Thread: VIP status
View Single Post
  #1  
Old 20th August 2008, 13:51
kp380lv's Avatar
kp380lv kp380lv is offline
Senior Member
 
Join Date: May 2008
Latvia
Posts: 388
Thumbs up VIP status
Mod For YSE PRE 6

Add to cleanup.php after the lifting of warnings:

PHP Code:
/*Begin "Vip Status to..." by Yuna */
//remove vip statuses
    
$now sqlesc(get_date_time());
    
$modcomment sqlesc(date("Y-m-d") . " -     
VIP status expired by date.\n"
);
    
$msg sqlesc("Your VIP status expired. Automaticaly your status changed to the old (prior to installation VIP).\n");
    
$subject sqlesc("Your VIP status expired");
    
sql_query("INSERT INTO messages (sender, receiver, added, msg, subject, poster) SELECT 0, id, $now$msg$subject, 0 FROM users WHERE vipuntil < $now AND vipuntil <> '0000-00-00 00:00:00'") or sqlerr(__FILE__,__LINE__);
    
sql_query("UPDATE users SET class = oldclass, oldclass = 0, vipuntil = '0000-00-00 00:00:00', modcomment = CONCAT($modcomment, modcomment) WHERE vipuntil < $now AND vipuntil <> '0000-00-00 00:00:00'") or sqlerr(__FILE__,__LINE__);
/*End of "Vip Status to..." mod by Yuna */ 
Add to mybonus.php before

PHP Code:
default:
            
stdmsg($tracker_lang['error'], "Unknown bonus type!"); 
PHP Code:
/*Begin "Vip status to..." mod by Yuna */
case "vip":
            if (
get_user_class() >= UC_VIP) {
                
stdmsg($tracker_lang['error'], "That the bonuses you have nowhere devat'sja!?"'error');
                die();
            }
            
$days $arr["quanity"];
            
$vipuntil get_date_time(TIMENOW $days 86400);
            if (!
sql_query("UPDATE users SET bonus = bonus - $points, class = ".UC_VIP.", oldclass = ".$CURUSER["class"].", vipuntil = ".sqlesc($vipuntil)." WHERE id = ".sqlesc($CURUSER["id"]))) {
                
stdmsg($tracker_lang['error'], "I can not update the bonus!"'error');
                die();
            }
            
stdmsg($tracker_lang['success'], "Bonus bartered for VIP status.<br />Your status zakanchvaetsya: $vipuntil");
            break;

/*End "Vip status to..." mod by Yuna */ 
Add to your datbase this:

Code:
ALTER TABLE `users` ADD `vipuntil` datetime NOT NULL default '0000-00-00 00:00:00';
ALTER TABLE `users` ADD `oldclass` tinyint(3) NOT NULL default '0';

INSERT INTO `bonus` (`name`, `points`, `description`, `type`, `quanity`) VALUES ('VIP Status for 30 days', 500, 'With enough bonus points acquired, you are able to exchange them for an VIP Status for 30 days.  The points are then removed from your Bonus Bank and the status is set.', 'vip', '30');
Who should be: give 5 bucks and remade not only in the VIP until such a number in a fashion that simply someone to a certain number - for example moderator to 7 - August 2007 - the year of 10:02.

I believe that this is more useful than just users themselves can take over bonuses VIP ...
Well it will - and so you understand ...
Credit for creating this mod goes to: Yuna
Credit for translation: kp380lv


Last edited by johnake; 29th August 2008 at 14:54.
Reply With Quote
The Following User Says Thank You to kp380lv For This Useful Post:
wxlg1117 (4th September 2009)