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 @@ +<?php + +use Core\Db; +use Helper\Table; + +if (!defined('GAME_VERSION')) { + require_once '_incl_data/autoload.php'; +} + +$users = Db::getRows('select users.id, money, money2 from users inner join stats on users.id = stats.id where `real` > 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 @@ -<?php -const GAME = true; -include('_incl_data/__config.php'); -include('_incl_data/class/__db_connect.php'); -$u = User::start(); - -if (isset($_GET['test'])) { - $sp = mysql_query('SELECT * FROM `users` WHERE `real` > 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']) . - ' - - - - - - - - <b>' . ($prc['a']) . ' (вещи) + ' . $pl['money2'] . ' ЕКР</b> \ <b>' . ($prc['b'] + $pl['money1']) . ' КР</b><br>'; - echo '<hr>'; - } - } -}