В админку.
This commit is contained in:
parent
70f2f900eb
commit
b91a305ac0
18
adminion/sms.php
Normal file
18
adminion/sms.php
Normal file
@ -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);
|
21
sms.php
21
sms.php
@ -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>';
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user