iframes war

This commit is contained in:
lopar 2018-03-24 02:19:46 +02:00
parent 44cb3e6ad5
commit e8395185a0

View File

@ -19,7 +19,7 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
<title>Окно игры</title>
<meta charset="utf-8">
<style>
header,
/* header,
footer {
display: block;
margin: 5px;
@ -29,7 +29,7 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
background: #ffeebb;
text-align: center;
}
*/
form {
padding: 3px;
width: 100%;
@ -62,31 +62,51 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
height: 100%;
}
</style>
<style>
body {
margin: 0;
}
.wrap {
display:grid;
background:#d7d7d7;
height: 100vh;
grid-template-rows: 45px /* Шапка */
2fr /* Окно игры */
1fr /* Окно чата*/
30px;/* Подвал */
}
header, footer {
margin: 1px;
padding: 5px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<header>
<a href="/user_anketa.php" title="Анкета" target="main"><img src="http://placehold.it/32x32/33ff33?text=A"/></a>
<a href="/friend.php" title="Друзья" target="main"><img src="http://placehold.it/32x32/33ff33?text=F"/></a>
<a href="/main.php?edit=1" title="Инвентарь" target="main"><img src="http://placehold.it/32x32/33ff33?text=I"/></a>
<a href="/relikt.php?edit=1" title="Реликты" target="main"><img src="http://placehold.it/32x32?text=R"/></a>
<a href="/klan.php" title="Клан" target="main"><img src="http://placehold.it/32x32/33ff33?text=K"/></a>
<a href="/orden.php" title="Особые умения" target="main"><img src="http://placehold.it/32x32/33ff33?text=O"/></a>
<a href="/moderators.php" title="Модераторы" target="main"><img src="http://placehold.it/32x32/33ff33?text=M"/></a>
<a href="/forum.php" title="Форум" target="main"><img src="http://placehold.it/32x32?text=F"/></a>
</header>
<div class="mainwrap">
<iframe name="main" src="main.php"></iframe>
<div class="wrap">
<header>
<a href="/user_anketa.php" title="Анкета" target="main"><img src="http://placehold.it/32x32/33ff33?text=A"/></a>
<a href="/friend.php" title="Друзья" target="main"><img src="http://placehold.it/32x32/33ff33?text=F"/></a>
<a href="/main.php?edit=1" title="Инвентарь" target="main"><img src="http://placehold.it/32x32/33ff33?text=I"/></a>
<a href="/relikt.php?edit=1" title="Реликты" target="main"><img src="http://placehold.it/32x32?text=R"/></a>
<a href="/klan.php" title="Клан" target="main"><img src="http://placehold.it/32x32/33ff33?text=K"/></a>
<a href="/orden.php" title="Особые умения" target="main"><img src="http://placehold.it/32x32/33ff33?text=O"/></a>
<a href="/moderators.php" title="Модераторы" target="main"><img src="http://placehold.it/32x32/33ff33?text=M"/></a>
<a href="/forum.php" title="Форум" target="main"><img src="http://placehold.it/32x32?text=F"/></a>
</header>
<div id="game"></div>
<div id="chat"></div>
<footer>
<form action="chat.php" method="post" target="chat">
<input id="msg" name="msg" size="100" placeholder="Введите сообщение...">
<input type="submit" value="Отправить">
</form>
</footer>
</div>
<div id="chat"></div>
<footer>
<form action="chat.php" method="post" target="chat">
<input id="msg" name="msg" size="100" placeholder="Введите сообщение...">
<input type="submit" value="Отправить">
</form>
</footer>
<script>
$( "#game" ).load( "main.php" );
$( "#chat" ).load( "chat.php" );
</script>
</body>