This commit is contained in:
lopar 2018-03-02 23:03:59 +02:00
parent c7b95f8a85
commit d594634fb0
2 changed files with 4 additions and 5 deletions

View File

@ -22,7 +22,6 @@ $chat = db::c()->query('SELECT `msg`, `msgdate`, (SELECT `login` FROM `users` WH
while ($message = $chat->fetch_assoc()) {
$d = new DateTime($message['msgdate']);
$m = htmlspecialchars($message['msg']);
// echo $d->format('H:i').": " . $m."<br>";
echo sprintf('%s [%s]: %s', $d->format('H:i'),$message['from'],$m)." <br>";
}

View File

@ -240,15 +240,15 @@ if (isset($_GET['modif_mf'])) {
}
}
$d = mysql_fetch_array(mysql_query("SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0"));
$d = db::c()->query('SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0', $user['id'])->fetch_assoc();
if ($d['summ'] > get_meshok() && $_GET['got']) {
echo "<font color=red><b>У вас переполнен рюкзак, вы не можете передвигаться...</b></font>";
err('У вас переполнен рюкзак, вы не можете передвигаться...');
$_GET['got'] = 0;
}
$eff = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '" . $user['id'] . "' AND (`type` = 14 OR `type` = 13) LIMIT 1"));
$eff = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND (`type` = 14 OR `type` = 13) LIMIT 1', $user['id'])->fetch_assoc();
if (isset($eff['id']) && $_GET['got']) {
echo "<font color=red><b>У вас тяжелая травма, вы не можете передвигатся...</b></font>";
err('У вас тяжелая травма, вы не можете передвигатся...');
$_GET['got'] = 0;
}