change this in cleanup
to
[/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)");
}
}
to
//=== Remove donor status if time up and set class to power user ===//
$res = SQL_Query_exec("SELECT id, modcomment,class 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);
if ($arr["class"]<=3) // Change this to your vip class if well diferent...
SQL_Query_exec("UPDATE users SET class = '2', donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");
else
SQL_Query_exec("UPDATE users SET 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)");
}
}
[/code]
