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.

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