Чистка устаревшего.
This commit is contained in:
parent
7ecaf3ae7e
commit
a5ca490d92
@ -1389,17 +1389,16 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<TABLE cellspacing=0 cellpadding=0>
|
<table class="allzeroes">
|
||||||
<tr>
|
<tr>
|
||||||
<TD colspan=3 width=100%>
|
<TD colspan=3>
|
||||||
<?= setHP($user['hp'], $user['maxhp']) ?>
|
<?= setHP($user['hp'], $user['maxhp']) ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?php if (($user['level'] > 3) && !$pas): ?>
|
||||||
if (($user['level'] > 3) && !$pas) { ?>
|
|
||||||
<TR>
|
<TR>
|
||||||
<TD colspan=3>
|
<TD colspan=3>
|
||||||
<?
|
<?php
|
||||||
echoscroll('m1');
|
echoscroll('m1');
|
||||||
echoscroll('m2');
|
echoscroll('m2');
|
||||||
echoscroll('m3');
|
echoscroll('m3');
|
||||||
@ -1410,7 +1409,7 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
|||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD colspan=3>
|
<TD colspan=3>
|
||||||
<?
|
<?php
|
||||||
echoscroll('m6');
|
echoscroll('m6');
|
||||||
echoscroll('m7');
|
echoscroll('m7');
|
||||||
echoscroll('m8');
|
echoscroll('m8');
|
||||||
@ -1419,11 +1418,10 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
|||||||
?>
|
?>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
<?
|
<? endif; ?>
|
||||||
} ?>
|
|
||||||
<TR>
|
<TR>
|
||||||
<TD width=62 valign=top>
|
<TD style="width: 62px;">
|
||||||
<TABLE width=100% cellspacing=0 cellpadding=0>
|
<TABLE class="allzeroes">
|
||||||
<TR>
|
<TR>
|
||||||
<TD><?php
|
<TD><?php
|
||||||
if ($user['sergi'] > 0) {
|
if ($user['sergi'] > 0) {
|
||||||
@ -1503,7 +1501,7 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
|||||||
</TR>
|
</TR>
|
||||||
<TR>
|
<TR>
|
||||||
<TD>
|
<TD>
|
||||||
<TABLE cellspacing=0 cellpadding=0>
|
<TABLE class="allzeroes">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php
|
<td><?php
|
||||||
if ($user['r1'] > 0) {
|
if ($user['r1'] > 0) {
|
||||||
@ -1548,10 +1546,10 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
|||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
</TD>
|
</TD>
|
||||||
<TD valign=top><img src="i/shadow/<?= $user['shadow'] ?>" width=76 height=209 alt="<?= $user['login'] ?>">
|
<TD><img src="i/shadow/<?= $user['shadow'] ?>" width=76 height=209 alt="<?= $user['login'] ?>">
|
||||||
</TD>
|
</TD>
|
||||||
<TD width=62 valign=top>
|
<TD style="width: 62px;">
|
||||||
<TABLE width=100% cellspacing=0 cellpadding=0>
|
<TABLE class="allzeroes">
|
||||||
<TR>
|
<TR>
|
||||||
<TD><?php
|
<TD><?php
|
||||||
if ($user['helm'] > 0) {
|
if ($user['helm'] > 0) {
|
||||||
@ -1613,8 +1611,8 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
|||||||
</TABLE>
|
</TABLE>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</table>
|
||||||
<TABLE cellPadding=0 cellSpacing=0 width="100%">
|
<TABLE class="allzeroes">
|
||||||
<TBODY>
|
<TBODY>
|
||||||
<?
|
<?
|
||||||
if (!$pas) {
|
if (!$pas) {
|
||||||
@ -1734,27 +1732,6 @@ function plusorminus($n, $shownum = 1)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showitem2()
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Проверяем одевается ли предмет
|
|
||||||
*/
|
|
||||||
function isWereable()
|
|
||||||
{
|
|
||||||
if (
|
|
||||||
(empty($row['nsila']) OR $user['sila'] >= $row['nsila']) AND
|
|
||||||
(empty($row['nlovk']) OR $user['lovk'] >= $row['nlovk']) AND
|
|
||||||
(empty($row['ninta']) OR $user['inta'] >= $row['ninta']) AND
|
|
||||||
(empty($row['nvinos']) OR $user['vinos'] >= $row['nvinos']) AND
|
|
||||||
(empty($row['nintel']) OR $user['intel'] >= $row['nintel']) AND
|
|
||||||
(empty($row['nmudra']) OR $user['mudra'] >= $row['nmudra']) AND
|
|
||||||
(empty($row['nlevel']) OR $user['level'] >= $row['nlevel']) AND
|
|
||||||
(empty($row['nalign']) OR $user['align'] >= $row['nalign'])
|
|
||||||
) return true; else return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function undressall($id)
|
function undressall($id)
|
||||||
{
|
{
|
||||||
for ($i = 1; $i <= 26; $i++) {
|
for ($i = 1; $i <= 26; $i++) {
|
||||||
@ -1764,7 +1741,6 @@ function undressall($id)
|
|||||||
|
|
||||||
function dropitemid($slot, $id)
|
function dropitemid($slot, $id)
|
||||||
{
|
{
|
||||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $id . '" LIMIT 1'));
|
|
||||||
switch ($slot) {
|
switch ($slot) {
|
||||||
case 1:
|
case 1:
|
||||||
$slot1 = 'sergi';
|
$slot1 = 'sergi';
|
||||||
@ -1839,14 +1815,14 @@ function dropitemid($slot, $id)
|
|||||||
$slot1 = '';
|
$slot1 = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
$checkid = db::c()->query('SELECT 1 FROM `users` WHERE `id` = ?i', $id);
|
||||||
if (mysql_query('UPDATE `users`, `inventory` SET `users`.`' . $slot1 . '` = 0, `inventory`.`dressed` = 0, `users`.`sila` = `users`.`sila` - `inventory`.`gsila`, `users`.`lovk` = `users`.`lovk` - `inventory`.`glovk`, `users`.`inta` = `users`.`inta` - `inventory`.`ginta`, `users`.`intel` = `users`.`intel` - `inventory`.`gintel`, `users`.`maxhp` = `users`.`maxhp` - `inventory`.`ghp`, `users`.`noj` = `users`.`noj` - `inventory`.`gnoj`, `users`.`topor` = `users`.`topor` - `inventory`.`gtopor`, `users`.`dubina` = `users`.`dubina` - `inventory`.`gdubina`, `users`.`mec` = `users`.`mec` - `inventory`.`gmech`, `users`.`mfire` = `users`.`mfire` - `inventory`.`gfire`, `users`.`mwater` = `users`.`mwater` - `inventory`.`gwater`, `users`.`mair` = `users`.`mair` - `inventory`.`gair`, `users`.`mearth` = `users`.`mearth` - `inventory`.`gearth`, `users`.`mlight` = `users`.`mlight` - `inventory`.`glight`, `users`.`mgray` = `users`.`mgray` - `inventory`.`ggray`, `users`.`mdark` = `users`.`mdark` - `inventory`.`gdark`, `users`.`fkrit` = `users`.`fkrit` - `inventory`.`mfkrit`, `users`.`fakrit` = `users`.`fakrit` - `inventory`.`mfakrit`, `users`.`fuvorot` = `users`.`fuvorot` - `inventory`.`mfuvorot`, `users`.`fauvorot` = `users`.`fauvorot` - `inventory`.`mfauvorot`, `users`.`ubron1` = `users`.`ubron1` - `inventory`.`bron1`, `users`.`ubron2` = `users`.`ubron2` - `inventory`.`bron2`, `users`.`ubron3` = `users`.`ubron3` - `inventory`.`bron3`, `users`.`ubron4` = `users`.`ubron4` - `inventory`.`bron4`, `users`.`uminu` = `users`.`uminu` - `inventory`.`minu`, `users`.`umaxu` = `users`.`umaxu` - `inventory`.`maxu` WHERE `inventory`.`id` = `users`.`' . $slot1 . '` AND `inventory`.`dressed` = 1 AND `inventory`.`owner` = "' . $user['id'] . '" AND `users`.`id` = "' . $user['id'] . '"')) {
|
if ($checkid->getNumRows()) {
|
||||||
mysql_query("UPDATE `users` SET `hp` = `maxhp`, `fullhptime` = " . time() . " WHERE `hp` > `maxhp` AND `id` = '{$id}' LIMIT 1");
|
if (mysql_query('UPDATE `users`, `inventory` SET `users`.`' . $slot1 . '` = 0, `inventory`.`dressed` = 0, `users`.`sila` = `users`.`sila` - `inventory`.`gsila`, `users`.`lovk` = `users`.`lovk` - `inventory`.`glovk`, `users`.`inta` = `users`.`inta` - `inventory`.`ginta`, `users`.`intel` = `users`.`intel` - `inventory`.`gintel`, `users`.`maxhp` = `users`.`maxhp` - `inventory`.`ghp`, `users`.`noj` = `users`.`noj` - `inventory`.`gnoj`, `users`.`topor` = `users`.`topor` - `inventory`.`gtopor`, `users`.`dubina` = `users`.`dubina` - `inventory`.`gdubina`, `users`.`mec` = `users`.`mec` - `inventory`.`gmech`, `users`.`mfire` = `users`.`mfire` - `inventory`.`gfire`, `users`.`mwater` = `users`.`mwater` - `inventory`.`gwater`, `users`.`mair` = `users`.`mair` - `inventory`.`gair`, `users`.`mearth` = `users`.`mearth` - `inventory`.`gearth`, `users`.`mlight` = `users`.`mlight` - `inventory`.`glight`, `users`.`mgray` = `users`.`mgray` - `inventory`.`ggray`, `users`.`mdark` = `users`.`mdark` - `inventory`.`gdark`, `users`.`fkrit` = `users`.`fkrit` - `inventory`.`mfkrit`, `users`.`fakrit` = `users`.`fakrit` - `inventory`.`mfakrit`, `users`.`fuvorot` = `users`.`fuvorot` - `inventory`.`mfuvorot`, `users`.`fauvorot` = `users`.`fauvorot` - `inventory`.`mfauvorot`, `users`.`ubron1` = `users`.`ubron1` - `inventory`.`bron1`, `users`.`ubron2` = `users`.`ubron2` - `inventory`.`bron2`, `users`.`ubron3` = `users`.`ubron3` - `inventory`.`bron3`, `users`.`ubron4` = `users`.`ubron4` - `inventory`.`bron4`, `users`.`uminu` = `users`.`uminu` - `inventory`.`minu`, `users`.`umaxu` = `users`.`umaxu` - `inventory`.`maxu` WHERE `inventory`.`id` = `users`.`' . $slot1 . '` AND `inventory`.`dressed` = 1 AND `inventory`.`owner` = "' . $id . '" AND `users`.`id` = "' . $id . '"')) {
|
||||||
if ($id == $user['id']) {
|
db::c()->query('UPDATE `users` SET `hp` = `maxhp`, `fullhptime` = ?i WHERE `hp` > `maxhp` AND `id` = ?i', time(), $id);
|
||||||
$user[$slot1] = 0;
|
$user[$slot1] = 0;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
} else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// снять предмет
|
// снять предмет
|
||||||
@ -2507,6 +2483,7 @@ function deltravma($id)
|
|||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @param $text
|
* @param $text
|
||||||
|
*
|
||||||
* @throws \Krugozor\Database\Mysql\Exception
|
* @throws \Krugozor\Database\Mysql\Exception
|
||||||
*/
|
*/
|
||||||
function telegraph($userId, $text)
|
function telegraph($userId, $text)
|
||||||
@ -2670,7 +2647,6 @@ function addToDelo($message, $user_id = 0, $type = 1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Апаем стат или мастерство на единицу.
|
* Апаем стат или мастерство на единицу.
|
||||||
*
|
*
|
||||||
|
72
main.php
72
main.php
@ -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
|
* Отображение персонажа в main.php
|
||||||
*
|
*
|
||||||
@ -651,10 +681,11 @@ if (isset($_GET['modif_mf'])) {
|
|||||||
|
|
||||||
if (input::post('setshadow')) {
|
if (input::post('setshadow')) {
|
||||||
?>
|
?>
|
||||||
<html>
|
<html lang="ru">
|
||||||
<head>
|
<head>
|
||||||
<link rel=stylesheet href="css/main.css">
|
<link rel=stylesheet href="css/main.css">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<title></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<table width=100%>
|
<table width=100%>
|
||||||
@ -1350,9 +1381,8 @@ if (input::get('edit')) {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<HTML>
|
<HTML lang="ru">
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<link rel="stylesheet" href="css/main.css">
|
<link rel="stylesheet" href="css/main.css">
|
||||||
<link rel="stylesheet" href="css/btn.css">
|
<link rel="stylesheet" href="css/btn.css">
|
||||||
@ -1424,42 +1454,10 @@ if (input::get('edit')) {
|
|||||||
TimerOn = tkHP < maxHP ? setTimeout("setHPlocal()", delay * 100) : -1
|
TimerOn = tkHP < maxHP ? setTimeout("setHPlocal()", delay * 100) : -1
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<title></title>
|
||||||
</HEAD>
|
</HEAD>
|
||||||
<body onLoad="<?= topsethp(); ?>">
|
<body onLoad="<?= topsethp(); ?>">
|
||||||
<?php
|
<?php $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time() - 60)); ?>
|
||||||
|
|
||||||
// Входим и выходим если можем.
|
|
||||||
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));
|
|
||||||
|
|
||||||
?>
|
|
||||||
<div id=hint3 class=ahint></div>
|
<div id=hint3 class=ahint></div>
|
||||||
<table class="allzeroes">
|
<table class="allzeroes">
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user