2020-08-29 16:30:11 +00:00
|
|
|
|
<?php
|
2018-02-13 20:02:15 +00:00
|
|
|
|
/**
|
|
|
|
|
* Copyright (c) 2018.
|
|
|
|
|
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
|
|
|
|
* Project name: Battles-Game
|
|
|
|
|
*/
|
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
session_start();
|
2020-08-26 09:21:56 +00:00
|
|
|
|
//require_once '../functions.php';
|
2020-10-28 20:21:08 +00:00
|
|
|
|
$user = new \Battles\User($_SESSION['uid']);
|
2020-09-30 19:16:34 +00:00
|
|
|
|
if (!$user->admin) {
|
2020-08-26 09:21:56 +00:00
|
|
|
|
header("HTTP/1.0 404 Not Found");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
exit;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$al = db::c()->query('SELECT * FROM `aligns` WHERE `align` = "?s" LIMIT 1', $user['align'])->fetch_assoc();
|
|
|
|
|
|
2018-01-28 21:22:28 +00:00
|
|
|
|
function statsat($nu)
|
|
|
|
|
{ /*in admin.php*/
|
|
|
|
|
$stats = 0;
|
|
|
|
|
$master = 0;
|
|
|
|
|
$vinos = 0;
|
2018-10-31 19:53:21 +00:00
|
|
|
|
$money = 0;
|
2018-01-28 21:22:28 +00:00
|
|
|
|
|
2020-08-30 16:28:15 +00:00
|
|
|
|
foreach (Config::$exptable as $k => $v) {
|
2020-08-29 16:30:11 +00:00
|
|
|
|
if ($k == $nu) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
2018-01-28 21:22:28 +00:00
|
|
|
|
$stats += $v[0];
|
|
|
|
|
$master += $v[1];
|
|
|
|
|
$vinos += $v[2];
|
|
|
|
|
$money += $v[3];
|
|
|
|
|
}
|
2020-08-29 16:30:11 +00:00
|
|
|
|
return ["stats" => $stats + 12, "master" => $master + 1, "vinos" => $vinos + 3, "money" => $money];
|
2018-01-28 21:22:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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];
|
|
|
|
|
}
|
2020-08-29 16:30:11 +00:00
|
|
|
|
if (isset($rarray)) {
|
|
|
|
|
return $rarray;
|
|
|
|
|
} else {
|
|
|
|
|
return [];
|
|
|
|
|
}
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_POST['ali']) { //Что делает эта штука?
|
|
|
|
|
$accs = $_POST;
|
|
|
|
|
array_shift($accs);
|
|
|
|
|
array_shift($accs);
|
|
|
|
|
array_shift($accs);
|
2020-08-29 16:30:11 +00:00
|
|
|
|
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));
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-08-29 16:30:11 +00:00
|
|
|
|
$aligns = db::c()->query('SELECT `img`,`align`,`name` FROM `aligns` ORDER BY `align`');
|
2020-10-28 20:21:08 +00:00
|
|
|
|
\Battles\Template::header('ᐰdminка');
|
2018-01-28 16:40:49 +00:00
|
|
|
|
?>
|
2020-09-30 22:12:53 +00:00
|
|
|
|
<link rel=stylesheet href="/css/admin.css">
|
|
|
|
|
<form method='post'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<fieldset>
|
2018-10-30 17:05:52 +00:00
|
|
|
|
<legend><a href='#' onclick='show("sk")'>Склонности</a></legend>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<div id=sk style='display:none;'>
|
|
|
|
|
<table>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<?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>
|
2018-06-24 14:09:58 +00:00
|
|
|
|
</tr>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<?php endwhile ?>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<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>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<td><input type='checkbox' name='sleep' class='input'><img src='../i/magic/sleep.gif'>
|
|
|
|
|
</td>
|
2018-02-13 20:02:15 +00:00
|
|
|
|
<td><input type='checkbox' name='sleepf' class='input'><img src='../i/magic/sleepf.gif'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
|
|
|
|
<td><input type='checkbox' name='sleep_off' class='input'><img
|
2018-02-13 20:02:15 +00:00
|
|
|
|
src='../i/magic/sleep_off.gif'></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<td><input type='checkbox' name='sleepf_off' class='input'><img
|
2018-02-13 20:02:15 +00:00
|
|
|
|
src='../i/magic/sleepf_off.gif'></td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<td><input type='checkbox' name='haos' class='input'><img src='../i/magic/haos.gif'>
|
|
|
|
|
</td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<td><input type='checkbox' name='haos_off' class='input'><img
|
2018-02-13 20:02:15 +00:00
|
|
|
|
src='../i/magic/haos_off.gif'></td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<td><input type='checkbox' name='death' class='input'><img src='../i/magic/death.gif'>
|
|
|
|
|
</td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<td><input type='checkbox' name='death_off' class='input'><img
|
2018-02-13 20:02:15 +00:00
|
|
|
|
src='../i/magic/death_off.gif'></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<!--<td><input type='checkbox' name='pal_buttons' class='input'><img src='i/magic/pal_buttons.gif'></td>-->
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<td><input type='checkbox' name='check' class='input'><img src='../i/magic/check.gif'>
|
|
|
|
|
</td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2018-02-13 20:02:15 +00:00
|
|
|
|
<td><input type='checkbox' name='attack' class='input'><img src='../i/magic/attack.gif'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<td><input type='checkbox' name='attackb' class='input'><img
|
|
|
|
|
src='../i/magic/attackb.gif'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
2018-02-13 20:02:15 +00:00
|
|
|
|
<td><input type='checkbox' name='hidden' class='input'><img src='../i/magic/hidden.gif'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
|
|
|
|
<td><input type='checkbox' name='teleport' class='input'><img
|
2018-02-13 20:02:15 +00:00
|
|
|
|
src='../i/magic/teleport.gif'></td>
|
|
|
|
|
<td><input type='checkbox' name='travma' class='input'><img src='../i/magic/travma.gif'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<td><input type='checkbox' name='cure' class='input'><img src='../i/magic/cure.gif'>
|
|
|
|
|
</td>
|
2018-02-13 20:02:15 +00:00
|
|
|
|
<td><input type='checkbox' name='vampir' class='input'><img src='../i/magic/vampir.gif'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<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>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<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>
|
2018-02-13 20:02:15 +00:00
|
|
|
|
<td><input type='checkbox' name='sys' class='input'><img src='../i/magic/sys.gif'></td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<td><input type='checkbox' name='scanner' class='input'><img
|
|
|
|
|
src='../i/magic/scanner.gif'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
2018-02-13 20:02:15 +00:00
|
|
|
|
<td><input type='checkbox' name='rep' class='input'><img src='../i/magic/rep.gif'></td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<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>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><input type='checkbox' name='obezl_off' class='input'><img
|
2018-02-13 20:02:15 +00:00
|
|
|
|
src='../i/magic/obezl_off.gif'></td>
|
2020-08-29 16:30:11 +00:00
|
|
|
|
<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'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</td>
|
|
|
|
|
<td><input type='checkbox' name='un_align' class='input'><img
|
2018-02-13 20:02:15 +00:00
|
|
|
|
src='../i/magic/un_align.gif'></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<BR><input type='submit' class=button value='Добавить/изменить'></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</form>
|
|
|
|
|
|
2020-09-30 22:12:53 +00:00
|
|
|
|
<form method=post>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<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') {
|
2020-08-29 16:30:11 +00:00
|
|
|
|
$ser_cl_rights = [];
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$ser_cl_rights[$cl_reg_curr['owner']][0] = 1;
|
|
|
|
|
$ser_cl_rights[$cl_reg_curr['owner']][1] = 1;
|
|
|
|
|
$cl_rights = serialize($ser_cl_rights);
|
2018-03-23 18:26:02 +00:00
|
|
|
|
$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']);
|
2018-01-28 19:15:29 +00:00
|
|
|
|
if ($add_clan) {
|
2020-08-29 23:21:22 +00:00
|
|
|
|
echo "<p>Заявка на клан <b>" . $cl_reg_curr['name'] . "</b> подтверждена успешно!</p>";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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();
|
2020-08-29 23:21:22 +00:00
|
|
|
|
$clan_msg_rec = db::c()->query('SELECT login FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner'])->fetch_assoc();
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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'] . " принята!";
|
2020-08-29 23:21:22 +00:00
|
|
|
|
} else {
|
|
|
|
|
echo "Ошибка подтверждения регистрации!";
|
|
|
|
|
}
|
2018-01-28 19:15:29 +00:00
|
|
|
|
} elseif ($_POST['clan_reg'] == 'not_add_clan') { /* Clan ader : don't add clan*/
|
2020-08-29 23:21:22 +00:00
|
|
|
|
echo "<p>Заявка на клан <b>" . $cl_reg_curr['name'] . "</b> отклонена!</p>";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
db::c()->query('DELETE FROM `reg_klan` WHERE `id` = ?i', $cl_reg_curr['id']);
|
2020-08-29 23:21:22 +00:00
|
|
|
|
$clan_msg_rec = db::c()->query('SELECT login FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner'])->fetch_assoc();
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$_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) {
|
2020-08-29 23:21:22 +00:00
|
|
|
|
echo "<p>Заявок в очереди на рассмотрение: <b>$clan_q</b></p>";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$clan_msg_rec = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner'])->fetch_assoc();
|
2020-08-29 23:21:22 +00:00
|
|
|
|
if ($_POST['clan_reg']) {
|
|
|
|
|
db::c()->query('DELETE FROM `reg_klan` WHERE `id` = ?i', $cl_reg_curr['id']);
|
|
|
|
|
}
|
|
|
|
|
echo "<p>Текущая заявка:</p>";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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>";
|
2020-08-29 23:21:22 +00:00
|
|
|
|
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 "Заявки на регистрацию кланов отсутствуют";
|
|
|
|
|
}
|
2018-01-28 19:15:29 +00:00
|
|
|
|
?>
|
|
|
|
|
</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>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name="image" placeholder="Картинка"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><select name="shop">
|
|
|
|
|
<option value="0" selected disabled>Тип магазина</option>
|
|
|
|
|
<option value="1">Обычный</option>
|
|
|
|
|
<option value="2">Цветной</option>
|
|
|
|
|
</select></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td><input name=count placeholder="Количество (шт.)"></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><select name="item_type">
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<option value="0" selected disabled>Тип предмета</option>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<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>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</select></td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=weight placeholder="Масса"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=durability placeholder="Макс. износ"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=price placeholder="Цена (кр.)"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<table class="additem">
|
|
|
|
|
<th>Требования</th>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=need_level placeholder="Уровень"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=need_strength placeholder="Сила"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=need_dexterity placeholder="Ловкость"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=need_intuition placeholder="Интуиция"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=need_endurance placeholder="Выносливость"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=need_intelligence placeholder="Интеллект"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
<td><input name=need_wisdom placeholder="Мудрость"></td>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</tr>
|
2020-08-29 23:21:22 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<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>
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-06-24 12:12:33 +00:00
|
|
|
|
<?php
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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();
|
|
|
|
|
// };
|
|
|
|
|
//
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
//End item adder
|
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
####################################################
|
|
|
|
|
## НЕ ТРОГАТЬ! ТУТ ОТКРЫВАЮТСЯ ВСПЛЫВАЮЩИЕ ОКНА!!!##
|
|
|
|
|
####################################################
|
|
|
|
|
echo "<div class=appblock id=hint3 onclick='closehint3();'></div>";
|
|
|
|
|
####################################################
|
2018-01-28 16:40:49 +00:00
|
|
|
|
$moj = expa($al['accses']);
|
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
switch ($_POST['use']) { /* Подключаем строго тот свиток который используем. 36 Свитков править. Мама дорогая! */
|
2020-08-30 16:48:39 +00:00
|
|
|
|
case "healing":
|
2020-08-30 21:40:58 +00:00
|
|
|
|
include("../magic/Healing.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "al_neut_power":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/al_neut_power.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct1":
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("../magic/ct1.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct2":
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("../magic/ct2.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct3":
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("../magic/ct3.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "sleep":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/sleep.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "sleepf":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/sleepf.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "sleep_off":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/sleep_off.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "sleepf_off":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/sleepf_off.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "haos":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/haos.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "haos_off":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/haos_off.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "obezl":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/obezl.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "obezl_off":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/obezl_off.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "death":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/death.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "death_off":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/death_off.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ldadd":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/ldadd.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "attack":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/eattack.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "attack_t":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/attack_t.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "battack":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/ebattack.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "attackk_close":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/attackk_close.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "attackk_open":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/attackk_open.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "pal_off":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/pal_off.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "marry":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/marry.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "unmarry":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/unmarry.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ct_all":
|
2020-09-16 15:50:38 +00:00
|
|
|
|
//Заменён на CureInjury.php class. Придумать вызов.
|
|
|
|
|
//include("../magic/ct_all.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "check":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/check.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "brat":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/brat.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "vampir":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/vampir.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "crush":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/devastate.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "def":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/defence.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "bexit":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/bexit.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "vip":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/vips.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "dlight":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/dlight.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "ddark":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/ddark.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "dneit":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/dneit.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "un_align":
|
2018-06-24 12:12:33 +00:00
|
|
|
|
include("../magic/un_align.php");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-31 19:53:21 +00:00
|
|
|
|
echo "<div class=abils><span class='legend'>Абилки:</span>Пока что привязаны к общей системе. Работают выборочно.<br>";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$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;
|
2020-08-30 16:48:39 +00:00
|
|
|
|
case "healing":
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$script_name = "runmagic1";
|
2020-08-30 16:48:39 +00:00
|
|
|
|
$magic_name = "Лечение";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
break;
|
|
|
|
|
case "al_neut_power":
|
2020-10-28 20:21:08 +00:00
|
|
|
|
$script_name = "RunmagicSelf";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$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;
|
|
|
|
|
}
|
|
|
|
|
# Эта строка генерирует свитки с навыком. Но нам нужен просто перечень всего…
|
2020-08-29 23:21:22 +00:00
|
|
|
|
if ($script_name) {
|
|
|
|
|
print "<a onclick=\"$script_name('$magic_name','$k','target','target1') \" href='#'><img src='i/magic/" . $k . ".gif' title='" . $magic_name . "'></a> ";
|
|
|
|
|
}
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
|
|
|
|
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>
|
2020-10-28 20:21:08 +00:00
|
|
|
|
<button onclick="RunmagicSelf('Test','0','0','0')">RunmagicSelf</button>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<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>
|
2019-02-15 23:07:12 +00:00
|
|
|
|
<input type='checkbox' name='red' class='input'> Записать, как причину блокировки
|
2018-01-28 19:15:29 +00:00
|
|
|
|
</form>
|
|
|
|
|
<form method='post'>
|
|
|
|
|
<legend>Отправить системное сообщение в чат</legend>
|
|
|
|
|
<input name='newsmsg' size='74' placeholder='Введите сообщение'>
|
|
|
|
|
<input type='submit' value='Отправить'>
|
|
|
|
|
</form>
|
|
|
|
|
<form method='post'>
|
|
|
|
|
<legend>Телеграф</legend>
|
2019-02-15 23:07:12 +00:00
|
|
|
|
<input name='receiver' placeholder='Логин'>
|
|
|
|
|
<input name='tgmsg' size='50' placeholder='Сообщение'>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<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>
|
2018-10-31 23:55:13 +00:00
|
|
|
|
<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>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<option disabled>--- ИГРОВЫЕ ---</option>
|
2018-10-31 23:55:13 +00:00
|
|
|
|
<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>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<option disabled>--- РАЗНОЕ ---</option>
|
2018-10-31 23:55:13 +00:00
|
|
|
|
<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>
|
2018-01-28 19:15:29 +00:00
|
|
|
|
<option value='-1'>Снять склонность</option>
|
|
|
|
|
</select> <input type='submit' value='Применить'></form>
|
2018-06-24 12:12:33 +00:00
|
|
|
|
<?php
|
2019-02-15 23:07:12 +00:00
|
|
|
|
# Телеграф.
|
2020-08-29 16:30:11 +00:00
|
|
|
|
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']);
|
2018-10-31 19:53:21 +00:00
|
|
|
|
echo "Успешно.";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
|
|
|
|
# Показывает невидимок.
|
|
|
|
|
echo '<legend>Невидимки:</legend>';
|
2018-06-24 12:12:33 +00:00
|
|
|
|
$prs = db::c()->query('SELECT `id`, `login` FROM `users` WHERE `invis` = 1 ORDER BY `id` DESC');
|
2018-06-24 13:26:43 +00:00
|
|
|
|
while ($row = $prs->fetch_assoc()) {
|
|
|
|
|
echo '<b>[id] = ' . $row['id'] . ', ' . $row['login'] . ' </b><br>';
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
|
|
|
|
# Системное сообщение.
|
2019-02-15 23:07:12 +00:00
|
|
|
|
if (!empty($_POST['newsmsg'])) {
|
2018-11-05 21:09:51 +00:00
|
|
|
|
AddChatSystem($_POST['newsmsg']);
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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) {
|
2020-08-29 16:30:11 +00:00
|
|
|
|
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>";
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
# Меняем склонности
|
|
|
|
|
if ($_POST['login'] && $_POST['krest']) {
|
|
|
|
|
switch ($_POST['krest']) {
|
2018-10-31 23:55:13 +00:00
|
|
|
|
case 1:
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$rang = 'Паладин Поднебесья';
|
|
|
|
|
break;
|
2018-10-31 23:55:13 +00:00
|
|
|
|
case 1.1:
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$rang = 'Паладин Солнечной Улыбки';
|
|
|
|
|
break;
|
2018-10-31 23:55:13 +00:00
|
|
|
|
case 1.2:
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$rang = 'Паладин Огненной Зари';
|
|
|
|
|
break;
|
2018-10-31 23:55:13 +00:00
|
|
|
|
case 1.3:
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$rang = 'Паладин Неба';
|
|
|
|
|
break;
|
2018-10-31 23:55:13 +00:00
|
|
|
|
case 1.4:
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$rang = 'Старший Паладин Неба';
|
|
|
|
|
break;
|
2018-10-31 23:55:13 +00:00
|
|
|
|
case 1.5:
|
2018-01-28 19:15:29 +00:00
|
|
|
|
$rang = 'Верховный Паладин';
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
$rang = '';
|
|
|
|
|
break;
|
|
|
|
|
}
|
2020-08-29 23:21:22 +00:00
|
|
|
|
if ($_POST['krest'] == -1) {
|
|
|
|
|
db::c()->query('UPDATE `users` SET `align`="?s", `status`="?s" WHERE `login` = "?s" LIMIT 1;', '0', '', $_POST['login']);
|
2020-09-30 22:12:53 +00:00
|
|
|
|
} else {
|
2020-08-29 23:21:22 +00:00
|
|
|
|
db::c()->query('UPDATE `users` SET `align` = "?s", `status` = "?s" WHERE `login` = "?s"', $_POST['krest'], $rang, $_POST['login']);
|
|
|
|
|
}
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
|
2018-01-28 16:40:49 +00:00
|
|
|
|
################################################
|
|
|
|
|
################ ВСЕ ЯВАСКРИПТЫ ################
|
|
|
|
|
################################################
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2019-01-16 17:45:30 +00:00
|
|
|
|
const xmlHttpp = [];
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
function ajax_func(func, iid, getpar, postpar) {
|
|
|
|
|
xmlHttpp[iid] = GetXmlHttpObject1();
|
|
|
|
|
if (xmlHttpp[iid] == null) {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
alert("Browser does not support HTTP Request");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
return
|
|
|
|
|
}
|
2018-02-13 20:02:15 +00:00
|
|
|
|
document.getElementById(iid).innerHTML = "<img src='../i/loading2.gif' />";
|
2019-01-16 17:45:30 +00:00
|
|
|
|
var url = "./ajax/" + func + ".php";
|
|
|
|
|
url = url + "?" + getpar;
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
2019-01-16 17:45:30 +00:00
|
|
|
|
};
|
2018-01-28 19:15:29 +00:00
|
|
|
|
xmlHttpp[iid].setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
|
|
|
xmlHttpp[iid].send(postpar);
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
2018-01-28 19:15:29 +00:00
|
|
|
|
|
|
|
|
|
function GetXmlHttpObject1() {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
let xmlHttp1 = null;
|
2018-01-28 19:15:29 +00:00
|
|
|
|
try {
|
|
|
|
|
xmlHttp1 = new XMLHttpRequest();
|
2020-08-29 16:30:11 +00:00
|
|
|
|
} catch (e) {
|
2018-01-28 19:15:29 +00:00
|
|
|
|
try {
|
|
|
|
|
xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
|
2020-08-29 16:30:11 +00:00
|
|
|
|
} catch (e) {
|
2018-01-28 19:15:29 +00:00
|
|
|
|
xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return xmlHttp1;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
function show(ele) {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
const srcElement = document.getElementById(ele);
|
2018-01-28 19:15:29 +00:00
|
|
|
|
if (srcElement != null) {
|
|
|
|
|
if (srcElement.style.display == "block") {
|
|
|
|
|
srcElement.style.display = 'none';
|
|
|
|
|
} else {
|
|
|
|
|
srcElement.style.display = 'block';
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-01-16 17:45:30 +00:00
|
|
|
|
let Hint3Name = '';
|
|
|
|
|
let Hint3Closed = false;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин персонажа:<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;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин персонажа:<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;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин персонажа:<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;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2020-10-28 20:21:08 +00:00
|
|
|
|
function RunmagicSelf(title, magic, name) {
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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']; ?>">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'</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;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
Hint3Name = name;
|
|
|
|
|
Hint3Closed = true;
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин персонажа:<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;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин персонажа:<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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин персонажа:<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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин персонажа:<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>' +
|
2018-06-24 12:12:33 +00:00
|
|
|
|
'<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 + '">' +
|
2018-01-28 19:15:29 +00:00
|
|
|
|
'Укажите логин жениха: <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;
|
|
|
|
|
}
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2019-01-16 17:45:30 +00:00
|
|
|
|
var xmlHttpp = [];
|
2018-01-28 16:40:49 +00:00
|
|
|
|
|
2018-01-28 19:15:29 +00:00
|
|
|
|
function ajax_func(func, iid, getpar, postpar) {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
xmlHttpp[iid] = GetXmlHttpObject1();
|
2018-01-28 19:15:29 +00:00
|
|
|
|
if (xmlHttpp[iid] == null) {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
alert("Browser does not support HTTP Request");
|
2018-01-28 19:15:29 +00:00
|
|
|
|
return
|
|
|
|
|
}
|
2018-02-13 20:02:15 +00:00
|
|
|
|
document.getElementById(iid).innerHTML = "<img src='../i/loading2.gif' />";
|
2019-01-16 17:45:30 +00:00
|
|
|
|
var url = "./ajax/" + func + ".php";
|
|
|
|
|
url = url + "?" + getpar;
|
2018-01-28 19:15:29 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
2019-01-16 17:45:30 +00:00
|
|
|
|
};
|
2018-01-28 19:15:29 +00:00
|
|
|
|
xmlHttpp[iid].setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
|
|
|
xmlHttpp[iid].send(postpar);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function GetXmlHttpObject1() {
|
2019-01-16 17:45:30 +00:00
|
|
|
|
let xmlHttp1 = null;
|
2018-01-28 19:15:29 +00:00
|
|
|
|
try {
|
|
|
|
|
// Firefox, Opera 8.0+, Safari
|
|
|
|
|
xmlHttp1 = new XMLHttpRequest();
|
2020-08-29 16:30:11 +00:00
|
|
|
|
} catch (e) {
|
2018-01-28 19:15:29 +00:00
|
|
|
|
//Internet Explorer
|
|
|
|
|
try {
|
|
|
|
|
xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
|
2020-08-29 16:30:11 +00:00
|
|
|
|
} catch (e) {
|
2018-01-28 19:15:29 +00:00
|
|
|
|
xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return xmlHttp1;
|
|
|
|
|
}
|
2020-09-30 22:12:53 +00:00
|
|
|
|
</script>
|