iframes war
This commit is contained in:
parent
7f42208b70
commit
3f96806855
27
game.php
27
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="Введите сообщение...">
|
||||
@ -86,5 +85,3 @@ if ($msg) db::c()->query('INSERT INTO `chat` (`cid`, `uid`, `msg`) VALUES (?i, ?
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user