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!
|
|
|
|
|
*/
|
|
|
|
|
|
2019-01-09 18:53:04 +00:00
|
|
|
|
session_start();
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if (empty($_SESSION['uid'])) {
|
|
|
|
|
header("Location: index.php");
|
2020-09-30 11:12:39 +00:00
|
|
|
|
exit;
|
2020-08-30 00:55:53 +00:00
|
|
|
|
}
|
2019-01-09 18:45:40 +00:00
|
|
|
|
require_once 'functions.php';
|
2020-09-30 11:12:39 +00:00
|
|
|
|
$user = $user ?? [];
|
|
|
|
|
if (!empty($_GET['teleport']) && $user->admin == 1) {
|
2019-01-18 19:56:07 +00:00
|
|
|
|
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']);
|
2020-08-30 00:55:53 +00:00
|
|
|
|
}
|
2019-01-18 19:59:19 +00:00
|
|
|
|
|
2019-01-18 19:56:07 +00:00
|
|
|
|
|
2019-01-09 18:45:40 +00:00
|
|
|
|
?>
|
2020-09-30 11:12:39 +00:00
|
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="ru">
|
|
|
|
|
<head>
|
|
|
|
|
<link rel=stylesheet href="css/main.css">
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<title></title>
|
|
|
|
|
</head>
|
2019-01-09 20:02:42 +00:00
|
|
|
|
<body>
|
2019-01-18 19:56:07 +00:00
|
|
|
|
<div style="float: right;">
|
2020-08-30 00:55:53 +00:00
|
|
|
|
<?php if ($user->admin == 1): ?>
|
2019-01-18 19:56:07 +00:00
|
|
|
|
<button onclick="location.href='?teleport=1'">Телепорт на ЦП</button>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<input type="button" onClick="location.href='main.php';" value="Вернуться">
|
|
|
|
|
</div>
|
2019-01-09 20:02:42 +00:00
|
|
|
|
<h2>Особые умения</h2>
|
|
|
|
|
<div align=center id=hint3></div>
|
2019-01-09 18:45:40 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
2019-01-09 19:49:59 +00:00
|
|
|
|
# ORDEN PHP
|
2020-08-30 00:55:53 +00:00
|
|
|
|
$al = db::c()->query('SELECT `accses`,`name` FROM `aligns` WHERE `align` = ?i', $user->align)->fetch_assoc();
|
2019-01-09 19:49:59 +00:00
|
|
|
|
$moj = expa($al['accses']);
|
|
|
|
|
|
|
|
|
|
function imp($array)
|
|
|
|
|
{
|
|
|
|
|
$str = '';
|
2020-08-30 00:55:53 +00:00
|
|
|
|
foreach ($array as $k => $v) {
|
|
|
|
|
$str .= $k . ";" . $v . ";";
|
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
return $str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function expa($str)
|
|
|
|
|
{
|
|
|
|
|
$rarray = '';
|
|
|
|
|
$array = explode(";", $str);
|
2020-08-30 00:55:53 +00:00
|
|
|
|
for ($i = 0; $i <= count($array) - 2; $i = $i + 2) {
|
|
|
|
|
$rarray[$array[$i]] = $array[$i + 1];
|
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
return $rarray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (in_array($_POST['use'], array_keys($moj))) {
|
2020-08-30 00:55:53 +00:00
|
|
|
|
$abil = db::c()->query('SELECT abil FROM users WHERE id = ?i', $user->id)->fetch_assoc();
|
2019-01-09 19:49:59 +00:00
|
|
|
|
$abil = unserialize($abil['abil']);
|
|
|
|
|
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 "al_neut_power":
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($abil[0] > 0 && $user->align == 2) {
|
2019-01-09 19:49:59 +00:00
|
|
|
|
include("./magic/al_neut_power.php");
|
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[0] -= 1;
|
2020-08-30 00:55:53 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id);
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
} elseif ($user->align != 2) {
|
|
|
|
|
include("./magic/al_neut_power.php");
|
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct1":
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($abil[0] > 0 && $user->align == 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;
|
2020-08-30 00:55:53 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id);
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
} elseif ($user->align != 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":
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($abil[1] > 0 && $user->align == 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;
|
2020-08-30 00:55:53 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id);
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
} elseif ($user->align != 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":
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($abil[2] > 0 && $user->align == 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;
|
2020-08-30 00:55:53 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id);
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
} elseif ($user->align != 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 "sleep":
|
|
|
|
|
include("./magic/sleep.php");
|
|
|
|
|
break;
|
|
|
|
|
case "sleepf":
|
|
|
|
|
include("./magic/sleepf.php");
|
|
|
|
|
break;
|
|
|
|
|
case "sleep_off":
|
|
|
|
|
include("./magic/sleep_off.php");
|
|
|
|
|
break;
|
|
|
|
|
case "sleepf_off":
|
|
|
|
|
include("./magic/sleepf_off.php");
|
|
|
|
|
break;
|
|
|
|
|
case "haos":
|
|
|
|
|
include("./magic/haos.php");
|
|
|
|
|
break;
|
|
|
|
|
case "haos_off":
|
|
|
|
|
include("./magic/haos_off.php");
|
|
|
|
|
break;
|
|
|
|
|
case "obezl":
|
|
|
|
|
include("./magic/obezl.php");
|
|
|
|
|
break;
|
|
|
|
|
case "obezl_off":
|
|
|
|
|
include("./magic/obezl_off.php");
|
|
|
|
|
break;
|
|
|
|
|
case "death":
|
|
|
|
|
include("./magic/death.php");
|
|
|
|
|
break;
|
|
|
|
|
case "death_off":
|
|
|
|
|
include("./magic/death_off.php");
|
|
|
|
|
break;
|
|
|
|
|
case "ldadd":
|
|
|
|
|
include("./magic/ldadd.php");
|
|
|
|
|
break;
|
|
|
|
|
case "pal_off":
|
|
|
|
|
include("./magic/pal_off.php");
|
|
|
|
|
break;
|
|
|
|
|
case "marry":
|
|
|
|
|
include("./magic/marry.php");
|
|
|
|
|
break;
|
|
|
|
|
case "unmarry":
|
|
|
|
|
include("./magic/unmarry.php");
|
|
|
|
|
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 "check":
|
|
|
|
|
include("./magic/check.php");
|
|
|
|
|
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":
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($abil[1] > 0 && $user->align == 2) {
|
2019-01-09 19:49:59 +00:00
|
|
|
|
include("./magic/attackk_close.php");
|
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[1] -= 1;
|
2020-08-30 00:55:53 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id);
|
|
|
|
|
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":
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($abil[1] > 0 && $user->align == 2) {
|
2019-01-09 19:49:59 +00:00
|
|
|
|
include("./magic/attackk_open.php");
|
|
|
|
|
if ($outok == 1) {
|
|
|
|
|
$abil[2] -= 1;
|
2020-08-30 00:55:53 +00:00
|
|
|
|
db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id);
|
|
|
|
|
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;
|
|
|
|
|
case "vip":
|
|
|
|
|
include("./magic/vips.php");
|
|
|
|
|
break;
|
|
|
|
|
case "dlight":
|
|
|
|
|
include("./magic/dlight.php");
|
|
|
|
|
break;
|
|
|
|
|
case "ddark":
|
|
|
|
|
include("./magic/ddark.php");
|
|
|
|
|
break;
|
|
|
|
|
case "dneit":
|
|
|
|
|
include("./magic/dneit.php");
|
|
|
|
|
break;
|
|
|
|
|
case "un_align":
|
|
|
|
|
include("./magic/un_align.php");
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "<table><tr><td><br><br>";
|
|
|
|
|
foreach ($moj as $k => $v) {
|
|
|
|
|
switch ($k) {
|
|
|
|
|
case "sleep":
|
|
|
|
|
$script_name = "runmagic0";
|
|
|
|
|
$magic_name = "Наложить заклятие молчания";
|
|
|
|
|
break;
|
|
|
|
|
case "sleepf":
|
|
|
|
|
$script_name = "runmagicf";
|
|
|
|
|
$magic_name = "Наложить заклятие форумного молчания";
|
|
|
|
|
break;
|
2020-08-30 16:48:39 +00:00
|
|
|
|
case "healing":
|
2019-01-09 19:49:59 +00:00
|
|
|
|
$script_name = "runmagic1";
|
2020-08-30 16:48:39 +00:00
|
|
|
|
$magic_name = "Лечение";
|
2019-01-09 19:49:59 +00:00
|
|
|
|
break;
|
|
|
|
|
case "al_neut_power":
|
|
|
|
|
$script_name = "RunMagicSelf";
|
|
|
|
|
$magic_name = "Сила нейтралитета";
|
|
|
|
|
break;
|
|
|
|
|
case "ct1":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Исцелить легкую травму";
|
|
|
|
|
break;
|
|
|
|
|
case "ct2":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Исцелить среднюю травму";
|
|
|
|
|
break;
|
|
|
|
|
case "ct3":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Исцелить тяжелую травму";
|
|
|
|
|
break;
|
|
|
|
|
case "sleep_off":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Снять заклятие молчания";
|
|
|
|
|
break;
|
|
|
|
|
case "sleepf_off":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Снять заклятие форумного молчания";
|
|
|
|
|
break;
|
|
|
|
|
case "haos":
|
|
|
|
|
$script_name = "runmagic2";
|
|
|
|
|
$magic_name = "Наложить заклятие хаоса";
|
|
|
|
|
break;
|
|
|
|
|
case "haos_off":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Снять заклятие хаоса";
|
|
|
|
|
break;
|
|
|
|
|
case "death":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Наложить заклятие смерти";
|
|
|
|
|
break;
|
|
|
|
|
case "death_off":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Снять заклятие смерти";
|
|
|
|
|
break;
|
|
|
|
|
case "obezl":
|
|
|
|
|
$script_name = "runmagic2";
|
|
|
|
|
$magic_name = "Наложить заклятие обезличивания";
|
|
|
|
|
break;
|
|
|
|
|
case "obezl_off":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Снять заклятие обезличивания";
|
|
|
|
|
break;
|
|
|
|
|
case "pal_off":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Лишить звания Паладин";
|
|
|
|
|
break;
|
|
|
|
|
case "attack":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Нападение";
|
|
|
|
|
break;
|
|
|
|
|
case "attack_t":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Нападение на Темного";
|
|
|
|
|
break;
|
|
|
|
|
case "battack":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Кровавое нападение";
|
|
|
|
|
break;
|
|
|
|
|
case "attackk_close":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Кулачное закрытое кровавое нападение";
|
|
|
|
|
break;
|
|
|
|
|
case "attackk_open":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Кулачное закрытое нападение";
|
|
|
|
|
break;
|
|
|
|
|
case "marry":
|
|
|
|
|
$script_name = "runmagic4";
|
|
|
|
|
$magic_name = "Зарегистрировать брак";
|
|
|
|
|
break;
|
|
|
|
|
case "unmarry":
|
|
|
|
|
$script_name = "runmagic4";
|
|
|
|
|
$magic_name = "Расторгнуть брак";
|
|
|
|
|
break;
|
|
|
|
|
case "hidden":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Заклятие невидимости";
|
|
|
|
|
break;
|
|
|
|
|
case "teleport":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Телепортация";
|
|
|
|
|
break;
|
|
|
|
|
case "check":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Поставить проверку";
|
|
|
|
|
break;
|
|
|
|
|
case "ct_all":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Вылечить от травм";
|
|
|
|
|
break;
|
|
|
|
|
case "pal_buttons":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Отметить о прохождении проверки";
|
|
|
|
|
break;
|
|
|
|
|
case "vampir":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Вампиризм (выпить энергию другого игрока)";
|
|
|
|
|
break;
|
|
|
|
|
case "brat":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Помочь темному собрату (вмешаться в поединок)";
|
|
|
|
|
break;
|
|
|
|
|
case "dneit":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Присвоить склонность (Нейтральное Братство)";
|
|
|
|
|
break;
|
|
|
|
|
case "dpal":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Присвоить склонность (Паладин)";
|
|
|
|
|
break;
|
|
|
|
|
case "ddark":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Присвоить склонность (Темное Братство)";
|
|
|
|
|
break;
|
|
|
|
|
case "dlight":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Присвоить склонность (Светлое Братство)";
|
|
|
|
|
break;
|
|
|
|
|
case "un_align":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Лишить склонности";
|
|
|
|
|
break;
|
|
|
|
|
case "note":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Редактировать личное дело";
|
|
|
|
|
break;
|
|
|
|
|
case "sys":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Отправить в чат системное сообщение";
|
|
|
|
|
break;
|
|
|
|
|
case "scanner":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Показать лог действий модератора";
|
|
|
|
|
break;
|
|
|
|
|
case "rep":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Отчет о переводах";
|
|
|
|
|
break;
|
|
|
|
|
case "rost":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Присвоить статус";
|
|
|
|
|
break;
|
|
|
|
|
case "ldadd":
|
|
|
|
|
$script_name = "";
|
|
|
|
|
$magic_name = "Записать причину отправки в Хаос";
|
|
|
|
|
break;
|
|
|
|
|
case "crush":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Сокрушение";
|
|
|
|
|
break;
|
|
|
|
|
case "def":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Защита от оружия";
|
|
|
|
|
break;
|
|
|
|
|
case "bexit":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Выйти из боя";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($script_name) {
|
|
|
|
|
$action_ok = 1;
|
|
|
|
|
$abil = db::c()->query('SELECT `abil` FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
|
|
|
|
$abil = unserialize($abil['abil']);
|
|
|
|
|
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($user->align == 2) {
|
|
|
|
|
if ($k == 'al_neut_power' && $abil[0] < 1) {
|
|
|
|
|
$action_ok = 0;
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($k == 'attackk_close' && $abil[1] < 1) {
|
|
|
|
|
$action_ok = 0;
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($k == 'attackk_open' && $abil[2] < 1) {
|
|
|
|
|
$action_ok = 0;
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($user->align == 6) {
|
|
|
|
|
if ($k == 'ct1' && $abil[0] < 1) {
|
|
|
|
|
$action_ok = 0;
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($k == 'ct2' && $abil[1] < 1) {
|
|
|
|
|
$action_ok = 0;
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($k == 'ct3' && $abil[2] < 1) {
|
|
|
|
|
$action_ok = 0;
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($action_ok > 0) {
|
|
|
|
|
print "<a onclick=\"javascript:$script_name('$magic_name','$k','target','target1') \" href='#'><img src='i/magic/" . $k . ".gif' title='" . $magic_name . "'></a> ";
|
|
|
|
|
}
|
2019-01-09 19:49:59 +00:00
|
|
|
|
}
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($user->align == 2) // Нейтралы
|
2019-01-09 19:49:59 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
$abil = db::c()->query('SELECT `abil` FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
|
|
|
|
$abil = unserialize($abil['abil']);
|
|
|
|
|
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 />");
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($user->align == 6) // Свет
|
2019-01-09 19:49:59 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
$abil = db::c()->query('SELECT `abil` FROM `users` WHERE `id`= ?i', $_SESSION['uid'])->fetch_assoc();
|
|
|
|
|
$abil = unserialize($abil['abil']);
|
|
|
|
|
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 />");
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-09 20:02:42 +00:00
|
|
|
|
echo "</td></tr></table>";
|
|
|
|
|
|
|
|
|
|
#RELIKT PHP
|
|
|
|
|
function klan_relicts()
|
|
|
|
|
{
|
|
|
|
|
global $user;
|
|
|
|
|
$r = '';
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($user->clan > 0) {
|
|
|
|
|
$abils = db::c()->query('SELECT `id`, `klan`, `sleep15`, `sleep30`, `closebattle`, `heal20`, `heal35`, `heal50`, `travmoff`, `attack`, `bloodattack`, `death`, `comment`, `openbattle`, `reamdeath`, `clone`, `unclone` FROM `abils_klan` WHERE `klan` = ?i', $user->clan)->fetch_assoc();
|
2019-01-09 20:02:42 +00:00
|
|
|
|
if ($abils['sleep15'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=1", "target")\'><img src=\'i/sh/silence15.gif\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">' . $abils['sleep15'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence15.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['sleep30'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=2", "target")\'><img src=\'i/sh/silence30.gif\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">' . $abils['sleep30'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence30.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['closebattle'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?useds=3\'><img src=\'i/sh/closebattle.gif\' title=\'Закрыть бой\' /></a><div class="amount">' . $abils['closebattle'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/closebattle.gif\' style=\'opacity: 0.3;\' title=\'Закрыть бой\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['heal20'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?useds=4\'><img src=\'i/sh/cureHP15.gif\' title=\'Исцеление +20%\' /></a><div class="amount">' . $abils['heal20'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP15.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +20%\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['heal35'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?useds=5\'><img src=\'i/sh/cureHP45.gif\' title=\'Исцеление +35%\' /></a><div class="amount">' . $abils['heal35'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP45.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +35%\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['heal50'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?useds=6\'><img src=\'i/sh/cureHP60.gif\' title=\'Исцеление +50%\' /></a><div class="amount">' . $abils['heal50'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP60.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +50%\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['travmoff'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=7", "target")\'><img src=\'i/sh/cure3.gif\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">' . $abils['travmoff'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cure3.gif\' style=\'opacity: 0.3;\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['attack'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=8", "target")\'><img src=\'i/sh/attack.gif\' title=\'Нападение\' /></a><div class="amount">' . $abils['attack'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attack.gif\' style=\'opacity: 0.3;\' title=\'Нападение\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['bloodattack'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=10", "target")\'><img src=\'i/sh/attackb.gif\' title=\'Кровавое нападение\' /></a><div class="amount">' . $abils['bloodattack'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attackb.gif\' style=\'opacity: 0.3;\' title=\'Кровавое нападение\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['death'] > 0) {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/poison_e.gif\' title=\'Объятия смерти\' /></a><div class="amount">' . $abils['death'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/poison_e.gif\' style=\'opacity: 0.3;\' title=\'Объятия смерти\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['comment'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'note("Запрос", "?useds=11", "target");\'><img src=\'i/sh/note.gif\' title=\'Записки Комментатора\' /></a><div class="amount">' . $abils['comment'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/note.gif\' style=\'opacity: 0.3;\' title=\'Записки Комментатора\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['openbattle'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?useds=12\'><img src=\'i/sh/unlockbattle.gif\' title=\'Открыть бой\' /></a><div class="amount">' . $abils['openbattle'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/unlockbattle.gif\' style=\'opacity: 0.3;\' title=\'Открыть бой\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['reamdeath'] > 0) {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/reanimationD.gif\' title=\'Поднять мертвого\' /></a><div class="amount">' . $abils['reamdeath'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/reanimationD.gif\' style=\'opacity: 0.3;\' title=\'Поднять мертвого\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['clone'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?useds=14\'><img src=\'i/sh/mirror.gif\' title=\'Клонирование\' /></a><div class="amount">' . $abils['clone'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/mirror.gif\' style=\'opacity: 0.3;\' title=\'Клонирование\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['unclone'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?useds=15", "target")\'><img src=\'i/sh/antimirror.gif\' title=\'Эфирное воздействие\' /></a><div class="amount">' . $abils['unclone'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/antimirror.gif\' style=\'opacity: 0.3;\' title=\'Эфирное воздействие\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$r = 'Вы не состоите в клане ...';
|
|
|
|
|
}
|
|
|
|
|
return $r;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function user_relicts()
|
|
|
|
|
{
|
|
|
|
|
global $user;
|
|
|
|
|
$r = '';
|
2020-08-30 00:55:53 +00:00
|
|
|
|
$abils = db::c()->query('SELECT `id`, `uid`, `sleep15`, `sleep30`, `closebattle`, `heal20`, `heal35`, `heal50`, `travmoff`, `attack`, `bloodattack`, `death`, `comment`, `openbattle`, `reamdeath`, `clone`, `unclone` FROM `abils_user` WHERE `uid` = ?i', $user->id)->fetch_assoc();
|
2019-01-09 20:02:42 +00:00
|
|
|
|
if ($abils['sleep15'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=1", "target")\'><img src=\'i/sh/silence15.gif\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">' . $abils['sleep15'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence15.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 15 минут\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['sleep30'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=2", "target")\'><img src=\'i/sh/silence30.gif\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">' . $abils['sleep30'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/silence30.gif\' style=\'opacity: 0.3;\' title=\'Заклятие молчания 30 минут\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['closebattle'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?used=3\'><img src=\'i/sh/closebattle.gif\' title=\'Закрыть бой\' /></a><div class="amount">' . $abils['closebattle'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/closebattle.gif\' style=\'opacity: 0.3;\' title=\'Закрыть бой\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['heal20'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?used=4\'><img src=\'i/sh/cureHP15.gif\' title=\'Исцеление +20%\' /></a><div class="amount">' . $abils['heal20'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP15.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +20%\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['heal35'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?used=5\'><img src=\'i/sh/cureHP45.gif\' title=\'Исцеление +35%\' /></a><div class="amount">' . $abils['heal35'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP45.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +35%\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['heal50'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?used=6\'><img src=\'i/sh/cureHP60.gif\' title=\'Исцеление +50%\' /></a><div class="amount">' . $abils['heal50'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cureHP60.gif\' style=\'opacity: 0.3;\' title=\'Исцеление +50%\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['travmoff'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=7", "target")\'><img src=\'i/sh/cure3.gif\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">' . $abils['travmoff'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/cure3.gif\' style=\'opacity: 0.3;\' title=\'Лечение тяжелой травмы\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['attack'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=8", "target")\'><img src=\'i/sh/attack.gif\' title=\'Нападение\' /></a><div class="amount">' . $abils['attack'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attack.gif\' style=\'opacity: 0.3;\' title=\'Нападение\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['bloodattack'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=9", "target")\'><img src=\'i/sh/attackb.gif\' title=\'Кровавое нападение\' /></a><div class="amount">' . $abils['bloodattack'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/attackb.gif\' style=\'opacity: 0.3;\' title=\'Кровавое нападение\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['death'] > 0) {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=10", "target")\'><img src=\'i/sh/poison_e.gif\' title=\'Объятия смерти\' /></a><div class="amount">' . $abils['death'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/poison_e.gif\' style=\'opacity: 0.3;\' title=\'Объятия смерти\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['comment'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'note("Запрос", "?used=11", "target");\'><img src=\'i/sh/note.gif\' title=\'Записки Комментатора\' /></a><div class="amount">' . $abils['comment'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/note.gif\' style=\'opacity: 0.3;\' title=\'Записки Комментатора\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['openbattle'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?used=12\'><img src=\'i/sh/unlockbattle.gif\' title=\'Открыть бой\' /></a><div class="amount">' . $abils['openbattle'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/unlockbattle.gif\' style=\'opacity: 0.3;\' title=\'Открыть бой\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['reamdeath'] > 0) {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=13", "target")\'><img src=\'i/sh/reanimationD.gif\' title=\'Поднять мертвого\' /></a><div class="amount">' . $abils['reamdeath'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item" style=\'display: none;\'><a href=\'javascript: void(0);\'><img src=\'i/sh/reanimationD.gif\' style=\'opacity: 0.3;\' title=\'Поднять мертвого\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['clone'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'?used=14\'><img src=\'i/sh/mirror.gif\' title=\'Клонирование\' /></a><div class="amount">' . $abils['clone'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/mirror.gif\' style=\'opacity: 0.3;\' title=\'Клонирование\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
if ($abils['unclone'] > 0) {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\' onclick=\'runmagic1("Введите имя персонажа", "?used=15", "target")\'><img src=\'i/sh/antimirror.gif\' title=\'Эфирное воздействие\' /></a><div class="amount">' . $abils['unclone'] . '</div></div>';
|
|
|
|
|
} else {
|
|
|
|
|
$r .= '<div class="item"><a href=\'javascript: void(0);\'><img src=\'i/sh/antimirror.gif\' style=\'opacity: 0.3;\' title=\'Эфирное воздействие\' /></a><div class="amount">0</div></div>';
|
|
|
|
|
}
|
|
|
|
|
return $r;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_GET['used'])) {
|
|
|
|
|
if ($_GET['used'] == 1) {
|
|
|
|
|
include('magic/usability_user/sleep15.php');
|
|
|
|
|
} elseif ($_GET['used'] == 2) {
|
|
|
|
|
include('magic/usability_user/sleep30.php');
|
|
|
|
|
} elseif ($_GET['used'] == 3) {
|
|
|
|
|
include('magic/usability_user/close_battle.php');
|
|
|
|
|
} elseif ($_GET['used'] == 4) {
|
2020-08-30 19:32:08 +00:00
|
|
|
|
//include('magic/usability_user/heal20.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['used'] == 5) {
|
2020-08-30 19:32:08 +00:00
|
|
|
|
//include('magic/usability_user/heal35.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['used'] == 6) {
|
2020-08-30 19:32:08 +00:00
|
|
|
|
//include('magic/usability_user/heal50.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['used'] == 7) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include('magic/usability_user/travmoff.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['used'] == 8) {
|
|
|
|
|
include('magic/usability_user/attack.php');
|
|
|
|
|
} elseif ($_GET['used'] == 9) {
|
|
|
|
|
include('magic/usability_user/attack_blood.php');
|
|
|
|
|
} elseif ($_GET['used'] == 11) {
|
|
|
|
|
include('magic/usability_user/note.php');
|
|
|
|
|
} elseif ($_GET['used'] == 12) {
|
|
|
|
|
include('magic/usability_user/open_battle.php');
|
|
|
|
|
} elseif ($_GET['used'] == 13) {
|
|
|
|
|
include('magic/usability_user/reamdeath.php');
|
|
|
|
|
} elseif ($_GET['used'] == 14) {
|
|
|
|
|
include('magic/usability_user/clone.php');
|
|
|
|
|
} elseif ($_GET['used'] == 15) {
|
|
|
|
|
include('magic/usability_user/unclone.php');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_GET['useds'])) {
|
|
|
|
|
if ($_GET['useds'] == 1) {
|
|
|
|
|
include('magic/usability_klan/sleep15.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 2) {
|
|
|
|
|
include('magic/usability_klan/sleep30.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 3) {
|
|
|
|
|
include('magic/usability_klan/close_battle.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 4) {
|
2020-08-30 19:32:08 +00:00
|
|
|
|
//include('magic/usability_klan/heal20.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['useds'] == 5) {
|
2020-08-30 19:32:08 +00:00
|
|
|
|
//include('magic/usability_klan/heal35.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['useds'] == 6) {
|
2020-08-30 19:32:08 +00:00
|
|
|
|
//include('magic/usability_klan/heal50.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['useds'] == 7) {
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include('magic/usability_klan/travmoff.php');
|
2019-01-09 20:02:42 +00:00
|
|
|
|
} elseif ($_GET['useds'] == 8) {
|
|
|
|
|
include('magic/usability_klan/attack.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 9) {
|
|
|
|
|
include('magic/usability_klan/attack_blood.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 11) {
|
|
|
|
|
include('magic/usability_klan/note.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 12) {
|
|
|
|
|
include('magic/usability_klan/open_battle.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 13) {
|
|
|
|
|
include('magic/usability_klan/reamdeath.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 14) {
|
|
|
|
|
include('magic/usability_klan/clone.php');
|
|
|
|
|
} elseif ($_GET['useds'] == 15) {
|
|
|
|
|
include('magic/usability_klan/unclone.php');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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',
|
|
|
|
|
];
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if ($user->clan) {
|
|
|
|
|
$clan = db::c()->query('SELECT `id`, `glava` FROM `clans` WHERE `id` = ?i', $user->clan)->fetch_assoc();
|
|
|
|
|
if ($clan['glava'] == $user->id) {
|
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-08-30 00:55:53 +00:00
|
|
|
|
$is_ = db::c()->query('SELECT `id` FROM `abils_user` WHERE `uid` = ?i', $user->id)->fetch_assoc();
|
|
|
|
|
if (empty($is_['id'])) {
|
|
|
|
|
db::c()->query('INSERT INTO `abils_user` (`uid`) VALUES (?i)', $user->id);
|
|
|
|
|
}
|
2019-01-09 20:02:42 +00:00
|
|
|
|
|
2020-08-30 00:55:53 +00:00
|
|
|
|
if (empty($user->clan)) {
|
|
|
|
|
$is_ = db::c()->query('SELECT `id` FROM `abils_klan` WHERE `klan` = ?i', $user->clan)->fetch_assoc();
|
|
|
|
|
if (empty($is_['id'])) {
|
|
|
|
|
db::c()->query('INSERT INTO `abils_klan` (`klan`) VALUES (?i)', $user->clan);
|
|
|
|
|
}
|
2019-01-09 20:02:42 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$bank = db::c()->query('SELECT `ekr` FROM `bank` WHERE `id` = ?i ', $_SESSION['uid'])->fetch_assoc();
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<h2>Реликты</h2>
|
|
|
|
|
<div class="contentContainer">
|
|
|
|
|
<div>
|
|
|
|
|
<fieldset style="width: 400px;">
|
|
|
|
|
<legend id="personal" class="box_user" href="#inlin" style="cursor: pointer;"
|
|
|
|
|
title="Магазин персональных реликтов">Персональные :
|
|
|
|
|
</legend>
|
|
|
|
|
<?= user_relicts(); ?>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="padding-top: 15px;">
|
|
|
|
|
<fieldset style="width: 400px;">
|
|
|
|
|
<legend id="klans" class="box_klan" href="#inlines" style="cursor: pointer;"
|
|
|
|
|
title="Магазин клановых реликтов">Клановые :
|
|
|
|
|
</legend>
|
|
|
|
|
<?= klan_relicts(); ?>
|
|
|
|
|
</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">
|
|
|
|
|
<?= 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); ?>
|
|
|
|
|
</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',
|
2020-08-30 00:55:53 +00:00
|
|
|
|
data: "type=" + type + "&user=" + <?= $user->id ?> + "",
|
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',
|
2020-08-30 00:55:53 +00:00
|
|
|
|
data: "type=" + type + "&user=" + <?= $user->id ?> + "",
|
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>
|