iframes war
This commit is contained in:
parent
7f42208b70
commit
3f96806855
29
game.php
29
game.php
@ -6,19 +6,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
if (!isset($_SESSION['uid'])) {
|
if (!isset($_SESSION['uid'])) header("Location: index.php");
|
||||||
header("Location: index.php");
|
//include("config.php");
|
||||||
}
|
|
||||||
include("config.php");
|
|
||||||
|
|
||||||
$msg = filter_input(INPUT_POST,'msg');
|
//$msg = filter_input(INPUT_POST,'msg');
|
||||||
$uid = $_SESSION['uid'];
|
//$uid = $_SESSION['uid'];
|
||||||
if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);
|
//if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Окно игры</title>
|
<title>Окно игры</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@ -50,8 +46,8 @@ if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?
|
|||||||
width: 15%;
|
width: 15%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainwrap {
|
.mainwrap {
|
||||||
width: 800px;
|
|
||||||
height: 600px;
|
height: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +55,10 @@ if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
iframe {border: none;}
|
|
||||||
|
iframe {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -75,9 +74,9 @@ if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?
|
|||||||
<a href="/forum.php" title="Форум" target="main"><img src="http://placehold.it/32x32?text=F"/></a>
|
<a href="/forum.php" title="Форум" target="main"><img src="http://placehold.it/32x32?text=F"/></a>
|
||||||
</header>
|
</header>
|
||||||
<div class="mainwrap">
|
<div class="mainwrap">
|
||||||
<iframe name="main" src="main.php" width=100%></iframe>
|
<iframe name="main" src="main.php"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<iframe name="chat" src="chat.php" width=100%></iframe>
|
<iframe name="chat" src="chat.php"></iframe>
|
||||||
<footer>
|
<footer>
|
||||||
<form action="chat.php" method="post" target="chat">
|
<form action="chat.php" method="post" target="chat">
|
||||||
<input id="msg" name="msg" size="100" placeholder="Введите сообщение...">
|
<input id="msg" name="msg" size="100" placeholder="Введите сообщение...">
|
||||||
@ -85,6 +84,4 @@ if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?
|
|||||||
</form>
|
</form>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user