1099 lines
59 KiB
PHP
1099 lines
59 KiB
PHP
<?php
|
||
/**
|
||
* Copyright (c) 2018.
|
||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||
* Project name: Battles-Game
|
||
*/
|
||
|
||
session_start();
|
||
//require_once '../functions.php';
|
||
$user = new User($_SESSION['uid']);
|
||
if (!$user->admin) {
|
||
header("HTTP/1.0 404 Not Found");
|
||
exit;
|
||
}
|
||
|
||
$al = db::c()->query('SELECT * FROM `aligns` WHERE `align` = "?s" LIMIT 1', $user['align'])->fetch_assoc();
|
||
|
||
function statsat($nu)
|
||
{ /*in admin.php*/
|
||
$stats = 0;
|
||
$master = 0;
|
||
$vinos = 0;
|
||
$money = 0;
|
||
|
||
foreach (Config::$exptable as $k => $v) {
|
||
if ($k == $nu) {
|
||
break;
|
||
}
|
||
$stats += $v[0];
|
||
$master += $v[1];
|
||
$vinos += $v[2];
|
||
$money += $v[3];
|
||
}
|
||
return ["stats" => $stats + 12, "master" => $master + 1, "vinos" => $vinos + 3, "money" => $money];
|
||
}
|
||
|
||
function imp($array)
|
||
{
|
||
$str = '';
|
||
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];
|
||
}
|
||
if (isset($rarray)) {
|
||
return $rarray;
|
||
} else {
|
||
return [];
|
||
}
|
||
}
|
||
|
||
if ($_POST['ali']) { //Что делает эта штука?
|
||
$accs = $_POST;
|
||
array_shift($accs);
|
||
array_shift($accs);
|
||
array_shift($accs);
|
||
db::c()->query('INSERT INTO `aligns` (`align`,`img`,`name`,`accses`) VALUES ("?s","?s","?s","?s") ON DUPLICATE KEY UPDATE `img` = "?s", `name` = "?s", `accses` = "?s"', $_POST['ali'], $_POST['im'], $_POST['txt'], imp($accs), $_POST['im'], $_POST['txt'], imp($accs));
|
||
}
|
||
|
||
$aligns = db::c()->query('SELECT `img`,`align`,`name` FROM `aligns` ORDER BY `align`');
|
||
Template::header('ᐰdminка');
|
||
?>
|
||
<link rel=stylesheet href="/css/admin.css">
|
||
<form method='post'>
|
||
<fieldset>
|
||
<legend><a href='#' onclick='show("sk")'>Склонности</a></legend>
|
||
<div id=sk style='display:none;'>
|
||
<table>
|
||
<?php while ($row = $aligns->fetch_assoc()): ?>
|
||
<tr class=row
|
||
onclick='document.all.im.value="<?= $row['img'] ?>"; document.all.ali.value="<?= $row['align'] ?>"; document.all.txt.value="<?= $row['name'] ?>";'>
|
||
<td><img src="/i/<?= $row['img'] ?>"></td>
|
||
<td><?= $row['align'] ?></td>
|
||
<td><?= $row['name'] ?></td>
|
||
</tr>
|
||
<?php endwhile ?>
|
||
<tr>
|
||
<td colspan=3><b>Добавить</b></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type='text' id='im' name='im' class='input' size=12></td>
|
||
<td><input type='text' class='input' size=6 id='ali' name='ali'></td>
|
||
<td><input type='text' class='input' size=55 id='txt' name='txt'></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan=3>
|
||
<table valign=middle>
|
||
<tr>
|
||
<td><input type='checkbox' name='sleep' class='input'><img src='../i/magic/sleep.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='sleepf' class='input'><img src='../i/magic/sleepf.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='sleep_off' class='input'><img
|
||
src='../i/magic/sleep_off.gif'></td>
|
||
<td><input type='checkbox' name='sleepf_off' class='input'><img
|
||
src='../i/magic/sleepf_off.gif'></td>
|
||
<td><input type='checkbox' name='haos' class='input'><img src='../i/magic/haos.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='haos_off' class='input'><img
|
||
src='../i/magic/haos_off.gif'></td>
|
||
<td><input type='checkbox' name='death' class='input'><img src='../i/magic/death.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='death_off' class='input'><img
|
||
src='../i/magic/death_off.gif'></td>
|
||
<!--<td><input type='checkbox' name='pal_buttons' class='input'><img src='i/magic/pal_buttons.gif'></td>-->
|
||
<td><input type='checkbox' name='check' class='input'><img src='../i/magic/check.gif'>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type='checkbox' name='attack' class='input'><img src='../i/magic/attack.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='attackb' class='input'><img
|
||
src='../i/magic/attackb.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='hidden' class='input'><img src='../i/magic/hidden.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='teleport' class='input'><img
|
||
src='../i/magic/teleport.gif'></td>
|
||
<td><input type='checkbox' name='travma' class='input'><img src='../i/magic/travma.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='cure' class='input'><img src='../i/magic/cure.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='vampir' class='input'><img src='../i/magic/vampir.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='brat' class='input'><img src='../i/magic/brat.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='dneit' class='input'><img src='../i/magic/dneit.gif'>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type='checkbox' name='dpal' class='input'><img src='../i/magic/dpal.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='ddark' class='input'><img src='../i/magic/ddark.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='note' class='input'><img src='../i/magic/note.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='sys' class='input'><img src='../i/magic/sys.gif'></td>
|
||
<td><input type='checkbox' name='scanner' class='input'><img
|
||
src='../i/magic/scanner.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='rep' class='input'><img src='../i/magic/rep.gif'></td>
|
||
<td><input type='checkbox' name='rost' class='input'><img src='../i/magic/rost.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='bexit' class='input'><img src='../i/magic/bexit.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='obezl' class='input'><img src='../i/magic/obezl.gif'>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type='checkbox' name='obezl_off' class='input'><img
|
||
src='../i/magic/obezl_off.gif'></td>
|
||
<td><input type='checkbox' name='marry' class='input'><img src='../i/magic/marry.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='unmarry' class='input'><img
|
||
src='../i/magic/unmarry.gif'>
|
||
</td>
|
||
<td><input type='checkbox' name='un_align' class='input'><img
|
||
src='../i/magic/un_align.gif'></td>
|
||
</tr>
|
||
</table>
|
||
<BR><input type='submit' class=button value='Добавить/изменить'></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</fieldset>
|
||
</form>
|
||
|
||
<form method=post>
|
||
<fieldset>
|
||
<legend><a href='#' onclick='show("sk3")'>Кланы</a></legend>
|
||
<div id=sk3 style='display:none;'>
|
||
<?php
|
||
$cl_reg_curr = db::c()->query('SELECT * FROM `reg_klan` LIMIT 1')->fetch_assoc();
|
||
// Clan adder : add clan
|
||
if ($_POST['clan_reg'] == 'add_clan') {
|
||
$ser_cl_rights = [];
|
||
$ser_cl_rights[$cl_reg_curr['owner']][0] = 1;
|
||
$ser_cl_rights[$cl_reg_curr['owner']][1] = 1;
|
||
$cl_rights = serialize($ser_cl_rights);
|
||
$add_clan = db::c()->query('INSERT INTO `clans` (`short`, `name`, `descr`, `glava`, `vozm`, `align`) VALUES ("?s","?s","?s","?s","?s",?i)',
|
||
$cl_reg_curr['abbr'], $cl_reg_curr['name'], $cl_reg_curr['descr'], $cl_reg_curr['owner'], $cl_rights, $cl_reg_curr['align']);
|
||
if ($add_clan) {
|
||
echo "<p>Заявка на клан <b>" . $cl_reg_curr['name'] . "</b> подтверждена успешно!</p>";
|
||
db::c()->query('DELETE FROM `reg_klan` WHERE `id` = ?i', $cl_reg_curr['id']);
|
||
$cl_reg_tmp = db::c()->query('SELECT `id` FROM `clans` WHERE `name` = "?s"', $cl_reg_curr['name'])->fetch_assoc();
|
||
$clan_msg_rec = db::c()->query('SELECT login FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner'])->fetch_assoc();
|
||
db::c()->query('UPDATE `users` SET `align` = ?i, `klan` = ?i, `status` = "?s" WHERE `id` = ?i', $cl_reg_curr['align'], $cl_reg_tmp['id'], "<b style='color:#008080'>Глава клана</b>", $cl_reg_curr['owner']);
|
||
$_POST['grn'] = $clan_msg_rec['login'];
|
||
$_POST['gr'] = "Ваша заявка на создание клана " . $cl_reg_curr['name'] . " принята!";
|
||
} else {
|
||
echo "Ошибка подтверждения регистрации!";
|
||
}
|
||
} elseif ($_POST['clan_reg'] == 'not_add_clan') { /* Clan ader : don't add clan*/
|
||
echo "<p>Заявка на клан <b>" . $cl_reg_curr['name'] . "</b> отклонена!</p>";
|
||
db::c()->query('DELETE FROM `reg_klan` WHERE `id` = ?i', $cl_reg_curr['id']);
|
||
$clan_msg_rec = db::c()->query('SELECT login FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner'])->fetch_assoc();
|
||
$_POST['grn'] = $clan_msg_rec['login'];
|
||
$_POST['gr'] = "Ваша заявка на создание клана " . $cl_reg_curr['name'] . " отклонена!";
|
||
}
|
||
$clan_q = db::c()->query('SELECT * FROM `reg_klan`')->getNumRows();
|
||
// Clan adder
|
||
if ($clan_q) {
|
||
echo "<p>Заявок в очереди на рассмотрение: <b>$clan_q</b></p>";
|
||
$clan_msg_rec = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner'])->fetch_assoc();
|
||
if ($_POST['clan_reg']) {
|
||
db::c()->query('DELETE FROM `reg_klan` WHERE `id` = ?i', $cl_reg_curr['id']);
|
||
}
|
||
echo "<p>Текущая заявка:</p>";
|
||
echo "<table class='adm'><tr><th>Прислал</th><th>Название</th><th>Краткое название</th><th>Сайт</th><th>Направленность</th><th>Описание</th><th>Дата/Время подачи</th></tr>";
|
||
echo "<tr><td>{$cl_reg_curr['owner']} aka {$clan_msg_rec['login']}</td><td>{$cl_reg_curr['name']}</td><td>{$cl_reg_curr['abr']}</td><td>{$cl_reg_curr['http']}</td><td>{$cl_reg_curr['align']}</td><td>{$cl_reg_curr['descr']}</td><td>{$cl_reg_curr['date']}</td></tr>";
|
||
echo "</table>";
|
||
echo "<p><input type='radio' name='clan_reg' value='add_clan' >Подтвердить <br /><input type='radio' name='clan_reg' value='not_add_clan' >Отменить <br /><input type='submit' value='Закончить' ></p>";
|
||
} else {
|
||
echo "Заявки на регистрацию кланов отсутствуют";
|
||
}
|
||
?>
|
||
</div>
|
||
</fieldset>
|
||
</form>
|
||
<form method=post>
|
||
<legend><a href='#' onclick='show("sk2")'>Добавить вещь</a></legend>
|
||
<div id=sk2 style='display:none;'>
|
||
<table class="additem">
|
||
<th>Вещи</th>
|
||
<tr>
|
||
<td><input name="name" placeholder="Название"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name="image" placeholder="Картинка"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><select name="shop">
|
||
<option value="0" selected disabled>Тип магазина</option>
|
||
<option value="1">Обычный</option>
|
||
<option value="2">Цветной</option>
|
||
<option value="3">Артефактный</option>
|
||
</select></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><input name=count placeholder="Количество (шт.)"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><select name="item_type">
|
||
<option value="0" selected disabled>Тип предмета</option>
|
||
<option value="1">Шлем</option>
|
||
<option value="2">Броня</option>
|
||
<option value="3">Поножи</option>
|
||
<option value="4">Сапоги</option>
|
||
<option value="5">Перчатки</option>
|
||
<option value="6">Оружие</option>
|
||
<option value="7">Щит</option>
|
||
<option value="8">Пояс</option>
|
||
<option value="9">Кольцо</option>
|
||
<option value="10">Амулет</option>
|
||
<option value="20">Расходник</option>
|
||
<option value="50">Всё остальное</option>
|
||
<option value="100">Хлам</option>
|
||
</select></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><input name=weight placeholder="Масса"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=durability placeholder="Макс. износ"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=price placeholder="Цена (кр.)"></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<table class="additem">
|
||
<th>Требования</th>
|
||
<tr>
|
||
<td><input name=need_level placeholder="Уровень"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=need_strength placeholder="Сила"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=need_dexterity placeholder="Ловкость"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=need_intuition placeholder="Интуиция"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=need_endurance placeholder="Выносливость"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=need_intelligence placeholder="Интеллект"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=need_wisdom placeholder="Мудрость"></td>
|
||
</tr>
|
||
|
||
<th>Характеристики</th>
|
||
<tr>
|
||
<td><input name=minu placeholder="Мин.урон"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=maxu placeholder="Макс.урон"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gsila placeholder="Сила"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=glovk placeholder="Ловкость"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=ginta placeholder="Интуиция"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gintel placeholder="Интеллект"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=ghp placeholder="НР"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=mfkrit placeholder="Мф.крит"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=mfakrit placeholder="Мф.антикрит"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=mfuvorot placeholder="Мф.уворот"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=mfauvorot placeholder="Мф.антиуворот"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gnoj placeholder="Ум.ножи"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gtopor placeholder="Ум.топоры"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gdubina placeholder="Ум.дубины"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gmech placeholder="Ум.мечи"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=bron1 placeholder="Броня головы"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=bron2 placeholder="Броня корпуса"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=bron3 placeholder="Броня пояса"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=bron4 placeholder="Броня ног"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gfire placeholder="Мастерство огня"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gwater placeholder="Мастерство воды"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gair placeholder="Мастерство воздуха"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gearth placeholder="Мастерство земли"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=glight placeholder="Светлая магия"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=ggray placeholder="Серая магия"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=gdark placeholder="Темная магия"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=encicl placeholder="В энциклопедию"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input name=magic placeholder="Наложенно заклятие"></td>
|
||
</tr>
|
||
</table>
|
||
<INPUT TYPE="submit" value="Добавить">
|
||
</div>
|
||
</form>
|
||
|
||
<?php
|
||
if ($_POST['name']) {
|
||
echo "Ждём лучших времён!";
|
||
//if($_POST['razdel'] !=7) $goden_tmp=0; else */
|
||
// $goden_tmp = $_POST['goden'];
|
||
//
|
||
// if ($_POST['shop'] == 1) if (mysql_query("INSERT INTO shop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,encicl,artefact,letter,isrep,razdel) VALUES ('" . $_POST['name'] . "','" . $_POST['duration'] . "','" . $_POST['maxdur'] . "','" . $_POST['cost'] . "','" . $_POST['ecost'] . "','" . $_POST['nlevel'] . "','" . $_POST['nsila'] . "','" . $_POST['nlovk'] . "','" . $_POST['ninta'] . "','" . $_POST['nvinos'] . "','" . $_POST['nintel'] . "','" . $_POST['nmudra'] . "','" . $_POST['nnoj'] . "','" . $_POST['ntopor'] . "','" . $_POST['ndubina'] . "','" . $_POST['nmech'] . "','" . $_POST['nalign'] . "','" . $_POST['minu'] . "','" . $_POST['maxu'] . "','" . $goden_tmp . "','" . $_POST['gsila'] . "','" . $_POST['glovk'] . "','" . $_POST['ginta'] . "','" . $_POST['gintel'] . "','" . $_POST['ghp'] . "','" . $_POST['mfkrit'] . "','" . $_POST['mfakrit'] . "','" . $_POST['mfuvorot'] . "','" . $_POST['mfauvorot'] . "','" . $_POST['gnoj'] . "','" . $_POST['gtopor'] . "','" . $_POST['gdubina'] . "','" . $_POST['gmech'] . "','" . $_POST['img'] . "','" . $_POST['count'] . "','" . $_POST['bron1'] . "','" . $_POST['bron2'] . "','" . $_POST['bron3'] . "','" . $_POST['bron4'] . "','" . $_POST['magic'] . "','" . $_POST['type'] . "','" . $_POST['massa'] . "','" . $_POST['needident'] . "','" . $_POST['nfire'] . "','" . $_POST['nwater'] . "','" . $_POST['nair'] . "','" . $_POST['nearth'] . "','" . $_POST['nlight'] . "','" . $_POST['ngray'] . "','" . $_POST['ndark'] . "','" . $_POST['gfire'] . "','" . $_POST['gwater'] . "','" . $_POST['gair'] . "','" . $_POST['gearth'] . "','" . $_POST['glight'] . "','" . $_POST['ggray'] . "','" . $_POST['gdark'] . "','" . $_POST['encicl'] . "','0','" . $_POST['letter'] . "','" . $_POST['isrep'] . "','" . $_POST['razdel'] . "');")) {
|
||
// echo "Предмет успешно добавлен";
|
||
// } else {
|
||
// echo "Предмет не был добавлен!-1";
|
||
// };
|
||
//
|
||
// if ($_POST['shop'] == 2) if (mysql_query("INSERT INTO fshop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,letter,isrep,razdel) VALUES ('" . $_POST['name'] . "','" . $_POST['duration'] . "','" . $_POST['maxdur'] . "','" . $_POST['cost'] . "','" . $_POST['ecost'] . "','" . $_POST['nlevel'] . "','" . $_POST['nsila'] . "','" . $_POST['nlovk'] . "','" . $_POST['ninta'] . "','" . $_POST['nvinos'] . "','" . $_POST['nintel'] . "','" . $_POST['nmudra'] . "','" . $_POST['nnoj'] . "','" . $_POST['ntopor'] . "','" . $_POST['ndubina'] . "','" . $_POST['nmech'] . "','" . $_POST['nalign'] . "','" . $_POST['minu'] . "','" . $_POST['maxu'] . "','" . $goden_tmp . "','" . $_POST['gsila'] . "','" . $_POST['glovk'] . "','" . $_POST['ginta'] . "','" . $_POST['gintel'] . "','" . $_POST['ghp'] . "','" . $_POST['mfkrit'] . "','" . $_POST['mfakrit'] . "','" . $_POST['mfuvorot'] . "','" . $_POST['mfauvorot'] . "','" . $_POST['gnoj'] . "','" . $_POST['gtopor'] . "','" . $_POST['gdubina'] . "','" . $_POST['gmech'] . "','" . $_POST['img'] . "','" . $_POST['count'] . "','" . $_POST['bron1'] . "','" . $_POST['bron2'] . "','" . $_POST['bron3'] . "','" . $_POST['bron4'] . "','" . $_POST['magic'] . "','" . $_POST['type'] . "','" . $_POST['massa'] . "','" . $_POST['needident'] . "','" . $_POST['nfire'] . "','" . $_POST['nwater'] . "','" . $_POST['nair'] . "','" . $_POST['nearth'] . "','" . $_POST['nlight'] . "','" . $_POST['ngray'] . "','" . $_POST['ndark'] . "','" . $_POST['gfire'] . "','" . $_POST['gwater'] . "','" . $_POST['gair'] . "','" . $_POST['gearth'] . "','" . $_POST['glight'] . "','" . $_POST['ggray'] . "','" . $_POST['gdark'] . "','" . $_POST['letter'] . "','" . $_POST['isrep'] . "','" . $_POST['razdel'] . "');")) {
|
||
// echo "Предмет успешно добавлен";
|
||
// } else {
|
||
// echo "Предмет не был добавлен!" . mysql_error();
|
||
// };
|
||
//
|
||
// if ($_POST['shop'] == 3) if (mysql_query("INSERT INTO ashop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,encicl,artefact,letter,isrep,razdel) VALUES ('" . $_POST['name'] . "','" . $_POST['duration'] . "','" . $_POST['maxdur'] . "','" . $_POST['cost'] . "','" . $_POST['ecost'] . "','" . $_POST['nlevel'] . "','" . $_POST['nsila'] . "','" . $_POST['nlovk'] . "','" . $_POST['ninta'] . "','" . $_POST['nvinos'] . "','" . $_POST['nintel'] . "','" . $_POST['nmudra'] . "','" . $_POST['nnoj'] . "','" . $_POST['ntopor'] . "','" . $_POST['ndubina'] . "','" . $_POST['nmech'] . "','" . $_POST['nalign'] . "','" . $_POST['minu'] . "','" . $_POST['maxu'] . "','" . $goden_tmp . "','" . $_POST['gsila'] . "','" . $_POST['glovk'] . "','" . $_POST['ginta'] . "','" . $_POST['gintel'] . "','" . $_POST['ghp'] . "','" . $_POST['mfkrit'] . "','" . $_POST['mfakrit'] . "','" . $_POST['mfuvorot'] . "','" . $_POST['mfauvorot'] . "','" . $_POST['gnoj'] . "','" . $_POST['gtopor'] . "','" . $_POST['gdubina'] . "','" . $_POST['gmech'] . "','" . $_POST['img'] . "','" . $_POST['count'] . "','" . $_POST['bron1'] . "','" . $_POST['bron2'] . "','" . $_POST['bron3'] . "','" . $_POST['bron4'] . "','" . $_POST['magic'] . "','" . $_POST['type'] . "','" . $_POST['massa'] . "','" . $_POST['needident'] . "','" . $_POST['nfire'] . "','" . $_POST['nwater'] . "','" . $_POST['nair'] . "','" . $_POST['nearth'] . "','" . $_POST['nlight'] . "','" . $_POST['ngray'] . "','" . $_POST['ndark'] . "','" . $_POST['gfire'] . "','" . $_POST['gwater'] . "','" . $_POST['gair'] . "','" . $_POST['gearth'] . "','" . $_POST['glight'] . "','" . $_POST['ggray'] . "','" . $_POST['gdark'] . "','" . $_POST['encicl'] . "','1','" . $_POST['letter'] . "','" . $_POST['isrep'] . "','" . $_POST['razdel'] . "');")) {
|
||
// echo "Предмет успешно добавлен";
|
||
// } else {
|
||
// echo "Предмет не был добавлен!" . mysql_error();
|
||
// };
|
||
}
|
||
//End item adder
|
||
|
||
####################################################
|
||
## НЕ ТРОГАТЬ! ТУТ ОТКРЫВАЮТСЯ ВСПЛЫВАЮЩИЕ ОКНА!!!##
|
||
####################################################
|
||
echo "<div class=appblock id=hint3 onclick='closehint3();'></div>";
|
||
####################################################
|
||
$moj = expa($al['accses']);
|
||
|
||
switch ($_POST['use']) { /* Подключаем строго тот свиток который используем. 36 Свитков править. Мама дорогая! */
|
||
case "healing":
|
||
include("../magic/Healing.php");
|
||
break;
|
||
case "al_neut_power":
|
||
include("../magic/al_neut_power.php");
|
||
break;
|
||
case "ct1":
|
||
//Заменён на CureInjury.php class. Придумать вызов.
|
||
//include("../magic/ct1.php");
|
||
break;
|
||
case "ct2":
|
||
//Заменён на CureInjury.php class. Придумать вызов.
|
||
//include("../magic/ct2.php");
|
||
break;
|
||
case "ct3":
|
||
//Заменён на CureInjury.php class. Придумать вызов.
|
||
//include("../magic/ct3.php");
|
||
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");
|
||
break;
|
||
case "battack":
|
||
include("../magic/ebattack.php");
|
||
break;
|
||
case "attackk_close":
|
||
include("../magic/attackk_close.php");
|
||
break;
|
||
case "attackk_open":
|
||
include("../magic/attackk_open.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":
|
||
//Заменён на CureInjury.php class. Придумать вызов.
|
||
//include("../magic/ct_all.php");
|
||
break;
|
||
case "check":
|
||
include("../magic/check.php");
|
||
break;
|
||
case "brat":
|
||
include("../magic/brat.php");
|
||
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 "<div class=abils><span class='legend'>Абилки:</span>Пока что привязаны к общей системе. Работают выборочно.<br>";
|
||
$script_name = $magic_name = '';
|
||
foreach ($moj as $k => $v) {
|
||
switch ($k) { /* 45 скриптов на 36 умелок? Неплохо… */
|
||
case "vip":
|
||
$script_name = "vipad";
|
||
$magic_name = "Вип";
|
||
break;
|
||
case "sleep":
|
||
$script_name = "runmagic";
|
||
$magic_name = "Наложить заклятие молчания";
|
||
break;
|
||
case "sleepf":
|
||
$script_name = "runmagicf";
|
||
$magic_name = "Наложить заклятие форумного молчания";
|
||
break;
|
||
case "healing":
|
||
$script_name = "runmagic1";
|
||
$magic_name = "Лечение";
|
||
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 = "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 = "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) {
|
||
print "<a onclick=\"$script_name('$magic_name','$k','target','target1') \" href='#'><img src='i/magic/" . $k . ".gif' title='" . $magic_name . "'></a> ";
|
||
}
|
||
}
|
||
echo "</div>";
|
||
?>
|
||
<legend>Всплывашки:</legend>
|
||
<button onclick="runmagic('Test','0','0','0')">runmagic</button>
|
||
<button onclick="runmagic0('Test','0','0','0')">runmagic0</button>
|
||
<button onclick="runmagic1('Test','0','0','0')">runmagic1</button>
|
||
<button onclick="runmagic2('Test','0','0','0')">runmagic2</button>
|
||
<button onclick="runmagic3('Test','0','0','0')">runmagic3</button>
|
||
<button onclick="runmagic4('Test','0','0','0')">runmagic4</button>
|
||
<button onclick="runmagicf('Test','0','0','0')">runmagicf</button>
|
||
<button onclick="RunMagicSelf('Test','0','0','0')">RunMagicSelf</button>
|
||
<button onclick="vipad('Test','0','0','0')">vipad</button>
|
||
<button onclick="runmagicgold('Test','0','0','0')">new window test</button>
|
||
|
||
<form method='post'>
|
||
<legend>Добавить в «дело» игрока заметку о нарушении правил, прокрутке и пр.</legend>
|
||
<input name='ldnick' placeholder='Логин'> <input name='ldtext' size='50' placeholder='Сообщение'>
|
||
<input type='hidden' name='use' value='ldadd'> <input type='submit' value='Добавить'><br>
|
||
<input type='checkbox' name='red' class='input'> Записать, как причину блокировки
|
||
</form>
|
||
<form method='post'>
|
||
<legend>Отправить системное сообщение в чат</legend>
|
||
<input name='newsmsg' size='74' placeholder='Введите сообщение'>
|
||
<input type='submit' value='Отправить'>
|
||
</form>
|
||
<form method='post'>
|
||
<legend>Телеграф</legend>
|
||
<input name='receiver' placeholder='Логин'>
|
||
<input name='tgmsg' size='50' placeholder='Сообщение'>
|
||
<input type='submit' value='Отправить'>
|
||
</form>
|
||
<form method='post'>
|
||
<legend>Поменять статус</legend>
|
||
<input name='login' placeholder='Логин'>
|
||
<input name='status' placeholder='Статус'>
|
||
<input type='submit' value='Изменить статус'>
|
||
</form>
|
||
|
||
<form method='post'>
|
||
<legend>Выдыча склонностей</legend>
|
||
<input type='text' name='login' placeholder='Логин''>
|
||
<select name='krest'>
|
||
<option disabled selected>Склонность</option>
|
||
<option disabled>--- ПАЛАДИНЫ ---</option>
|
||
<option value='1'><img src="../i/align_1.gif"> Паладин поднебесья</option>
|
||
<option value='1.1'><img src="../i/align_1.1.gif"> Паладин Солнечной Улыбки</option>
|
||
<option value='1.2'><img src="../i/align_1.2.gif"> Паладин Огненной Зари</option>
|
||
<option value='1.3'><img src="../i/align_1.3.gif"> Паладин Неба</option>
|
||
<option value='1.4'><img src="../i/align_1.4.gif"> Старший Паладин Неба</option>
|
||
<option value='1.5'><img src="../i/align_1.5.gif"> Верховный Паладин</option>
|
||
<option disabled>--- ИГРОВЫЕ ---</option>
|
||
<option value='2'><img src="../i/align_2.gif"> Нейтрал</option>
|
||
<option value='3'><img src="../i/align_3.gif"> Тёмный</option>
|
||
<option value='6'><img src="../i/align_6.gif"> Светлый</option>
|
||
<option disabled>--- РАЗНОЕ ---</option>
|
||
<option value='2.7'><img src="../i/align_2.7.gif"> Обычный хаос</option>
|
||
<option value='2.8'><img src="../i/align_2.8.gif"> Зеленый хаос</option>
|
||
<option value='2.9'><img src="../i/align_2.9.gif"> Красный хаос</option>
|
||
<option value='1.6'><img src="../i/align_1.6.gif"> Суперкрест</option>
|
||
<option value='-1'>Снять склонность</option>
|
||
</select> <input type='submit' value='Применить'></form>
|
||
<?php
|
||
# Телеграф.
|
||
if (!empty($_POST['receiver']) and !empty($_POST['tgmsg'])) {
|
||
$receiverId = db::c()->query('SELECT `id` FROM `users` WHERE `login`= "?s"', $_POST['receiver'])->fetch_row();
|
||
telegraph($receiverId[0], $_POST['tgmsg']);
|
||
echo "Успешно.";
|
||
}
|
||
# Показывает невидимок.
|
||
echo '<legend>Невидимки:</legend>';
|
||
$prs = db::c()->query('SELECT `id`, `login` FROM `users` WHERE `invis` = 1 ORDER BY `id` DESC');
|
||
while ($row = $prs->fetch_assoc()) {
|
||
echo '<b>[id] = ' . $row['id'] . ', ' . $row['login'] . ' </b><br>';
|
||
}
|
||
# Системное сообщение.
|
||
if (!empty($_POST['newsmsg'])) {
|
||
AddChatSystem($_POST['newsmsg']);
|
||
echo "<b style='color: green;'>Системное сообщение отправлено.</b>";
|
||
}
|
||
# Меняем статусы
|
||
if ($_POST['login'] && $_POST['status']) {
|
||
$dd = db::c()->query('SELECT `ip`, `login` FROM `users` WHERE `login` = "?s"', $_POST['login'])->fetch_assoc();
|
||
if ($dd) {
|
||
db::c()->query('UPDATE `users` SET `status` = "?s" WHERE `login` = "?s"', $_POST['status'] . $_POST['login']);
|
||
echo "<span class='success'>Статус " . $dd['login'] . " изменен на " . $_POST['status'] . "</span><BR>";
|
||
}
|
||
}
|
||
# Меняем склонности
|
||
if ($_POST['login'] && $_POST['krest']) {
|
||
switch ($_POST['krest']) {
|
||
case 1:
|
||
$rang = 'Паладин Поднебесья';
|
||
break;
|
||
case 1.1:
|
||
$rang = 'Паладин Солнечной Улыбки';
|
||
break;
|
||
case 1.2:
|
||
$rang = 'Паладин Огненной Зари';
|
||
break;
|
||
case 1.3:
|
||
$rang = 'Паладин Неба';
|
||
break;
|
||
case 1.4:
|
||
$rang = 'Старший Паладин Неба';
|
||
break;
|
||
case 1.5:
|
||
$rang = 'Верховный Паладин';
|
||
break;
|
||
default:
|
||
$rang = '';
|
||
break;
|
||
}
|
||
if ($_POST['krest'] == -1) {
|
||
db::c()->query('UPDATE `users` SET `align`="?s", `status`="?s" WHERE `login` = "?s" LIMIT 1;', '0', '', $_POST['login']);
|
||
} else {
|
||
db::c()->query('UPDATE `users` SET `align` = "?s", `status` = "?s" WHERE `login` = "?s"', $_POST['krest'], $rang, $_POST['login']);
|
||
}
|
||
}
|
||
|
||
|
||
################################################
|
||
################ ВСЕ ЯВАСКРИПТЫ ################
|
||
################################################
|
||
?>
|
||
|
||
<script type="text/javascript">
|
||
const 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() {
|
||
let xmlHttp1 = null;
|
||
try {
|
||
xmlHttp1 = new XMLHttpRequest();
|
||
} catch (e) {
|
||
try {
|
||
xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
|
||
} catch (e) {
|
||
xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
|
||
}
|
||
}
|
||
return xmlHttp1;
|
||
}
|
||
|
||
function show(ele) {
|
||
const srcElement = document.getElementById(ele);
|
||
if (srcElement != null) {
|
||
if (srcElement.style.display == "block") {
|
||
srcElement.style.display = 'none';
|
||
} else {
|
||
srcElement.style.display = 'block';
|
||
}
|
||
}
|
||
}
|
||
|
||
let Hint3Name = '';
|
||
let Hint3Closed = false;
|
||
|
||
function runmagic0(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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT NAME="' + name + '">' +
|
||
'<select style="background-color:#eceddf; color:#000000;" name="timer"><option value=15>15 мин</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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
function runmagicgold(title, magic, name) {
|
||
document.all("hint3").innerHTML = '<legend>' + title + '</legend>' +
|
||
'<form method=post><input type=hidden name=sd4 value="<?=$user['id'];?>"><input type=hidden name="use" value="' + magic + '">' +
|
||
'<input name="' + name + '" placeholder="Логин персонажа"> ' +
|
||
'<select name="timer"><option value=15>15 мин</option></select> ' +
|
||
'<input type="submit"></form>';
|
||
document.all("hint3").style.visibility = "visible";
|
||
document.all("hint3").style.left = 100;
|
||
document.all("hint3").style.top = 100;
|
||
document.all(name).focus();
|
||
Hint3Name = name;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
function vipad(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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT NAME="' + name + '">' +
|
||
'<br /><select style="background-color:#eceddf; color:#000000;" name="vip_type"><option value=1>Silver</option><option value=2>Gold</option><option value=3>Platinum</option></select>' +
|
||
'<select style="background-color:#eceddf; color:#000000;" name="time"><option value="1">1 Месяц</option><option value="2">2 Месяца</option><option value="3">3 Месяца</option><option value="4">4 Месяца</option><option value="5">5 Месяцев</option><option value="6">6 Месяцев</option><option value="99999999">Бесконечно</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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"><INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT 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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
function RunMagicSelf(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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Использовать возможность "Сила Нейтралитета?"</TD></TR><TR><TD align=left><INPUT TYPE=hidden NAME="' + name + '" VALUE="<?php echo @$user['login']; ?>">' +
|
||
'</TD><TD width=30><INPUT TYPE="submit" value=" »» " onclick="top.frames[\'main\'].Hint3Closed = false;"></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;
|
||
|
||
Hint3Name = name;
|
||
Hint3Closed = true;
|
||
|
||
}
|
||
|
||
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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT 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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT 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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT 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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td colspan=2><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD align=left><INPUT NAME="' + name + '">' +
|
||
'<br>Причина: <INPUT 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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
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="admin.php" method=POST><table width=100% cellspacing=0 cellpadding=2 bgcolor=FFF6DD><tr><td><INPUT TYPE=hidden name=sd4 value="<?php echo @$user['id']; ?>"> <INPUT TYPE=hidden NAME="use" value="' + magic + '">' +
|
||
'Укажите логин жениха: <INPUT NAME="' + name + '">' +
|
||
'<br>Укажите логин невесты: <INPUT 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;
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
function closehint3() {
|
||
document.all("hint3").style.visibility = "hidden";
|
||
Hint3Name = '';
|
||
Hint3Closed = false;
|
||
}
|
||
|
||
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() {
|
||
let 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>
|