iframes war
This commit is contained in:
parent
7f42208b70
commit
3f96806855
29
game.php
29
game.php
@ -6,19 +6,15 @@
|
||||
*/
|
||||
|
||||
session_start();
|
||||
if (!isset($_SESSION['uid'])) {
|
||||
header("Location: index.php");
|
||||
}
|
||||
include("config.php");
|
||||
if (!isset($_SESSION['uid'])) header("Location: index.php");
|
||||
//include("config.php");
|
||||
|
||||
$msg = filter_input(INPUT_POST,'msg');
|
||||
$uid = $_SESSION['uid'];
|
||||
if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);
|
||||
//$msg = filter_input(INPUT_POST,'msg');
|
||||
//$uid = $_SESSION['uid'];
|
||||
//if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?i, "?s")', 1, $uid, $msg);
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Окно игры</title>
|
||||
<meta charset="utf-8">
|
||||
@ -50,8 +46,8 @@ if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?
|
||||
width: 15%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.mainwrap {
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
@ -59,7 +55,10 @@ if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
iframe {border: none;}
|
||||
|
||||
iframe {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
</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>
|
||||
</header>
|
||||
<div class="mainwrap">
|
||||
<iframe name="main" src="main.php" width=100%></iframe>
|
||||
<iframe name="main" src="main.php"></iframe>
|
||||
</div>
|
||||
<iframe name="chat" src="chat.php" width=100%></iframe>
|
||||
<iframe name="chat" src="chat.php"></iframe>
|
||||
<footer>
|
||||
<form action="chat.php" method="post" target="chat">
|
||||
<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>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user