Simple website with some JavaScript games.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.5 KiB

7 years ago
  1. <?php
  2. $loggedIn = false;
  3. $admin = false;
  4. session_start();
  5. ob_start();
  6. require_once("../club_connect.php");
  7. if((md5($_SERVER['HTTP_USERAGENT'] . 'salt')) == ($_SESSION['agent']) && $_SESSION['use'] == true)
  8. {
  9. $loggedIn = true;
  10. //checks to see if user is an admin
  11. $q = "select admin from users where user_name='" . $_SESSION['username'] . "'";
  12. $r = mysqli_query($dbc, $q);
  13. if(@mysqli_num_rows($r) == 1)
  14. {
  15. while($row = mysqli_fetch_array($r))
  16. {
  17. $checka = $row['admin'];
  18. }
  19. if($checka)
  20. {
  21. $admin = true;
  22. }
  23. }
  24. }
  25. echo '<!DOCTYPE html>
  26. <html>
  27. <head>
  28. <title>Club Panda</title>
  29. <meta charset="UTF-8">
  30. <meta name="viewport" content="width=device-width, initial-scale=1">
  31. <link rel="stylesheet" href="includes/w3.css">
  32. <link rel="stylesheet" href="https://www.w3schools.com/lib/w3-theme-black.css">
  33. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  34. </head>
  35. <body id="myPage">
  36. <!-- Sidebar on click -->
  37. <nav class="w3-sidebar w3-bar-block w3-white w3-card-2 w3-animate-left w3-xxlarge" style="display:none;z-index:2" id="mySidebar">
  38. <a href="javascript:void(0)" onclick="w3_close()" class="w3-bar-item w3-button w3-display-topright w3-text-teal">Close
  39. <i class="fa fa-remove"></i>
  40. </a>
  41. <a href="#" class="w3-bar-item w3-button">Bamboo Field</a>
  42. <a href="#" class="w3-bar-item w3-button">Link 2</a>
  43. <a href="#" class="w3-bar-item w3-button">Link 3</a>
  44. <a href="#" class="w3-bar-item w3-button">Link 4</a>
  45. <a href="#" class="w3-bar-item w3-button">Link 5</a>
  46. </nav>
  47. <!-- Navbar -->
  48. <div class="w3-top">
  49. <div class="w3-bar w3-theme-d2 w3-left-align">
  50. <a class="w3-bar-item w3-button w3-hide-medium w3-hide-large w3-right w3-hover-white w3-theme-d2" href="javascript:void(0);" onclick="openNav()"><i class="fa fa-bars"></i></a>
  51. <a href="#" class="w3-bar-item w3-button w3-teal"><i class="fa fa-home w3-margin-right"></i>Logo</a>
  52. <a href="index.php" class="w3-bar-item w3-button w3-hide-small w3-hover-white">Home</a>
  53. <a href="about.php" class="w3-bar-item w3-button w3-hide-small w3-hover-white">About</a>
  54. <div class="w3-dropdown-hover w3-hide-small">
  55. <button class="w3-button" title="Notifications">Games<i class="fa fa-caret-down"></i></button>
  56. <div class="w3-dropdown-content w3-card-4 w3-bar-block">
  57. <a href="#" class="w3-bar-item w3-button">Bamboo Field</a>
  58. <a href="#" class="w3-bar-item w3-button">Link</a>
  59. <a href="#" class="w3-bar-item w3-button">Link</a>
  60. </div>
  61. </div>
  62. </div>
  63. <!-- Navbar on small screens -->
  64. <div id="navDemo" class="w3-bar-block w3-theme-d2 w3-hide w3-hide-large w3-hide-medium">
  65. <a href="index.php" class="w3-bar-item w3-button">Home</a>
  66. <a href="games.php" class="w3-bar-item w3-button">Games</a>
  67. <a href="about.php" class="w3-bar-item w3-button">About</a>
  68. </div>
  69. </div>
  70. <!-- Image Header -->
  71. <div class="w3-display-container w3-animate-opacity">
  72. <img src="includes/banner.png" alt="boat" style="width:100%;min-height:350px;">
  73. </div>';
  74. ?>