918 lines
29 KiB
PHP
918 lines
29 KiB
PHP
|
<?php
|
|||
|
//include("a_process_start.php");
|
|||
|
//session_start();
|
|||
|
//if (empty($_SESSION['uid'])) die ("<script>top.location.href = '/';</script>");
|
|||
|
include "config.php";
|
|||
|
|
|||
|
include "functions.php";
|
|||
|
|
|||
|
if (@$_POST['cmd']=='inqs.question') {
|
|||
|
|
|||
|
$eff_slinse = sql_row("SELECT `time` FROM `effects` WHERE `owner` = '{$user_target['id']}' and `type` = '2' LIMIT 1;");
|
|||
|
|
|||
|
if (@$_SESSION['pal_time'] >= time()) {
|
|||
|
$_SESSION['pal_hint'] = 'Вопросы можно задавать не чаще, чем раз в 5 минут';
|
|||
|
} elseif (empty($_POST['text'])) {
|
|||
|
$_SESSION['pal_hint'] = 'Ваш вопрос не задан...';
|
|||
|
} elseif (!empty($eff_slinse)) {
|
|||
|
$_SESSION['pal_hint'] = 'На вас наложено молчание';
|
|||
|
} elseif ($user['prison']) {
|
|||
|
$_SESSION['pal_hint'] = 'В тюрьме нельзя';
|
|||
|
} else {
|
|||
|
|
|||
|
$_SESSION['pal_hint'] = 'Ваш вопрос принят ';
|
|||
|
$_SESSION['pal_time'] = time()+5*60;
|
|||
|
|
|||
|
sql_query("INSERT INTO `paladin_vopros`(`owner` ,`login`, `text`, `status`, `date`) VALUES (
|
|||
|
'".$_SESSION['uid']."',
|
|||
|
'".$user['login']."',
|
|||
|
'".$_POST['text']."',
|
|||
|
1,
|
|||
|
'".time()."');");
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if (@$_POST['choosen_question']) {
|
|||
|
|
|||
|
|
|||
|
$pal_question = sql_row("SELECT * FROM paladin_vopros WHERE `id` = '".mysql_real_escape_string($_POST['choosen_question'])."' LIMIT 1;");
|
|||
|
|
|||
|
if ($pal_question['id']) {
|
|||
|
|
|||
|
if ($_POST['cp_comment']) {
|
|||
|
$text_solution = $_POST['cp_comment'];
|
|||
|
$text = 'Ответ от паладина <b>'.$user['login'].'</b>.<br>';
|
|||
|
$text .= '<br>Дата: '.date('Y.m.d H:i:s', $pal_question['date']).'<br>';
|
|||
|
$text .= 'Ваш вопрос: '.$pal_question['text'].'<br>';
|
|||
|
$text .= ''.'<br>';
|
|||
|
$text .= ''.'<br>';
|
|||
|
$text .= 'Ответ паладина: '.$text_solution;
|
|||
|
|
|||
|
send_user_letter($pal_question['owner'], '[Администрация]', 'Ваш вопрос рассмотрен', $text);
|
|||
|
sql_query("UPDATE paladin_vopros SET status = 2, otvet = '".$text_solution."', otvet_id = '".$user['id']."' WHERE id = '".$pal_question['id']."'");
|
|||
|
$_SESSION['pal_hint'] = 'вопрос от '.$pal_question['login'].' рассмотрен';
|
|||
|
|
|||
|
} else {
|
|||
|
$_SESSION['pal_hint'] = 'Ответ не указан';
|
|||
|
}
|
|||
|
|
|||
|
} else {
|
|||
|
$_SESSION['pal_hint'] = 'не найдено жалобы';
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$_GET['cmd'] = 'pal.otvet';
|
|||
|
$_GET['page'] = @$_POST['page'];
|
|||
|
$_GET['selstatus'] = @$_POST['selstatus'];
|
|||
|
}
|
|||
|
|
|||
|
?>
|
|||
|
|
|||
|
<html xmlns="http://www.w3.org/1999/xhtml" class="js win chrome chrome27 webkit webkit537"><head>
|
|||
|
<title>Помощь</title>
|
|||
|
|
|||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|||
|
|
|||
|
<link href="http://www.tadot.ru//css/main.css" rel="stylesheet" type="text/css">
|
|||
|
<link href="http://www.tadot.ru//c/help.css" rel="stylesheet" type="text/css">
|
|||
|
|
|||
|
<link rel="stylesheet" href="css/jquery-ui-1.8.17.custom.css" type="text/css" media="screen" charset="utf-8"/>
|
|||
|
|
|||
|
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery-ui.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.browser.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.cookie.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.tooltip.mod.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.pnotify.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.placeholder.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.countdown.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.jeegoocontext.mod.js" type="text/javascript"></script>
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
var isBattle = Number(<?= $user['battle'] ?>);
|
|||
|
var isBid = Number(<?= $user['zayavka'] ?>);
|
|||
|
</script>
|
|||
|
|
|||
|
<script src="http://www.tadot.ru//js/iner.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/jquery/jquery.charcounter.mod.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/shortkeys.js" type="text/javascript"></script>
|
|||
|
<script src="http://www.tadot.ru//j/user_v2.js" type="text/javascript"></script>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<script language="JavaScript" type="text/javascript">
|
|||
|
/*<![CDATA[*/
|
|||
|
if (!top.CheckFrame) {
|
|||
|
top.location.href = '/';
|
|||
|
}
|
|||
|
/*]]>*/
|
|||
|
</script>
|
|||
|
|
|||
|
</head>
|
|||
|
<body class="main-content">
|
|||
|
<div id="hint1" class="hint"></div>
|
|||
|
|
|||
|
<table class="main-table">
|
|||
|
<tbody><tr>
|
|||
|
<td>
|
|||
|
|
|||
|
<?
|
|||
|
if (!empty($_SESSION['pal_hint'])) {
|
|||
|
echo show_global_mess($_SESSION['pal_hint']);
|
|||
|
$_SESSION['pal_hint'] = '';
|
|||
|
}
|
|||
|
?>
|
|||
|
|
|||
|
<div id="tabs">
|
|||
|
<div id="tab" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
|
|||
|
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
|
|||
|
<li class="ui-state-default ui-corner-top <? if ((@$_GET['cmd']=='pal.show') or(empty($_GET['cmd']))) { ?>ui-tabs-selected ui-state-active<? } ?>"><a href="?cmd=pal.show">Задай вопрос</a></li>
|
|||
|
<li class="ui-state-default ui-corner-top <? if ((@$_GET['cmd']=='links.show')) { ?>ui-tabs-selected ui-state-active<? } ?>"><a href="?cmd=links.show">Ссылки</a></li>
|
|||
|
<li class="ui-state-default ui-corner-top <? if ((@$_GET['cmd']=='hotkeys.show')) { ?>ui-tabs-selected ui-state-active<? } ?>"><a href="?cmd=hotkeys.show">Горячие клавиши</a></li>
|
|||
|
<li class="ui-state-default ui-corner-top <? if ((@$_GET['cmd']=='path.show')or(@$_GET['cmd']=='path.calc')) { ?>ui-tabs-selected ui-state-active<? } ?>"><a href="?cmd=path.show">Как пройти?</a></li>
|
|||
|
<? if ($user['align']>1 && $user['align']<3) { ?>
|
|||
|
<li class="ui-state-default ui-corner-top <? if (($_GET['cmd']=='pal.otvet')) { ?>ui-tabs-selected ui-state-active<? } ?>"><a href="?cmd=pal.otvet">Вопросы</a></li>
|
|||
|
<? } ?>
|
|||
|
</ul>
|
|||
|
<div class="ui-block ui-tabs-panel ui-widget-content ui-corner-bottom">
|
|||
|
|
|||
|
<? if ((@$_GET['cmd']=='pal.show') or(empty($_GET['cmd']))) { ?>
|
|||
|
|
|||
|
<h2 class="tab-header">Задай вопрос паладинам</h2>
|
|||
|
|
|||
|
Уважаемые игроки!<br>Для более быстрого и эффективного решения вашей проблемы просьба обращаться к тем паладинам, ники которых находятся <br />справа в списке «Паладины онлайн». Цените свое и чужое время!
|
|||
|
|
|||
|
<table class="ask-table">
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td class="question-col">
|
|||
|
<form action="" method="post">
|
|||
|
<input name="cmd" type="hidden" value="inqs.question">
|
|||
|
<input name="nd" type="hidden" value="9958516956">
|
|||
|
|
|||
|
<label for="question">
|
|||
|
<b>Задай свой вопрос:</b>
|
|||
|
</label>
|
|||
|
|
|||
|
<div class="wide-field-container">
|
|||
|
<textarea cols="50" id="question" maxlength="1000" name="text" rows="5"></textarea>
|
|||
|
</div>
|
|||
|
|
|||
|
<input class="xbutton" type="submit" value="Спросить">
|
|||
|
<br><br>
|
|||
|
<span style="color: #FF0000">Внимание!</span> Паладины вправе наказывать за злоупотребление этой функцией.
|
|||
|
</form>
|
|||
|
<?
|
|||
|
|
|||
|
$paladin_vopros = sql_query("SELECT * FROM `paladin_vopros` WHERE `owner` = '{$_SESSION['uid']}' ;");
|
|||
|
$paladin_vopros_count = sql_number("SELECT * FROM `paladin_vopros` WHERE `owner` = '{$_SESSION['uid']}' ;");
|
|||
|
if ($paladin_vopros_count) {
|
|||
|
|
|||
|
?>
|
|||
|
<table class="questions">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<td class="bold">Ваши вопросы:</td>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<?
|
|||
|
|
|||
|
while($row=mysql_fetch_array($paladin_vopros))
|
|||
|
{
|
|||
|
$dfg = sdsfower(date("m",$row['date']));
|
|||
|
?>
|
|||
|
<tr>
|
|||
|
<td class="n question">
|
|||
|
<span class="green">[<?= date("d",$row['date']) ?> <?= mb_strtolower($dfg) ?> <?= date("Y H:i",$row['date']) ?>]</span> <b>Вопрос:</b> <?= $row['text'] ?> <? if ($row['otvet']) { ?><b>Ответ</b>: <?= $row['otvet'] ?> <? } ?>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<?
|
|||
|
}
|
|||
|
?>
|
|||
|
|
|||
|
<!--<tr>
|
|||
|
<td class="n answer">
|
|||
|
<span class="green">[04 октября 2013 21:00]</span> <b>Ответ от Вредный мопес</b>: подземелье Разлом для игроков 9 уровня
|
|||
|
</td>
|
|||
|
</tr>-->
|
|||
|
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<? } ?>
|
|||
|
</td>
|
|||
|
<td class="online-col nowrap">
|
|||
|
<b class="nowrap">Паладины онлайн:</b>
|
|||
|
<br><br>
|
|||
|
<?
|
|||
|
$data = sql_query("SELECT `id`, `login`, `level`, `align` FROM `users` WHERE `upd_online` >= ".(time()-60)." AND invis = 0 AND (align>=1 and align<=2) AND `incity` = '".INCITY."' order by align desc, login asc ;");
|
|||
|
while ($row = mysql_fetch_array($data)) {
|
|||
|
if ($row['id'] > 0) {?>
|
|||
|
|
|||
|
<?= nick_2($row['id'],0,10,'private_on','','on'); ?><br>
|
|||
|
|
|||
|
<?
|
|||
|
}
|
|||
|
}
|
|||
|
?>
|
|||
|
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
|
|||
|
|
|||
|
<? }elseif ((@$_GET['cmd']=='links.show')) { ?>
|
|||
|
|
|||
|
<h2 class="tab-header">2. Полезные ссылки</h2>
|
|||
|
|
|||
|
|
|||
|
Большинство вопросов касающихся игры, как правило, уже задавались другими персонажами либо описаны в библиотеке.
|
|||
|
<div class="text" style=" border: 0px solid #404040; ">
|
|||
|
<ul>
|
|||
|
<li>
|
|||
|
<a href="/forum.php" target="_blank"><b>Форум</b> — место, где можно задать вопрос всем игрокам. </a>
|
|||
|
</li>
|
|||
|
<li>
|
|||
|
<a href="http://lib.tadot.ru/" target="_blank"><b>Библиотека</b> — подробная информация на любую тематику.</a>
|
|||
|
</li>
|
|||
|
<li>
|
|||
|
<a href="http://lib.tadot.ru/faq/" target="_blank"><b>Часто задаваемые вопросы.</b></a>
|
|||
|
</li>
|
|||
|
<li>
|
|||
|
<a href="http://lib.tadot.ru/laws/" target="_blank"><b>Законы игры.</b></a>
|
|||
|
</li>
|
|||
|
<li>
|
|||
|
<a href="http://lib.tadot.ru/aligns/" target="_blank"><b>Что такое склонность?</b></a>
|
|||
|
</li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<? }elseif (($_GET['cmd']=='hotkeys.show')) { ?>
|
|||
|
<h2 class="tab-header">3. Горячие клавиши</h2>
|
|||
|
<table class="table-list hotkeys">
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<th class="caption" colspan="2">Общие:</th>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>ALT + 1</th>
|
|||
|
<td>Инвентарь "Вещи"</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>ALT + 2</th>
|
|||
|
<td>Инвентарь "Руны"</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>ALT + 3</th>
|
|||
|
<td>Инвентарь "Заклятия"</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>ALT + 4</th>
|
|||
|
<td>Инвентарь "Еда"</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>ALT + 5</th>
|
|||
|
<td>Инвентарь "Прочее"</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>ALT + ~</th>
|
|||
|
<td>Локация</td>
|
|||
|
</tr>
|
|||
|
<!--<tr>
|
|||
|
<th>ALT + F</th>
|
|||
|
<td>Форум</td>
|
|||
|
</tr>-->
|
|||
|
<tr>
|
|||
|
<th>ALT + Q</th>
|
|||
|
<td>Выход из игры</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>
|
|||
|
<img alt="Главная" height="30" src="http://img.tadot.ru/i/button/new/cm_inv.gif" title="Главная страница" width="30">
|
|||
|
</th>
|
|||
|
<td>Левый клик мышкой — Главная страница</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>
|
|||
|
<img alt="Инвентарь" height="30" src="http://img.tadot.ru/i/button/new/cm_inv.gif" title="Инвентарь" width="30">
|
|||
|
</th>
|
|||
|
<td>Правый клик мышкой — Инвентарь</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th class="caption" colspan="2">Во время боя:</th>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>ESC</th>
|
|||
|
<td>Отменить выставленные параметры ударов и блоков</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>1,2,3,4</th>
|
|||
|
<td>Первое нажатие выбирает зону удара</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>1,2,3,4,5,6</th>
|
|||
|
<td>Второе нажатие выбирает зону блока</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>1,2</th>
|
|||
|
<td>Третье нажатие выбирает позицию</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<th>Enter</th>
|
|||
|
<td>Четвертое нажатие эквивалентно кнопке "Вперед!"</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
|
|||
|
<? }elseif (($_GET['cmd']=='path.show')or($_GET['cmd']=='path.calc')) { ?>
|
|||
|
|
|||
|
<?
|
|||
|
|
|||
|
|
|||
|
$isroom = $rooms[$user['room']];
|
|||
|
|
|||
|
?>
|
|||
|
|
|||
|
Ваше местонахождение — "<b><?= $isroom ?></b>"
|
|||
|
<br><br>
|
|||
|
<form action="">
|
|||
|
<input name="cmd" type="hidden" value="path.calc">
|
|||
|
<input name="nd" type="hidden" value="9448657205">
|
|||
|
<input name="r" type="hidden" value="0.680938616360784">
|
|||
|
|
|||
|
Куда бы вы хотели попасть?<br>
|
|||
|
<?
|
|||
|
|
|||
|
$locations_normal = array (
|
|||
|
|
|||
|
"100"=> "Дворец",
|
|||
|
"101"=> "Центральный Зал",
|
|||
|
"102"=> "Казарма Призывников",
|
|||
|
"103"=> "Казарма Новобранцев",
|
|||
|
"104"=> "Казарма Рекрутов",
|
|||
|
"105"=> "Зал Победителей",
|
|||
|
"106"=> "Зал Славетных",
|
|||
|
"107"=> "Зал Отважных",
|
|||
|
"108"=> "Зал Героев",
|
|||
|
"109"=> "Зал Тьмы",
|
|||
|
"110"=> "Зал Света",
|
|||
|
"111"=> "Зал Хаоса",
|
|||
|
"113"=> "Башня Паладинов",
|
|||
|
|
|||
|
"120"=> "Центральная площадь",
|
|||
|
"121" => "Глас народа",
|
|||
|
"122"=> "Собор",
|
|||
|
"123"=> "Магазин",
|
|||
|
"124"=> "Почта",
|
|||
|
"125"=> "Кузня",
|
|||
|
"126"=> "Таверна "Опрокинутый кувшин"",
|
|||
|
"127"=> "Стелла войны",
|
|||
|
"128"=> "Новогодняя Елочка",
|
|||
|
|
|||
|
"130"=> "Западная улица",
|
|||
|
"131"=> "Больница",
|
|||
|
"132"=> "Ратуша",
|
|||
|
"133"=> "Лотерея",
|
|||
|
"134"=> "Башня Сражений",
|
|||
|
"135"=> "Магазин Ордена Забытой Чести",
|
|||
|
"136"=> "Вокзал",
|
|||
|
|
|||
|
"150" => "Малые Торговые ряды",
|
|||
|
"152" => "Постоялый двор",
|
|||
|
"153"=> "Биржа",
|
|||
|
"154"=> "Магазин эксклюзивных вещей",
|
|||
|
"155"=> "Банк",
|
|||
|
|
|||
|
"410" => "Спуск в Канализацию",
|
|||
|
"411" => "Канализация",
|
|||
|
|
|||
|
"420" => "Спуск в Пещеру проклятий",
|
|||
|
"421" => "Пещера проклятий",
|
|||
|
|
|||
|
"440" => "Спуск в Катакомбы",
|
|||
|
"441" => "Катакомбы",
|
|||
|
|
|||
|
|
|||
|
"666" => "Тюрьма (Камера смертников)",
|
|||
|
|
|||
|
"408" => "Магазин Луки"
|
|||
|
);
|
|||
|
|
|||
|
|
|||
|
// sort($locations_normal);
|
|||
|
// sort($locations_new);
|
|||
|
|
|||
|
//$result_keyed = array_reverse($locationsd, true);
|
|||
|
|
|||
|
$roomme = $user['room'];
|
|||
|
if (@$_GET['room']) {
|
|||
|
$room = $_GET['room'];
|
|||
|
}
|
|||
|
|
|||
|
if (empty($room)) {
|
|||
|
$room = $roomme;
|
|||
|
}
|
|||
|
|
|||
|
?>
|
|||
|
<select name="room">
|
|||
|
<?
|
|||
|
|
|||
|
|
|||
|
|
|||
|
echo '<optgroup label="Территория = Дворец">';
|
|||
|
for ($i = 100; $i <= 113; $i++ ) {
|
|||
|
|
|||
|
if ($i == 100) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'>> '.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
} else {
|
|||
|
if ($i != 112) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'> > '.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
echo '</optgroup>';
|
|||
|
|
|||
|
echo '<optgroup label="Территория = Центральная площадь">';
|
|||
|
for ($i = 120; $i <= 128; $i++ ) {
|
|||
|
if ($i == 120) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'>> '.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
} elseif ($i != 128) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'> > '.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
}
|
|||
|
}
|
|||
|
echo '</optgroup>';
|
|||
|
|
|||
|
echo '<optgroup label="Территория = Западная улица">';
|
|||
|
for ($i = 130; $i <= 136; $i++ ) {
|
|||
|
if ($i == 130) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'>'.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
} elseif ($i != 134 && $i != 135) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'> > '.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
}
|
|||
|
}
|
|||
|
echo '</optgroup>';
|
|||
|
|
|||
|
echo '<optgroup label="Территория = Малые Торговые ряды">';
|
|||
|
for ($i = 150; $i <= 155; $i++ ) {
|
|||
|
if ($i == 150) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'>> '.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
} elseif ($i != 151) {
|
|||
|
echo '<option value="'.$i.'" '.(($room == $i)?'selected="selected"':"").'> > '.setinloc($i).' '.$locations_normal[$i].'</option>';
|
|||
|
}
|
|||
|
}
|
|||
|
echo '</optgroup>';
|
|||
|
|
|||
|
|
|||
|
/* if ($k == $roomme) { ?>
|
|||
|
|
|||
|
<? } else { if ($k == $room) { ?>
|
|||
|
<option value="<?= $k ?>" selected="selected"><?= $v ?></option>
|
|||
|
<? } else { ?>
|
|||
|
<option value="<?= $k ?>"><?= $v ?></option>
|
|||
|
<? }*/
|
|||
|
|
|||
|
|
|||
|
?>
|
|||
|
|
|||
|
</select>
|
|||
|
<input class="xbutton" type="submit" value="Показать путь">
|
|||
|
</form>
|
|||
|
<?
|
|||
|
if ($_GET['cmd']=='path.calc') {
|
|||
|
|
|||
|
|
|||
|
/* Дворец */
|
|||
|
$ar_100 = array(101,102,103,104,105,106,107,108,109,110,111,112,113);
|
|||
|
/* Центральная площадь */
|
|||
|
$ar_120 = array(121,122,123,124,125,126,127,128);
|
|||
|
/* Западная улица */
|
|||
|
$ar_130 = array(131,132,133,134,135,136);
|
|||
|
/* Малые Торговые ряды */
|
|||
|
$ar_150 = array(405,402,151,152,153,154,155);
|
|||
|
/* All */
|
|||
|
$ar_all = array(100,120,130,150);
|
|||
|
|
|||
|
$serch_room = @$_GET['room'];
|
|||
|
$me_room = $user['room'];
|
|||
|
?>
|
|||
|
<br>
|
|||
|
<b>ПОРЯДОК ПЕРЕХОДОВ: <?= setinloc($serch_room) ?> <?= $rooms[$serch_room] ?> </b><!---->
|
|||
|
<ol id="path">
|
|||
|
<?
|
|||
|
$find_100 = 0;
|
|||
|
$find_120 = 0;
|
|||
|
$find_130 = 0;
|
|||
|
$find_150 = 0;
|
|||
|
|
|||
|
$me_100 = 0;
|
|||
|
$me_120 = 0;
|
|||
|
$me_130 = 0;
|
|||
|
$me_150 = 0;
|
|||
|
|
|||
|
$show_room_100 = '';
|
|||
|
$show_room_120 = '';
|
|||
|
$show_room_130 = '';
|
|||
|
$show_room_150 = '';
|
|||
|
|
|||
|
if(in_array($serch_room, $ar_100)){ $find_100 = 1; }
|
|||
|
if(in_array($serch_room, $ar_120)){ $find_120 = 1; }
|
|||
|
if(in_array($serch_room, $ar_130)){ $find_130 = 1; }
|
|||
|
if(in_array($serch_room, $ar_150)){ $find_150 = 1; }
|
|||
|
|
|||
|
if(in_array($me_room, $ar_100)){ $me_100 = 1; }
|
|||
|
if(in_array($me_room, $ar_120)){ $me_120 = 1; }
|
|||
|
if(in_array($me_room, $ar_130)){ $me_130 = 1; }
|
|||
|
if(in_array($me_room, $ar_150)){ $me_150 = 1; }
|
|||
|
|
|||
|
#-------------------------
|
|||
|
# Центральная площадь
|
|||
|
#-------------------------
|
|||
|
|
|||
|
$is120 = 0;
|
|||
|
if (($me_room == 150 || $me_100 || $me_120 || $me_130 || $me_150) && ($find_100 || $find_120 || $find_130 || $find_150)) {
|
|||
|
if (($me_150 || $me_room == 150) && ($find_100 || $find_120 || $find_130)) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is120 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
if ((($me_100 && !$find_100) || $me_120 || $me_room == 130 || ($me_room == 100 && !$find_100 && $serch_room != 120)) && ($find_100 || $find_120 || $find_130 || $find_150)) {
|
|||
|
if ($me_room == 130 && !$find_130) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is120 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if (($me_120 || $me_room == 130 || ($me_room == 100 && !$find_100 && $serch_room != 120)) && ($serch_room == 100 || $serch_room == 120 || $serch_room == 130 || $serch_room == 150)) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is120 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($me_100 && ($find_120 || $find_130 || $find_150 || $serch_room == 130 || $serch_room == 150)) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is120 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($me_120 && $find_120) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is120 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($me_room == 100 && ($find_120 || $find_130 || $find_150)) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is120 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($me_130 && ($find_150 || $find_120 || $find_100)) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is120 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
if ($is120) {
|
|||
|
$show_room_120 = '<li>"Центральная площадь"</li>';
|
|||
|
}
|
|||
|
|
|||
|
#-------------------------
|
|||
|
# Малые Торговые ряды
|
|||
|
#-------------------------
|
|||
|
|
|||
|
$is150 = 0;
|
|||
|
if (($me_100 || $me_120 || $me_130 || $me_150 || $me_room == 100 || $me_room == 120 || $me_room == 130) && $find_150) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is150 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($me_150 && ($find_120 || $find_130 || $find_100 || $serch_room == 130 || $serch_room == 120 || $serch_room == 100)) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is150 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($is150) {
|
|||
|
$show_room_150 = '<li>"Малые Торговые ряды"</li>';
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
#-------------------------
|
|||
|
# Западная улица
|
|||
|
#-------------------------
|
|||
|
|
|||
|
$is130 = 0;
|
|||
|
if (($me_100 || $me_120 || $me_150 || $me_130 || $me_room == 100 || $me_room == 120 || $me_room == 150) && $find_130) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is130 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($me_130 && ($find_120 || $find_150 || $find_100 || $serch_room == 150 || $serch_room == 120 || $serch_room == 100)) {
|
|||
|
if ($me_room != $serch_room) {
|
|||
|
$is130 = 1;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if ($is130) {
|
|||
|
$show_room_130 = '<li>"Западная улица"</li>';
|
|||
|
}
|
|||
|
|
|||
|
#-------------------------
|
|||
|
# Дворец
|
|||
|
#-------------------------
|
|||
|
|
|||
|
$is100 = 0;
|
|||
|
if (($me_100 || $me_120 || $me_130 || $me_150 || $me_room == 120 || $me_room == 130 || $me_room == 150) && $find_100) {
|
|||
|
$is100 = 1;
|
|||
|
}
|
|||
|
if (($me_100) && ($find_120 || $find_130 || $find_150 || $serch_room == 120 || $serch_room == 130 || $serch_room == 150)) {
|
|||
|
$is100 = 1;
|
|||
|
}
|
|||
|
|
|||
|
if ($me_100 == $find_100) {
|
|||
|
$is100 = 0;
|
|||
|
}
|
|||
|
|
|||
|
if ($is100) {
|
|||
|
$show_room_100 = '<li>"Дворец"</li>';
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
switch($serch_room){
|
|||
|
case 100: $find_100 = 1; break;
|
|||
|
case 120: $find_120 = 1; break;
|
|||
|
case 130: $find_130 = 1; break;
|
|||
|
case 150: $find_150 = 1; break;
|
|||
|
}
|
|||
|
|
|||
|
switch($me_room){
|
|||
|
case 100: $me_100 = 1; break;
|
|||
|
case 120: $me_120 = 1; break;
|
|||
|
case 130: $me_130 = 1; break;
|
|||
|
case 150: $me_150 = 1; break;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
if ($me_100 && ($find_120 || $find_130 || $find_150)) {
|
|||
|
|
|||
|
echo $show_room_100.$show_room_120.$show_room_130.$show_room_150;
|
|||
|
|
|||
|
} elseif ($me_120 && ($find_100 || $find_130 || $find_150)) {
|
|||
|
|
|||
|
echo $show_room_100.$show_room_120.$show_room_130.$show_room_150;
|
|||
|
|
|||
|
} elseif ($me_130 && ($find_100 || $find_120 || $find_150)) {
|
|||
|
|
|||
|
echo $show_room_130.$show_room_120.$show_room_150.$show_room_100;
|
|||
|
|
|||
|
} elseif ($me_150 && ($find_100 || $find_130 || $find_120)) {
|
|||
|
|
|||
|
echo $show_room_150.$show_room_120.$show_room_130.$show_room_100;
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
/*if ($serch_room >=150) {
|
|||
|
echo $show_room_100.$show_room_130.$show_room_120.$show_room_150;
|
|||
|
}elseif ($serch_room >=130 && $serch_room <= 140) {
|
|||
|
echo $show_room_100.$show_room_150.$show_room_120.$show_room_130;
|
|||
|
|
|||
|
}elseif ($serch_room >=120 && $serch_room < 130) {
|
|||
|
echo $show_room_100.$show_room_120.$show_room_130.$show_room_150;
|
|||
|
|
|||
|
}elseif ($serch_room >=120 && $serch_room < 130 && $me_room >=130 && $me_room <= 140) {
|
|||
|
echo $show_room_100.$show_room_130.$show_room_150.$show_room_120;
|
|||
|
|
|||
|
}elseif ($serch_room >=120 && $serch_room < 130 && $me_room >=150) {
|
|||
|
echo $show_room_100.$show_room_130.$show_room_150.$show_room_120;
|
|||
|
|
|||
|
}elseif ($serch_room >=120 && $serch_room < 130 && $me_room <=113) {
|
|||
|
echo $show_room_100.$show_room_130.$show_room_150.$show_room_120;
|
|||
|
|
|||
|
}elseif ($serch_room < 120) {
|
|||
|
echo $show_room_130.$show_room_150.$show_room_120.$show_room_100;
|
|||
|
}*/
|
|||
|
|
|||
|
|
|||
|
|
|||
|
if(!in_array($serch_room, $ar_all)){ }
|
|||
|
echo '<li>"'.$locations_normal[$serch_room].'"</li>';
|
|||
|
|
|||
|
|
|||
|
?>
|
|||
|
|
|||
|
<? } ?>
|
|||
|
</ol>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<? }elseif ($_GET['cmd']=='pal.otvet' && $user['align']>1 && $user['align']<3 ) { ?>
|
|||
|
<?
|
|||
|
$old_time_pal_otvet = 2*25*24*60*60;
|
|||
|
|
|||
|
mysql_query("DELETE FROM `paladin_vopros` WHERE `date` <= '".(time() - $old_time_pal_otvet)."' ;");
|
|||
|
|
|||
|
|
|||
|
if (empty($_GET['selstatus']) || ($_GET['selstatus'] < 1 || $_GET['selstatus'] > 3)) {
|
|||
|
$_GET['selstatus'] = 1;
|
|||
|
}
|
|||
|
if (empty($_GET['page']) ) {
|
|||
|
$_GET['page'] = 1;
|
|||
|
}
|
|||
|
|
|||
|
?>
|
|||
|
<script>
|
|||
|
var pages = Number(2);
|
|||
|
var current_page = Number(0);
|
|||
|
var link_to = '?page=__id__&rows_on_page=20&source=3&co_type=&sort_by=2&cs_status=1&rand=0.692136749814743';
|
|||
|
|
|||
|
var page = Number(<?= $_GET['page'] ?>);
|
|||
|
var selstatus = Number(<?= $_GET['selstatus'] ?>);
|
|||
|
|
|||
|
$(function(){
|
|||
|
|
|||
|
|
|||
|
var headCheckbox = $('#pal_otvet thead :checkbox');
|
|||
|
var bodyCheckboxes = $('#pal_otvet tbody :checkbox');
|
|||
|
|
|||
|
headCheckbox.click(function() {
|
|||
|
if(this.checked) {
|
|||
|
bodyCheckboxes.attr('checked', 'checked');
|
|||
|
} else {
|
|||
|
bodyCheckboxes.removeAttr('checked');
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
bodyCheckboxes.click(function() {
|
|||
|
if(bodyCheckboxes.length == bodyCheckboxes.filter(':checked').length) {
|
|||
|
headCheckbox[0].checked = true;
|
|||
|
} else {
|
|||
|
headCheckbox[0].checked = false;
|
|||
|
}
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
|
|||
|
$('#pal_otvet input.xbutton').click(function() {
|
|||
|
var comment = getDialog();
|
|||
|
comment.dialog('option', 'title', 'Комментарий Паладина');
|
|||
|
|
|||
|
var form = $.buildForm({
|
|||
|
'fields': [
|
|||
|
{
|
|||
|
'name': 'page',
|
|||
|
'value': page
|
|||
|
}, {
|
|||
|
'name': 'selstatus',
|
|||
|
'value': selstatus
|
|||
|
}, {
|
|||
|
'name': 'choosen_question',
|
|||
|
'value': $(this).data('id')
|
|||
|
},{
|
|||
|
'label': 'Комментарий',
|
|||
|
'group': [
|
|||
|
{
|
|||
|
'autocomplete': 'off',
|
|||
|
'name': 'cp_comment',
|
|||
|
'size': 60,
|
|||
|
'type': 'text'
|
|||
|
}, {
|
|||
|
'type': 'submit',
|
|||
|
'value': 'OK'
|
|||
|
}
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
'url': '/help.php?cmd=pal.otvet'
|
|||
|
});
|
|||
|
|
|||
|
comment.html(form)
|
|||
|
dialogOpen(comment);
|
|||
|
});
|
|||
|
});
|
|||
|
</script>
|
|||
|
<?
|
|||
|
|
|||
|
|
|||
|
$pal_question_count = sql_number("SELECT * FROM `paladin_vopros` WHERE `status` = '".@$_GET['selstatus']."';");
|
|||
|
$count_line = 20;
|
|||
|
$pqsall = ceil($pal_question_count / $count_line);
|
|||
|
|
|||
|
$cur_page = @$_GET['page'];
|
|||
|
if (empty($cur_page) || $cur_page ==1) {
|
|||
|
$cur_page = 1;
|
|||
|
$start = 0;
|
|||
|
} else {
|
|||
|
$start = (($cur_page * $count_line) - $count_line);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
$paladin_vopros = sql_query("SELECT * FROM `paladin_vopros` WHERE `status` = '".@$_GET['selstatus']."' ORDER BY id DESC LIMIT $start , $count_line;");
|
|||
|
|
|||
|
?>
|
|||
|
<div class="top-pagination pagination-container"><? if ($pqsall > 1) { ?>Страницы:
|
|||
|
<div class="pagination">
|
|||
|
|
|||
|
<? if ($start > $cur_page) { ?>
|
|||
|
<a href="?cmd=pal.otvet&nd=3540469077&0.180671616791109&page=1&selstatus=<?= @$_GET['selstatus'] ?>">⇐</a>
|
|||
|
<? } ?>
|
|||
|
<?
|
|||
|
for ($i = 1; $i <= $pqsall; $i++ ) {
|
|||
|
if ($i == $cur_page) {
|
|||
|
?><span class="current"><?= $i ?></span> <?
|
|||
|
} else{
|
|||
|
?>
|
|||
|
<a href="?cmd=pal.otvet&nd=3540469077&0.180671616791109&page=<?= $i ?>&selstatus=<?= @$_GET['selstatus'] ?>"><?= $i ?></a>
|
|||
|
<? }
|
|||
|
}
|
|||
|
?>
|
|||
|
<? if ($start < $pqsall) { ?>
|
|||
|
<a href="?cmd=pal.otvet&nd=3540469077&0.180671616791109&page=<?= $pqsall ?>&selstatus=<?= @$_GET['selstatus'] ?>">⇒</a>
|
|||
|
<? } ?>
|
|||
|
|
|||
|
</div>
|
|||
|
<? } ?>
|
|||
|
<form action="" style=" margin-top: -15px; float: right; ">
|
|||
|
<select name="selstatus" size="1" onchange="submit();">
|
|||
|
<option value="1" <? if (@$_GET['selstatus']==1) { ?>selected="selected"<? } ?>>не обработаные</option>
|
|||
|
<option value="2" <? if (@$_GET['selstatus']==2) { ?>selected="selected"<? } ?>>обработаные</option>
|
|||
|
<option value="3" <? if (@$_GET['selstatus']==3) { ?>selected="selected"<? } ?>>Все</option>
|
|||
|
</select>
|
|||
|
<input type="hidden" name="instatus" value="<?= @$_GET['selstatus'] ?>">
|
|||
|
<input type="hidden" name="cmd" value="pal.otvet">
|
|||
|
<input type="hidden" name="page" value="<?= @$_GET['page'] ?>">
|
|||
|
</form>
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<? if ($pal_question_count) { ?>
|
|||
|
<table class="table-list" id="pal_otvet">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>№</th>
|
|||
|
<th style=" white-space: nowrap; ">От кого</th>
|
|||
|
<th class="subject">Тема</th>
|
|||
|
<th style=" width: 140px; ">Получено</th>
|
|||
|
<? if (@$_GET['selstatus']==2) { ?><th>Ответ</th><? }else { ?><th>Действие</th><? } ?>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
|
|||
|
|
|||
|
<?
|
|||
|
$in = $start;
|
|||
|
while($row=mysql_fetch_array($paladin_vopros))
|
|||
|
{
|
|||
|
$in++;
|
|||
|
$status = '';
|
|||
|
switch($row['status']){
|
|||
|
case 1: $status = 'Обработать'; break;
|
|||
|
}
|
|||
|
?>
|
|||
|
<tr class="">
|
|||
|
<td class="number"><?= $in ?></td>
|
|||
|
<td class="nickname">
|
|||
|
<span class="name"><?= nick_2($row['owner'], 0,0,'private_on','','on') ?></span>
|
|||
|
</td>
|
|||
|
<td class="subject">
|
|||
|
<?= $row['text'] ?>
|
|||
|
</td>
|
|||
|
<td class="receive-date"><?= date("d",$row['date']) ?> <?= mb_strtolower(sdsfower(date("m",$row['date']))) ?> <?= date("Y H:i",$row['date']) ?></td>
|
|||
|
<td class=""><? if ($row['status']==1 && empty($row['otvet'])) { ?><input class="xbutton" data-id="<?= $row['id'] ?>" type="button" value="<?= $status ?>"><? } else { ?><?= nick_2($row['otvet_id'], 0,0,'private_on','batl_off','on') ?> : <?= $row['otvet'] ?><? } ?></td>
|
|||
|
</tr>
|
|||
|
<? } ?>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
|
|||
|
<? } ?>
|
|||
|
|
|||
|
<? } ?>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</td>
|
|||
|
<td class="right-col right-col-small">
|
|||
|
<div class="right-col-inner right-col-inner-small">
|
|||
|
<div class="buttons">
|
|||
|
<input class="xbbutton" onclick="location.href='?cmd=pal.show&0.535975361021059';" type="button" value="Обновить" style=" width: 100px; ">
|
|||
|
<input class="xgbutton" id="return" onclick="location.href='/main.php?0.535975361021059'" type="button" value="Вернуться" style=" width: 100px; ">
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody></table>
|
|||
|
|
|||
|
</body></html><? if ($mysql) { mysql_close($mysql);} include("a_process_end.php"); ?>
|