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.

170 lines
7.0 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <?php
  2. $loggedIn = false;
  3. $admin = false;
  4. session_start();
  5. ob_start();
  6. if($dir == 2)
  7. {
  8. require_once("../../club_connect.php");
  9. }
  10. else
  11. {
  12. require_once("../club_connect.php");
  13. }
  14. if((md5($_SERVER['HTTP_USERAGENT'] . 'salt')) == ($_SESSION['agent']) && $_SESSION['use'] == true)
  15. {
  16. $loggedIn = true;
  17. //checks to see if user is an admin
  18. $q = "select admin from users where user_name='" . $_SESSION['username'] . "'";
  19. $r = mysqli_query($dbc, $q);
  20. if(@mysqli_num_rows($r) == 1)
  21. {
  22. while($row = mysqli_fetch_array($r))
  23. {
  24. $checka = $row['admin'];
  25. }
  26. if($checka)
  27. {
  28. $admin = true;
  29. }
  30. }
  31. }
  32. echo '<!DOCTYPE html>
  33. <html>
  34. <head>
  35. <title>Club Panda</title>
  36. <meta charset="UTF-8">
  37. <meta name="viewport" content="width=device-width, initial-scale=1">';
  38. if($dir == 2)
  39. {
  40. echo '<!DOCTYPE html>
  41. <html>
  42. <head>
  43. <title>Club Panda</title>
  44. <meta charset="UTF-8">
  45. <meta name="viewport" content="width=device-width, initial-scale=1">';
  46. echo '<link rel="stylesheet" href="../includes/w3.css">';
  47. echo '<link rel="stylesheet" href="https://www.w3schools.com/lib/w3-theme-black.css">
  48. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  49. </head>
  50. <body id="myPage">
  51. <!-- Sidebar on click -->
  52. <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">
  53. <a href="javascript:void(0)" onclick="w3_close()" class="w3-bar-item w3-button w3-display-topright w3-text-teal">Close
  54. <i class="fa fa-remove"></i>
  55. </a>
  56. <a href="bamboofield.php" class="w3-bar-item w3-button">Bamboo Field</a>
  57. <a href="zombiePanda.php" class="w3-bar-item w3-button">Zombie Pandas</a>
  58. <a href="#" class="w3-bar-item w3-button">Link 3</a>
  59. <a href="#" class="w3-bar-item w3-button">Link 4</a>
  60. <a href="#" class="w3-bar-item w3-button">Link 5</a>
  61. </nav>
  62. <!-- Navbar -->
  63. <div class="w3-top">
  64. <div class="w3-bar w3-theme-d2 w3-left-align">
  65. <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>
  66. <a href="#" class="w3-bar-item w3-button w3-teal"><i class="fa fa-home w3-margin-right"></i>Logo</a>
  67. <a href="../index.php" class="w3-bar-item w3-button w3-hide-small w3-hover-white">Home</a>
  68. <a href="../about.php" class="w3-bar-item w3-button w3-hide-small w3-hover-white">About</a>
  69. <div class="w3-dropdown-hover w3-hide-small">
  70. <button class="w3-button" title="Notifications">Games<i class="fa fa-caret-down"></i></button>
  71. <div class="w3-dropdown-content w3-card-4 w3-bar-block">
  72. <a href="bamboofield.php" class="w3-bar-item w3-button">Bamboo Field</a>
  73. <a href="zombiePanda.php" class="w3-bar-item w3-button">Zombie Pandas</a>
  74. <a href="#" class="w3-bar-item w3-button">Link</a>
  75. </div>
  76. </div>
  77. </div>
  78. <!-- Navbar on small screens -->
  79. <div id="navDemo" class="w3-bar-block w3-theme-d2 w3-hide w3-hide-large w3-hide-medium">
  80. <a href="../index.php" class="w3-bar-item w3-button">Home</a>
  81. <a href="../games.php" class="w3-bar-item w3-button">Games</a>
  82. <a href="../about.php" class="w3-bar-item w3-button">About</a>
  83. </div>
  84. </div>
  85. <!-- Image Header -->
  86. <div class="w3-display-container w3-animate-opacity">
  87. <img src="../includes/banner.png" alt="boat" style="width:100%;min-height:350px;">
  88. </div>';
  89. }
  90. else
  91. {
  92. echo '<!DOCTYPE html>
  93. <html>
  94. <head>
  95. <title>Club Panda</title>
  96. <meta charset="UTF-8">
  97. <meta name="viewport" content="width=device-width, initial-scale=1">';
  98. echo '<link rel="stylesheet" href="includes/w3.css">';
  99. echo '<link rel="stylesheet" href="https://www.w3schools.com/lib/w3-theme-black.css">
  100. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  101. </head>
  102. <body id="myPage">
  103. <!-- Sidebar on click -->
  104. <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">
  105. <a href="javascript:void(0)" onclick="w3_close()" class="w3-bar-item w3-button w3-display-topright w3-text-teal">Close
  106. <i class="fa fa-remove"></i>
  107. </a>
  108. <a href="games/bamboofield.php" class="w3-bar-item w3-button">Bamboo Field</a>
  109. <a href="games/zombiePanda.php" class="w3-bar-item w3-button">Zombie Pandas</a>
  110. <a href="#" class="w3-bar-item w3-button">Link 3</a>
  111. <a href="#" class="w3-bar-item w3-button">Link 4</a>
  112. <a href="#" class="w3-bar-item w3-button">Link 5</a>
  113. </nav>
  114. <!-- Navbar -->
  115. <div class="w3-top">
  116. <div class="w3-bar w3-theme-d2 w3-left-align">
  117. <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>
  118. <a href="#" class="w3-bar-item w3-button w3-teal"><i class="fa fa-home w3-margin-right"></i>Logo</a>
  119. <a href="index.php" class="w3-bar-item w3-button w3-hide-small w3-hover-white">Home</a>
  120. <a href="about.php" class="w3-bar-item w3-button w3-hide-small w3-hover-white">About</a>
  121. <div class="w3-dropdown-hover w3-hide-small">
  122. <button class="w3-button" title="Notifications">Games<i class="fa fa-caret-down"></i></button>
  123. <div class="w3-dropdown-content w3-card-4 w3-bar-block">
  124. <a href="games/bamboofield.php" class="w3-bar-item w3-button">Bamboo Field</a>
  125. <a href="games/zombiePanda.php" class="w3-bar-item w3-button">Zombie Pandas</a>
  126. <a href="#" class="w3-bar-item w3-button">Link</a>
  127. </div>
  128. </div>
  129. </div>
  130. <!-- Navbar on small screens -->
  131. <div id="navDemo" class="w3-bar-block w3-theme-d2 w3-hide w3-hide-large w3-hide-medium">
  132. <a href="index.php" class="w3-bar-item w3-button">Home</a>
  133. <a href="games.php" class="w3-bar-item w3-button">Games</a>
  134. <a href="about.php" class="w3-bar-item w3-button">About</a>
  135. </div>
  136. </div>
  137. <!-- Image Header -->
  138. <div class="w3-display-container w3-animate-opacity">
  139. <img src="includes/banner.png" alt="boat" style="width:100%;min-height:350px;">
  140. </div>';
  141. }
  142. ?>