2019-01-09 18:45:40 +00:00
|
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Copyright (c) 2019.
|
|
|
|
|
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
|
|
|
|
* Project name: Battles-Game
|
|
|
|
|
* One file to rule 'em all!
|
|
|
|
|
*/
|
|
|
|
|
|
2021-08-29 22:34:50 +00:00
|
|
|
|
use Battles\Database\DBPDO;
|
2021-02-01 16:42:52 +00:00
|
|
|
|
use Battles\Template;
|
2021-08-29 22:34:50 +00:00
|
|
|
|
use Battles\User;
|
2021-02-01 16:42:52 +00:00
|
|
|
|
|
2019-01-09 18:45:40 +00:00
|
|
|
|
require_once 'functions.php';
|
2021-02-01 19:20:23 +00:00
|
|
|
|
if (!empty($_GET['teleport']) && $user->getAdmin() == 1) {
|
2021-08-29 22:34:50 +00:00
|
|
|
|
DBPDO::$db->execute('update users, online set users.room = 20, online.room = 20 where user_id = id and user_id = ?', User::$current->getId());
|
2020-08-30 00:55:53 +00:00
|
|
|
|
}
|
2019-01-18 19:59:19 +00:00
|
|
|
|
|
2019-01-09 19:49:59 +00:00
|
|
|
|
# ORDEN PHP
|
2021-08-29 22:34:50 +00:00
|
|
|
|
$_POST['use'] ??= null;
|
2021-02-01 19:20:23 +00:00
|
|
|
|
if ($user->getAdmin()) {
|
2021-08-29 22:34:50 +00:00
|
|
|
|
$abil = DBPDO::$db->fetch('SELECT 1 FROM users WHERE id = ?i', $user->getId());
|
2021-02-01 20:53:28 +00:00
|
|
|
|
//$abil = unserialize($abil['abil']);
|
2019-01-09 19:49:59 +00:00
|
|
|
|
switch ($_POST['use']) {
|
2020-08-30 16:48:39 +00:00
|
|
|
|
case "healing":
|
2020-08-30 21:40:58 +00:00
|
|
|
|
include("./magic/Healing.php");
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct1":
|
2021-02-01 16:42:52 +00:00
|
|
|
|
if ($abil[0] > 0 && $user->getAlign() == 6) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("./magic/ct1.php");
|
2019-01-09 19:49:59 +00:00
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[0] -= 1;
|
2021-02-01 16:42:52 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->getId());
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2021-02-01 16:42:52 +00:00
|
|
|
|
} elseif ($user->getAlign() != 6) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("./magic/ct1.php");
|
2020-08-30 00:55:53 +00:00
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct2":
|
2021-02-01 16:42:52 +00:00
|
|
|
|
if ($abil[1] > 0 && $user->getAlign() == 6) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("./magic/ct2.php");
|
2019-01-09 19:49:59 +00:00
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[1] -= 1;
|
2021-02-01 16:42:52 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->getId());
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2021-02-01 16:42:52 +00:00
|
|
|
|
} elseif ($user->getAlign() != 6) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("./magic/ct2.php");
|
2020-08-30 00:55:53 +00:00
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct3":
|
2021-02-01 16:42:52 +00:00
|
|
|
|
if ($abil[2] > 0 && $user->getAlign() == 6) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("./magic/ct3.php");
|
2019-01-09 19:49:59 +00:00
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[2] -= 1;
|
2021-02-01 16:42:52 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->getId());
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2021-02-01 16:42:52 +00:00
|
|
|
|
} elseif ($user->getAlign() != 6) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("./magic/ct3.php");
|
2020-08-30 00:55:53 +00:00
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct_all":
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("./magic/ct_all.php");
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "attack":
|
|
|
|
|
include("./magic/eattack.php");
|
|
|
|
|
break;
|
|
|
|
|
case "attack_t":
|
|
|
|
|
include("./magic/attack_t.php");
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($skipper == 1) {
|
|
|
|
|
header("Location:fbattle.php");
|
|
|
|
|
exit();
|
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "battack":
|
|
|
|
|
include("./magic/ebattack.php");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "attackk_close":
|
2021-02-01 16:42:52 +00:00
|
|
|
|
if ($abil[1] > 0 && $user->getAlign() == 2) {
|
2019-01-09 19:49:59 +00:00
|
|
|
|
include("./magic/attackk_close.php");
|
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[1] -= 1;
|
2021-02-01 16:42:52 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->getId());
|
2020-08-30 00:55:53 +00:00
|
|
|
|
header("Location:fbattle.php");
|
|
|
|
|
exit();
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
include("./magic/attackk_close.php");
|
2020-08-30 00:55:53 +00:00
|
|
|
|
header("Location:fbattle.php");
|
|
|
|
|
exit();
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "attackk_open":
|
2021-02-01 16:42:52 +00:00
|
|
|
|
if ($abil[1] > 0 && $user->getAlign() == 2) {
|
2019-01-09 19:49:59 +00:00
|
|
|
|
include("./magic/attackk_open.php");
|
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[2] -= 1;
|
2021-02-01 16:42:52 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->getId());
|
2020-08-30 00:55:53 +00:00
|
|
|
|
header("Location:fbattle.php");
|
|
|
|
|
exit();
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
include("./magic/attackk_open.php");
|
2020-08-30 00:55:53 +00:00
|
|
|
|
header("Location:fbattle.php");
|
|
|
|
|
exit();
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "brat":
|
|
|
|
|
include("./magic/brat.php");
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($skipper == 1) {
|
|
|
|
|
header("Location:fbattle.php");
|
|
|
|
|
exit();
|
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "vampir":
|
|
|
|
|
include("./magic/vampir.php");
|
|
|
|
|
break;
|
|
|
|
|
case "crush":
|
|
|
|
|
include("./magic/devastate.php");
|
|
|
|
|
break;
|
|
|
|
|
case "def":
|
|
|
|
|
include("./magic/defence.php");
|
|
|
|
|
break;
|
|
|
|
|
case "bexit":
|
|
|
|
|
include("./magic/bexit.php");
|
|
|
|
|
break;
|
2019-01-09 20:02:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function show_byu($type)
|
|
|
|
|
{
|
|
|
|
|
global $user;
|
|
|
|
|
$type = $type + 20;
|
2020-09-30 11:12:39 +00:00
|
|
|
|
$typeName = [
|
|
|
|
|
21 => '15 минут тишины',
|
|
|
|
|
22 => '30 минут тишины',
|
|
|
|
|
23 => 'изоляция поединка',
|
|
|
|
|
24 => 'исцеление 20%',
|
|
|
|
|
25 => 'исцеление 35%',
|
|
|
|
|
26 => 'исцеление 50%',
|
|
|
|
|
27 => 'лечение тяжёлой травмы',
|
|
|
|
|
28 => 'нападение',
|
|
|
|
|
29 => 'кровавое нападение',
|
|
|
|
|
30 => 'объятия смерти',
|
|
|
|
|
31 => 'оставить запись в лог боя',
|
|
|
|
|
32 => 'снятие изоляции поединка',
|
|
|
|
|
33 => 'воскрешение',
|
|
|
|
|
34 => 'порождение клона',
|
|
|
|
|
35 => 'эфирное воздействие',
|
|
|
|
|
];
|
|
|
|
|
$typeImage = [
|
|
|
|
|
21 => 'silence15',
|
|
|
|
|
22 => 'silence30',
|
|
|
|
|
23 => 'closebattle',
|
|
|
|
|
24 => 'cureHP15',
|
|
|
|
|
25 => 'cureHP45',
|
|
|
|
|
26 => 'cureHP60',
|
|
|
|
|
27 => 'cure3',
|
|
|
|
|
28 => 'attack',
|
|
|
|
|
29 => 'attackb',
|
|
|
|
|
30 => 'poison_e',
|
|
|
|
|
31 => 'note',
|
|
|
|
|
32 => 'unlockbattle',
|
|
|
|
|
33 => 'reanimationD',
|
|
|
|
|
34 => 'mirror',
|
|
|
|
|
35 => 'antimirror',
|
|
|
|
|
];
|
2021-02-01 16:42:52 +00:00
|
|
|
|
if ($user->getClan()) {
|
2021-02-01 20:53:28 +00:00
|
|
|
|
$clan = db::c()->query('SELECT owner_id FROM clans WHERE short_name = "?s"', $user->getClan())->fetch_assoc();
|
|
|
|
|
if ($clan['owner_id'] == $user->getId()) {
|
2019-01-09 20:02:42 +00:00
|
|
|
|
$r = '<div style="text-align: center;"><a href="javascript:void(0);" class="byu_klan" id="' . $type . '">купить 1 шт.</a></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r = '<div style="text-align: center;"><a href="javascript:void(0);">Вы не глава</a></div>';
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$r = '<div style="text-align: center;"><a href="javascript:void(0);">Вы не состоите в клане</a></div>';
|
|
|
|
|
}
|
2020-09-30 11:12:39 +00:00
|
|
|
|
return <<<FFFF
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">$typeName[$type]</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/$typeImage[$type].gif" alt="$typeName[$type]"></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
$r
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
FFFF;
|
2019-01-09 20:02:42 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-09-30 19:12:34 +00:00
|
|
|
|
|
2021-02-01 16:42:52 +00:00
|
|
|
|
Template::header('user_abilities');
|
2021-02-01 20:53:28 +00:00
|
|
|
|
echo <<<RELICTS
|
|
|
|
|
<span class='legend'>Клановые и личные реликты</span><br>
|
|
|
|
|
<button disabled>sleep15</button>
|
|
|
|
|
<button disabled>sleep30</button>
|
|
|
|
|
<button disabled>closebattle</button>
|
|
|
|
|
<button disabled>heal20</button>
|
|
|
|
|
<button disabled>heal35</button>
|
|
|
|
|
<button disabled>heal50</button>
|
|
|
|
|
<button disabled>travmoff</button>
|
|
|
|
|
<button disabled>attack</button>
|
|
|
|
|
<button disabled>bloodattack</button>
|
|
|
|
|
<button disabled>death</button>
|
|
|
|
|
<button disabled>comment</button>
|
|
|
|
|
<button disabled>openbattle</button>
|
|
|
|
|
<button disabled>reamdeath</button>
|
|
|
|
|
<button disabled>clone</button>
|
|
|
|
|
<button disabled>unclone</button>
|
|
|
|
|
RELICTS;
|
|
|
|
|
if ($user->getAdmin()) {
|
|
|
|
|
echo <<<A
|
|
|
|
|
<button onclick="location.href='?teleport=1'">Телепорт на ЦП</button>
|
|
|
|
|
A;
|
|
|
|
|
}
|
2019-01-09 20:02:42 +00:00
|
|
|
|
?>
|
2020-09-30 19:12:34 +00:00
|
|
|
|
<div style="float: right;">
|
|
|
|
|
<input type="button" onClick="location.href='main.php';" value="Вернуться">
|
|
|
|
|
</div>
|
|
|
|
|
<h2>Особые умения</h2>
|
|
|
|
|
<div style="text-align: center;" id=hint3></div>
|
|
|
|
|
<div>
|
|
|
|
|
<?php
|
2021-02-01 20:53:28 +00:00
|
|
|
|
if ($user->getAlign() == 2 || $user->getAdmin()) // Нейтралы
|
2020-09-30 19:12:34 +00:00
|
|
|
|
{
|
2019-01-09 20:02:42 +00:00
|
|
|
|
|
2021-02-01 20:53:28 +00:00
|
|
|
|
$abil = db::c()->query('SELECT 1 FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
|
|
|
|
//$abil = unserialize($abil['abil']);
|
2020-09-30 19:12:34 +00:00
|
|
|
|
for ($i = 0; $i < 3; $i++) {
|
|
|
|
|
if (!$abil[$i]) {
|
|
|
|
|
$abil[$i] = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo("<br />Осталось использований:<br />");
|
|
|
|
|
echo("<img src='i/magic/al_neut_power.gif' title='Сила нейтралитета'> Сила нейтралитета - " . $abil[0] . "<br />");
|
|
|
|
|
echo("<img src='i/magic/attackk_close.gif' title='Кулачное закрытое кровавое нападение'> Кулачное закрытое кровавое нападение - " . $abil[1] . "<br />");
|
|
|
|
|
echo("<img src='i/magic/attackk_open.gif' title='Кулачное закрытое нападение'> Кулачное закрытое нападение - " . $abil[2] . "<br />");
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-01 20:53:28 +00:00
|
|
|
|
if ($user->getAlign() == 6 || $user->getAdmin()) // Свет
|
2020-09-30 19:12:34 +00:00
|
|
|
|
{
|
|
|
|
|
|
2021-02-01 20:53:28 +00:00
|
|
|
|
$abil = db::c()->query('SELECT 1 FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
|
|
|
|
//$abil = unserialize($abil['abil']);
|
2020-09-30 19:12:34 +00:00
|
|
|
|
for ($i = 0; $i < 3; $i++) {
|
|
|
|
|
if (!$abil[$i]) {
|
|
|
|
|
$abil[$i] = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo("<br />Осталось использований:<br />");
|
|
|
|
|
echo("<img src='i/magic/ct1.gif' title='Исцелить легкую травму'> Исцелить легкую травму - " . $abil[0] . "<br />");
|
|
|
|
|
echo("<img src='i/magic/ct2.gif' title='Исцелить среднюю травму'> Исцелить среднюю травму - " . $abil[1] . "<br />");
|
|
|
|
|
echo("<img src='i/magic/ct3.gif' title='Исцелить тяжелую травму'> Исцелить тяжелую травму - " . $abil[2] . "<br />");
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
2019-01-09 20:02:42 +00:00
|
|
|
|
<h2>Реликты</h2>
|
|
|
|
|
<div class="contentContainer">
|
|
|
|
|
<div>
|
|
|
|
|
<fieldset style="width: 400px;">
|
|
|
|
|
<legend id="personal" class="box_user" href="#inlin" style="cursor: pointer;"
|
|
|
|
|
title="Магазин персональных реликтов">Персональные :
|
|
|
|
|
</legend>
|
2021-02-01 20:53:28 +00:00
|
|
|
|
[список в шапке]
|
2019-01-09 20:02:42 +00:00
|
|
|
|
</fieldset>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="padding-top: 15px;">
|
|
|
|
|
<fieldset style="width: 400px;">
|
|
|
|
|
<legend id="klans" class="box_klan" href="#inlines" style="cursor: pointer;"
|
|
|
|
|
title="Магазин клановых реликтов">Клановые :
|
|
|
|
|
</legend>
|
2021-02-01 20:53:28 +00:00
|
|
|
|
[список в шапке]
|
2019-01-09 20:02:42 +00:00
|
|
|
|
</fieldset>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="padding-top: 13px; padding-bottom: 13px;">
|
|
|
|
|
<fieldset style="width: 400px;">
|
|
|
|
|
<legend>Счёт</legend>
|
|
|
|
|
На счету <b><?= $bank['ekr'] ?></b> еврокредитов.
|
|
|
|
|
</fieldset>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="inlin">
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Заклятие молчания</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/silence15.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 1.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="1">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Заклятие молчания</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/silence30.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 2.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="2">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Закрыть бой</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/closebattle.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 10.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="3">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Исцеление +20%</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/cureHP15.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 0.50 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="4">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Исцеление +35%</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/cureHP45.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 0.80 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="5">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Исцеление +50%</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/cureHP60.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 1.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="6">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Лечение тяжелой травмы</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/cure3.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 1.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="7">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Нападение</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/attack.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 0.10 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="8">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Нападение (кровавое)</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/attackb.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 0.20 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="9">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items" style="display: none;">
|
|
|
|
|
<div class="title">Объятия смерти</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/poison_e.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 4.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="10">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Оставить запись в логе боя</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/note.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 0.02 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="11">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Открыть бой</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/unlockbattle.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 20.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="12">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items" style="display: none;">
|
|
|
|
|
<div class="title">Поднять мертвого</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/reanimationD.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 10.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="13">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Порождение клона</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/mirror.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 1.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="14">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="items">
|
|
|
|
|
<div class="title">Эфирное воздействие</div>
|
|
|
|
|
<div class="img"><img class="slot valign halign" src="/i/sh/antimirror.gif"/></div>
|
|
|
|
|
<div class="control">
|
|
|
|
|
Цена: 1.00 екр.
|
|
|
|
|
<div style="text-align: center;"><a href="javascript:void(0);" class="byu" id="15">купить 1 шт.</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="inlines">
|
2020-09-30 19:12:34 +00:00
|
|
|
|
<?= show_byu(1); ?>
|
|
|
|
|
<?= show_byu(2); ?>
|
|
|
|
|
<?= show_byu(3); ?>
|
|
|
|
|
<?= show_byu(4); ?>
|
|
|
|
|
<?= show_byu(5); ?>
|
|
|
|
|
<?= show_byu(6); ?>
|
|
|
|
|
<?= show_byu(7); ?>
|
|
|
|
|
<?= show_byu(8); ?>
|
|
|
|
|
<?= show_byu(9); ?>
|
|
|
|
|
<?= show_byu(10); ?>
|
|
|
|
|
<?= show_byu(11); ?>
|
|
|
|
|
<?= show_byu(12); ?>
|
|
|
|
|
<?= show_byu(13); ?>
|
|
|
|
|
<?= show_byu(14); ?>
|
|
|
|
|
<?= show_byu(15); ?>
|
2019-01-09 20:02:42 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
|
2019-01-16 17:45:30 +00:00
|
|
|
|
const types_user = ['Заклятие молчания 15 мин', 'Заклятие молчания 30 мин', 'Закрыть бой', 'Исцеление 20%', 'Исцеление 35%', 'Исцеление 50%', 'Лечение', 'Нападение', 'Кровавое нападение', 'Объятия смерти', 'Записки Комментатора', 'Открыть бой', 'Поднять мертвого', 'Клонирование', 'Переманить клона'];
|
|
|
|
|
const types_klan = ['Заклятие молчания 15 мин', 'Заклятие молчания 30 мин', 'Закрыть бой', 'Исцеление 20%', 'Исцеление 35%', 'Исцеление 50%', 'Лечение', 'Нападение', 'Клановое нападение', 'Объятия смерти', 'Записки Комментатора', 'Открыть бой', 'Поднять мертвого', 'Клонирование', 'Переманить клона'];
|
2019-01-09 20:02:42 +00:00
|
|
|
|
|
|
|
|
|
$(".box_klan").fancybox();
|
|
|
|
|
$(".box_user").fancybox();
|
|
|
|
|
|
|
|
|
|
$(".byu").on("click", function () {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
const type = $(this).attr('id');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
$.ajax({
|
|
|
|
|
type: 'POST',
|
|
|
|
|
url: 'fancy/buy.php',
|
2021-02-01 16:42:52 +00:00
|
|
|
|
data: "type=" + type + "&user=" + <?= $user->getId() ?> + "",
|
2019-01-09 20:02:42 +00:00
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data === 'success') {
|
|
|
|
|
$(".child").html('<b style="color: Red;">' + types_user[type - 1] + ' успешно куплено</b>');
|
|
|
|
|
$("#" + type + "").html('Купить еще?');
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
$(".child").html('Магазин персональных реликтов');
|
|
|
|
|
}, 500)
|
|
|
|
|
} else {
|
|
|
|
|
$("#" + type + "").html(data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".byu_klan").on("click", function () {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
const type = $(this).attr('id');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
$.ajax({
|
|
|
|
|
type: 'POST',
|
|
|
|
|
url: 'fancy/buy_klan.php',
|
2021-02-01 16:42:52 +00:00
|
|
|
|
data: "type=" + type + "&user=" + <?= $user->getId() ?> + "",
|
2019-01-09 20:02:42 +00:00
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data === 'success') {
|
|
|
|
|
$(".child").html('<b style="color: Red;">' + types_klan[type - 21] + ' успешно куплено</b>');
|
|
|
|
|
$("#" + type + "").html('Купить еще?');
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
$(".child").html('Магазин клановых реликтов');
|
|
|
|
|
}, 500)
|
|
|
|
|
} else {
|
|
|
|
|
$("#" + type + "").html(data);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
2020-08-30 00:55:53 +00:00
|
|
|
|
</script>
|