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.

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