When a user is warned and the warned time is over
the system does not remove the warning automatic
go to /include/libs/cron/cron_class.php
and find
PHP Code:
public function deadtime()
{
above add
PHP Code:
//remove expired warnings
$res = mysql_query("SELECT id FROM users WHERE warned='yes' AND warneduntil < NOW() AND warneduntil <> '0000-00-00 00:00:00'") or sqlerr(__FILE__, __LINE__);
if (mysql_num_rows($res) > 0)
{
$dt = sqlesc(get_date_time());
$msg = sqlesc("Your warning has been removed. Please keep in your best behaviour from now on.\n");
while ($arr = mysql_fetch_assoc($res))
{
mysql_query("UPDATE users SET warned = 'no', warneduntil = '0000-00-00 00:00:00' WHERE id = $arr[id]") or sqlerr(__FILE__, __LINE__);
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id], $dt, $msg, 0)") or sqlerr(__FILE__, __LINE__);
}
}
//end remove expired warnings
grtzz Edgein