Чистка устаревшего.

This commit is contained in:
Igor Barkov (iwork)
2019-09-17 17:37:44 +03:00
parent 7ecaf3ae7e
commit a5ca490d92
2 changed files with 61 additions and 87 deletions

View File

@@ -280,6 +280,36 @@ function dressitem($id)
}
}
// Входим и выходим если можем.
if (isset($_GET['goto'])) {
$imove = true;
$d = db::c()->query('SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0', $user['id'])->fetch_assoc();
$eff = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND (`type` = 14 OR `type` = 13) LIMIT 1', $user['id'])->fetch_assoc();
if ($d['summ'] > get_meshok() && $_GET['got']) {
err('У вас переполнен рюкзак, вы не можете передвигаться...');
$imove = false;
}
if (isset($eff['id']) && $_GET['got']) {
err('У вас тяжелая травма, вы не можете передвигатся...');
$imove = false;
}
if ($_GET['goto'] == 'plo' AND !empty($user['zayavka']) AND $imove === true) {
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
header('Location: city.php');
die("<i>Топ-топ-топ...</i>");
} else err('Подали заявку на бой и убегаете из клуба? Нехорошо...');
if ($_GET['goto'] == 'arena' AND $user['room'] === 20 AND $imove === true) {
db::c()->query('UPDATE `users`, `online` SET `users`.`room` = 1, `online`.`room` = 1 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
header('Location: main.php');
die("<i>Топ-топ-топ...</i>");
}
}
if (isset($_GET['use'])) {
usemagic($_GET['use'], $_POST['target']);
}
/**
* Отображение персонажа в main.php
*
@@ -651,10 +681,11 @@ if (isset($_GET['modif_mf'])) {
if (input::post('setshadow')) {
?>
<html>
<html lang="ru">
<head>
<link rel=stylesheet href="css/main.css">
<meta charset="utf-8">
<title></title>
</head>
<body>
<table width=100%>
@@ -1350,9 +1381,8 @@ if (input::get('edit')) {
die();
}
?>
<HTML>
<HTML lang="ru">
<HEAD>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/btn.css">
@@ -1424,42 +1454,10 @@ if (input::get('edit')) {
TimerOn = tkHP < maxHP ? setTimeout("setHPlocal()", delay * 100) : -1
}
</script>
<title></title>
</HEAD>
<body onLoad="<?= topsethp(); ?>">
<?php
// Входим и выходим если можем.
if (isset($_GET['goto'])) {
$imove = true;
$d = db::c()->query('SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0', $user['id'])->fetch_assoc();
$eff = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND (`type` = 14 OR `type` = 13) LIMIT 1', $user['id'])->fetch_assoc();
if ($d['summ'] > get_meshok() && $_GET['got']) {
err('У вас переполнен рюкзак, вы не можете передвигаться...');
$imove = false;
}
if (isset($eff['id']) && $_GET['got']) {
err('У вас тяжелая травма, вы не можете передвигатся...');
$imove = false;
}
if ($_GET['goto'] == 'plo' AND !empty($user['zayavka']) AND $imove === true) {
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
header('Location: city.php');
die("<i>Топ-топ-топ...</i>");
} else err('Подали заявку на бой и убегаете из клуба? Нехорошо...');
if ($_GET['goto'] == 'arena' AND $user['room'] === 20 AND $imove === true) {
db::c()->query('UPDATE `users`, `online` SET `users`.`room` = 1, `online`.`room` = 1 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
header('Location: main.php');
die("<i>Топ-топ-топ...</i>");
}
}
if (isset($_GET['use'])) {
usemagic($_GET['use'], $_POST['target']);
}
$online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time() - 60));
?>
<?php $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time() - 60)); ?>
<div id=hint3 class=ahint></div>
<table class="allzeroes">
<tr>