Прикручиваем шаблон. Хороним идиотские ошибки.
This commit is contained in:
parent
bc0992f281
commit
354499f885
@ -74,35 +74,19 @@ if (in_array($user->room, Config::$canalenters)) {
|
||||
$podzemroom = $user->room + 1;
|
||||
$cavedata = [620 => ['x1' => 3, 'y1' => 2, 'dir1' => 2]];
|
||||
$podzemdata = [621 => ['name1' => 'Проклятый Рудник', 'name2' => 'Проклятого Рудника']];
|
||||
?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<script LANGUAGE='JavaScript'>
|
||||
document.ondragstart = test;
|
||||
//запрет на перетаскивание
|
||||
document.onselectstart = test;
|
||||
//запрет на выделение элементов страницы
|
||||
document.oncontextmenu = test;
|
||||
|
||||
//запрет на выведение контекстного меню
|
||||
function test() {
|
||||
return false
|
||||
$warning = $_GET["warning"] ?? '';
|
||||
Template::header('enter_cave');
|
||||
if ($warning) {
|
||||
echo sprintf('<b style="color: #f80000">%s</b>', $warning);
|
||||
}
|
||||
</SCRIPT>
|
||||
<link rel=stylesheet href="css/main.css">
|
||||
<meta charset="UTF-8">
|
||||
</HEAD>
|
||||
<BODY style="background-color: #dedede;">
|
||||
<? if ($_GET["warning"] && strlen($_GET["warning"]) > 1) {
|
||||
echo "<b><font color=red>$_GET[warning]</font></b>";
|
||||
} ?>
|
||||
?>
|
||||
<div id=hint4 class=ahint></div>
|
||||
|
||||
<TABLE width=100%>
|
||||
<TR>
|
||||
<TD valign=top width=100%>
|
||||
<center><h3><?= $rooms[$user["room"]] ?></h3></center>
|
||||
<?
|
||||
<?php
|
||||
$select = mysql_query("SELECT `time` FROM `visit_podzem` WHERE `room` = '$podzemroom' AND `login` = '" . $user['login'] . "' AND `time` > 0 LIMIT 1");
|
||||
if ($el = mysql_fetch_array($select)) {
|
||||
$wait_sec = $el['time'];
|
||||
@ -116,8 +100,7 @@ if (in_array($user->room, Config::$canalenters)) {
|
||||
mysql_query("UPDATE `visit_podzem` SET `time` = 1 WHERE `login` = '$user[login]' AND `time` > 0 AND `room` = '$user->room' LIMIT 1");
|
||||
}
|
||||
|
||||
if ($wait_sec > $new_t) {
|
||||
if ($_GET['donate']) {
|
||||
if ($wait_sec > $new_t && $_GET['donate']) {
|
||||
if ($user['money'] >= $podzemdata[$podzemroom]['passprice']) {
|
||||
mysql_query("UPDATE `users` SET `money` = (`money`-" . $podzemdata[$podzemroom]['passprice'] . ") WHERE `id` = '$user[id]' LIMIT 1");
|
||||
mysql_query("INSERT INTO `delo` (`id`, `author`, `pers`, `text`, `type`, `date`) VALUES ('', '0', '{$_SESSION['uid']}', '\"" . $user['login'] . "\" пожертвовал на благоустройство пещеры \"" . $podzemdata[$podzemroom]['passprice'] . "\" кр. ($user[money]/$user[ekr]). ', 7, '" . time() . "')");
|
||||
@ -126,7 +109,6 @@ if (in_array($user->room, Config::$canalenters)) {
|
||||
echo "<b><font color=red>У вас недостаточно денег</font></b>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($wait_sec > $new_t) {
|
||||
echo " <font style='font-size: 12px;'>Вы можете посетить " . $podzemdata[$podzemroom]['name1'] . " через <font style='font-size: 11px; color: #000;'> " . secs2hrs($left_time) . "</font><br />";
|
||||
@ -292,7 +274,7 @@ if (in_array($user->room, Config::$canalenters)) {
|
||||
<TD height=1 colspan=2><SPAN></SPAN></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<?
|
||||
<?php
|
||||
|
||||
///////////////Подача заявки////////////////////
|
||||
if ($_GET['open']) {
|
||||
@ -379,7 +361,7 @@ if (in_array($user->room, Config::$canalenters)) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($_GET['start']){
|
||||
if ($_GET['start']) {
|
||||
if (in_array($user->room + 1, Config::$caverooms)) {
|
||||
$nc = 1;
|
||||
$locs = [];
|
||||
@ -452,21 +434,21 @@ if (in_array($user->room, Config::$canalenters)) {
|
||||
}
|
||||
?>
|
||||
<script>top.frames['online'].location = 'ch.php?online=' + Math.round(Math.random() * 100000);</script>
|
||||
<?
|
||||
<?php
|
||||
mysql_query("DELETE FROM `vxod` WHERE `login` = '$login'");
|
||||
mysql_query("DELETE FROM `vxodd` WHERE `glav_id` = " . $user['id'] . "");
|
||||
mysql_query("DELETE FROM `vxodd` WHERE `login` = '$login'");
|
||||
print "<script>location.href='cave.php'</script>";
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<TD nowrap valign=top>
|
||||
|
||||
<BR>
|
||||
<DIV align=right>
|
||||
<INPUT style="font-size:12px;" onClick="document.location.href='enter_cave.php?<? echo time(); ?>'"
|
||||
<INPUT style="font-size:12px;" onClick="document.location.href='enter_cave.php?<?= time(); ?>'"
|
||||
value=Обновить type=button>
|
||||
<input style="font-size: 12px;" type="button" value="Вернуться"
|
||||
onclick="document.location.href='enter_cave.php?ext=1';"/>
|
||||
@ -478,10 +460,7 @@ if (in_array($user->room, Config::$canalenters)) {
|
||||
</TABLE>
|
||||
<div id="goto" style="text-align:right;white-space:nowrap"> </div>
|
||||
<br><br>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<?
|
||||
<?php
|
||||
} else {
|
||||
header("location: main.php");
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user