jhylands

Ogame.php

Mar 19th, 2013
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. <!-- page loaded for game where it is not the users go !-->
  2. <?php
  3. //startup scripts
  4.  Create connection to database
  5. include 'scripts/sql.php';
  6. //check if its the users go
  7. $result = mysqli_query($con,"SELECT * FROM games WHERE PID = '" . $_GET['gid'] . "'");
  8.     while($row = mysqli_fetch_array($result))
  9.         {
  10.                 $GO = $row['go'];
  11.         if ( $GO == $_GET['id']){
  12.                     echo "<script> loadgame();</script>";
  13.                     }
  14.         }
  15. ?>
  16. <table style='width:100%;height:100%;'>
  17. <tr><td height='100px'><?php echo "<img width='70px' src='https://graph.facebook.com/" . $GO . "/picture?width=200&height=200' />"; ?></td></tr>
  18. <tr><td>
  19. <?php
  20. // Create connection to database
  21. include 'scripts/sql.php';
  22. //get users win/total
  23. $result = mysqli_query($con,"SELECT * FROM x" . $_GET['gid']);
  24. while($row = mysqli_fetch_array($result))
  25.   {
  26.         echo "<table style='float:left;float:top;width:140px;' ><tr>";
  27.     echo "<td>";
  28.     echo "<img width='70px' src='https://graph.facebook.com/" . $row['id'] . "/picture?width=200&height=200' />";
  29.     //get user's name
  30.     $result1 = mysqli_query($con,"SELECT * FROM Persons WHERE PID = '" . $row['id'] . "'");
  31.     while($row1 = mysqli_fetch_array($result1))
  32.         {
  33.         echo "<li>" . $row1['Firstname'] . " " . $row1['Lastname'] . "</li>";
  34.         }
  35.     echo "<li>$" . $row['Money'] . "</li>";
  36.         echo "</td>";
  37.         echo "</tr></table>";
  38.   }
  39. ?>
  40. </td></tr>
  41. </table>
Advertisement
Add Comment
Please, Sign In to add comment