Файл: html/profile.php
Строк: 1302
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/functions/bablo.php';
require_once ('system/dbc.php');
require_once ('system/func.php');
setTotem();
health_rechange();
$footval = "profile";
auth(); // Закроем от неавторизированых
# Настройки #
$animations = 2;
$id = $user['id'];
if (isset($_GET['id'])) {
$id = $_GET['id'];
} else {
$_GET['id'] = $id;
}
$result64 = $mc->query("SELECT * FROM `users` WHERE `id` = '$id'");
$profile = $result64->fetch_array(MYSQLI_ASSOC);
$arrstat = get_user_stats();
/*
Здоровье:
Урон:
Точность:
Броня:
Уворот:
Оглушение:
Блок:
*
*/
//получаем параметры одетых бонусных шмоток
$arr = [];
$arr['health'] = 0; //Здоровье
$arr['strength'] = 0; //урон
$arr['toch'] = 0; //точность
$arr['bron'] = 0; //броня
$arr['lov'] = 0; //уворот
$arr['kd'] = 0; //оглушение
$arr['block'] = 0; //блок
$arr['all'] = 0; //все статы
//пересчет параметров игрока
//получаем список одетых вещей героя
if ($myrow221 = $mc->query("SELECT * FROM `userbag` WHERE `id_user` = '$id' AND `id_punct` = '11'")->fetch_all(MYSQLI_ASSOC)) {
//перебираем параметры вещей
for ($i = 0; $i < count($myrow221); $i++) {
//read thing
if ($result1 = $mc->query("SELECT * FROM `shop` WHERE `id`='" . $myrow221[$i]['id_shop'] . "'")) {
//thing to arr par
$infoshop = $result1->fetch_array(MYSQLI_ASSOC);
$arr['health'] += $infoshop['health'];
$arr['strength'] += $infoshop['strength'];
$arr['toch'] += $infoshop['toch'];
$arr['lov'] += $infoshop['lov'];
$arr['kd'] += $infoshop['kd'];
$arr['block'] += $infoshop['block'];
$arr['bron'] += $infoshop['bron'];
}
}
$arr['all'] += $arr['health'] + $arr['strength'] + $arr['toch'] + $arr['lov'] + $arr['kd'] + $arr['block'] + $arr['bron'];
}
if ($myrow456 = $mc->query("SELECT * FROM `userbag` WHERE `id_user` = '$id' && `id_punct`='1' && `dress`='1'")->fetch_array(MYSQLI_ASSOC)) {
//получаем параметры вещей
if ($myrow2123 = $mc->query("SELECT * FROM `shop` WHERE `id` = '" . $myrow456['id_shop'] . "'")->fetch_array(MYSQLI_ASSOC)) {
//переводим в иконку оружия
if ($myrow2123['id_punct'] == 1) {
$userWeapon = $myrow2123['id_image'];
} else {
$userWeapon = 0;
}
} else {
$userWeapon = 0;
}
} else {
$userWeapon = 0;
}
# Ошибки #
if ($profile == 0) {
error('Данный пользователь не найден');
require_once ('system/foot/foot.php');
exit(0);
}
# Информация #
?>
<style>
.colonleft{
width: 150px;
padding-left: 6;
}
.colonright{
width: 130px;
padding-right: 6;
word-break: break-all;
}
</style>
<script>
MyLib.loaded1 = 0;
//setTimeFoot();
if (<?= $profile['id']; ?> !== 0) {
profile();
}
function profile() {
var MiniCanvas = $("mobitva:eq(-1)").find("#MiniCanvas")[0];
var ctxMiniCanvas = MiniCanvas.getContext("2d");
var buffMiniCanvas = document.createElement("canvas");
var ctxbuffMiniCanvas = buffMiniCanvas.getContext("2d");
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
var myReq;
var weaponData = [];
var imageweapon;
var spriteData = [];
var spriteImage = [];
var Pico = <?= $profile['side']; ?>;
var Panimation = 0;
var Pweapon = <?= $userWeapon; ?>;
var Panimationcount = 0;
var PposX = -180;
var PposY = -130;
MiniCanvas.width = buffMiniCanvas.width = 320;
MiniCanvas.height = buffMiniCanvas.height = 150;
var dressData = [];
var imagedress;
var PDress = 0;
$.ajax({
url: "./json/dress/dress.json?129",
dataType: "json",
success: function (data) {
dressData = JSON.parse(JSON.stringify(data));
imagedress = new Image();
imagedress.src = dressData.img;
}
});
$.ajax({
url: "./json/weapon/weapon_new.json?139.1114",
dataType: "json",
success: function (a) {
weaponData = JSON.parse(JSON.stringify(a));
imageweapon = new Image;
imageweapon.src = weaponData.img;
}
});
$.ajax({
url: "./json/Player/animation.json?129",
dataType: "json",
success: function (a) {
spriteData = JSON.parse(JSON.stringify(a));
for (a = 0; a < spriteData.img.length; a++)
spriteImage[a] = new Image, spriteImage[a].src = spriteData.img[a];
}
});
function render() {
MiniCanvas.width = MiniCanvas.width;
try {
ctxMiniCanvas.drawImage(buffMiniCanvas,
0,
0,
MiniCanvas.width,
MiniCanvas.height,
0,
0,
buffMiniCanvas.width,
buffMiniCanvas.height
);
} catch (e) {
}
MyLib.intervaltimer.push(setTimeout(function () {
myReq = requestAnimationFrame(render);
}, 1000 / 10));
}
myReq = requestAnimationFrame(render);
//fffaaackkk
MyLib.intervaltimer.push(setInterval(function () {
buffMiniCanvas.width = buffMiniCanvas.width;
try {
if (Panimationcount >= spriteData[Pico][Panimation].length) {
Panimationcount = 0;
}
for (var a = 0; a < spriteData[Pico][Panimation][Panimationcount].length; a++) {
var type = parseInt(spriteData[Pico][Panimation][Panimationcount][a][9]);
var typeStr = spriteData[Pico][Panimation][Panimationcount][a][9];
if (type === -1) {
ctxbuffMiniCanvas.save();
ctxbuffMiniCanvas.translate(Math.round(buffMiniCanvas.width / 2 + spriteData[Pico][Panimation][Panimationcount][a][4] ) + PposX, Math.round(spriteData[Pico][Panimation][Panimationcount][a][5] + spriteData[Pico][Panimation][Panimationcount][a][7] / 2) + PposY);
ctxbuffMiniCanvas.rotate(spriteData[Pico][Panimation][Panimationcount][a][8] * Math.PI / 180);
ctxbuffMiniCanvas.drawImage(
imageweapon,
weaponData.imgC[Pweapon][0],
weaponData.imgC[Pweapon][1],
weaponData.imgC[Pweapon][2],
weaponData.imgC[Pweapon][3],
-weaponData.imgC[Pweapon][4],
-weaponData.imgC[Pweapon][5],
weaponData.imgC[Pweapon][2],
weaponData.imgC[Pweapon][3]
);
ctxbuffMiniCanvas.restore();
} else if (type > 99) {
ctxbuffMiniCanvas.save();
ctxbuffMiniCanvas.translate(Math.round(buffMiniCanvas.width / 2 + spriteData[Pico][Panimation][Panimationcount][a][4] + spriteData[Pico][Panimation][Panimationcount][a][6] / 2) + PposX, Math.round(spriteData[Pico][Panimation][Panimationcount][a][5] + spriteData[Pico][Panimation][Panimationcount][a][7] / 2) + PposY);
ctxbuffMiniCanvas.rotate(spriteData[Pico][Panimation][Panimationcount][a][8] * Math.PI / 180);
ctxbuffMiniCanvas.drawImage(
imagedress,
dressData[typeStr][Pico][PDress][0],
dressData[typeStr][Pico][PDress][1],
dressData[typeStr][Pico][PDress][2],
dressData[typeStr][Pico][PDress][3],
Math.round(-dressData[typeStr][Pico][PDress][2] / 2),
Math.round(-dressData[typeStr][Pico][PDress][3] / 2),
dressData[typeStr][Pico][PDress][2],
dressData[typeStr][Pico][PDress][3]
);
ctxbuffMiniCanvas.restore();
} else {
ctxbuffMiniCanvas.save();
ctxbuffMiniCanvas.translate(Math.round(buffMiniCanvas.width / 2 + spriteData[Pico][Panimation][Panimationcount][a][4] + spriteData[Pico][Panimation][Panimationcount][a][6] / 2) + PposX, Math.round(spriteData[Pico][Panimation][Panimationcount][a][5] + spriteData[Pico][Panimation][Panimationcount][a][7] / 2) + PposY);
ctxbuffMiniCanvas.rotate(spriteData[Pico][Panimation][Panimationcount][a][8] * Math.PI / 180);
ctxbuffMiniCanvas.drawImage(
spriteImage[Pico],
spriteData[Pico][Panimation][Panimationcount][a][0],
spriteData[Pico][Panimation][Panimationcount][a][1],
spriteData[Pico][Panimation][Panimationcount][a][2],
spriteData[Pico][Panimation][Panimationcount][a][3],
Math.round(-spriteData[Pico][Panimation][Panimationcount][a][6] / 2),
Math.round(-spriteData[Pico][Panimation][Panimationcount][a][7] / 2),
spriteData[Pico][Panimation][Panimationcount][a][6],
spriteData[Pico][Panimation][Panimationcount][a][7]
);
ctxbuffMiniCanvas.restore();
}
}
} catch (e) {
}
Panimationcount++;
}, 200));
}
</script>
<?php
if (isset($user['id']) && isset($_GET['id']) && $user['id'] == $_GET['id'] && !isset($_GET['bonus'])) {
if (isset($user['id'])) {
?>
<div style="position: relative;top: -5px;z-index:99999">
<table style="margin: auto;border-spacing: 0;height: 40px;max-width: 100%;">
<tr>
<td class="lth_01l" style="width: 18px;"></td>
<td class="lth_01c">
<div style="font-size: 14px;font-family: font-family:Anfisa;">
<img style="width: 16px;" src="/img/img23.png"><?= $user['level']; ?>
<img style="width: 18px;" src="/images/icons/hp.png">
<hp class="hp"><?= $user['temp_health']; ?></hp>
<?php
//Не съежали деньги
$dengi = 0;
?>
<?php if ($user['platinum'] != 0) { ?>
<img style="width: 15px;" src="/images/icons/plata.png">
<?php
echo $user['platinum'];
$dengi++;
?>
<?php } ?>
<?php if (money($user['money'], 'zoloto') != 0) { ?>
<img style="width: 15px;" src="/images/icons/zoloto.png">
<?php
echo money($user['money'], 'zoloto');
$dengi++;
?>
<?php } ?>
<?php if (money($user['money'], 'serebro') != 0) { ?>
<img style="width: 15px;" src="/images/icons/serebro.png">
<?php
echo money($user['money'], 'serebro');
$dengi++;
?>
<?php } ?>
<?php if (money($user['money'], 'med') != 0) { ?>
<img style="width: 15px;" src="/images/icons/med.png">
<?= money($user['money'], 'med'); ?>
<?php } ?>
</div>
</td>
<td class="lth_01r" style="width: 18px;"></td>
</tr>
</table>
</div>
<?php } ?>
<center>
<div>
<canvas id="MiniCanvas"></canvas>
</div>
</center>
<table style="margin: auto;border-spacing: 0;width: 100%;">
<tr>
<td class="ptb_1l" ></td>
<td class="ptb_1c" ></td>
<td class="ptb_1r" ></td>
</tr>
<tr>
<td class="ptb_2l"></td>
<td class="ptb_2c">
<strong>Тайные приёмы:</strong>
<?php
function age_times($secs) {
$bit = array(
' year' => floor($secs / 31556926),
' day' => $secs / 86400 % 365,
' hour' => $secs / 3600 % 24,
' minute' => $secs / 60 % 60,
' second' => $secs % 60
);
$years = 0;
$days = 0;
$hours = 0;
$ret = [];
foreach ($bit as $k => $v) {
$str = (string) $v;
$str = strlen($str) == 1 ? "0" . $str : $str;
//года
if ($v > 0 && $k == ' year') {
if ((int) $str{strlen($str) - 1 - 1} > 4 || (int) $str{strlen($str) - 1} == 0 || (int) $str{strlen($str) - 2} > 0 && (int) $str{strlen($str) - 2} < 2 && strlen($str) > 1) {
$years = $v;
$ret[] = $v . ' лет ';
} elseif ((int) $str{strlen($str) - 1} > 1 && (int) $str{strlen($str) - 1} < 5) {
$years = $v;
$ret[] = $v . ' года ';
} elseif ((int) $str{strlen($str) - 1} == 1) {
$years = $v;
$ret[] = $v . ' год ';
}
}
//дни
if ($v > 0 && $k == ' day') {
if ((int) $str{strlen($str) - 1} > 4 || (int) $str{strlen($str) - 1} == 0 || (int) $str{strlen($str) - 2} > 0 && (int) $str{strlen($str) - 2} < 2 && strlen($str) > 1) {
$days = $v;
$ret[] = $v . ' дней ';
} elseif ((int) $str{strlen($str) - 1} > 1 && (int) $str{strlen($str) - 1} < 5) {
$days = $v;
$ret[] = $v . ' дня ';
} elseif ((int) $str{strlen($str) - 1} == 1) {
$days = $v;
$ret[] = $v . ' день ';
}
}
if ($v > 0 && $k == ' hour' && $years == 0) {
if ($v > 4 && $v < 21) {
$hours = $v;
$ret[] = $v . ' часов ';
} elseif ($v > 1 && $v < 5 || $v > 21) {
$hours = $v;
$ret[] = $v . ' часа ';
} elseif ((int) $str{strlen($str) - 1} == 1) {
$hours = $v;
$ret[] = $v . ' час ';
}
}
if ($v > 0 && $k == ' minute' && $years == 0 && $days == 0) {
$ret[] = $v . ' мин ';
}
if ($v > 0 && $k == ' second' && $years == 0 && $days == 0 && $hours == 0) {
$ret[] = $v . ' сек ';
}
}
return join(' ', $ret);
}
$maxuron = $arrstat['strength'] + $profile['level'];
$maxtoch = $arrstat['toch'] + $profile['level'];
$maxlov = $arrstat['lov'] + $profile['level'];
$maxkd = $arrstat['kd'] + $profile['level'];
$rep_num = $profile['rep_p'] - $profile['rep_m'];
$rep_name = "Неизвестный";
if ($reparr = $mc->query("SELECT * FROM `reputation` WHERE `rep` <= '" . $rep_num . "' ORDER BY `rep` DESC LIMIT 1")->fetch_array(MYSQLI_ASSOC)) {
$rep_name = $reparr['name'];
}
$slavamin = $mc->query("SELECT * FROM `slava` WHERE `slava` <= '" . $profile['slava'] . "' && `lvl` <= '" . $profile['level'] . "' ORDER BY `slava` DESC LIMIT 1")->fetch_array(MYSQLI_ASSOC);
$slavamax = $mc->query("SELECT * FROM `slava` WHERE `slava` > '" . $profile['slava'] . "' && `lvl` <= '" . $profile['level'] . "' ORDER BY `slava` ASC LIMIT 1")->fetch_array(MYSQLI_ASSOC);
if (!isset($slavamax['slava'])) {
$slavamax['slava'] = "100";
}
if ($profile['exp'] < 0) {
$profile['exp'] = 0;
}
$maxexp = $mc->query("SELECT * FROM `exp` WHERE `exp` >= " . $profile['exp'] . " ORDER BY `exp`.`exp` ASC LIMIT 0, 1")->fetch_array(MYSQLI_ASSOC);
$minexp = $mc->query("SELECT * FROM `exp` WHERE `exp` <= " . $profile['exp'] . " ORDER BY `exp`.`exp` DESC LIMIT 0, 1")->fetch_array(MYSQLI_ASSOC);
if ($maxexp != $minexp) {
$procentexp = floor((($profile['exp'] - $minexp['exp']) * 100) / ($maxexp['exp'] - $minexp['exp']));
} else {
$procentexp = 0;
}
$arrsu = explode(",", $profile['superudar']);
if (count($arrsu) == 1 && $arrsu[0] == "") {
$arrsu = [];
}
for ($i = 0; $i < count($arrsu); $i++) {
echo '<div style="padding-left: 2px">';
for ($i2 = 0; $i2 < strlen($arrsu[$i]) - 1; $i2++) {
echo '<img src="/images/super/' . $arrsu[$i][$i2] . 'su.png" alt="' . $arrsu[$i][$i2] . '"><strong> - </strong>';
}
echo '<img src="/images/super/' . $arrsu[$i][strlen($arrsu[$i]) - 1] . 'su.png" alt="' . $arrsu[$i][strlen($arrsu[$i]) - 1] . '"></div>';
}
?>
<table width="100%">
<tr>
<td class="colonleft"> </td>
<td class="colonright">
<font color="YELLOW"><b>
<?php
if ($profile['prem'] == '1') {
echo "Премиум " . age_times($profile['prem_t'] - time());
}
?>
</b>
</font>
</td>
</tr>
<td class="colonleft">Имя:</td>
<td class="colonright">
<b>
<?= $profile['name']; ?>
</b>
</td>
</tr>
<tr>
<td class="colonleft">Народ :</td>
<?php if ($profile['side'] == 2 || $profile['side'] == 3) { ?>
<td class="colonright"><font color="blue">Нармасцы</font></td>
<?php } else { ?>
<td class="colonright"><font color="red">Шейване</font></td>
<?php } ?>
</tr>
<tr>
<td class="colonleft">Репутация:</td>
<td class="colonright">
<?= $rep_name; ?>
<br>
<?= $profile['rep_p']; ?>/<?= $profile['rep_m']; ?>
</td>
</tr>
<tr>
<td class="colonleft">Звание:</td>
<td class="colonright">
<?= $slavamin['name']; ?>
<br>
<?= $profile['slava']; ?>/<?= $slavamax['slava']; ?>
</td>
</tr>
<tr>
<td class="colonleft">Опыт:</td>
<td class="colonright">
<?= $profile['exp'] . ' / ' . $maxexp['exp'] . '(' . $procentexp . '%)'; ?>
</td>
</tr>
<tr>
<td class="colonleft">Выносливость:</td>
<td class="colonright">
<vinos class="vinos"><?= $profile['vinos_t']; ?></vinos><?= ' / ' . $profile['vinos_m']; ?>
</td>
</tr>
<tr>
<td class="colonleft">Рейтинг турнира:</td>
<td class="colonright">
<?= $profile['tur_reit']; ?>
</td>
</tr>
<tr>
<td class="colonleft">Здоровье:</td>
<td class="colonright">
<img src="/images/icons/hp.png" width="18" alt="*">
<hp class="hp"><?= $arrstat['temp_health']; ?></hp><?= '/' . $arrstat['max_health']; ?>
</td>
</tr>
<tr>
<td class="colonleft">Урон:</td>
<td class="colonright">
<img src="/images/icons/power.jpg" width="16" alt="*">
<?= ' ' . $arrstat['strength'] . '...' . $maxuron; ?>
</td>
</tr>
<tr>
<td class="colonleft">Точность:</td>
<td class="colonright">
<img src="/images/icons/toch.png" width="16" alt="*">
<?= ' ' . $arrstat['toch'] . '...' . $maxtoch; ?>
</td>
</tr>
<tr>
<td class="colonleft">Броня:</td>
<td class="colonright">
<img src="/images/icons/bron.png" width="16" alt="*">
<?= ' ' . $arrstat['bron']; ?></td>
</tr>
<tr>
<td class="colonleft">Уворот:</td>
<td class="colonright">
<img src="/images/icons/img235.png" width="16" alt="*">
<?= ' ' . $arrstat['lov'] . ' ... ' . $maxlov; ?></td>
</tr>
<tr>
<td class="colonleft">Оглушение:</td>
<td class="colonright">
<img src="/images/icons/kd.png" width="16" alt="*">
<?= ' ' . $arrstat['kd'] . ' ... ' . $maxkd; ?></td>
</tr>
<tr>
<td class="colonleft">Блок:</td>
<td class="colonright">
<img src="/images/icons/shit.png" width="16" alt="*">
<?= ' ' . $arrstat['block']; ?></td>
</tr>
<tr>
<td class="colonleft">Бонусы:</td>
<td class="colonright">
<a style="font-size:17px;"onclick="showContent('/profile.php?bonus')">
<strong>
<u><?= $arr['all']; ?>(<?= $arr['all']; ?>)</u>
</strong>
</a>
</tr>
<tr>
<td class="colonleft">Победы (монстры):</td>
<td class="colonright">
<?= $profile['pobedmonser']; ?>/<?= $profile['losemonser']; ?>
</tr>
<tr>
<td class="colonleft">Победы (игроки):</td>
<td class="colonright">
<?= $profile['pobedigroki']; ?>
</tr>
<tr>
<td class="colonleft">Возраст в игре:</td>
<td class="colonright">
<?php
echo age_times(time() - $profile['registr']);
?>
</tr>
</table>
<?php
if (isset($profile['id'])) {
$gifts = $mc->query("SELECT * FROM `gifts` WHERE `id_2` = '" . $profile['id'] . "' ORDER BY `id` DESC LIMIT 3")->fetch_all(MYSQLI_ASSOC);
$giftsnum = $mc->query("SELECT * FROM `gifts` WHERE `id_2` = '" . $profile['id'] . "' ORDER BY `id` DESC LIMIT 4")->num_rows;
?>
<table style="width: 100%;margin: auto;">
<tr>
<td style="text-align: center;">
<?php for ($i = 0; $i < count($gifts); $i++) { ?>
<img onclick="showContent('gifts.php?gifts=<?= $gifts[$i]['id']; ?>&id=<?= $profile['id']; ?>')" style="width: 80px;height: 80px;" class="shops" src='/images/gifts/<?= $gifts[$i]['id_img']; ?>.png'>
<?php } ?>
<?php if ($giftsnum > 3) { ?>
<a onclick="showContent('/gifts.php?id=<?= $profile['id'] ?>')" style="text-decoration: underline;">
Еще...
</a>
<?php } ?>
</td>
</tr>
</table>
<?php } ?>
</td>
<td class="ptb_2r"></td>
<tr>
<td class="ptb_3l"></td>
<td class="ptb_3c"></td>
<td class="ptb_3r"></td>
</tr>
</table>
<center><br><a onclick="showContent('/ref.php')">реферальная программа</a></center>
<center><br><a onclick="showContent('/changeParams.php')">изменить данные</a></center>
<?php
} else {
if ($profile['id'] == '464' || $profile['id'] == '42') {
?>
<span style="font-size:16px">Mobitva2</span>
<?php
} else {
if (isset($user['level']) && $user['level'] < 2) {
?>
<script>showContent("/main.php?msg=" + decodeURI("Не доступно до 2 уровня ."));</script>
<?php
}
if (!$id == 0 && !isset($_GET['bonus'])) {
$star = "";
if ($profile['access'] == 1) {
$star = $star . "<img height='15' src='/img/icon/star.png' width='15' alt=''>";
} else if ($profile['access'] == 2) {
$star = $star . "<img height='15' src='/img/icon/star2.png' width='15' alt=''>";
} else if ($profile['access'] > 2) {
$star = $star . "<img height='15' src='/img/icon/star3.png' width='15' alt=''>";
}
?>
<center>
<div >
<?= $star, "<a onclick="showContent('/profile/" . $_GET['id'] . "')" dir='ltr'>" . $profile['name'] . '</a>[' . $profile['level'] . ']'; ?>
</div>
</center>
<center>
<div>
<canvas id="MiniCanvas"></canvas>
</div>
<center>
<?php
if (!isset($_GET['equip'])) {
$rep_num = $profile['rep_p'] - $profile['rep_m'];
$rep_name = "Неизвестный";
if ($reparr = $mc->query("SELECT * FROM `reputation` WHERE `rep` <= '" . $rep_num . "' ORDER BY `rep` DESC LIMIT 1")->fetch_array(MYSQLI_ASSOC)) {
$rep_name = $reparr['name'];
}
?>
<div>
<b>
<?= $rep_name; ?>
</b>
</div>
<div>
<b style="line-height:25px;">
<?php
$slavamin = $mc->query("SELECT * FROM `slava` WHERE `slava` <= '" . $profile['slava'] . "' && `lvl` <= '" . $profile['level'] . "' ORDER BY `slava` DESC LIMIT 1")->fetch_array(MYSQLI_ASSOC);
?>
<?= $slavamin['name']; ?>
</b></div>
<u style="line-height:30px;font-size:19px;">
<?php
$clan = $mc->query("SELECT `name` FROM `clan` Where `id`='" . $profile['id_clan'] . "'")->fetch_array(MYSQLI_ASSOC);
if (isset($clan['name'])) {
?>
<a onclick="showContent('/clan/clan_all.php?see_clan=<?= $profile['id_clan']; ?>')">
<?= $clan['name']; ?>
</a>
<?php } ?>
</u>
</center>
<div class="z101">
Голоса за/против:
<span style="float: right;">
<?= $profile['rep_p']; ?>
/
<?= $profile['rep_m']; ?>
</span>
</div>
<div class="z101">
Победы/Поражения (монстры):
<span style="float: right;">
<?= $profile['pobedmonser']; ?>/<?= $profile['losemonser']; ?>
</span>
</div>
<div class="z101">
Победы (игроки):
<span style="float: right;">
<?= $profile['pobedigroki']; ?>
</span>
</div>
<br>
<?php if ($user['access'] > 2) { ?>
<center>
<div>
<a onclick="showContent('/admin/admin.php?id=<?= $profile['id']; ?>')">
Изменить персонажа (Админ)
</a>
</div>
<br>
</center>
<?php } ?>
<?php
if ($user['access'] > 2) {
if ($profile['game_ban'] == 0) {
?>
<center>
<div>
<a onclick="showContent('/admin/game_ban.php?ban&id=<?= $profile['id']; ?>')">
Заблокировать
</a>
</div>
<br>
</center>
<?php } else { ?>
<center>
<div>
<a onclick="showContent('/admin/game_ban.php?upban&id=<?= $profile['id']; ?>')">
Разблокировать
</a>
</div>
<br>
</center>
<?php
}
}
?>
<u style="font-size:18px; font-weight:350;">
<center>
<div>
<a onclick="showContent('/profile/<?= $profile['id']; ?>/1')">
снаряжение
</a>
</div>
</center>
<?php if ($id == $profile['id']) { ?>
<center>
<div>
<a onclick="showContent('/mail.php?id_2=<?= $profile['id']; ?>')">
сообщение
</a>
</div>
</center>
<center>
<div>
<?php
$myfriend = $mc->query("SELECT COUNT(*) FROM `friends` WHERE (`id_user`='" . $user['id'] . "' AND `id_user2` = '" . $profile['id'] . "') OR (`id_user` = '" . $profile['id'] . "' AND `id_user2` = '" . $user['id'] . "')")->fetch_array(MYSQLI_ASSOC);
$myfriends = $mc->query("SELECT `red`,COUNT(0) FROM `friends` WHERE (`id_user` = '" . $user['id'] . "' AND `id_user2` = '" . $profile['id'] . "') OR (`id_user` = '" . $profile['id'] . "' AND `id_user2` = '" . $user['id'] . "')")->fetch_array(MYSQLI_ASSOC);
$res;
$resS;
if ($user['side'] == 0 || $user['side'] == 1) {
$res = 'Sh';
} else if ($user['side'] == 2 || $user['side'] == 3) {
$res = 'No';
}
if ($profile['side'] == 0 || $profile['side'] == 1) {
$resS = 'Sh';
} else if ($profile['side'] == 2 || $profile['side'] == 3) {
$resS = 'No';
}
?>
<?php if ($myfriends['COUNT(0)'] == 0) { ?> <a onclick="showContent('friends.php?addfriends=<?= $profile['id'] ?>')">добавить в Друзья</a><?php } ?>
<?php
if ($myfriends['COUNT(0)'] != 0) {
if ($myfriends['red'] == 0) {
?> <a onclick="showContent('/friends.php?dellfriends=<?= $profile['id'] ?>')">удалить из друзей</a>
<?php
}
}
?>
</div>
</center>
<center>
<div>
<a onclick="showContent('/shop_gift.php?menu&id=<?= $profile['id'] ?>')">
сделать подарок
</a>
</div>
</center>
<center>
<div>
<a onclick="showContent('/history_name.php?id=<?= $profile['id'] ?>')">
История Ников
</a>
</div>
</center>
<center>
<div>
<?php if ($user['des'] > 1 && $user['id_clan'] == $profile['id_clan'] && $profile['des'] < 1) { ?>
<a onclick="showContent('/clan/chempadd.php?chempadd=<?= $profile['id'] ?>')">Выставить чемпионом</a><br>
<?php } elseif ($user['des'] > 1 && $user['id_clan'] == $profile['id_clan'] && $profile['des'] == 1) { ?>
<a onclick="showContent('/clan/chempdel.php?chempdel=<?= $profile['id'] ?>')">Снять чемпиона</a><br>
<?php } ?>
</div>
</center>
<center>
<div>
<?php if ($user['des'] > 2 && $user['id_clan'] == $profile['id_clan'] && $profile['des'] < 2) { ?>
<a onclick="showContent('/clan/desadd.php?desadd=<?= $profile['id'] ?>')">Назначить десятником</a><br>
<?php } elseif ($user['des'] > 2 && $user['id_clan'] == $profile['id_clan'] && $profile['des'] == 2) { ?>
<a onclick="showContent('/clan/desdel.php?desdel=<?= $profile['id'] ?>')">Снять десятника</a><br>
<?php } ?>
</div>
</center>
<center>
<div>
<?php if ($user['des'] > 2 && $user['id_clan'] == $profile['id_clan']) { ?>
<a onclick="showContent('/clan/wignat.php?wignat=<?= $profile['id'] ?>')">Выгнать из клана</a>
<?php } elseif ($user['des'] > 1 && $profile['id_clan'] == 0 && $myfriend['COUNT(*)'] == 1 && $res == $resS) { ?>
<a onclick="showContent('/clan/priglas.php?priglas=<?= $profile['id'] ?>')">Пригласить в клан</a>
<?php } ?>
</div>
</center>
</u>
<?php
if (isset($profile['id']) && $gifts = $mc->query("SELECT * FROM `gifts` WHERE `id_2` = '" . $profile['id'] . "' ORDER BY `id` DESC LIMIT 3")->fetch_all(MYSQLI_ASSOC)) {
$giftsnum = $mc->query("SELECT * FROM `gifts` WHERE `id_2` = '" . $profile['id'] . "' ORDER BY `id` DESC LIMIT 4")->num_rows;
?>
<div>
<table class="table_block2">
<tr>
<td class="block101"></td>
<td class="block102"></td>
<td class="block103"></td>
</tr>
<tr>
<td class="block104"></td>
<td class="block105" style="text-align: center;">
<?php for ($i = 0; $i < count($gifts); $i++) { ?>
<img onclick="showContent('gifts.php?gifts=<?= $gifts[$i]['id']; ?>&id=<?= $profile['id']; ?>')" style="width: 80px;height: 80px;" class="shops" src='/images/gifts/<?= $gifts[$i]['id_img']; ?>.png'>
<?php } ?>
<?php if ($giftsnum > 3) { ?>
<a onclick="showContent('/gifts.php?id=<?= $profile['id'] ?>')" style="text-decoration: underline;">
Еще...
</a>
<?php } ?>
</td>
<td class="block106"></td>
</tr>
<tr>
<td class="block107"></td>
<td class="block108"></td>
<td class="block109"></td>
</tr>
</table>
</div>
<?php
}
}
if ($user['access'] > 2) {
//вывод списка боев данного игрока
$resCBattle = $mc->query("SELECT * FROM `battle` WHERE `Mid` = '" . $profile['id'] . "' ORDER BY `battle_start_time` DESC");
if ($resCBattle->num_rows > 0) {
$BattleCAll = $resCBattle->fetch_all(MYSQLI_ASSOC);
?>
<details>
<summary style='text-align: left;padding-left: 10px;font-size: 22px;'>-Бои игрока(<?= count($BattleCAll); ?>)-</summary>
<?php
foreach ($BattleCAll as $nextvalue) {
$resBattle = $mc->query("SELECT `battle_id`,`Pname`,`Pnamevs`,`Pvsname`,`battle_start_time`,`level` FROM `battle` WHERE `Pnamevs` !='' && `battle_id` ='" . $nextvalue['battle_id'] . "'");
if ($resBattle->num_rows > 0) {
$value = $resBattle->fetch_array(MYSQLI_ASSOC);
?>
<table style="width: 98%;margin: auto;">
<tr>
<td onclick="showContent('/admin/battle/index.php?view_battle=<?= $value['battle_id']; ?>')" style="max-width: 100%" class="clanturblock">
<?= $value['Pname']; ?>[<?= $value['level']; ?>]<br>
<?= $value['Pnamevs'] . " " . ($value['Pvsname'] != "" ? " vs " . $value['Pvsname'] : ""); ?><br>
<?= date("d:m H:i:s", $value['battle_start_time']); ?>
</td>
<td onclick="showContent('/admin/battle/index.php?end_battle=<?= $value['battle_id']; ?>')" style="width: 20%" onmouseover="this.style.backgroundColor = '#ddca9f'" onmouseout="this.style.backgroundColor = ''">
<img src="../../img/button/btnno.png" alt="delete" style="width: 100%">
</td>
</tr>
</table>
<?php
}
}
?>
</details>
<?php
}
}
} else {
//снаряжение
?>
<?php
$drespers = [];
$persequip1 = $mc->query("SELECT * FROM `userbag` WHERE `id_user`='" . $profile['id'] . "' AND `dress`=1");
while ($persequip = $persequip1->fetch_array(MYSQLI_ASSOC)) {
$namedress = $mc->query("SELECT * FROM `shop` WHERE `id`='" . $persequip['id_shop'] . "'")->fetch_array(MYSQLI_ASSOC);
if ($namedress['stil'] > 0) {
$colorStyle = ["black", "green", "blue", "red", "yellow"];
$namedress['name'] = '<font style="color:' . $colorStyle[$namedress['stil']] . ';font-weight: bold;">' . $namedress['name'] . '</font>';
}
if (!isset($drespers[$persequip['id_punct']])) {
$drespers[$persequip['id_punct']] = "";
}
if ($drespers[$persequip['id_punct']] != "") {
if ($persequip['id_punct'] == 9) {
if ($persequip['koll'] >= 0 && $persequip['koll'] < 99) {
$drespers[$persequip['id_punct']] .= ' , ' . $namedress['name'] . '(' . $persequip['koll'] . ')';
} else {
$drespers[$persequip['id_punct']] .= ' , ' . $namedress['name'] . '(99)';
}
} else {
if ($persequip['iznos'] >= 0 && $persequip['iznos'] < 99) {
$drespers[$persequip['id_punct']] .= ' , ' . $namedress['name'];
} else {
$drespers[$persequip['id_punct']] .= ' , ' . $namedress['name'];
}
}
} else {
if ($persequip['id_punct'] == 9) {
if ($persequip['koll'] >= 0 && $persequip['koll'] < 99) {
$drespers[$persequip['id_punct']] .= $namedress['name'] . '(' . $persequip['koll'] . ')';
} else {
$drespers[$persequip['id_punct']] .= $namedress['name'] . '(99)';
}
} else {
if ($persequip['iznos'] >= 0 && $persequip['iznos'] < 99) {
$drespers[$persequip['id_punct']] .= $namedress['name'];
} else {
$drespers[$persequip['id_punct']] .= $namedress['name'];
}
}
}
}
for ($i = 1; $i < 9; $i++) {
if (!isset($drespers[$i])) {
$drespers[$i] = "-";
}
}
?>
<table><tbody>
<tr><td><b>Оружие: </b></td><td><?= isset($drespers[1]) ? $drespers[1] : "-"; ?></td></tr>
<tr><td><b>Защита: </b></td><td><?= isset($drespers[2]) ? $drespers[2] : "-"; ?></td></tr>
<tr><td><b>Шлем: </b></td><td><?= isset($drespers[3]) ? $drespers[3] : "-"; ?></td></tr>
<tr><td><b>Перчатки: </b></td><td><?= isset($drespers[4]) ? $drespers[4] : "-"; ?></td></tr>
<tr><td><b>Доспехи: </b></td><td><?= isset($drespers[5]) ? $drespers[5] : "-"; ?></td></tr>
<tr><td><b>Обувь: </b></td><td><?= isset($drespers[6]) ? $drespers[6] : "-"; ?></td></tr>
<tr><td><b>Амулет: </b></td><td><?= isset($drespers[7]) ? $drespers[7] : "-"; ?></td></tr>
<tr><td><b>Кольца: </b></td><td><?= isset($drespers[8]) ? $drespers[8] : "-"; ?></td></tr>
<tr><td style="float: left;"><b>Пояс: </b></td><td><?= isset($drespers[9]) ? $drespers[9] : "-"; ?></td></tr>
</tbody></table>
<?php
if ($user['access'] > 2) {
echo "-Админ-<br>";
$persequip3 = $mc->query("SELECT * FROM `userbag` WHERE `id_user`='" . $profile['id'] . "' ORDER BY `userbag`.`id_punct` ASC, `id` ASC");
while ($persequip2 = $persequip3->fetch_array(MYSQLI_ASSOC)) {
$namedress2 = $mc->query("SELECT * FROM `shop` WHERE `id`='" . $persequip2['id_shop'] . "'")->fetch_array(MYSQLI_ASSOC);
?>
<?php if ($persequip2['dress'] == "1") { ?>
<b><?php echo $namedress2["name"]; ?></b>
<a onclick="showContent('/profile/<?php echo $profile['id']; ?>/1?weshEdit=h&ids=<?php echo $persequip2["id"]; ?>')"><font>[Снять]</font></a>
<?php } else if ($persequip2['dress'] == "0") { ?>
<?php echo $namedress2["name"]; ?>
<a onclick="showContent('/profile/<?php echo $profile['id']; ?>/1?weshEdit=s&ids=<?php echo $persequip2["id"]; ?>')"><font>[Одеть]</font></a>
<?php } ?>
<a onclick="showContent('/profile/<?php echo $profile['id']; ?>/1?weshEdit=d&ids=<?php echo $persequip2["id"]; ?>')"><font>[Удалить]</font></a><br> <?php
}
?>
<table style="width: 100%;margin: auto;"><tbody><tr>
<td style="width: 50px;"><input class="id_dress" type="number" value="0" style="width: 98%;height: 40px;"></td>
<td style="max-width: 100%;"><input onkeyup="searchdress(this.value)" class="name_dress" type="text" style="width: 98%;height: 40px;"></td>
<td style="width: 50px;text-align: center;"><button onclick="add();" class="button" style="width:100%;height: 40px;text-align: center">Добавить</button></td>
</tbody></tr></table>
<div class="search">
</div>
<script>
function add() {
showContent('/profile/<?php echo $profile['id']; ?>/1?weshEdit=a&ids=' + $(".id_dress").val());
}
function add2(a) {
showContent('/profile/<?php echo $profile['id']; ?>/1?weshEdit=a&ids=' + a);
}
function searchdress(etext) {
var arr;
$.ajax({
type: "POST",
url: "/admin/shop/search.php?etext=" + etext,
dataType: "text",
success: function (data) {
$(".search").html("");
if (data != "") {
arr = JSON.parse(data);
for (var i = 0; i < arr.length; i++) {
addDressSearched(arr[i].name, arr[i].level, arr[i].id);
}
}
},
error: function () {
$(".search").html("error");
}
});
}
function addDressSearched(name, level, id) {
$(".search").append(
'<table style="width: 100%;margin: auto;"><tr><td style="max-width: 100%;text-align: center;">' +
name + ' [' + level + '] id : ' + id +
'</td><td style="width: 50px;text-align: center;">' +
'<button onclick="add2(' + id + ');" class="button" style="width:100%;height: 40px;text-align: center" >Добавить</button></td></tr></table>'
);
}
</script>
<?php
if (isset($_GET['weshEdit']) && isset($_GET['ids'])) {
echo $_GET['weshEdit'];
if ($_GET['weshEdit'] == "h" || $_GET['weshEdit'] == "s") {
$hs = 0;
if ($_GET['weshEdit'] == "s") {
$hs = 1;
}
//hide - снять
echo $_GET['ids'] . "Снять";
$dresssnyatreid = $mc->query("SELECT * FROM `userbag` WHERE `id_user`='" . $profile['id'] . "' AND `id`='" . $_GET['ids'] . "'")->fetch_array(MYSQLI_ASSOC);
$mc->query("DELETE FROM `userbag` WHERE `id_user`='" . $profile['id'] . "' AND `id`='" . $_GET['ids'] . "'");
$mc->query("INSERT INTO `userbag`("
. "`id_user`,"
. " `id_shop`,"
. " `id_punct`,"
. " `dress`,"
. " `iznos`,"
. " `id_quests`,"
. " `koll`,"
. " `max_hc`,"
. " `time_end`,"
. " `stil`,"
. " `BattleFlag`"
. ") VALUES ("
. "'" . $dresssnyatreid['id_user'] . "',"
. "'" . $dresssnyatreid['id_shop'] . "',"
. "'" . $dresssnyatreid['id_punct'] . "',"
. "'" . $hs . "',"
. "'" . $dresssnyatreid['iznos'] . "',"
. "'" . $dresssnyatreid['id_quests'] . "',"
. "'" . $dresssnyatreid['koll'] . "',"
. "'" . $dresssnyatreid['max_hc'] . "',"
. "'" . $dresssnyatreid['time_end'] . "',"
. "'" . $dresssnyatreid['stil'] . "',"
. "'" . $dresssnyatreid['BattleFlag'] . "'"
. ")");
}
if ($_GET['weshEdit'] == "d") {
//hide - удалить
$mc->query("DELETE FROM `userbag` WHERE `id_user`='" . $profile['id'] . "' AND `id`='" . $_GET['ids'] . "'");
}
if ($_GET['weshEdit'] == "a") {
//add добавить
//echo "Добавлю потом";
$dresssnyatreid = $mc->query("SELECT * FROM `shop` WHERE `id`='" . $_GET['ids'] . "'")->fetch_array(MYSQLI_ASSOC);
//дата истечения в unix
if ($dresssnyatreid['time_s'] > 0) {
$time_the_lapse = $dresssnyatreid['time_s'] + time();
} else {
$time_the_lapse = 0;
}
$mc->query("INSERT INTO `userbag`("
. "`id_user`,"
. " `id_shop`,"
. " `id_punct`,"
. " `dress`,"
. " `iznos`,"
. " `id_quests`,"
. " `koll`,"
. " `max_hc`,"
. " `time_end`,"
. " `stil`,"
. " `BattleFlag`"
. ") VALUES ("
. "'" . $profile['id'] . "',"
. "'" . $dresssnyatreid['id'] . "',"
. "'" . $dresssnyatreid['id_punct'] . "',"
. "'0',"
. "'" . $dresssnyatreid['iznos'] . "',"
. "'" . $dresssnyatreid['id_quests'] . "',"
. "'" . $dresssnyatreid['koll'] . "',"
. "'" . $dresssnyatreid['max_hc'] . "',"
. "'$time_the_lapse',"
. "'" . $dresssnyatreid['stil'] . "',"
. "'" . $dresssnyatreid['BattleFlag'] . "'"
. ")");
}
$arr = $mc->query("SELECT `stil` FROM `userbag` WHERE `id_user` = '" . $profile['id'] . "' && `id_punct` < '10' && `dress` ='1' GROUP BY `stil` ASC")->fetch_all(MYSQLI_ASSOC);
if (count($arr) == 2) {
$stil = $arr[1]['stil'];
} elseif (count($arr) == 1 && $arr[0]['stil'] != 0) {
$stil = $arr[0]['stil'];
} elseif (count($arr) < 2) {
$stil = 0;
} else {
$stil = 5;
}
$mc->query("UPDATE `users` SET `stil`='$stil' WHERE `id` = '" . $profile['id'] . "'");
?> <script>showContent('/profile/<?php echo $profile['id']; ?>/1');</script> <?php
}
}
?>
<?php } ?>
</center>
<div class="stone"></div>
<?php
}
}
}
if ($id == 0) {
require_once ('HeroClass.php');
//объект класса воеводы
$class = new HeroClass;
?>
<script>
var MaxCanvas = $("mobitva:eq(-1)").find("#MaxCanvas")[0];
var ctxMaxCanvas = MaxCanvas.getContext("2d");
var buffMaxCanvas = document.createElement("canvas");
var ctxbuffMaxCanvas = buffMaxCanvas.getContext("2d");
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
var cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
var myReq;
var weaponData = [];
var imageweapon;
var spriteData = [];
var spriteImage = [];
var PshieldNC = 0;
var Pshield = 0;
var Panimation = 0;
var Pweapon = 0;
var Panimationcount = 0;
var Pico = <?= $class->img; ?>;
var PposX = -170;
var PposY = -130;
MaxCanvas.width = buffMaxCanvas.width = 280;
MaxCanvas.height = buffMaxCanvas.height = 150;
if (Pico === 9) {
PposX = -170;
PposY = -75;
MaxCanvas.width = buffMaxCanvas.width = 280;
MaxCanvas.height = buffMaxCanvas.height = 200;
}
$.ajax({
url: "./json/weapon/weapon_new.json?139.1114",
dataType: "json",
success: function (a) {
weaponData = JSON.parse(JSON.stringify(a));
imageweapon = new Image;
imageweapon.src = weaponData.img;
}
});
$.ajax({
url: "./json/Mob/animation.json?136.3233",
dataType: "json",
success: function (a) {
spriteData = JSON.parse(JSON.stringify(a));
var newJson = {};
for (a = 1; a <= spriteData.AnimCount; a++) {
newJson[a] = spriteData[spriteData.keyToAnim[a]];
}
newJson.img = spriteData.img;
spriteData = newJson;
for (a = 1; a < spriteData.img.length + 1; a++)
spriteImage[a] = new Image, spriteImage[a].src = spriteData.img[a - 1];
}
});
function render() {
MaxCanvas.width = MaxCanvas.width;
try {
//ctxMaxCanvas.fillStyle = "#ff0000";
//ctxMaxCanvas.fillRect(0,0,MaxCanvas.width,MaxCanvas.height);
ctxMaxCanvas.drawImage(buffMaxCanvas,
0,
0,
MaxCanvas.width,
MaxCanvas.height,
0,
0,
buffMaxCanvas.width,
buffMaxCanvas.height
);
} catch (e) {
}
MyLib.setTimeid[100] = setTimeout(function () {
myReq = requestAnimationFrame(render);
}, 1000 / 10);
}
myReq = requestAnimationFrame(render);
MyLib.intervaltimer[1] = setInterval(function () {
buffMaxCanvas.width = buffMaxCanvas.width;
try {
if (Panimationcount >= spriteData[Pico][Panimation].length) {
Panimationcount = 0;
}
for (var a = 0; a < spriteData[Pico][Panimation][Panimationcount].length; a++) {
if (spriteData[Pico][Panimation][Panimationcount][a][9] !== -1) {
ctxbuffMaxCanvas.save();
ctxbuffMaxCanvas.translate(Math.round(buffMaxCanvas.width / 2 + spriteData[Pico][Panimation][Panimationcount][a][4] + spriteData[Pico][Panimation][Panimationcount][a][6] / 2) + PposX, Math.round(spriteData[Pico][Panimation][Panimationcount][a][5] + spriteData[Pico][Panimation][Panimationcount][a][7] / 2) + PposY);
ctxbuffMaxCanvas.rotate(spriteData[Pico][Panimation][Panimationcount][a][8] * Math.PI / 180);
ctxbuffMaxCanvas.drawImage(spriteImage[Pico], spriteData[Pico][Panimation][Panimationcount][a][0], spriteData[Pico][Panimation][Panimationcount][a][1], spriteData[Pico][Panimation][Panimationcount][a][2], spriteData[Pico][Panimation][Panimationcount][a][3], Math.round(-spriteData[Pico][Panimation][Panimationcount][a][6] / 2), Math.round(-spriteData[Pico][Panimation][Panimationcount][a][7] / 2), spriteData[Pico][Panimation][Panimationcount][a][6], spriteData[Pico][Panimation][Panimationcount][a][7]);
ctxbuffMaxCanvas.restore();
} else {
ctxbuffMaxCanvas.save();
ctxbuffMaxCanvas.translate(Math.round(buffMaxCanvas.width / 2 + spriteData[Pico][Panimation][Panimationcount][a][4] + spriteData[Pico][Panimation][Panimationcount][a][6] / 2) + PposX, Math.round(spriteData[Pico][Panimation][Panimationcount][a][5] + spriteData[Pico][Panimation][Panimationcount][a][7] / 2) + PposY);
ctxbuffMaxCanvas.rotate(spriteData[Pico][Panimation][Panimationcount][a][8] * Math.PI / 180);
ctxbuffMaxCanvas.drawImage(imageweapon, weaponData.imgC[Pweapon][0], weaponData.imgC[Pweapon][1], weaponData.imgC[Pweapon][2], weaponData.imgC[Pweapon][3], Math.round(-weaponData.imgC[Pweapon][2] / 2), Math.round(-weaponData.imgC[Pweapon][3] / 2), weaponData.imgC[Pweapon][2], weaponData.imgC[Pweapon][3]);
ctxbuffMaxCanvas.restore();
}
}
} catch (e) {
}
Panimationcount++;
}, 200);</script>
<center>
<canvas id='MaxCanvas'></canvas>
<br>
<?= $profile['name']; ?>
</center>
<hr>
<?php
echo $class->text;
//айди монстра воевода
$amob = 98;
//переменная
$mobidarr = [];
//создаем список
$mobidarr[] = "" . $amob;
//запишем список в бд
$mc->query("UPDATE `users` SET `huntList` = '" . json_encode($mobidarr) . "' WHERE `users`.`id` = '" . $user['id'] . "'");
echo "<br><br>Команды для чата:<br>Воевода<br>Воевода,привет<br>Воевода,как дела?";
echo "<hr>";
//HuntMobBattleOne(0);
?>
<a onclick="HuntMobBattleOne(0);">Атаковать</a>
<?php
} if (isset($_GET['bonus'])) {
$footval = "bonus";
?>
<center>-Бонусы-</center>
<table style="margin: auto;border-spacing: 0;width: 100%;">
<tr>
<td class="ptb_1l"></td>
<td class="ptb_1c"></td>
<td class="ptb_1r"></td>
</tr>
<tr>
<td class="ptb_2l"></td>
<td class="ptb_2c">
<table style="width: 100%;">
<tr>
<td style="width: 70%">Здоровье:</td>
<td style="width: 6%;text-align:right;">
<img src='/images/icons/hp.png' width='18'>
<td style="width: 12%;text-align:right;"><?= $arr['health']; ?></td>
<td style="width: 12%;text-align:right;"><?= $arr['health']; ?></td>
</tr>
<tr>
<td>Урон:</td>
<td style="text-align:right; ">
<img src='/images/icons/power.jpg' width='18' >
</td>
<td style="text-align:right;"><?= $arr['strength']; ?></td>
<td style="text-align:right;"><?= $arr['strength']; ?></td>
</tr>
<tr>
<td>Точность:</td>
<td style="text-align:right; ">
<img src='/images/icons/toch.png' width='18' >
</td>
<td style="text-align:right;"><?= $arr['toch']; ?></td>
<td style="text-align:right;"><?= $arr['toch']; ?></td>
</tr>
<tr>
<td>Броня:</td>
<td style="text-align:right; ">
<img src='/images/icons/bron.png' width='18' >
</td>
<td style="text-align:right;"><?= $arr['bron']; ?></td>
<td style="text-align:right;"><?= $arr['bron']; ?></td>
</tr>
<tr>
<td>Уворот:</td>
<td style="text-align:right; ">
<img src='/images/icons/img235.png' width='18'>
</td>
<td style="text-align:right;"><?= $arr['lov']; ?></td>
<td style="text-align:right;"><?= $arr['lov']; ?></td>
</tr>
<tr>
<td>Оглушение:</td>
<td style="text-align:right; ">
<img src='/images/icons/kd.png' width='18' >
</td>
<td style="text-align:right;"><?= $arr['kd']; ?></td>
<td style="text-align:right;"><?= $arr['kd']; ?></td>
</tr>
<tr>
<td>Блок:</td>
<td style="text-align:right; ">
<img src='/images/icons/shit.png' width='18' >
</td>
<td style="text-align:right;"><?= $arr['block']; ?></td>
<td style="text-align:right;"><?= $arr['block']; ?></td>
</tr>
</table>
</td>
<td class="ptb_2r"></td>
</tr>
<tr><td class="ptb_3l"></td>
<td class="ptb_3c"></td>
<td class="ptb_3r"></td>
</tr>
</table><?php
}
require_once ('system/foot/foot.php');
?>