battles/admin/admin.php

1305 lines
68 KiB
PHP
Raw Normal View History

2018-01-28 19:15:29 +00:00
<?php
/**
* Copyright (c) 2018.
* Author: Igor Barkov <lopar.4ever@gmail.com>
* Project name: Battles-Game
*/
2018-01-28 19:15:29 +00:00
session_start();
include "../config.php";
include "../functions.php";
2018-01-28 19:15:29 +00:00
2018-01-28 19:15:29 +00:00
if (empty($user['admin'])) {
echo "<!DOCTYPE HTML><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL /admin.php was not found on this server.</p><hr><address>Apache/2.2.22 (@RELEASE@) Server at Hetzner Datacenter 426</address></body></html>";
exit;
}
define('ADMINS', microtime());
2018-01-28 16:40:49 +00:00
?>
<!DOCTYPE html>
<!--suppress ALL -->
<html>
<head>
2018-01-28 19:15:29 +00:00
<meta charset="utf-8">
<title>ᐰdmin</title>
2018-01-28 16:40:49 +00:00
</head>
<link type="text/css" rel="stylesheet" href="../css/main.css">
2018-01-28 16:40:49 +00:00
<style type="text/css">
2018-01-28 19:15:29 +00:00
body {
background: silver;
margin: 25px;
}
legend, legend a {
color: dimgray;
font-family: consolas, sans-serif;
font-size: 18px;
margin-top: 10px;
}
table.additem input {
width: 200px;
}
table.additem select {
width: 206px;
}
.abils {
background: #CFCFC4;
margin: 5px 0;
padding: 5px;
}
.appblock {
background: gold;
border-radius: 5px;
/* float: left;*/
margin: 10px;
max-width: 300px;
position: absolute;
top: 100px;
left: 100px;
}
div.appblock form, div.appblock legend {
margin: 5px;
}
2018-01-28 16:40:49 +00:00
</style>
2018-01-28 19:15:29 +00:00
<body>
<h1>Работает через жопу! Я предупредиль!</h1>
2018-01-28 16:40:49 +00:00
<?php
2018-01-28 19:15:29 +00:00
$al = db::c()->query('SELECT * FROM `aligns` WHERE `align` = "?s" LIMIT 1', $user['align'])->fetch_assoc();
// $registeredUsers = db::c()->query('SELECT COUNT(*) FROM `users` WHERE `block` = 0 AND `admin` = 0');
// echo "В игре зарегистровано ".$registeredUsers." человек";
2018-01-28 19:15:29 +00:00
header("Cache-Control: no-cache");
function statsat($nu)
{ /*in admin.php*/
global $exptable;
$stats = 0;
$master = 0;
$vinos = 0;
foreach ($exptable as $k => $v) {
if ($k == $nu) break;
$stats += $v[0];
$master += $v[1];
$vinos += $v[2];
$money += $v[3];
}
return array("stats" => $stats + 12, "master" => $master + 1, "vinos" => $vinos + 3, "money" => $money);
}
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];
}
return $rarray;
}
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));
#mysql_query("INSERT INTO `aligns` (`align`,`img`,`name`,`accses`) values ('{$_POST['ali']}','{$_POST['im']}','{$_POST['txt']}','" . imp($accs) . "') ON DUPLICATE KEY UPDATE `img` = '{$_POST['im']}', `name` = '{$_POST['txt']}', accses = '" . imp($accs) . "';");
2018-01-28 19:15:29 +00:00
}
if ($_POST['sbr_par']) {
2018-06-24 11:37:16 +00:00
$sb_pers = db::c()->query('SELECT `id`, `nextup`, `level` FROM `users` WHERE `login` = "?s" LIMIT 1', $_POST['sbr_par'])->fetch_assoc_array();
2018-01-28 19:15:29 +00:00
undressall($sb_pers['id']);
$levelstats = statsat($sb_pers['nextup']);
//TODO Ох боюсь я за этот запрос!
db::c()->query('
2018-01-28 16:40:49 +00:00
UPDATE `users`
SET `stats` = ?i, `sila` = ?i, `lovk` = ?i, `inta` = ?i, `intel` = ?i, `vinos` = ?i,
`maxhp` = ?i, `master` = ?i, `noj` = ?i, `mec` = ?i, `topor` = ?i, `dubina` = ?i,
`mlight` = ?i, `mgray` = ?i, `mdark` = ?i
WHERE `id` = ?i',
2018-01-28 19:15:29 +00:00
($levelstats['stats'] - 9), 3, 3, 3, 0, $levelstats['vinos'], ($levelstats['vinos'] * 6), $levelstats['master'], 0, 0, 0, 0, 0, 0, 0, $sb_pers['id']);
echo "<span class='redalert'>Все прошло удачно. Персонаж может перераспределить параметры.</span>";
}
2018-01-28 16:40:49 +00:00
?>
2018-01-28 19:15:29 +00:00
<form action='admin.php' method='post'>
<fieldset>
<legend><a href='#' onclick='show("sk")'>Склонности</a></legend>
2018-01-28 19:15:29 +00:00
<div id=sk style='display:none;'>
<table>
<?php
// $aligns = mysql_query("SELECT * FROM `aligns` ORDER BY `align`");
// while($row = mysql_fetch_array($aligns)) {
2018-06-24 11:54:36 +00:00
$aligns = db::c()->query('SELECT `img`,`align`,`name` FROM `aligns` ORDER BY `align`');
while ($row = $aligns->fetch_assoc()): ?>
2018-06-24 14:09:58 +00:00
<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>
2018-06-24 11:54:36 +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>
<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'>
2018-01-28 19:15:29 +00:00
</td>
<td><input type='checkbox' name='sleep_off' class='input'><img
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
src='../i/magic/sleepf_off.gif'></td>
<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
src='../i/magic/haos_off.gif'></td>
<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
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>-->
<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>
<td><input type='checkbox' name='attack' class='input'><img src='../i/magic/attack.gif'>
2018-01-28 19:15:29 +00:00
</td>
<td><input type='checkbox' name='attackb' class='input'><img src='../i/magic/attackb.gif'>
2018-01-28 19:15:29 +00:00
</td>
<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
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>
<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'>
2018-01-28 19:15:29 +00:00
</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>
2018-01-28 19:15:29 +00:00
</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'>
2018-01-28 19:15:29 +00:00
</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>
2018-01-28 19:15:29 +00:00
</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'>
2018-01-28 19:15:29 +00:00
</td>
<td><input type='checkbox' name='un_align' class='input'><img
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>
<form method=post action="admin.php">
<fieldset>
<legend><a href='#' onclick='show("sk3")'>Кланы</a></legend>
<div id=sk3 style='display:none;'>
<?php
2018-01-28 16:40:49 +00:00
2018-01-28 19:15:29 +00:00
// $cl_reg_ar=mysql_query("SELECT * FROM `reg_klan` LIMIT 1");
// $cl_reg_curr=mysql_fetch_assoc($cl_reg_ar);
// $cl_reg_ar = $db->query('SELECT * FROM `reg_klan` LIMIT 1');
$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 = array();
$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-01-28 16:40:49 +00:00
// $add_clan = mysql_query('
// INSERT INTO `clans` (`short`, `name`, `descr`, `glava`, `vozm`, `align`, `homepage`)
// VALUES ("'.$cl_reg_curr['abr'].'", "'.$cl_reg_curr['name'].'", "'.$cl_reg_curr['descr'].'",
// "'.$cl_reg_curr['owner'].'", "'.$cl_rights.'", "'.$cl_reg_curr['align'].'", "'.$cl_reg_curr['http'].'")
// ');
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 16:40:49 +00:00
2018-01-28 19:15:29 +00:00
if ($add_clan) {
echo("<p>Заявка на клан <b>" . $cl_reg_curr['name'] . "</b> подтверждена успешно!</p>");
2018-01-28 16:40:49 +00:00
// $cl_reg_tmp=mysql_fetch_assoc(mysql_query("select * from clans where name='".$cl_reg_curr['name']."'"));
// mysql_query("delete from reg_klan where id='".$cl_reg_curr['id']."'");
// $clan_msg_rec_q = $db->query('SELECT FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner']);
// $clan_msg_rec=mysql_fetch_assoc(mysql_query("SELECT * FROM USERS where id='".$cl_reg_curr['owner']."'"));
// mysql_query("update users set align='".$cl_reg_curr['align']."',klan='".$cl_reg_tmp['id']."',status='<font color=#008080><b>Глава клана</b></font>' where id='".$cl_reg_curr['owner']."'");
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();
$clan_msg_rec = db::c()->query('SELECT 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>");
2018-01-28 16:40:49 +00:00
// mysql_query("delete from reg_klan where id='".$cl_reg_curr['id']."'");
// $clan_msg_rec=mysql_fetch_assoc(mysql_query("SELECT * FROM USERS where id='".$cl_reg_curr['owner']."'"));
2018-01-28 19:15:29 +00:00
db::c()->query('DELETE FROM `reg_klan` WHERE `id` = ?i', $cl_reg_curr['id']);
2018-01-28 16:40:49 +00:00
// $clan_msg_rec_q = $db->query('SELECT FROM `users` WHERE `id` = ?i', $cl_reg_curr['owner']);
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();
$_POST['grn'] = $clan_msg_rec['login'];
$_POST['gr'] = "Ваша заявка на создание клана " . $cl_reg_curr['name'] . " отклонена!";
// Moneyback
$clan_moneyback = 1200;
2018-01-28 16:40:49 +00:00
// switch($cl_reg_curr['align']) {
// case 2:$clan_moneyback=1200;break;
// case 3:$clan_moneyback=1200;break;
// case 6:$clan_moneyback=1200;break;
// };
// $temp=mysql_query("UPDATE `users` set `money` = money+'$clan_moneyback' WHERE `id` = '".$cl_reg_curr['owner']."' LIMIT 1;");
2018-01-28 19:15:29 +00:00
$temp = db::c()->query('UPDATE `users` SET `money` = `money` + ?i WHERE `id` = ?i LIMIT 1', $clan_moneyback, $cl_reg_curr['owner']);
2018-01-28 16:40:49 +00:00
// if(!($temp)) echo(mysql_error()); /*В теории сейчас в класс вшит обработчик ошибок.*/
2018-01-28 19:15:29 +00:00
}
// $clan_q_base=mysql_query("select * from reg_klan");
// $clan_q=mysql_num_rows($clan_q_base);
$clan_q = db::c()->query('SELECT * FROM `reg_klan`')->getNumRows();
// Clan adder
if ($clan_q) {
echo("<p>Заявок в очереди на рассмотрение: <b>$clan_q</b></p>");
2018-01-28 16:40:49 +00:00
// $clan_msg_rec=mysql_fetch_assoc(mysql_query("SELECT * FROM USERS where id='".$cl_reg_curr['owner']."'"));
// if ($_POST['clan_reg']) mysql_query("delete from reg_klan where id='".$cl_reg_curr['id']."'");
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();
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' >Подтвердить&nbsp;<br /><input type='radio' name='clan_reg' value='not_add_clan' >Отменить&nbsp;<br /><input type='submit' value='Закончить' ></p>");
} else echo("Заявки на регистрацию кланов отсутствуют");
2018-01-28 16:40:49 +00:00
2018-01-28 19:15:29 +00:00
?>
</div>
</fieldset>
</form>
<form method=post>
<legend>Сброс параметров персонажа</legend>
<input name='sbr_par' placeholder="Логин"> <input type=submit value='Применить'></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="img" 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="type">
<option value="0" selected disabled>Тип предмета</option>
<option value="3">Оружие</option>
<option value="11">Сапоги</option>
<option value="9">Перчатки</option>
<option value="4">Броня</option>
<option value="8">Шлемы</option>
<option value="10">Щиты</option>
<option value="1">Серьги</option>
<option value="2">Ожерелья</option>
<option value="5">Кольца</option>
<option value="12">Заклинания</option>
</select></td>
</tr>
<tr>
<td><input name=massa placeholder="Масса"></td>
</tr>
<tr>
<td><input name=needident placeholder="Нужно идентифицировать">чекбокс?</td>
</tr>
<tr>
<td><input name=letter placeholder="Кол-во знаков">что это?</td>
</tr>
<tr>
<td><input name=isrep placeholder="Подлежит ремонту">чекбокс?</td>
</tr>
<tr>
<td><input name=goden placeholder="Годен (дней)"></td>
</tr>
<tr>
<td><select name="razdel">
<option value="0" selected disabled>Раздел магазина</option>
<option value="1">Оружие: Кастеты, ножи</option>
<option value="11">Оружие: Топоры</option>
<option value="12">Оружие: Дубины, Булавы</option>
<option value="13">Оружие: Мечи</option>
<option disabled>--------------------</option>
<option value="2">Одежда: Сапоги</option>
<option value="21">Одежда: Перчатки</option>
<option value="22">Одежда: Броня: легкая</option>
<option value="23">Одежда: Броня: тяжелая</option>
<option value="24">Одежда: Шлемы</option>
<option value="3">Щиты</option>
<option disabled>--------------------</option>
<option value="4">Ювелирные товары: Серьги</option>
<option value="41">Ювелирные товары: Ожерелья</option>
<option value="42">Ювелирные товары: Кольца</option>
<option disabled>--------------------</option>
<option value="5">Заклинания: Нейтральные</option>
<option value="51">Заклинания: Боевые, Защитные</option>
<option value="6">Аммуниция</option>
<option disabled>--------------------</option>
<option value="7">Артефакты: Букеты</option>
</select></td>
</tr>
<tr>
<td><input name=duration placeholder="Мин. износ">Но нахуя износ новой вещи?!</td>
</tr>
<tr>
<td><input name=maxdur placeholder="Макс. износ"></td>
</tr>
<tr>
<td><input name=cost placeholder="Цена (кр.)"></td>
</tr>
<tr>
<td><input name=ecost placeholder="Цена (екр.)"></td>
</tr>
</table>
<table class="additem">
<th>Требования</th>
<tr>
<td><input name=nlevel placeholder="Уровень"></td>
</tr>
<tr>
<td><input name=nsila placeholder="Сила"></td>
</tr>
<tr>
<td><input name=nlovk placeholder="Ловкость"></td>
</tr>
<tr>
<td><input name=ninta placeholder="Интуиция"></td>
</tr>
<tr>
<td><input name=nvinos placeholder="Выносливость"></td>
</tr>
<tr>
<td><input name=nintel placeholder="Интеллект"></td>
</tr>
<tr>
<td><input name=nmudra placeholder="Мудрость"></td>
</tr>
<tr>
<td><input name=nnoj placeholder="Ум.ножи"></td>
</tr>
<tr>
<td><input name=ntopor placeholder="Ум.топоры"></td>
</tr>
<tr>
<td><input name=ndubina placeholder="Ум.дубины"></td>
</tr>
<tr>
<td><input name=nmech placeholder="Ум.мечи"></td>
</tr>
<tr>
<td><input name=nalign placeholder="Склонность"></td>
</tr>
<tr>
<td><input name=nfire placeholder="Мастерство огня"></td>
</tr>
<tr>
<td><input name=nwater placeholder="Мастерство воды"></td>
</tr>
<tr>
<td><input name=nair placeholder="Мастерство воздуха"></td>
</tr>
<tr>
<td><input name=nearth placeholder="Мастерство земли"></td>
</tr>
<tr>
<td><input name=nlight placeholder="Светлая магия"></td>
</tr>
<tr>
<td><input name=ngray placeholder="Серая магия"></td>
</tr>
<tr>
<td><input name=ndark 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>
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();
// };
//
// 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();
// };
}
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 Свитков править. Мама дорогая! */
case "cure150":
2018-06-24 12:12:33 +00:00
include("../magic/cure150.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":
2018-06-24 12:12:33 +00:00
include("../magic/ct1.php");
2018-01-28 19:15:29 +00:00
break;
case "ct2":
2018-06-24 12:12:33 +00:00
include("../magic/ct2.php");
2018-01-28 19:15:29 +00:00
break;
case "ct3":
2018-06-24 12:12:33 +00:00
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":
2018-06-24 12:12:33 +00:00
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;
}
echo "<div class=abils><legend>Абилки:</legend>Пока что привязаны к общей системе. Работают выборочно.<br>";
$script_name = $magic_name = '';
foreach ($moj as $k => $v) {
#echo $k;
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 "cure150":
$script_name = "runmagic1";
$magic_name = "Лечение(150)";
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>&nbsp;";
}
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>Выдать чёртов ВИП
<small>и переписать функцию выдачи как будет время</small>
</legend>
<input name="target">
<select name="vip_type">
<option selected disabled>Тип</option>
<option value=1>Silver</option>
<option value=2>Gold</option>
<option value=3>Platinum</option>
</select>
<select name="time">
<option selected disabled>Срок</option>
<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>
<input type="hidden" name="use" value="vip">
<input type="submit">
</form>
<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='login_exp' placeholder='Логин'>
<input name='kol_exp' placeholder='Количество опыта'>
<input type=submit value='Отправить'>
</form>
<form method='post'>
<legend>Телеграф</legend>
<input name='grn' placeholder='Логин'>
<input name='gr' 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.1'>Паладин поднебесья</option>
<option value='1.75'>Паладин Солнечной Улыбки</option>
<option value='1.7'>Паладин Огненной Зари</option>
<option value='1.91'>Паладин Неба</option>
<option value='1.98'>Старший Паладин Неба</option>
<option value='1.99'>Верховный Паладин</option>
<option disabled>--- ИГРОВЫЕ ---</option>
<option value='2'>Нейтрал</option>
<option value='3'>Тёмный</option>
<option value='6'>Светлый</option>
<option disabled>--- РАЗНОЕ ---</option>
<option value='1.0011'>Бот ОС</option>
<option value='2.99'>Истинный хаос</option>
<option value='10'>Суперкрест</option>
<option value='-1'>Снять склонность</option>
</select> <input type='submit' value='Применить'></form>
2018-06-24 12:12:33 +00:00
<?php
2018-01-28 19:15:29 +00:00
# Даёт опыт.
if ($_POST['kol_exp'] > 0) {
$id_user = mysql_fetch_assoc(mysql_query("SELECT `id` FROM `users` WHERE `login`='" . $_POST['login_exp'] . "'"));
mysql_query("UPDATE `users` SET `exp`=`exp`+'" . $_POST['kol_exp'] . "' WHERE `id`='" . $id_user['id'] . "'");
echo "<font color=green>Успешно.</font>";
}
# Телеграф.
if ($_POST['grn'] && $_POST['gr']) echo telegraph($_POST['grn'], $_POST['gr']);
# Показывает невидимок.
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
}
# Системное сообщение.
if ($_POST['newsmsg']) {
$from = '<span style="background:#faa;">';
AddChatSystem($from . $_POST['newsmsg'] . "</span>");
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=redalert>Статус ".$dd['login']." изменен на ". $_POST['status']. "</span><BR>";
}
}
# Меняем склонности
if ($_POST['login'] && $_POST['krest']) {
switch ($_POST['krest']) {
case 1.1:
$rang = 'Паладин Поднебесья';
break;
case 1.75:
$rang = 'Паладин Солнечной Улыбки';
break;
case 1.7:
$rang = 'Паладин Огненной Зари';
break;
case 1.91:
$rang = 'Паладин Неба';
break;
case 1.98:
$rang = 'Старший Паладин Неба';
break;
case 1.99:
$rang = 'Верховный Паладин';
break;
default:
$rang = '';
break;
}
echo $_POST['krest'] . " = 45424tgf34g";
if ($_POST['krest'] == -1) db::c()->query('UPDATE `users` SET `align`="?s", `status`="?s" WHERE `login` = "?s" LIMIT 1;', '0.00', '', $_POST['login']);
else mysql_query("UPDATE `users` SET `align` = '" . $_POST['krest'] . "',`status` = '$rang' WHERE `login` = '" . $_POST['login'] . "';");
}
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">
2018-01-28 19:15:29 +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) {
xmlHttpp[iid] = GetXmlHttpObject1();
if (xmlHttpp[iid] == null) {
alert("Browser does not support HTTP Request")
return
}
document.getElementById(iid).innerHTML = "<img src='../i/loading2.gif' />";
2018-01-28 19:15:29 +00:00
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);
2018-01-28 16:40:49 +00:00
}
2018-01-28 19:15:29 +00:00
function GetXmlHttpObject1() {
var xmlHttp1 = null;
try {
xmlHttp1 = new XMLHttpRequest();
}
catch (e) {
try {
xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
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) {
var srcElement = document.getElementById(ele);
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
}
2018-01-28 19:15:29 +00:00
var Hint3Name = '';
var 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
2018-01-28 19:15:29 +00:00
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>' +
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
</script>
<script>
2018-01-28 19:15:29 +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) {
xmlHttpp[iid] = GetXmlHttpObject1()
if (xmlHttpp[iid] == null) {
alert("Browser does not support HTTP Request")
return
}
document.getElementById(iid).innerHTML = "<img src='../i/loading2.gif' />";
2018-01-28 19:15:29 +00:00
var url = "./ajax/" + func + ".php"
url = url + "?" + getpar
xmlHttpp[iid].open("POST", url, true);
xmlHttpp[iid].onreadystatechange = function () {
if (xmlHttpp[iid].readyState == 4 || xmlHttpp[iid].readyState == "complete") {
if (document.getElementById(iid) == '[object HTMLInputElement]')
document.getElementById(iid).value = xmlHttpp[iid].responseText;
else
document.getElementById(iid).innerHTML = xmlHttpp[iid].responseText;
document.getElementById('chat').scrollTop = document.getElementById('chat').scrollHeight + 10;
}
}
xmlHttpp[iid].setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlHttpp[iid].send(postpar);
}
function GetXmlHttpObject1() {
var xmlHttp1 = null;
try {
// Firefox, Opera 8.0+, Safari
xmlHttp1 = new XMLHttpRequest();
}
catch (e) {
//Internet Explorer
try {
xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp1;
}
2018-01-28 16:40:49 +00:00
</script>
</body>
</html>