From b91a305ac078b69ae4120f3f72412bd8ecef3e03 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Mon, 29 Apr 2024 13:22:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=20=D0=B0=D0=B4=D0=BC=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adminion/sms.php | 18 ++++++++++++++++++ spam.php => adminion/spam.php | 0 sms.php | 21 --------------------- 3 files changed, 18 insertions(+), 21 deletions(-) create mode 100644 adminion/sms.php rename spam.php => adminion/spam.php (100%) delete mode 100644 sms.php diff --git a/adminion/sms.php b/adminion/sms.php new file mode 100644 index 00000000..2c35a29e --- /dev/null +++ b/adminion/sms.php @@ -0,0 +1,18 @@ + 0 and banned = 0 and bot = 0 order by id desc'); +$tbl = [['Логин', 'Стоимость вещей кр', 'Стоимость вещей екр', 'Всего кр с учётом вещей', 'Всего екр с учётом вещей']]; +foreach ($users as $user) { + $itemsprices = Db::getRow('select sum(`1price`) as sumkr, sum(`2price`) as sumekr from items_users where uid = ?', [$user['id']]); + $allkr = $user['money'] + $itemsprices['sumkr']; + $allekr = $user['money2'] + $itemsprices['sumekr']; + $tbl[] = [User::getLogin($user['id']), $itemsprices['sumkr'] ?? 0, $itemsprices['sumekr'] ?? 0, $allkr, $allekr]; +} +echo Table::get($tbl); diff --git a/spam.php b/adminion/spam.php similarity index 100% rename from spam.php rename to adminion/spam.php diff --git a/sms.php b/sms.php deleted file mode 100644 index d2a83b70..00000000 --- a/sms.php +++ /dev/null @@ -1,21 +0,0 @@ - 0 AND `banned` = 0 ORDER BY `id` DESC'); - while ($pl = mysql_fetch_array($sp)) { - $prc = mysql_fetch_array( - mysql_query( - 'SELECT SUM(`2price`) AS `a` , SUM(`1price`) AS `b` FROM `items_users` WHERE `uid` = "' . $pl['id'] . '" AND `delete` < `time_create` LIMIT 1' - ) - ); - if ($prc['a'] > 0) { - echo User::getLogin($pl['id']) . - '   - - - - - - - - ' . ($prc['a']) . ' (вещи) + ' . $pl['money2'] . ' ЕКР \ ' . ($prc['b'] + $pl['money1']) . ' КР
'; - echo '
'; - } - } -}