... reading hard..
Cleanup code to remove the donor status once it expires.
in bottom of cleanup.php before
donor star an little harder depends on what you using to display icons like vip, warned and what not aka using the function some made called class_user
Edit: the class_user function from https://www.torrenttrader.org/topic/17452-class-colors-function-for-208/ is easy to modify to show if donor..
replace
with
then replace
with
[/code]
Cleanup code to remove the donor status once it expires.
in bottom of cleanup.php before
//OPTIMIZE TABLES
add this code:
//=== Remove donor status if time up and set class to power user ===//
$res = SQL_Query_exec("SELECT id, modcomment FROM users WHERE donor='yes' AND donoruntil < NOW() AND donoruntil <> '0000-00-00 00:00:00'");
if (mysql_num_rows($res) > 0) {
$dt = sqlesc(get_date_time());
$subject = sqlesc("VIP status removed by System.");
$msg = sqlesc("Your VIP status has timed out and has been auto-removed by the System. We would like to thank you once again for supporting " . $site_config['SITENAME'] . ". If you wish to re-new your VIP, you can do so by clicking [url=".%20%24site_config%5B"] . "/donate.php]HERE[/url]. Cheers!n");
while ($arr = mysql_fetch_assoc($res)) {
///--- Autosystem modcomment ---//
$modcomment = htmlspecialchars($arr["modcomment"]);
$modcomment = gmdate("Y-m-d H:i") . " - VIP status removed by System.n" . $modcomment;
$modcom = sqlesc($modcomment);
SQL_Query_exec("UPDATE users SET class = '2', donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject, poster) VALUES(0, $arr[id], $dt, $msg, $subject, 0)");
}
}donor star an little harder depends on what you using to display icons like vip, warned and what not aka using the function some made called class_user
Edit: the class_user function from https://www.torrenttrader.org/topic/17452-class-colors-function-for-208/ is easy to modify to show if donor..
replace
$a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";with
$a ="SELECT class, donor, warned, enabled FROM `users` WHERE username ='".$name."'";then replace
}if($classy[1]>0){with
}if($classy[1]=="yes"){[/code]

