remove notices

This commit is contained in:
lopar 2018-03-23 23:47:46 +02:00
parent a14a001e63
commit 1040d1a5b9
2 changed files with 40 additions and 35 deletions

View File

@ -2527,6 +2527,7 @@ function showpersout($pas = 0)
// echo "<TR><TD><IMG height=25 src=\"i/travma.gif\" width=40></TD><TD><SMALL>У персонажа $trt травма.</SMALL></TD></TR>";
// }
$dd = db::c()->query('SELECT `time`, `type` FROM `effects` WHERE `owner` = ?i', $user['id']);
$param_bonus = [];
array_fill_keys($param_bonus, 0);
while ($row = $dd->fetch_assoc()) {
if ($row['time'] < time()) {
@ -2549,13 +2550,13 @@ function showpersout($pas = 0)
<TD valign=top style='width:450px;'></TD>
Сила: <?=$user['sila']?>
<?php if ($param_bonus['sila']) echo " <b><font color=green>(+" . $param_bonus['sila'] . ")</font></b>"; ?><BR>
<?php if (isset($param_bonus['sila'])) echo " <b><font color=green>(+" . $param_bonus['sila'] . ")</font></b>"; ?><BR>
Ловкость: <?=$user['lovk']?>
<?php if ($param_bonus['lovk']) echo " <b><font color=green>(+" . $param_bonus['lovk'] . ")</font></b>"; ?><BR>
<?php if (isset($param_bonus['lovk'])) echo " <b><font color=green>(+" . $param_bonus['lovk'] . ")</font></b>"; ?><BR>
Интуиция: <?=$user['inta']?>
<?php if ($param_bonus['inta']) echo " <b><font color=green>(+" . $param_bonus['inta'] . ")</font></b>"; ?><BR>
<?php if (isset($param_bonus['inta'])) echo " <b><font color=green>(+" . $param_bonus['inta'] . ")</font></b>"; ?><BR>
Выносливость:<?=$user['vinos']?>
<?php if ($param_bonus['vinos']) echo " <b><font color=green>(+" . $param_bonus['vinos'] . ")</font></b>"; ?><BR>
<?php if (isset($param_bonus['vinos'])) echo " <b><font color=green>(+" . $param_bonus['vinos'] . ")</font></b>"; ?><BR>
Интеллект: <?=$user['intel']?><BR>
Мудрость: <?=$user['mudra']?><BR>

View File

@ -33,7 +33,7 @@ if (!isset($_SESSION['stackall'])) {
$_SESSION['stackall'] = true;
}
if ($_GET['stackall']) {
if (isset($_GET['stackall'])) {
$_SESSION['stackall'] = ($_SESSION['stackall'] ? false : true);
/*
$rec = mysql_query("SELECT `id` FROM `inventory` WHERE `owner` = '$user[id]' AND `setsale` = 0 AND `koll` >= 1 ORDER BY `id` DESC");
@ -47,7 +47,7 @@ if ($_GET['stackall']) {
*/
}
if ($_GET["stack"]) {
if (isset($_GET["stack"])) {
$_GET["stack"] = (int)$_GET["stack"];
$rec = mysql_fetch_array(mysql_query("SELECT `id` FROM `inventory` WHERE `id` = '" . mysql_real_escape_string($_GET['stack']) . "' AND `owner` = '$user[id]' AND `setsale` = 0 LIMIT 1"));
if (isset($rec['id'])) {
@ -56,7 +56,7 @@ if ($_GET["stack"]) {
}
}
if ($_GET['unstack']) {
if (isset($_GET['unstack'])) {
unstack((int)$_GET['unstack'], (int)$_POST["qty"]);
}
@ -79,13 +79,15 @@ if ($obraz && ($user['shadow'] == 'g0.gif' || $user['shadow'] == 'man0.gif')) {
setShadow($obraz);
}
if ($_GET['del'] == 1) {
if ($_GET['efid'] > 0) {
$pl = mysql_fetch_array(mysql_query('SELECT `id`, `type` FROM `effects` WHERE `owner` = "' . $user['id'] . '" AND `id` = "' . (int)$_GET['efid'] . '" LIMIT 1'));
if (isset($pl['id'])) {
del_efs($user['id'], $pl['id'], $pl['type']);
} else {
echo '<b style=\'color: Red;\'>Эффект не найден ...</b>';
if (isset($_GET['del'])) {
if ($_GET['del'] == 1) {
if ($_GET['efid'] > 0) {
$pl = mysql_fetch_array(mysql_query('SELECT `id`, `type` FROM `effects` WHERE `owner` = "' . $user['id'] . '" AND `id` = "' . (int)$_GET['efid'] . '" LIMIT 1'));
if (isset($pl['id'])) {
del_efs($user['id'], $pl['id'], $pl['type']);
} else {
echo '<b style=\'color: Red;\'>Эффект не найден ...</b>';
}
}
}
}
@ -199,7 +201,7 @@ function gone_rooms($room)
if (isset($_GET['got'])) gone_rooms($_GET['room']);
if ($_REQUEST['transreport']) {
if (isset($_REQUEST['transreport'])) {
?>
<HTML>
<HEAD>
@ -238,7 +240,7 @@ if ($_REQUEST['transreport']) {
die();
}
if ($_POST['setshadow']) {
if (isset($_POST['setshadow'])) {
?>
<HTML>
<HEAD>
@ -347,7 +349,7 @@ if ($_POST['setshadow']) {
die();
}
//
if ($_POST['setshadowclan']) {
if (isset($_POST['setshadowclan'])) {
?>
<HTML>
<HEAD>
@ -396,7 +398,7 @@ if ($_POST['setshadowclan']) {
die();
}
if ($_GET['setch']) {
if (isset($_GET['setch'])) {
$online = db::c()->query('SELECT * FROM `online` WHERE `real_time` >= ?i', (time() - 60));
while ($v = $online->fetch_assoc()) {
$or[$v['room']]++;
@ -1058,7 +1060,7 @@ if ($_GET['setch']) {
}
header("Cache-Control: no-cache");
if ($_GET['edit']) {
if (isset($_GET['edit'])) {
function ups($type, $stat, $statName)
{
@ -2603,24 +2605,26 @@ if (isset($eff['id']) && $_GET['got']) {
$_GET['got'] = 0;
}
if ($_GET['goto'] == 'plo') {
if ($user['zayavka'] == 0) {
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
die("
<script>
function cityg(){
location.href='city.php';
}
setTimeout('cityg', 5000);
</script>
<br><br><img style='display: block; margin: auto;' src='i/ajax-loader.gif'><br>
<i>Переходим на Центральную площадь...</i>
");
} else {
err('Подали заявку на бой и убегаете из клуба? Нехорошо...');
if (isset($_GET['goto'])) {
if ($_GET['goto'] == 'plo') {
if ($user['zayavka'] == 0) {
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
die("
<script>
function cityg(){
location.href='city.php';
}
setTimeout('cityg', 5000);
</script>
<br><br><img style='display: block; margin: auto;' src='i/ajax-loader.gif'><br>
<i>Переходим на Центральную площадь...</i>
");
} else {
err('Подали заявку на бой и убегаете из клуба? Нехорошо...');
}
}
}
if ($_GET['use']) {
if (isset($_GET['use'])) {
usemagic($_GET['use'], $_POST['target']);
}