2016-01-10 11:01:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class main_account_requestKick {
|
|
|
|
|
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($admin, $account, $reason) {
|
|
|
|
$q = $this->db->query("SELECT * FROM adm_kick WHERE to_kick=$account AND status<>'N'");
|
|
|
|
if (!$q || dbCount($q)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
$id = $this->db->query("INSERT INTO adm_kick (to_kick,requested_by,requested_at,reason) "
|
|
|
|
. "VALUES ($account,$admin," . time() . ",'" . addslashes($reason) . "')");
|
|
|
|
|
|
|
|
return !!$id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|