battles/fight.php

65 lines
1.8 KiB
PHP
Raw Normal View History

<?php
use Battles\Database\DBPDO;
use Battles\Template;
2019-01-09 23:21:33 +00:00
require_once 'config.php';
$userLoginStatus = DBPDO::$db->ofetch('select enter_game from users where id = ?', $_SESSION['uid']);
if (!empty($userLoginStatus->enter_game)) {
DBPDO::$db->execute('update users set enter_game = 0 where enter_game = 1 and id = ?', $_SESSION['uid']);
}
Template::header('Окно игры');
?>
<script>
if (!navigator.cookieEnabled) {
document.write('Внимание! В вашем браузере отключена поддержка Cookies. Включите чтобы играть.');
try {
window.stop();
} catch (exception) {
document.execCommand('Stop');
}
}
</script>
<style>
IFRAME.FRAME {
width: 100%;
height: 100%;
border: 0 solid;
overflow: hidden;
}
.frametable {
height: 100%;
width: 100%;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
border: 0 solid;
border-spacing: 0;
}
.frametd {
height: inherit;
padding: 0;
}
</style>
2019-01-09 22:49:46 +00:00
<table class="frametable">
<tr style="height: 25px;">
<td class="frametd">
<iframe id="header<?= mt_rand() ?>" class="FRAME" src="top_menu.php" name="headframe" title="headframe"></iframe>
</td>
</tr>
2019-01-09 22:13:57 +00:00
<tr style="height: 75%;">
<td class="frametd">
<iframe id="main<?= mt_rand() ?>" class="FRAME" src="main.php?top=<?= mt_rand() ?>" name="gameframe" title="gameframe"></iframe>
</td>
</tr>
<tr>
<td class="frametd">
<iframe id="chat<?= mt_rand() ?>" class="FRAME" src="chat.php" name="chatframe" title="chatframe"></iframe>
</td>
</tr>
</table>