Убираем deprecated, пробуем подвязать к User.php
This commit is contained in:
parent
004042b60a
commit
1f1b59f980
@ -26,9 +26,9 @@ class User
|
||||
public $block;
|
||||
public $shadow;
|
||||
// Пока несуществующие, для совместимости.
|
||||
public $married;
|
||||
public $experience;
|
||||
public $stat_points;
|
||||
public $married ='Someone или нет.';
|
||||
public $experience=200;
|
||||
public $stat_points =1;
|
||||
//Статусы того, кто смотрит на информацию.
|
||||
public $watcher_id;
|
||||
protected $watcherIsAdmin;
|
||||
@ -46,7 +46,14 @@ class User
|
||||
}
|
||||
}
|
||||
|
||||
private function UserInfoDoll($isBattle = 0)
|
||||
/**
|
||||
* Отображает куклу персонажа (образ и слоты).
|
||||
* @param int $isBattle - установить 1, если куклу нужно отобразить в поединке (показывает параметры при наведении на образ).
|
||||
* @param int $isMain - установить 1, если куклу надо показать на странице игрока (по клику на предмет снимает его).
|
||||
*
|
||||
* @throws \Krugozor\Database\Mysql\Exception
|
||||
*/
|
||||
private function UserInfoDoll($isBattle = 0, $isMain = 0)
|
||||
{
|
||||
//https://jsfiddle.net/ngx0yvhc
|
||||
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
|
||||
@ -56,8 +63,13 @@ class User
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
echo sprintf('<div class="slot-%s">', $i);
|
||||
if (isset($dressed_item[$i])) {
|
||||
if (!$isBattle && $isMain) {
|
||||
$itemString = '<a href="?edit=1&drop=%s"><img src="/i/sh/%s" class="item-wrap-normal" alt="%s" title="%s"></a>';
|
||||
echo sprintf($itemString, $i, $dressed_item[$i]['image'], $dressed_item[$i]['name'], $dressed_item[$i]['name']);
|
||||
} else {
|
||||
$itemString = '<img src="/i/sh/%s" class="item-wrap-normal tip" alt="%s"><span class="tiptext"><strong>%s</strong></span>';
|
||||
echo sprintf($itemString, $dressed_item[$i]['image'], $dressed_item[$i]['name'], $dressed_item[$i]['name']);
|
||||
}
|
||||
} else {
|
||||
echo sprintf('<img src="/i/sh/noitem.png" class="item-wrap-normal" title="Пустой слот [%s]" alt="Пустой слот [%s]">', $i, $i);
|
||||
}
|
||||
@ -233,10 +245,10 @@ class User
|
||||
}
|
||||
}
|
||||
|
||||
public function showUserDoll($isBattle = 0)
|
||||
public function showUserDoll($isBattle = 0, $isMain = 0)
|
||||
{
|
||||
echo '<div class="user-info-container">';
|
||||
$this->UserInfoDoll($isBattle);
|
||||
$this->UserInfoDoll($isBattle, $isMain);
|
||||
echo '</div><!-- user-info-container -->';
|
||||
}
|
||||
|
||||
|
377
main.php
377
main.php
@ -198,42 +198,42 @@ function sum_mf($u)
|
||||
{
|
||||
try {
|
||||
$sum = db::c()->query('SELECT SUM(`add_proc_mf`) AS `mf` FROM `inventory` WHERE `dressed` = 1 AND `add_proc_mf` > 0 AND `owner` = ?i', $u);
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||
}
|
||||
if ($sum->fetch_assoc() > 0) {
|
||||
return $sum;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||
}
|
||||
}
|
||||
|
||||
function sum_dmg($u)
|
||||
{
|
||||
try {
|
||||
$sum = db::c()->query('SELECT SUM(`add_proc_uron`) AS `mf` FROM `inventory` WHERE `dressed` = 1 AND `add_proc_uron` > 0 AND `owner` = ?i', $u);
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||
}
|
||||
if ($sum->fetch_assoc() > 0) {
|
||||
return $sum;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||
}
|
||||
}
|
||||
|
||||
function sum_bron($u)
|
||||
{
|
||||
try {
|
||||
$sum = db::c()->query('SELECT SUM(`add_proc_bron`) AS `mf` FROM `inventory` WHERE `dressed` = 1 AND `add_proc_bron` > 0 AND `owner` = ?i', $u);
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||
}
|
||||
if ($sum->fetch_assoc() > 0) {
|
||||
return $sum;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} catch (\Krugozor\Database\Mysql\Exception $e) {
|
||||
echo "<div style='background-color: #ffaaaa;'>Ошибка: " . $e->getMessage() . "<br> В файле: " . $e->getFile() . " (" . $e->getLine() . ")</div>";
|
||||
}
|
||||
}
|
||||
|
||||
function bron_ads($a1, $a2, $a3, $a4, $col)
|
||||
@ -329,22 +329,23 @@ function countmf()
|
||||
function GetWeaponType($idwep)
|
||||
{
|
||||
if ($idwep == 0 || $idwep == null || $idwep == '') {
|
||||
return "kulak";
|
||||
$type = "kulak";
|
||||
}
|
||||
$wep = db::c()->query('SELECT `otdel`, `minu` FROM `inventory` WHERE `id` = ?i', $idwep)->fetch_row();
|
||||
if ($wep[0] == '1') {
|
||||
return "noj";
|
||||
$type = "noj";
|
||||
} elseif ($wep[0] == '12') {
|
||||
return "dubina";
|
||||
$type = "dubina";
|
||||
} elseif ($wep[0] == '11') {
|
||||
return "topor";
|
||||
$type = "topor";
|
||||
} elseif ($wep[0] == '13') {
|
||||
return "mech";
|
||||
$type = "mech";
|
||||
} elseif ($wep[1] > 0) {
|
||||
return "buket";
|
||||
$type = "buket";
|
||||
} else {
|
||||
return "kulak";
|
||||
$type = "kulak";
|
||||
}
|
||||
return $type;
|
||||
}
|
||||
|
||||
$zo = db::c()->query('SELECT 1 FROM `effects` WHERE `type` = 201 AND `owner` = ?i', $user['id'])->getNumRows();
|
||||
@ -500,7 +501,7 @@ function dressitem($id)
|
||||
}
|
||||
|
||||
if (!($item['type'] == 12 && $user['level'] < 4)) {
|
||||
if (db::c()->query('UPDATE `users` AS `u`, `inventory` AS `i` SET `u`.?f = ?i, `i`.`dressed` = 1, `u`.`sila` = `u`.`sila` + `i`.`gsila`, `u`.`lovk` = `u`.`lovk` + `i`.`glovk`, `u`.`inta` = `u`.`inta` + `i`.`ginta`, `u`.`intel` = `u`.`intel` + `i`.`gintel`, `u`.`maxhp` = `u`.`maxhp` + `i`.`ghp`, `u`.`noj` = `u`.`noj` + `i`.`gnoj`, `u`.`topor` = `u`.`topor` + `i`.`gtopor`, `u`.`dubina` = `u`.`dubina` + `i`.`gdubina`, `u`.`mec` = `u`.`mec` + `i`.`gmech`, `u`.`mfire` = `u`.`mfire` + `i`.`gfire`, `u`.`mwater` = `u`.`mwater` + `i`.`gwater`, `u`.`mair` = `u`.`mair` + `i`.`gair`, `u`.`mearth` = `u`.`mearth` + `i`.`gearth`, `u`.`mlight` = `u`.`mlight` + `i`.`glight`, `u`.`mgray` = `u`.`mgray` + `i`.`ggray`, `u`.`mdark` = `u`.`mdark` + `i`.`gdark`, `u`.`ubron1` = `u`.`ubron1` + `i`.`bron1`, `u`.`ubron2` = `u`.`ubron2` + `i`.`bron2`, `u`.`ubron3` = `u`.`ubron3` + `i`.`bron3`, `u`.`ubron4` = `u`.`ubron4` + `i`.`bron4`, `u`.`fkrit` = `u`.`fkrit` + `i`.`mfkrit`, `u`.`fakrit` = `u`.`fakrit` + `i`.`mfakrit`, `u`.`fuvorot` = `u`.`fuvorot` + `i`.`mfuvorot`, `u`.`fauvorot` = `u`.`fauvorot` + `i`.`mfauvorot`, `u`.`uminu` = `u`.`uminu` + `i`.`minu`, `u`.`umaxu` = `u`.`umaxu` + `i`.`maxu` WHERE `i`.`needident` = 0 AND `i`.`id` = ?i AND `i`.`dressed` = 0 AND `i`.owner = ?i AND (20 + `u`.`sila`) >= `i`.`nsila` AND (20 + `u`.`lovk`) >= `i`.`nlovk` AND (20 + `u`.`inta`) >= `i`.`ninta` AND `u`.`vinos` >= `i`.`nvinos` AND (20 + `u`.`intel`) >= `i`.`nintel` AND `u`.`mudra` >= `i`.`nmudra` AND `u`.`level` >= `i`.`nlevel` AND (("?s" OR (?i = `i`.`nalign`)) OR (`i`.`nalign` = 0)) AND `u`.`noj` >= `i`.`nnoj` AND `u`.`topor` >= `i`.`ntopor` AND `u`.`dubina` >= `i`.`ndubina` AND `u`.`mec` >= `i`.`nmech` AND `u`.`mfire` >= `i`.`nfire` AND `u`.`mwater` >= `i`.`nwater` AND `u`.`mair` >= `i`.`nair` AND `u`.`mearth` >= `i`.`nearth` AND `u`.`mlight` >= `i`.`nlight` AND `u`.`mgray` >= `i`.`ngray` AND `u`.`mdark` >= `i`.`ndark` AND `i`.`setsale` = 0 AND `u`.`id` = ?i', $slot1, $id, $id, $user['id'], $al, $user['align'], $user['id'])) {
|
||||
if (db::c()->query('UPDATE `users` AS `u`, `inventory` AS `i` SET `u`.?f = ?i, `i`.`dressed` = 1, `u`.`sila` = `u`.`sila` + `i`.`gsila`, `u`.`lovk` = `u`.`lovk` + `i`.`glovk`, `u`.`inta` = `u`.`inta` + `i`.`ginta`, `u`.`intel` = `u`.`intel` + `i`.`gintel`, `u`.`maxhp` = `u`.`maxhp` + `i`.`ghp`, `u`.`noj` = `u`.`noj` + `i`.`gnoj`, `u`.`topor` = `u`.`topor` + `i`.`gtopor`, `u`.`dubina` = `u`.`dubina` + `i`.`gdubina`, `u`.`mec` = `u`.`mec` + `i`.`gmech`, `u`.`mfire` = `u`.`mfire` + `i`.`gfire`, `u`.`mwater` = `u`.`mwater` + `i`.`gwater`, `u`.`mair` = `u`.`mair` + `i`.`gair`, `u`.`mearth` = `u`.`mearth` + `i`.`gearth`, `u`.`mlight` = `u`.`mlight` + `i`.`glight`, `u`.`mgray` = `u`.`mgray` + `i`.`ggray`, `u`.`mdark` = `u`.`mdark` + `i`.`gdark`, `u`.`ubron1` = `u`.`ubron1` + `i`.`bron1`, `u`.`ubron2` = `u`.`ubron2` + `i`.`bron2`, `u`.`ubron3` = `u`.`ubron3` + `i`.`bron3`, `u`.`ubron4` = `u`.`ubron4` + `i`.`bron4`, `u`.`fkrit` = `u`.`fkrit` + `i`.`mfkrit`, `u`.`fakrit` = `u`.`fakrit` + `i`.`mfakrit`, `u`.`fuvorot` = `u`.`fuvorot` + `i`.`mfuvorot`, `u`.`fauvorot` = `u`.`fauvorot` + `i`.`mfauvorot`, `u`.`uminu` = `u`.`uminu` + `i`.`minu`, `u`.`umaxu` = `u`.`umaxu` + `i`.`maxu` WHERE `i`.`needident` = 0 AND `i`.`id` = ?i AND `i`.`dressed` = 0 AND `i`.owner = ?i AND (20 + `u`.`sila`) >= `i`.`nsila` AND (20 + `u`.`lovk`) >= `i`.`nlovk` AND (20 + `u`.`inta`) >= `i`.`ninta` AND `u`.`vinos` >= `i`.`nvinos` AND (20 + `u`.`intel`) >= `i`.`nintel` AND `u`.`mudra` >= `i`.`nmudra` AND `u`.`level` >= `i`.`nlevel` AND (((?i = `i`.`nalign`)) OR (`i`.`nalign` = 0)) AND `u`.`noj` >= `i`.`nnoj` AND `u`.`topor` >= `i`.`ntopor` AND `u`.`dubina` >= `i`.`ndubina` AND `u`.`mec` >= `i`.`nmech` AND `u`.`mfire` >= `i`.`nfire` AND `u`.`mwater` >= `i`.`nwater` AND `u`.`mair` >= `i`.`nair` AND `u`.`mearth` >= `i`.`nearth` AND `u`.`mlight` >= `i`.`nlight` AND `u`.`mgray` >= `i`.`ngray` AND `u`.`mdark` >= `i`.`ndark` AND `i`.`setsale` = 0 AND `u`.`id` = ?i', $slot1, $id, $id, $user['id'], $user['align'], $user['id'])) {
|
||||
$user[$slot1] = $item['id'];
|
||||
}
|
||||
return true;
|
||||
@ -540,283 +541,6 @@ if (isset($_GET['use'])) {
|
||||
usemagic($_GET['use'], $_POST['target']);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Отображение персонажа в main.php
|
||||
*
|
||||
* @param $id
|
||||
*
|
||||
* @throws \Krugozor\Database\Mysql\Exception
|
||||
*/
|
||||
function showpersinv($id)
|
||||
{
|
||||
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $id)->fetch_assoc();
|
||||
$dressed = [];
|
||||
$r = db::c()->query('SELECT * FROM `inventory` WHERE
|
||||
`id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR
|
||||
`id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR
|
||||
`id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i',
|
||||
$user['helm'], $user['weap'], $user['plaw'], $user['bron'], $user['rybax'],
|
||||
$user['sergi'], $user['kulon'], $user['r1'], $user['r2'], $user['r3'], $user['perchi'],
|
||||
$user['shit'], $user['boots'], $user['m1'], $user['m2'], $user['m3'], $user['m4'],
|
||||
$user['m5'], $user['m6'], $user['m7'], $user['m8'], $user['m9'], $user['m10']);
|
||||
while ($rec = $r->fetch_assoc()) {
|
||||
$dressed[$rec['id']] = $rec;
|
||||
}
|
||||
?>
|
||||
<div style="text-align: center;">
|
||||
<?php nick::id($_SESSION['uid']); ?>
|
||||
<?= showProgressBar($user['hp'], $user['maxhp']); ?>
|
||||
<TABLE cellspacing=0 cellpadding=0>
|
||||
<?php
|
||||
if ($user['level'] > 3) { ?>
|
||||
<TR>
|
||||
<TD colspan=3>
|
||||
<?php // TODO Сделать один запрос из десяти!
|
||||
if ($user['m1'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m1'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=12"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m2'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m2'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=13"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m3'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m3'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=14"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m4'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m4'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=15"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m5'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m5'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=16"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD colspan=3>
|
||||
<?php
|
||||
if ($user['m6'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m6'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=17"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m7'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m7'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=18"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m8'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m8'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=19"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m9'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m9'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=20"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
if ($user['m10'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m10'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br />Прочность ' . $dress['duration'] . '/' . $dress['maxdur'];
|
||||
echo '<a href="?edit=1&drop=21"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=40 height=25></a>';
|
||||
} else {
|
||||
$mess = '<b>Пустой слот магия</b>';
|
||||
echo '<img class=\'tooltip\' title=\'' . $mess . '\' src=i/w13.gif width=40 height=25>';
|
||||
}
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
<?php
|
||||
} ?>
|
||||
<TR>
|
||||
<TD width=62 valign=top>
|
||||
<TABLE width=100% cellspacing=0 cellpadding=0>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['sergi'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['sergi'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=1"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=60 height=20></a>';
|
||||
} else {
|
||||
echo '<img src="i/w1.gif" width=60 height=20 class=\'tooltip\' title=\'<b>Пустой слот Серьги</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['kulon'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['kulon'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=2"><img src="i/sh/' . $dress['img'] . '" width=60 height=20 class=\'tooltip\' title=\'' . $mess . '\'></a>';
|
||||
} else {
|
||||
echo '<img src="i/w2.gif" width=60 height=20 class=\'tooltip\' title=\'<b>Пустой слот Ожерелье</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['weap'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['weap'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=3"><img src="i/sh/' . $dress['img'] . '" width=60 height=60 class=\'tooltip\' title=\'' . $mess . '\'></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w3.gif" width=60 height=60 title=\'<b>Пустой слот Оружие</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['bron'] > 0 || $user['rybax'] > 0 || $user['plaw'] > 0) {
|
||||
$d = $n = 0;
|
||||
if ($user['plaw']) {
|
||||
$d = $user['plaw'];
|
||||
$n = 23;
|
||||
} elseif ($user['bron']) {
|
||||
$d = $user['bron'];
|
||||
$n = 4;
|
||||
} elseif ($user['rybax']) {
|
||||
$d = $user['rybax'];
|
||||
$n = 22;
|
||||
}
|
||||
$dress = $dressed[$d];
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=' . $n . '"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=60 height=80></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w4.gif" width=60 height=80 title=\'<b>Пустой слот Броня</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<TABLE cellspacing=0 cellpadding=0>
|
||||
<tr>
|
||||
<td><?php
|
||||
if ($user['r1'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['r1'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=5"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=20 height=20></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title=\'<b>Пустой слот Кольцо</b>\' />';
|
||||
}
|
||||
?></td>
|
||||
<td><?php
|
||||
if ($user['r2'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['r2'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a class=\'tooltip\' title=\'' . $mess . '\' href="?edit=1&drop=6"><img src="i/sh/' . $dress['img'] . '" width=20 height=20></a>';
|
||||
} else {
|
||||
echo '<img src="i/w6.gif" width=20 height=20 class=\'tooltip\' title=\'<b>Пустой слот Кольцо</b>\' />';
|
||||
}
|
||||
?></td>
|
||||
<td><?php
|
||||
if ($user['r3'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['r3'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=7"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=20 height=20></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title=\'<b>Пустой слот Кольцо</b>\' />';
|
||||
}
|
||||
?></td>
|
||||
|
||||
</tr>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD valign=top><img src="i/shadow/<?= $user['shadow'] ?>" width=76 height=209
|
||||
alt="<?= $user['login'] ?>"></TD>
|
||||
<TD width=62 valign=top>
|
||||
<TABLE width=100% cellspacing=0 cellpadding=0>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['helm'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['helm'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=8"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=60 height=60></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w9.gif" width=60 height=60 title=\'<b>Пустой слот Шлем</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['perchi'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['perchi'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=9"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=60 height=40></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w11.gif" width=60 height=40 title=\'<b>Пустой слот Перчатки</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if ($user['shit'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['shit'])->fetch_assoc();
|
||||
$mess = 'Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '';
|
||||
echo '<a href="?edit=1&drop=10"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=60 height=60></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w10.gif" width=60 height=60 title=\'<b>Пустой слот Щит</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><?php
|
||||
if
|
||||
($user['boots'] > 0) {
|
||||
$dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['boots'])->fetch_assoc();
|
||||
$mess = '<span style="min-width: 350px;">Снять <b>' . $dress['name'] . '</b><br>Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '</span>';
|
||||
echo '<a href="?edit=1&drop=11"><img class=\'tooltip\' title=\'' . $mess . '\' src="i/sh/' . $dress['img'] . '" width=60 height=40></a>';
|
||||
} else {
|
||||
echo '<img class=\'tooltip\' src="i/w12.gif" width=60 height=40 title=\'<b>Пустой слот Обувь</b>\' />';
|
||||
}
|
||||
?></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</div> <?php
|
||||
}
|
||||
|
||||
|
||||
function updstats()
|
||||
{
|
||||
global $user;
|
||||
@ -1208,7 +932,11 @@ if (input::get('edit')) {
|
||||
<FORM METHOD=POST ACTION="main.php?edit=1">
|
||||
<table width=100%>
|
||||
<TR>
|
||||
<td style="vertical-align: top; width: 250px"><?php showpersinv($user['id']) ?> <!-- Первый столбец -->
|
||||
<td style="vertical-align: top; width: 250px">
|
||||
<?php
|
||||
$showUser = new User($_SESSION['uid']);
|
||||
$showUser->showUserDoll(0,1);
|
||||
?> <!-- Первый столбец -->
|
||||
<div align="center">
|
||||
<a href='main.php?edit=1&undress=all'>Снять все</a><BR>
|
||||
<a href="javascript: void(0);" onclick="saveComplect(); return false;">Запомнить комплект</a><br/>
|
||||
@ -1230,49 +958,48 @@ if (input::get('edit')) {
|
||||
</td>
|
||||
<TD style="vertical-align: top; width: 207px"> <!-- Второй столбец -->
|
||||
<div>
|
||||
<br>Уровень: <b><?= $user['level'] ?></b>
|
||||
<br>Опыт: <b><?= $user['exp'] ?></b> (<?= $user['nextup'] ?>)
|
||||
<br>Побед: <b><?= $user['win'] ?></b>
|
||||
<br>Поражений: <b><?= $user['lose'] ?></b>
|
||||
<br>Ничьих: <b><?= $user['nich'] ?></b>
|
||||
<br>Деньги: <b><?= $user['money'] ?></b> кр.
|
||||
<br>Репутация: <b><?= $user['doblest'] ?></b> реп.
|
||||
<br>Уровень: <strong><?= $showUser->level ?></strong>
|
||||
<br>Опыт: <strong><?= $showUser->experience ?></strong>
|
||||
<br>Побед: <strong><?= 'нет поля' ?></strong>
|
||||
<br>Поражений: <strong><?= 'нет поля' ?></strong>
|
||||
<br>Ничьих: <strong><?= 'нет поля' ?></strong>
|
||||
<br>Деньги: <strong><?= $showUser->money ?></strong> кр.
|
||||
<HR>
|
||||
</div>
|
||||
<!--Параметры-->
|
||||
<div>
|
||||
<div class="container">
|
||||
Сила: <?= $user['sila'] ?>
|
||||
<?php if (!empty($user['stats'])): ?>
|
||||
Сила: <?= $showUser->strength ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=sila'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Ловкость: <?= $user['lovk'] ?>
|
||||
<?php if (!empty($user['stats'])): ?>
|
||||
Ловкость: <?= $showUser->dexterity ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=lovk'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Интуиция: <?= $user['inta'] ?>
|
||||
<?php if (!empty($user['stats'])): ?>
|
||||
Интуиция: <?= $showUser->intuition ?>
|
||||
<?php if ($showUser->stat_points)): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=inta'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Выносливость: <?= $user['vinos'] ?>
|
||||
<?php if (!empty($user['stats'])): ?>
|
||||
Выносливость: <?= $showUser->endurance ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=vinos'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Интеллект: <?= $user['intel'] ?>
|
||||
<?php if (!empty($user['stats'])): ?>
|
||||
Интеллект: <?= $showUser->intelligence ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=intel'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Мудрость: <?= $user['mudra'] ?>
|
||||
<?php if (!empty($user['stats'])): ?>
|
||||
Мудрость: <?= $showUser->wisdom ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=mudra'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
<small style="color: darkgreen;">Возможных увеличений: <?= $user['stats'] ?></small>
|
||||
<small style="color: darkgreen;">Возможных увеличений: <?= $showUser->stat_points ?></small>
|
||||
<br><br>
|
||||
</div>
|
||||
<?php
|
||||
@ -1459,7 +1186,7 @@ if (input::get('edit')) {
|
||||
<div class="jGrowl-notification"></div>
|
||||
</div>
|
||||
<div id="mZeInventory">
|
||||
<?php endif; ?>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
|
||||
if (in_array(input::get('razdel'), [0, 1, 2, 3, 4, 5])) {
|
||||
@ -1471,17 +1198,17 @@ if (input::get('edit')) {
|
||||
<td>
|
||||
<table class="allzeroes" style="background-color: #d4d2d2;">
|
||||
<tr>
|
||||
<td align=center bgcolor="<?= ($_SESSION['razdel'] == null) ? "#A5A5A6" : "#C7C7C8" ?>"><a
|
||||
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == null) ? '#A5A5A6' : '#C7C7C8' ?>"><a
|
||||
href="?edit=1&razdel=0" ajax="mZeInventory">Амуниция</a></td>
|
||||
<td align=center bgcolor="<?= ($_SESSION['razdel'] == 1) ? "#A5A5A6" : "#C7C7C8" ?>"><a
|
||||
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 1) ? '#A5A5A6' : '#C7C7C8' ?>"><a
|
||||
href="?edit=1&razdel=1" ajax="mZeInventory">Заклинания</a></td>
|
||||
<td align=center bgcolor="<?= ($_SESSION['razdel'] == 3) ? "#A5A5A6" : "#C7C7C8" ?>"><a
|
||||
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 3) ? '#A5A5A6' : '#C7C7C8' ?>"><a
|
||||
href="?edit=1&razdel=3" ajax="mZeInventory">Ресурсы</a></td>
|
||||
<td align=center bgcolor="<?= ($_SESSION['razdel'] == 4) ? "#A5A5A6" : "#C7C7C8" ?>"><a
|
||||
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 4) ? '#A5A5A6' : '#C7C7C8' ?>"><a
|
||||
href="?edit=1&razdel=4" ajax="mZeInventory">Подарки</a></td>
|
||||
<td align=center bgcolor="<?= ($_SESSION['razdel'] == 5) ? "#A5A5A6" : "#C7C7C8" ?>"><a
|
||||
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 5) ? '#A5A5A6' : '#C7C7C8' ?>"><a
|
||||
href="?edit=1&razdel=5" ajax="mZeInventory">Квестовые вещи</a></td>
|
||||
<td align=center bgcolor="<?= ($_SESSION['razdel'] == 2) ? "#A5A5A6" : "#C7C7C8" ?>"><a
|
||||
td style="text-align: center; background-color: <?= ($_SESSION['razdel'] == 2) ? '#A5A5A6' : '#C7C7C8' ?>"><a
|
||||
href="?edit=1&razdel=2" ajax="mZeInventory">Прочее</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1492,11 +1219,11 @@ if (input::get('edit')) {
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center>
|
||||
<td style="text-align: center">
|
||||
<table BORDER=0 WIDTH=100% CELLSPACING="1" CELLPADDING="2" BGCOLOR="#A5A5A5">
|
||||
<?php if (!empty($user['money'])): ?>
|
||||
<tr bgcolor="#C7C7C7">
|
||||
<td width="100" align="center"><img src="i/sh/money-bag.png"></td>
|
||||
<tr style="background-color: #c7c7c7">
|
||||
<td style="text-align: center; width: 100px;"><img src="i/sh/money-bag.png"></td>
|
||||
<td valign="top">Мешок денег (Масса: 0)<br><b><?= $user['money'] ?> кр.</b></td>
|
||||
</tr>
|
||||
<?php endif;
|
||||
|
Loading…
Reference in New Issue
Block a user