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
6.4 KiB

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