Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start();
- session_start();
- $spelnaam = $_GET['game'];
- $speler = $_SESSION['speler'];
- ?>
- <html>
- <head>
- <?php
- if(file_exists("instellingen.php")){
- require("instellingen.php");
- }
- else{
- exit("De server kan het bestand \"instellingen.php\" niet vinden!");
- }
- if($_SERVER['REQUEST_METHOD'] == "POST"){
- header("location: ./?game=".$_POST['game']."");
- }
- function changevalue($field, $value){
- return "document.getElementById('".$field."').innerHTML = '".$value."';";
- }
- function reload($game){
- $query = mysql_query("SELECT * FROM BKEE_".$game."");
- while($open = mysql_fetch_array($query)){
- $vA = $open['v1']; $vB = $open['v2']; $vC = $open['v3'];
- $vD = $open['v4']; $vE = $open['v5']; $vF = $open['v6'];
- $vG = $open['v7']; $vH = $open['v8']; $vI = $open['v9'];
- }
- return "".changevalue("v1", $vA)."".changevalue("v2", $vB)."".changevalue("v3", $vC)."".changevalue("v4", $vD)."".changevalue("v5", $vE)."".changevalue("v6", $vF)."".changevalue("v7", $vG)."".changevalue("v8", $vH)."".changevalue("v9", $vI)."";
- }
- ?>
- <title><?php echo $config['title']; if(isset($spelnaam)){ echo " | "; echo $spelnaam; } ?></title>
- </head>
- <body>
- <center>
- <?php
- if(!isset($spelnaam)){
- ?>
- <h1><u><?php echo $config['title']; ?></u></h1>
- Hoi! Vul hieronder het spelnaam in waar je naartoe wilt.<br />Het spel moet al wel bestaan!!<br /><br />
- <form name="join" id="join" method="post" action="<?php echo htmlentities($_SERVER['REQUEST_URI']); ?>" style="border: 1px darkblue solid;margin:15px;padding:15px;width:500px;">
- <input type="text" id="game" name="game" value="Demo" onclick="this.value=''" onkeyup="document.getElementById('gbutt').value=this.value" /><br />
- Ga nu naar het spel: <input type="submit" name="gbutt" id="gbutt" value="Demo" />
- </form>
- <?php
- }
- else{
- echo "<script>setInterval(\"".reload($spelnaam)."\", '500');</script>";
- ?>
- <h1><u><?php echo $config['title']; ?> | <?php echo $spelnaam; ?></u></h1><br /><br />
- <table border="1" cellpadding="30" cellspacing="30">
- <td><div id="v1"> </div></td><td><div id="v2"> </div></td><td><div id="v3"> </div></td>
- <tr></tr>
- <td><div id="v4"> </div></td><td><div id="v5"> </div></td><td><div id="v6"> </div></td>
- <tr></tr>
- <td><div id="v7"> </div></td><td><div id="v8"> </div></td><td><div id="v9"> </div></td>
- </table>
- <?php
- }
- ?>
- </center>
- </body>
- </html>
Add Comment
Please, Sign In to add comment