Remove globals
This commit is contained in:
parent
be5779ff27
commit
3b4bbf3a6a
@ -583,6 +583,10 @@ class User
|
|||||||
|
|
||||||
private function __construct()
|
private function __construct()
|
||||||
{
|
{
|
||||||
|
if (empty($_SESSION['uid']) && empty($_COOKIE['login'])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$user = !empty($_SESSION['uid']) ? $_SESSION['uid'] : $_COOKIE['login'];
|
$user = !empty($_SESSION['uid']) ? $_SESSION['uid'] : $_COOKIE['login'];
|
||||||
$this->info = self::getInfo($user);
|
$this->info = self::getInfo($user);
|
||||||
unset($user);
|
unset($user);
|
||||||
@ -2000,7 +2004,7 @@ class User
|
|||||||
[$id]
|
[$id]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$r = '';
|
|
||||||
if (
|
if (
|
||||||
isset($inf['id']) &&
|
isset($inf['id']) &&
|
||||||
(
|
(
|
||||||
@ -5544,7 +5548,7 @@ FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`
|
|||||||
if (!isset($po['nodelete'])) {
|
if (!isset($po['nodelete'])) {
|
||||||
$is1 .= ' <a onClick="top.drop(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
|
$is1 .= ' <a onClick="top.drop(' . $pl['id'] . ',\'' . $pl['img'] . '\',\'' . $pl['name'] . '\',1,\'<table border=\\\'0\\\' width=\\\'100%\\\' cellspacing=\\\'0\\\' cellpadding=\\\'5\\\'><tr><td rowspan=2><img src=\\\'' . Config::img() . '/i/items/' . $pl['img'] . '\\\'></td><td align=\\\'left\\\'>Предмет <strong>' . $pl['name'] . '</strong> будет утерян, вы уверены ?</td></tr></table>\',\'' . intval(
|
||||||
$_GET['otdel']
|
$_GET['otdel']
|
||||||
) . '\'); return false;" href="javascript:void(0);" title="Выкинуть предмет"><img src="' . Config::img() . '/i/clear.gif"></a>';
|
) . ' . Config::img() . ' / i / clear . gif"></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -953,7 +953,7 @@ from items_users left join items_main on items_main.id = item_id where inOdet !=
|
|||||||
|
|
||||||
//Бонусы комплектов
|
//Бонусы комплектов
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if (is_array($coms['new'])) {
|
if (!empty($coms['new']) && is_array($coms['new'])) {
|
||||||
while ($i <= count($coms['new'])) {
|
while ($i <= count($coms['new'])) {
|
||||||
if (isset($coms['new'][$i])) {
|
if (isset($coms['new'][$i])) {
|
||||||
//$coms[$i]['id'] - id комплекта, $j - кол-во предметов данного комплекта
|
//$coms[$i]['id'] - id комплекта, $j - кол-во предметов данного комплекта
|
||||||
|
1
main.php
1
main.php
@ -429,7 +429,6 @@ elem.parentNode.removeChild(elem);
|
|||||||
</script>";
|
</script>";
|
||||||
if ($u->info['dnow'] > 0) {
|
if ($u->info['dnow'] > 0) {
|
||||||
$d = new Dungeon;
|
$d = new Dungeon;
|
||||||
$d->start();
|
|
||||||
}
|
}
|
||||||
require_once('modules_data/_dialog.php');
|
require_once('modules_data/_dialog.php');
|
||||||
} elseif (isset($_GET['inv']) && !isset($u->tfer['id']) && $trololo == 1) {
|
} elseif (isset($_GET['inv']) && !isset($u->tfer['id']) && $trololo == 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user