Большая чистка.

This commit is contained in:
2023-06-23 17:44:24 +03:00
parent 802f0a2ad0
commit adc1f81007
2037 changed files with 270 additions and 11416 deletions
+10 -21
View File
@@ -1,9 +1,11 @@
<?php
use Core\Db;
if (!defined('GAME')) {
die();
}
$re = '';
if (isset($u->error2)) {
$re = $u->error2;
@@ -107,32 +109,21 @@ if (isset($_GET['nightatack'])) {
function thisInfRm($id, $tp = null, $json = false)
{
global $u;
$rm = mysql_fetch_array(
mysql_query(
'SELECT * FROM `room` WHERE `code` = "' . mysql_real_escape_string(
$id
) . '" AND `city` = "' . $u->info['city'] . '" LIMIT 1'
)
);
$rm = Db::getRow('select * from room where code = ? and city = ?', [$id, $u->info['city']]);
$inf = 'Здание было разрушено';
if (isset($rm['id'])) {
$rown = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `users` WHERE `online` > ' . (time(
) - 120) . ' AND `city` = "' . $u->info['city'] . '" AND `room` = "' . $rm['id'] . '"'
)
);
$rown = Db::getValue('select count(*) from users where online > unix_timestamp() - 120 and city = ? and room = ?', [$u->info['city'], $rm['id']]);
if ($tp == null) {
$inf = '<b>' . $rm['name'] . '</b><br>Сейчас в комнате ' . (0 + $rown[0]) . ' чел.';
$inf = '<b>' . $rm['name'] . '</b><br>Сейчас в комнате ' . ($rown) . ' чел.';
} else {
$inf = $rm['name'] . "\nСейчас в комнате " . (0 + $rown[0]) . ' чел.';
$inf = $rm['name'] . "\nСейчас в комнате " . ($rown) . ' чел.';
}
if ($json) {
return [$rm['code'], $rm['name'], (0 + $rown[0])];
return [$rm['code'], $rm['name'], ($rown)];
}
}
if ($json) {
return ['false', $inf, (0 + $rown[0])];
return ['false', $inf, ($rown)];
}
if ($tp == null) {
echo 'onMouseOver="top.hi(this,\'<div align=right>' . $inf . '</div>\',event,0,1,1,1,\'max-height:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" onClick="goLocal(\'main.php?loc=' . $rm['code'] . '\',\'' . $rm['name'] . '\');"';
@@ -188,9 +179,7 @@ if (isset($_GET['loc'])) {
if (isset($tr_pl['id'])) {
$zadej = 0;
if ($tr_pl['v1'] == 1) {
//все ок
} elseif ($tr_pl['v1'] == 2) {
if ($tr_pl['v1'] == 2) {
if ($kos1['good'] == 0 && $kos2['good'] == 0) {
$re = 'Вы травмированы. Не возможно с такими увечиями передвигаться без костылей.';
$zadej = -1;