diff --git a/admin/NewItem.php b/admin/NewItem.php new file mode 100644 index 0000000..98cd34e --- /dev/null +++ b/admin/NewItem.php @@ -0,0 +1,143 @@ + +
+ + * Project name: Battles-Game */ - session_start(); -//require_once '../functions.php'; -$user = new \Battles\User($_SESSION['uid']); +require_once '../functions.php'; + +use Battles\Bank; +use Battles\Database\DBPDO; +use Battles\Moderation; +use Battles\Nick; +use Battles\User; + +$user = $user ?? new User($_SESSION['uid']); if (!$user->admin) { header("HTTP/1.0 404 Not Found"); exit; } -$al = db::c()->query('SELECT * FROM `aligns` WHERE `align` = "?s" LIMIT 1', $user['align'])->fetch_assoc(); +if (isset($_GET['sleep'])) { + Moderation::muteChat($user->id, strtotime('15min')); +} -function statsat($nu) -{ /*in admin.php*/ - $stats = 0; - $master = 0; - $vinos = 0; - $money = 0; +if (isset($_POST['ldnick']) && isset($_POST['ldtext'])) { + Moderation::addToUserLog($_POST['ldnick'], $_POST['ldtext'], $user->id); +} - foreach (Config::$exptable as $k => $v) { - if ($k == $nu) { - break; +if (isset($_POST['syschatmsg'])) { + Moderation::addChatSysMsg($_POST['syschatmsg']); +} + +//clans to reg +$unregisteredClans = new class { + public $db; + + public function getList() + { + $row = $this->db->ofetchAll('SELECT * FROM clans WHERE status = 0'); + $i = 0; + while ($i < count($row)) { + $id = $row[$i]->owner_id; + $login = Nick::id($row[$i]->owner_id)->short(1); + $fullName = $row[$i]->full_name; + $shortName = $row[$i]->short_name; + $info = nl2br($row[$i]->info); + $i++; + echo <<