jhylands

index.php updata

Mar 19th, 2013
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.77 KB | None | 0 0
  1. <?php
  2. include 'scripts/fblog.php';
  3. // Create connection to database
  4. include 'scripts/sql.php';
  5. //SQL Table Persons - PID key, Firstname, Lastname,Gender
  6. $result = mysqli_query($con,"SELECT PID FROM Persons WHERE PID='" . $user_profile['id'] . "'");
  7. $Signedup = "";
  8. while($row = mysqli_fetch_array($result))
  9.   {
  10.   $signedup = $row['PID'];
  11.   }
  12. if ($signedup == "")
  13.   {
  14.   echo "<script> window.location = 'http://calander.site90.net/monopoly/signup.php' </script>";
  15.   }
  16. //close connection to db
  17. mysqli_close($con);
  18. ?>
  19. <head>
  20. <link rel="stylesheet" type="text/css" href="style.css">
  21. <script src="deed.js"></script>
  22. <script src="create.js"></script>
  23. <script src="play.js"></script>
  24. <script>
  25. var Vdeed = true;
  26. function loadOgame(){
  27.                                                 loading();
  28.                     }
  29.     function loadMain(){
  30.                         if(Vdeed){
  31.                                                 loading();
  32.                                                 var xmlhttp;
  33.                         if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
  34.                             xmlhttp=new XMLHttpRequest();
  35.                         }
  36.                         else{// code for IE6, IE5
  37.                             xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  38.                         }
  39.                             xmlhttp.onreadystatechange=function(){
  40.                             if (xmlhttp.readyState==4 && xmlhttp.status==200){
  41.                                 document.getElementById("the").innerHTML=xmlhttp.responseText;
  42.                                    
  43.                                                         }
  44.                         }
  45.                         xmlhttp.open("GET","main.php?id=" + <?php echo $user_profile['id']; ?> ,true);
  46.                         xmlhttp.send();    
  47.                                         }}
  48.  
  49.  
  50. function AllowDeed(){
  51. Vdeed =true;
  52. }
  53. var Players = new Array();
  54. function loading(){
  55. document.getElementById("the").innerHTML="<h1>Loading stuff...</h1>";
  56. }
  57. </script>
  58. <script>
  59. var id0 = <?php echo $user_profile['id']; ?>;
  60. function isgo(gamid){
  61.     //send request
  62.         var xmlhttp;
  63.     if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
  64.     xmlhttp=new XMLHttpRequest();
  65.     }
  66.     else{// code for IE6, IE5
  67.         xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  68.     }
  69.     xmlhttp.onreadystatechange=function(){
  70.     if (xmlhttp.readyState==4 && xmlhttp.status==200){
  71.     document.getElementById("the").innerHTML=xmlhttp.responseText;
  72.           
  73.     }
  74.     }
  75.     xmlhttp.open("GET","game.php?gid=" + gamid + "&id=" + id0,true);
  76.     xmlhttp.send();
  77. }  
  78. function isngo(gamid){
  79.     //send request
  80.         var xmlhttp;
  81.     if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
  82.     xmlhttp=new XMLHttpRequest();
  83.     }
  84.     else{// code for IE6, IE5
  85.         xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  86.     }
  87.     xmlhttp.onreadystatechange=function(){
  88.     if (xmlhttp.readyState==4 && xmlhttp.status==200){
  89.     document.getElementById("the").innerHTML=xmlhttp.responseText;
  90.           
  91.     }
  92.     }
  93.     xmlhttp.open("GET","ogame.php?gid=" + gamid + "&id=" + id0,true);
  94.     xmlhttp.send();
  95. }
  96. function play(gamid){
  97. loading();
  98. //check weather it is this users go or not
  99.     var xmlhttp;
  100.     if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
  101.     xmlhttp=new XMLHttpRequest();
  102.     }
  103.     else{// code for IE6, IE5
  104.         xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  105.     }
  106.     xmlhttp.onreadystatechange=function(){
  107.     if (xmlhttp.readyState==4 && xmlhttp.status==200){
  108.     var response=xmlhttp.responseText;
  109.         if(response.substring(0,1) == "1"){
  110.            //its the users go
  111.            isgo(gamid);
  112.         }
  113.         else{
  114.            //its not the users go
  115. alert(response.substring(0,1));
  116.            isngo(gamid);
  117.         }
  118.        
  119.     }
  120.     }
  121.     xmlhttp.open("GET","isgo.php?gid=" + gamid + "&id=" + id0,true);
  122.     xmlhttp.send();
  123. }
  124. </script>
  125. </head>
  126. <body onload="loadMain();">
  127.  
  128. <table border="1" class="a1" style="">
  129. <tr><td class="property" ><b>GO</b> </td><td class="property" ><table class="property"><tr><td id="a"></td></tr><tr><td onclick="loadDeed('Old Kent Road')" >Old kent road</td></tr></table></td><td class="property" id="chest">Chest</td><td class="property" ><table class="property"><tr><td id="a"></td></tr><tr><td onclick="loadDeed('Whitechapel Road')" >white...le</td></tr></table></td><td class="property" >Income tax</td></td><td class="property" >Kings cross station</td></td><td class="property" ><table class="property"><tr><td id="b"></td></tr><tr><td onclick="loadDeed('The Angel, Islington')" >The Angle islington</td></tr></table></td><td class="property" id="chance">?</td><td class="property" ><table class="property"><tr><td id="b"></td></tr><tr><td onclick="loadDeed('Eusten Road')" >Eusten road</td></tr></table></td><td class="property" ><table class="property"><tr><td id="b"></td></tr><tr><td onclick="loadDeed('Pentonville Road')" >Pentavil road</td></tr></table></td><td class="property" ><img width="50%" src="http://3.bp.blogspot.com/-IfpDgdvq7Y0/UTyRKWGJkTI/AAAAAAAAAbk/9U8SQQhRrQY/s1600/graphic_jail.jpg" /> </td></tr>
  130. <tr><td class="property" ><table class="property"><tr><td id="h"></td></tr><tr><td onclick="loadDeed('Mayfair')" >Mayfair</td></tr></table></td>
  131.  
  132. <td id="the" colspan="9" rowspan="9">
  133. <h1>Loading please wait...</h1>
  134.  
  135. <?php
  136. function isuser($Userid) {
  137. // Create connection to database
  138. include 'scripts/sql.php';
  139. //SQL Table Persons - PID key, Firstname, Lastname,Gender
  140. $result = mysqli_query($con,"SELECT PID FROM Persons WHERE PID='" . $Userid . "'");
  141. $Signedup = "";
  142. while($row = mysqli_fetch_array($result))
  143.   {
  144.   $signedup = $row['PID'];
  145.   }
  146. if ($signedup != ""){
  147.     return false;
  148.     }
  149. else{
  150.     return true;
  151.     }
  152. mysqli_close($con);
  153. }
  154.  ?>
  155. <div style="position:absolute;right:11%;top:11%;width:75px;text-align: justify;display: inline-block;">
  156. <p><img class="profileimage" name="" src="https://graph.facebook.com/<?php echo $user; ?>/picture" width="50" height="50" alt=""><br />
  157. <?php echo $user_profile['name']; ?><br />
  158. </p>
  159. </div>
  160. </td>
  161.  
  162. <td class="property" ><table class="property"><tr><td id="c"></td></tr><tr><td onclick="loadDeed('Pall Mall')" >Pall mall</td></tr></table></td></tr>
  163. <tr><td class="property" >Super tax</td><td class="property" ><img width="50%" src="http://4.bp.blogspot.com/-3q1uxh1D9JA/UTEnxRIi5GI/AAAAAAAAAaU/RqQ6uUnnp44/s320/SKU1827.gif" /></td></tr>
  164. <tr><td class="property" ><table class="property"><tr><td id="h"></td></tr><tr><td onclick="loadDeed('Park Lane');">Park lane</td></tr></table></td><td class="property" ><table class="property" ><tr><td id="c"></td></tr><tr><td onclick="loadDeed('Whitehall');" >Whitehall</td></tr></table></td></tr>
  165. <tr><td class="property" id="chance">?</td><td class="property" ><table class="property"><tr><td id="c"></td></tr><tr><td onclick="loadDeed('Northumberland Avenue');" >North...land avernue</td></tr></table></tr>
  166. <tr><td class="property" >Liver... station</td><td class="property" >Mal...ne station</td></tr>
  167. <tr><td class="property" ><table class="property"><tr><td id="g"></td></tr><tr><td onclick="loadDeed('Bond Street');" >Bond street</td></tr></table></td><td class="property" ><table class="property"><tr><td id="d"></td></tr><tr><td onclick="loadDeed('Bow Street');" >Bow Street</td></tr></table></td></tr>
  168. <tr><td class="property" id="chest">Chest</td><td class="property" id="chest">Chest</td></tr>
  169. <tr><td class="property" ><table class="property"><tr><td id="g"></td></tr><tr><td onclick="loadDeed('Oxford Street');" >Oxford street</td></tr></table></td><td class="property" ><table class="property"><tr><td id="d"></td></tr><tr><td onclick="loadDeed('Marlborough Street');" >Malbura street</td></tr></table></td></tr>
  170. <tr><td class="property" ><table class="property"><tr><td id="g"></td></tr><tr><td onclick="loadDeed('Regent Street');" >Regent street</td></tr></table></td><td class="property" ><table class="property"><tr><td id="d"></td></tr><tr><td onclick="loadDeed('Vine Street');" >Vine street</td></tr></table></td></tr>
  171. <tr><td class="property" >go to jail</td><td class="property" ><table class="property"><tr><td id="f"></td></tr><tr><td onclick="loadDeed('Piccadilly');" >Piccadilly</td></tr></table></td><td class="property" ><img width="97%" src="http://1.bp.blogspot.com/--72tDF4Ew9A/UTEl1Bxir2I/AAAAAAAAAaM/BOcwShc0kXY/s320/nowater.jpg" /></td><td class="property" ><table class="property"><tr><td id="f"></td></tr><tr><td onclick="loadDeed('Coventry Street');" >Coventry street</td></tr></table></td><td class="property" ><table class="property"><tr><td id="f"></td></tr><tr><td onclick="loadDeed('Leicester Square');" >lester square</td></tr></table></td><td class="property" >Fen...ch station</td><td class="property" ><table class="property"><tr><td id="e"></td></tr><tr><td onclick="loadDeed('Trafalgar Square');" >trafalgar square</td></tr></table></td><td class="property" ><table class="property"><tr><td id="e"></td></tr><tr><td onclick="loadDeed('Fleet Street');" >Fleet street</td></tr></table></td><td class="property" id="chance">?</td><td class="property" ><table class="property"><tr><td id="e"></td></tr><tr><td onclick="loadDeed('Strand');" >strand</td></tr></table></td><td class="property" >free parking</td></tr>
  172. </table>
  173.  
  174. </body>
Advertisement
Add Comment
Please, Sign In to add comment