2016-01-10 11:01:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class main_account_setQuitCountdown {
|
|
|
|
|
2024-12-31 00:25:05 +01:00
|
|
|
public function __construct($lib) {
|
2016-01-10 11:01:49 +01:00
|
|
|
$this->lib = $lib;
|
|
|
|
$this->db = $this->lib->game->db;
|
|
|
|
}
|
|
|
|
|
|
|
|
function run($uid, $reason) {
|
|
|
|
$reason = trim(preg_replace('/\s+/', ' ', $reason));
|
|
|
|
if ($reason == '') {
|
|
|
|
$rqs = "";
|
|
|
|
} else {
|
|
|
|
$rqs = ",reason='" . addslashes($reason) . "'";
|
|
|
|
}
|
|
|
|
$this->db->query("UPDATE account SET quit_ts=UNIX_TIMESTAMP(NOW())$rqs WHERE id=$uid AND status='STD'");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|