2018-01-28 16:40:49 +00:00
|
|
|
|
<?php
|
|
|
|
|
session_start();
|
|
|
|
|
if (!($_SESSION['uid'] > 0)) header("Location: index.php");
|
|
|
|
|
include "config.php";
|
2018-11-05 19:34:35 +00:00
|
|
|
|
#$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
2018-01-28 16:40:49 +00:00
|
|
|
|
include "functions.php";
|
|
|
|
|
if ($user['battle'] != 0) {
|
|
|
|
|
header('location: fbattle.php');
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
if ($user['in_tower'] == 1) {
|
|
|
|
|
header('Location: towerin.php');
|
|
|
|
|
die();
|
|
|
|
|
}
|
2018-11-05 19:34:35 +00:00
|
|
|
|
$al = db::c()->query('SELECT `accses` FROM `aligns` WHERE `align` = ?i',$user['align'])->fetch_assoc();
|
2018-01-28 16:40:49 +00:00
|
|
|
|
header("Cache-Control: no-cache");
|
|
|
|
|
?>
|
|
|
|
|
<HTML>
|
|
|
|
|
<HEAD>
|
2018-11-05 19:34:35 +00:00
|
|
|
|
<link rel=stylesheet href="css/main.css">
|
|
|
|
|
<meta charset=utf-8">
|
|
|
|
|
|
2018-01-28 16:40:49 +00:00
|
|
|
|
<SCRIPT>
|
|
|
|
|
var Hint3Name = '';
|
|
|
|
|
|
|
|
|
|
// Заголовок, название скрипта, имя поля с логином
|
|
|
|
|
function runmagic(title, magic, name) {
|
|
|
|
|
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
|
|
|
'<form action="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
|
|
|
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
|
|
|
|
|
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=15>15 мин</option><option value=30>30 мин</option><option value=60>1 час</option>' +
|
|
|
|
|
'<option value=180>3 часа</option><option value=360>6 часов</option><option value=720>12 часов</option><option value=1440>сутки</option></select>' +
|
|
|
|
|
'</TD><TD width=30><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
|
|
|
|
document.all("hint3").style.visibility = "visible";
|
|
|
|
|
document.all("hint3").style.left = 100;
|
|
|
|
|
document.all("hint3").style.top = 100;
|
|
|
|
|
document.all(name).focus();
|
|
|
|
|
Hint3Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function runmagicf(title, magic, name) {
|
|
|
|
|
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
|
|
|
'<form action="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
|
|
|
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
|
|
|
|
|
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=15>15 мин<option value=30>30 мин<option value=60>1 час' +
|
|
|
|
|
'<option value=180>3 часа<option value=360>6 часов<option value=720>12 часов<option value=1440>сутки<option value=4320>3 суток<option value=10080>неделя</select>' +
|
|
|
|
|
'</TD><TD width=30><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
|
|
|
|
document.all("hint3").style.visibility = "visible";
|
|
|
|
|
document.all("hint3").style.left = 100;
|
|
|
|
|
document.all("hint3").style.top = 100;
|
|
|
|
|
document.all(name).focus();
|
|
|
|
|
Hint3Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function runmagic1(title, magic, name) {
|
|
|
|
|
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
|
|
|
'<form action="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
|
|
|
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
|
|
|
|
|
'</TD><TD width=30><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
|
|
|
|
document.all("hint3").style.visibility = "visible";
|
|
|
|
|
document.all("hint3").style.left = 100;
|
|
|
|
|
document.all("hint3").style.top = 100;
|
|
|
|
|
document.all(name).focus();
|
|
|
|
|
Hint3Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function runmagic2(title, magic, name) {
|
|
|
|
|
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
|
|
|
'<form action="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
|
|
|
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
|
|
|
|
|
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=2>2 дня<option value=3>3 дня<option value=7>неделя<option value=14>2 недели' +
|
|
|
|
|
'<option value=30>1 месяц<option value=60>2 месяца<option value=365>бессрочно</select>' +
|
|
|
|
|
'</TD><TD width=30><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
|
|
|
|
document.all("hint3").style.visibility = "visible";
|
|
|
|
|
document.all("hint3").style.left = 100;
|
|
|
|
|
document.all("hint3").style.top = 100;
|
|
|
|
|
document.all(name).focus();
|
|
|
|
|
Hint3Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function runmagic3(title, magic, name) {
|
|
|
|
|
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
|
|
|
'<form action="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<? echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
|
|
|
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT TYPE=text NAME="' + name + '">' +
|
|
|
|
|
'<br>Причина: <INPUT TYPE=text size=25 NAME="palcom"></TD><TD width=30><INPUT TYPE="submit" value=" »» "></TD></TR></TABLE></FORM></td></tr></table>';
|
|
|
|
|
document.all("hint3").style.visibility = "visible";
|
|
|
|
|
document.all("hint3").style.left = 100;
|
|
|
|
|
document.all("hint3").style.top = 100;
|
|
|
|
|
document.all(name).focus();
|
|
|
|
|
Hint3Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function runmagic4(title, magic, name, name1) {
|
|
|
|
|
document.all("hint3").innerHTML = '<table width=100% cellspacing=1 cellpadding=0 bgcolor=CCC3AA><tr><td align=center><B>' + title + '</td><td width=20 align=right valign=top style="cursor: hand" onclick="closehint3();"><BIG><B>x</b></BIG></td></tr><tr><td colspan=2>' +
|
|
|
|
|
'<form action="orden.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td><INPUT TYPE=hidden name=sd4 value="<? echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
|
|
|
|
'Укажите логин жениха: <INPUT TYPE=text NAME="' + name + '">' +
|
|
|
|
|
'<br>Укажите логин невесты: <INPUT TYPE=text NAME="' + name1 + '">' +
|
|
|
|
|
'<br><center><INPUT TYPE="submit" value=" »» "></center></TD></TR></TABLE></FORM></td></tr></table>';
|
|
|
|
|
document.all("hint3").style.visibility = "visible";
|
|
|
|
|
document.all("hint3").style.left = 100;
|
|
|
|
|
document.all("hint3").style.top = 100;
|
|
|
|
|
document.all(name).focus();
|
|
|
|
|
Hint3Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function closehint3() {
|
|
|
|
|
document.all("hint3").style.visibility = "hidden";
|
|
|
|
|
Hint3Name = '';
|
|
|
|
|
}
|
|
|
|
|
</SCRIPT>
|
|
|
|
|
</HEAD>
|
|
|
|
|
<body leftmargin=5 topmargin=5 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
|
|
|
|
|
<table align=right>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><INPUT TYPE="button" onClick="location.href='main.php';" value="Вернуться" title="Вернуться">
|
|
|
|
|
</table>
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
function imp($array)
|
|
|
|
|
{
|
|
|
|
|
foreach ($array as $k => $v) {
|
|
|
|
|
$str .= $k . ";" . $v . ";";
|
|
|
|
|
}
|
|
|
|
|
return $str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function expa($str)
|
|
|
|
|
{
|
|
|
|
|
$array = explode(";", $str);
|
|
|
|
|
for ($i = 0; $i <= count($array) - 2; $i = $i + 2) {
|
|
|
|
|
$rarray[$array[$i]] = $array[$i + 1];
|
|
|
|
|
}
|
|
|
|
|
return $rarray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "<div align=left><h4>Бонус к опыту:</h4>+50%</div><br />";
|
|
|
|
|
echo "<div align=left><h4>Боевые:</h4>возможность одевать вещи всех склонностей</div><br />";
|
|
|
|
|
echo "<div align=left><h4>Визуальные:</h4>уникальный образ для персонажа и уникальные картинки для стандартных вещей</div><br />";
|
|
|
|
|
echo "<div align=left><h4>Статусные</h4>возможность принимать участие в противостоянии света против тьмы за любую из сторон</div><br />";
|
|
|
|
|
echo "<div align=left><h4>Магические</h4>возможность выбрать 10 любых абилок и использовать их 10 юзов в сутки. Вы выбрали:</div>";
|
|
|
|
|
|
|
|
|
|
//print_r($al);
|
|
|
|
|
$moj = expa($al['accses']);
|
|
|
|
|
|
|
|
|
|
if (in_array($_POST['use'], array_keys($moj))) {
|
|
|
|
|
//echo $_GET['use'];
|
|
|
|
|
$abil = mysql_fetch_array(mysql_query("SELECT `abil` FROM `users` WHERE `id`='{$user['id']}';"));
|
|
|
|
|
switch ($_POST['use']) {
|
|
|
|
|
case "ct1": {
|
|
|
|
|
if ($abil['abil'][0] > 0) {
|
|
|
|
|
include("./magic/ct1.php");
|
|
|
|
|
if ($outok == 1)
|
|
|
|
|
mysql_query("UPDATE `users` SET `abil`=`abil`-100 WHERE `id`='{$user['id']}';");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "ct2": {
|
|
|
|
|
if ($abil['abil'][1] > 0) {
|
|
|
|
|
include("./magic/ct2.php");
|
|
|
|
|
if ($outok == 1)
|
|
|
|
|
mysql_query("UPDATE `users` SET `abil`=`abil`-10 WHERE `id`='{$user['id']}';");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "ct3": {
|
|
|
|
|
if ($abil['abil'][2] > 0) {
|
|
|
|
|
include("./magic/ct3.php");
|
|
|
|
|
if ($outok == 1)
|
|
|
|
|
mysql_query("UPDATE `users` SET `abil`=`abil`-1 WHERE `id`='{$user['id']}';");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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 "attack":
|
|
|
|
|
include("./magic/eattack.php");
|
|
|
|
|
break;
|
|
|
|
|
case "attack_t": {
|
|
|
|
|
include("./magic/attack_t.php");
|
|
|
|
|
if ($skipper == 1)// header("Location:fbattle.php");
|
|
|
|
|
die("<script>location.href='fbattle.php';</script>");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "battack":
|
|
|
|
|
include("./magic/ebattack.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":
|
|
|
|
|
include("./magic/ct_all.php");
|
|
|
|
|
break;
|
|
|
|
|
case "check":
|
|
|
|
|
include("./magic/check.php");
|
|
|
|
|
break;
|
|
|
|
|
case "brat": {
|
|
|
|
|
include("./magic/brat.php");
|
|
|
|
|
if ($skipper == 1)// header("Location:fbattle.php");
|
|
|
|
|
die("<script>location.href='fbattle.php';</script>");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case "vampir":
|
|
|
|
|
include("./magic/vampir.php");
|
|
|
|
|
break;
|
|
|
|
|
case "bexit":
|
|
|
|
|
include("./magic/bexit.php");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echo "<table>";
|
|
|
|
|
echo "<tr><td><br><br>";
|
|
|
|
|
foreach ($moj as $k => $v) {
|
|
|
|
|
//echo $k;
|
|
|
|
|
switch ($k) {
|
|
|
|
|
case "sleep":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Наложить заклятие молчания";
|
|
|
|
|
break;
|
|
|
|
|
case "sleepf":
|
|
|
|
|
if (($user['align'] > '2' && $user['align'] < '3') || $user['align'] == '1.99') {
|
|
|
|
|
$script_name = "runmagicf";
|
|
|
|
|
$magic_name = "Наложить заклятие форумного молчания";
|
|
|
|
|
} else {
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$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 "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 = "runmagic";
|
|
|
|
|
$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 = "runmagic1";
|
|
|
|
|
$magic_name = "Присвоить склонность (Законник)";
|
|
|
|
|
break;
|
|
|
|
|
case "ddark":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Присвоить склонность (Тьма)";
|
|
|
|
|
break;
|
|
|
|
|
case "dlight":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Присвоить склонность (Свет)";
|
|
|
|
|
break;
|
|
|
|
|
case "note":
|
|
|
|
|
$script_name = "runmagic";
|
|
|
|
|
$magic_name = "Редактировать личное дело";
|
|
|
|
|
break;
|
|
|
|
|
case "sys":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$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 "bexit":
|
|
|
|
|
$script_name = "runmagic1";
|
|
|
|
|
$magic_name = "Выйти из боя";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if ($script_name) {
|
|
|
|
|
$action_ok = 1;
|
|
|
|
|
$abil = mysql_fetch_array(mysql_query("SELECT `abil` FROM `users` WHERE `id`='{$user['id']}';"));
|
|
|
|
|
if ($user['align'] > '7' && $user['align'] < '8') {
|
|
|
|
|
if ($k == 'ct1') {
|
|
|
|
|
if ($abil['abil'] < 100)
|
|
|
|
|
$action_ok = 0;
|
|
|
|
|
}
|
|
|
|
|
if ($k == 'ct2') {
|
|
|
|
|
if ($abil['abil'] % 100 < 10)
|
|
|
|
|
$action_ok = 0;
|
|
|
|
|
}
|
|
|
|
|
if ($k == 'ct3') {
|
|
|
|
|
if (($abil['abil'] % 100) % 10 < 1)
|
|
|
|
|
$action_ok = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//echo("Value=".$abil['abil']);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
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> ";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($user['align'] > '7' && $user['align'] < '8') {
|
|
|
|
|
|
|
|
|
|
$abil = mysql_fetch_array(mysql_query("SELECT `abil` FROM `users` WHERE `id`='{$user['id']}';"));
|
|
|
|
|
if (!$abil['abil'][0]) $abil['abil'][0] = "0";
|
|
|
|
|
if (!$abil['abil'][1]) $abil['abil'][1] = "0";
|
|
|
|
|
if (!$abil['abil'][2]) $abil['abil'][2] = "0";
|
|
|
|
|
echo("<br />Осталось использований:<br />");
|
|
|
|
|
echo("<img src='i/magic/ct1.gif' title='Исцелить легкую травму'> Исцелить легкую травму - " . $abil['abil'][0] . "<br />");
|
|
|
|
|
echo("<img src='i/magic/ct2.gif' title='Исцелить среднюю травму'> Исцелить среднюю травму - " . $abil['abil'][1] . "<br />");
|
|
|
|
|
echo("<img src='i/magic/ct3.gif' title='Исцелить тяжелую травму'> Исцелить тяжелую травму - " . $abil['abil'][2] . "<br />");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "</td></tr></table>";
|
|
|
|
|
if ($skipper == 1) header("Location:fbattle.php");
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
<script>
|
|
|
|
|
var xmlHttpp = [];
|
|
|
|
|
|
|
|
|
|
function ajax_func(func, iid, getpar, postpar) {
|
|
|
|
|
xmlHttpp[iid] = GetXmlHttpObject1();
|
|
|
|
|
if (xmlHttpp[iid] == null) {
|
|
|
|
|
alert("Browser does not support HTTP Request");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
document.getElementById(iid).innerHTML = "<img src='./i/loading2.gif' />";
|
|
|
|
|
var url = "./ajax/" + func + ".php";
|
|
|
|
|
url = url + "?" + getpar;
|
|
|
|
|
xmlHttpp[iid].open("POST", url, true);
|
|
|
|
|
xmlHttpp[iid].onreadystatechange = function () {
|
|
|
|
|
if (xmlHttpp[iid].readyState == 4 || xmlHttpp[iid].readyState == "complete") {
|
|
|
|
|
if (document.getElementById(iid) == '[object HTMLInputElement]')
|
|
|
|
|
document.getElementById(iid).value = xmlHttpp[iid].responseText;
|
|
|
|
|
else
|
|
|
|
|
document.getElementById(iid).innerHTML = xmlHttpp[iid].responseText;
|
|
|
|
|
document.getElementById('chat').scrollTop = document.getElementById('chat').scrollHeight + 10;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
xmlHttpp[iid].setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
|
|
|
xmlHttpp[iid].send(postpar);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetXmlHttpObject1() {
|
|
|
|
|
var xmlHttp1 = null;
|
|
|
|
|
try {
|
|
|
|
|
// Firefox, Opera 8.0+, Safari
|
|
|
|
|
xmlHttp1 = new XMLHttpRequest();
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
//Internet Explorer
|
|
|
|
|
try {
|
|
|
|
|
xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
|
|
|
|
|
}
|
|
|
|
|
catch (e) {
|
|
|
|
|
xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return xmlHttp1;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|