request to get
This commit is contained in:
parent
da607f6b71
commit
b28be0ea6a
36
zayavka.php
36
zayavka.php
@ -11,6 +11,8 @@ if ($user['battle'] != 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$level = filter_input(INPUT_GET, 'level');
|
$level = filter_input(INPUT_GET, 'level');
|
||||||
|
$logs = filter_input(INPUT_GET, 'logs');
|
||||||
|
$tklogs = filter_input(INPUT_GET, 'tklogs');
|
||||||
|
|
||||||
db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE, `clans` WRITE');
|
db::c()->query('LOCK TABLES `bots` WRITE, `battle` WRITE, `logs` WRITE, `users` WRITE, `inventory` WRITE, `zayavka` WRITE, `effects` WRITE, `online` WRITE, `clans` WRITE');
|
||||||
|
|
||||||
@ -667,8 +669,8 @@ if ($_POST['open']) {
|
|||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function refreshPeriodic() {
|
function refreshPeriodic() {
|
||||||
<?php if ($_REQUEST['logs'] == null): ?>
|
<?php if (is_null($logs)): ?>
|
||||||
location.href = 'zayavka.php?level=<?= $_REQUEST['level'] ?>&tklogs=<?= $_REQUEST['tklogs'] ?>&logs=<?= $_REQUEST['logs'] ?>';
|
location.href = 'zayavka.php?level=<?= $level ?>&tklogs=<?= $tklogs ?>&logs=<?= $logs ?>';
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -684,7 +686,7 @@ if ($_POST['open']) {
|
|||||||
<FORM METHOD=POST name=F1>
|
<FORM METHOD=POST name=F1>
|
||||||
<TR>
|
<TR>
|
||||||
<TD colspan=5>
|
<TD colspan=5>
|
||||||
<?php if (!empty($_REQUEST['level'])) echo nick($user); ?>
|
<?php if (!empty($level)) echo nick($user); ?>
|
||||||
</TD>
|
</TD>
|
||||||
<TD colspan=4 align=right>
|
<TD colspan=4 align=right>
|
||||||
<INPUT TYPE=button value="Вернуться" onclick="location.href='main.php?top=<?= mt_rand() ?>';">
|
<INPUT TYPE=button value="Вернуться" onclick="location.href='main.php?top=<?= mt_rand() ?>';">
|
||||||
@ -706,27 +708,27 @@ if ($_POST['open']) {
|
|||||||
<TD class=<?= ($level == 'haos') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=haos&".mt_rand()."\">Хаотичные</A></TD>"); else echo 'В разработке</TD>' ?>
|
<TD class=<?= ($level == 'haos') ? "s" : "m" ?>><?php if ($user['room'] != 101) echo("<A HREF=\"zayavka.php?level=haos&".mt_rand()."\">Хаотичные</A></TD>"); else echo 'В разработке</TD>' ?>
|
||||||
<TD class=<?= (input::check('tklogs') == '1') ? "s" : "m" ?>><A HREF="zayavka.php?tklogs=1&<?= mt_rand() ?>">Текущие</A>
|
<TD class=<?= (input::check('tklogs') == '1') ? "s" : "m" ?>><A HREF="zayavka.php?tklogs=1&<?= mt_rand() ?>">Текущие</A>
|
||||||
</TD>
|
</TD>
|
||||||
<TD class=<?= (!is_null($_REQUEST['logs'])) ? "s" : "m" ?>><A HREF="zayavka.php?logs=<?= date("d.m.y") ?>&<?= mt_rand() ?>">Завершенные</A></TD>
|
<TD class=<?= (!is_null($logs)) ? "s" : "m" ?>><A HREF="zayavka.php?logs=<?= date("d.m.y") ?>&<?= mt_rand() ?>">Завершенные</A></TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE>
|
</TABLE>
|
||||||
<TABLE width=100% cellspacing=0 cellpadding=0>
|
<TABLE width=100% cellspacing=0 cellpadding=0>
|
||||||
<TR>
|
<TR>
|
||||||
<TD valign=top>
|
<TD valign=top>
|
||||||
<?php
|
<?php
|
||||||
if (!in_array($user['room'], [1,2,3,4,5,6,7,8,9,10,15,16,19,101]) AND empty($_REQUEST['logs']) AND empty($_REQUEST['tklogs'])) die(err('В этой комнате невозможно подавать заявки!'));
|
if (!in_array($user['room'], [1,2,3,4,5,6,7,8,9,10,15,16,19,101]) AND empty($logs) AND empty($tklogs)) die(err('В этой комнате невозможно подавать заявки!'));
|
||||||
// if ($user['room'] != 1 && $user['room'] != 2 && $user['room'] != 3 && $user['room'] != 4 &&
|
// if ($user['room'] != 1 && $user['room'] != 2 && $user['room'] != 3 && $user['room'] != 4 &&
|
||||||
// $user['room'] != 5 && $user['room'] != 6 && $user['room'] != 7 && $user['room'] != 9 &&
|
// $user['room'] != 5 && $user['room'] != 6 && $user['room'] != 7 && $user['room'] != 9 &&
|
||||||
// $user['room'] != 10 && $user['room'] != 15 && $user['room'] != 16 && $user['room'] != 19 &&
|
// $user['room'] != 10 && $user['room'] != 15 && $user['room'] != 16 && $user['room'] != 19 &&
|
||||||
// $user['room'] != 8 && $user['room'] != 101 && !$_REQUEST['tklogs'] && !$_REQUEST['logs']) {
|
// $user['room'] != 8 && $user['room'] != 101 && !$tklogs && !$logs) {
|
||||||
// echo "<BR><BR><BR><CENTER><B>В этой комнате невозможно подавать заявки</b></CENTER>";
|
// echo "<BR><BR><BR><CENTER><B>В этой комнате невозможно подавать заявки</b></CENTER>";
|
||||||
// die();
|
// die();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (!$_REQUEST['level'] && !$_REQUEST['tklogs'] && !$_REQUEST['logs']) {
|
if (!$level && !$tklogs && !$logs) {
|
||||||
echo "<BR><BR><BR><CENTER><B>Выберите раздел</b></CENTER>";
|
echo "<BR><BR><BR><CENTER><B>Выберите раздел</b></CENTER>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST['level'] == 'begin') {
|
if ($level == 'begin') {
|
||||||
if ($user['level'] > 0) {
|
if ($user['level'] > 0) {
|
||||||
die("<BR><BR><BR><CENTER><B>Вы уже выросли из ползунков ;)</b></CENTER>");
|
die("<BR><BR><BR><CENTER><B>Вы уже выросли из ползунков ;)</b></CENTER>");
|
||||||
}
|
}
|
||||||
@ -834,7 +836,7 @@ if ($_POST['open']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($_REQUEST['level'] == 'fiz') {
|
if ($level == 'fiz') {
|
||||||
if ($user['level'] == 0) {
|
if ($user['level'] == 0) {
|
||||||
die("<BR><BR><BR><CENTER><B>Физические бои доступны с 1 уровня.</b></CENTER>");
|
die("<BR><BR><BR><CENTER><B>Физические бои доступны с 1 уровня.</b></CENTER>");
|
||||||
}
|
}
|
||||||
@ -944,7 +946,7 @@ if ($_POST['open']) {
|
|||||||
echo '<INPUT TYPE=submit value="Принять вызов" NAME=confirm2></TD></TR></TABLE>';
|
echo '<INPUT TYPE=submit value="Принять вызов" NAME=confirm2></TD></TR></TABLE>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST['level'] == 'group') {
|
if ($level == 'group') {
|
||||||
if ($user['level'] < 2) {
|
if ($user['level'] < 2) {
|
||||||
die("<BR><BR><BR><CENTER><B>Групповые бои доступны с 2 уровня.</b></CENTER>");
|
die("<BR><BR><BR><CENTER><B>Групповые бои доступны с 2 уровня.</b></CENTER>");
|
||||||
}
|
}
|
||||||
@ -1262,7 +1264,7 @@ if ($_POST['open']) {
|
|||||||
//print_r($_POST);
|
//print_r($_POST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST['tklogs'] != null) {
|
if (!is_null($tklogs)) {
|
||||||
$t1 = floor(time() - 900);
|
$t1 = floor(time() - 900);
|
||||||
$data = db::c()->query('SELECT * FROM `battle` WHERE `win` = 3 AND `to1` > ?i AND `to2` > ?i ORDER BY `id` ASC', $t1, $t1);
|
$data = db::c()->query('SELECT * FROM `battle` WHERE `win` = 3 AND `to1` > ?i AND `to2` > ?i ORDER BY `id` ASC', $t1, $t1);
|
||||||
while ($row = $data->fetch_assoc()) {
|
while ($row = $data->fetch_assoc()) {
|
||||||
@ -1286,21 +1288,21 @@ if ($_POST['open']) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($_REQUEST['logs'])) {
|
if (!is_null($logs)) {
|
||||||
echo '<TABLE width=100% cellspacing=0 cellpadding=0><TR>
|
echo '<TABLE width=100% cellspacing=0 cellpadding=0><TR>
|
||||||
<TD valign=top> <A HREF="zayavka.php?logs=' .
|
<TD valign=top> <A HREF="zayavka.php?logs=' .
|
||||||
date("d.m.y", mktime(0, 0, 0, substr($_REQUEST['logs'], 3, 2), substr($_REQUEST['logs'], 0, 2) - 1, "20" . substr($_REQUEST['logs'], 6, 2)))
|
date("d.m.y", mktime(0, 0, 0, substr($logs, 3, 2), substr($logs, 0, 2) - 1, "20" . substr($logs, 6, 2)))
|
||||||
. '&filter=' . (($_REQUEST['filter']) ? $_REQUEST['filter'] : $user['login']) . '">« Предыдущий день</A></TD>
|
. '&filter=' . (($_REQUEST['filter']) ? $_REQUEST['filter'] : $user['login']) . '">« Предыдущий день</A></TD>
|
||||||
<TD valign=top align=center><H3>Записи о завершенных боях за ' . (($_REQUEST['logs'] != 1) ? "{$_REQUEST['logs']}" : "" . date("d.m.y")) . '</H3></TD>
|
<TD valign=top align=center><H3>Записи о завершенных боях за ' . (($logs != 1) ? "{$logs}" : "" . date("d.m.y")) . '</H3></TD>
|
||||||
<TD valign=top align=right><A HREF="zayavka.php?logs=' .
|
<TD valign=top align=right><A HREF="zayavka.php?logs=' .
|
||||||
date("d.m.y", mktime(0, 0, 0, substr($_REQUEST['logs'], 3, 2), substr($_REQUEST['logs'], 0, 2) + 1, "20" . substr($_REQUEST['logs'], 6, 2)))
|
date("d.m.y", mktime(0, 0, 0, substr($logs, 3, 2), substr($logs, 0, 2) + 1, "20" . substr($logs, 6, 2)))
|
||||||
. '&filter=' . (($_REQUEST['filter']) ? $_REQUEST['filter'] : $user['login']) . '">Следующий день »</A> </TD>
|
. '&filter=' . (($_REQUEST['filter']) ? $_REQUEST['filter'] : $user['login']) . '">Следующий день »</A> </TD>
|
||||||
</TR><TR><TD colspan=3 align=center>Показать только бои персонажа: <INPUT TYPE=text NAME=filter value="' . (($_REQUEST['filter']) ? $_REQUEST['filter'] : $user['login']) . '"> за <INPUT TYPE=text NAME=logs size=12 value="' . (($_REQUEST['logs'] != 1) ? "{$_REQUEST['logs']}" : "" . date("d.m.y")) . '"> <INPUT TYPE=submit value="фильтр!"></TD>
|
</TR><TR><TD colspan=3 align=center>Показать только бои персонажа: <INPUT TYPE=text NAME=filter value="' . (($_REQUEST['filter']) ? $_REQUEST['filter'] : $user['login']) . '"> за <INPUT TYPE=text NAME=logs size=12 value="' . (($logs != 1) ? "{$logs}" : "" . date("d.m.y")) . '"> <INPUT TYPE=submit value="фильтр!"></TD>
|
||||||
</TR></TABLE>';
|
</TR></TABLE>';
|
||||||
|
|
||||||
$u = mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `login` = '" . (($_REQUEST['filter']) ? "{$_REQUEST['filter']}" : "{$user['login']}") . "' LIMIT 1"));
|
$u = mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `login` = '" . (($_REQUEST['filter']) ? "{$_REQUEST['filter']}" : "{$user['login']}") . "' LIMIT 1"));
|
||||||
|
|
||||||
$data = mysql_query("SELECT * FROM `battle` WHERE ((`t1` LIKE '%;{$u[0]};%' OR `t1` LIKE '{$u[0]}' OR `t1` LIKE '{$u[0]};%' OR `t1` LIKE '%;{$u[0]}') OR (`t2` LIKE '%;{$u[0]};%' OR `t2` LIKE '{$u[0]}' OR `t2` LIKE '{$u[0]};%' OR `t2` LIKE '%;{$u[0]}')) AND `date` LIKE '" . (($_REQUEST['logs'] != 1) ? "20" . substr($_REQUEST['logs'], 6, 2) . "-" . substr($_REQUEST['logs'], 3, 2) . "-" . substr($_REQUEST['logs'], 0, 2) : "" . date("Y-m-d")) . " %' ORDER by `id` DESC");
|
$data = mysql_query("SELECT * FROM `battle` WHERE ((`t1` LIKE '%;{$u[0]};%' OR `t1` LIKE '{$u[0]}' OR `t1` LIKE '{$u[0]};%' OR `t1` LIKE '%;{$u[0]}') OR (`t2` LIKE '%;{$u[0]};%' OR `t2` LIKE '{$u[0]}' OR `t2` LIKE '{$u[0]};%' OR `t2` LIKE '%;{$u[0]}')) AND `date` LIKE '" . (($logs != 1) ? "20" . substr($logs, 6, 2) . "-" . substr($logs, 3, 2) . "-" . substr($logs, 0, 2) : "" . date("Y-m-d")) . " %' ORDER by `id` DESC");
|
||||||
while ($row = @mysql_fetch_array($data)) {
|
while ($row = @mysql_fetch_array($data)) {
|
||||||
echo "<span class=date>{$row['date']}</span>";
|
echo "<span class=date>{$row['date']}</span>";
|
||||||
echo ' ' . $row['t1hist'];
|
echo ' ' . $row['t1hist'];
|
||||||
|
Loading…
Reference in New Issue
Block a user