| 
														
															@@ -359,7 +359,7 @@ $page = preg_replace("/\?.+/", "", $page); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <script> 
														 | 
														
														 | 
														
															     <script> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       console.log("Nickname: <?= $nickname ?>\nDiscord Username: <?= $discordUsername ?>\nUsername: <?= $username ?>\nBirth Date: <?= $birthDate ?>\n"); 
														 | 
														
														 | 
														
															       console.log("Nickname: <?= $nickname ?>\nDiscord Username: <?= $discordUsername ?>\nUsername: <?= $username ?>\nBirth Date: <?= $birthDate ?>\n"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </script> 
														 | 
														
														 | 
														
															     </script> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    <?php } else if (!isset($_SESSION["loggedIn"],$_GET["code"]) && $page === "/login/redirect") {  
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    <?php } else if (!isset($_SESSION["loggedIn"],$_GET["code"]) && stristr($page, "/login/redirect")) {  
														 | 
													
												
											
												
													
														| 
														 | 
														
															       $authResult = getDiscordAuthInfoFromCode($_GET["code"]); 
														 | 
														
														 | 
														
															       $authResult = getDiscordAuthInfoFromCode($_GET["code"]); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       if ($authResult !== false) { 
														 | 
														
														 | 
														
															       if ($authResult !== false) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         $discordInfo = getDiscordUserInfo($authResult->access_token); 
														 | 
														
														 | 
														
															         $discordInfo = getDiscordUserInfo($authResult->access_token); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -368,13 +368,13 @@ $page = preg_replace("/\?.+/", "", $page); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         $_SESSION["loggedIn"] = true; 
														 | 
														
														 | 
														
															         $_SESSION["loggedIn"] = true; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         header("Location: /applications"); 
														 | 
														
														 | 
														
															         header("Location: /applications"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } 
														 | 
														
														 | 
														
															       } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    } else if ($page === "/logout") {  
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } else if (stristr($page, "/logout")) {  
														 | 
													
												
											
												
													
														| 
														 | 
														
															       session_destroy(); 
														 | 
														
														 | 
														
															       session_destroy(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       header("Location: /"); 
														 | 
														
														 | 
														
															       header("Location: /"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    } else if (!isset($_SESSION["loggedIn"]) && $page === "/login") { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } else if (!isset($_SESSION["loggedIn"]) && stristr($page, "/login")) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         $redirectUri = urlencode(siteUrl."/login/redirect"); 
														 | 
														
														 | 
														
															         $redirectUri = urlencode(siteUrl."/login/redirect"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         header("Location: ". "https://discordapp.com/api/oauth2/authorize?client_id=" . discordClientId . "&redirect_uri=" . $redirectUri . "&response_type=code&scope=identify%20guilds"); 
														 | 
														
														 | 
														
															         header("Location: ". "https://discordapp.com/api/oauth2/authorize?client_id=" . discordClientId . "&redirect_uri=" . $redirectUri . "&response_type=code&scope=identify%20guilds"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    } else if (isset($_SESSION["loggedIn"]) && in_array($_SESSION["discordId"], allowedUsers) && $page === "/applications") { ?> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } else if (isset($_SESSION["loggedIn"]) && in_array($_SESSION["discordId"], allowedUsers) && stristr($page, "/applications")) { ?> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <div> 
														 | 
														
														 | 
														
															     <div> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       <h1>Bedrock Server Applications</h1> 
														 | 
														
														 | 
														
															       <h1>Bedrock Server Applications</h1> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       <div class="tableContainer"> 
														 | 
														
														 | 
														
															       <div class="tableContainer"> 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -414,7 +414,7 @@ $page = preg_replace("/\?.+/", "", $page); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         </table> 
														 | 
														
														 | 
														
															         </table> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       </div> 
														 | 
														
														 | 
														
															       </div> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     </div> 
														 | 
														
														 | 
														
															     </div> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    <?php } else if ($page === "/bedrock") { ?> 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    <?php } else if (stristr($page, "/bedrock")) { ?> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     <div> 
														 | 
														
														 | 
														
															     <div> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       <img src="source/logo.png" alt="logo" id="logo"> 
														 | 
														
														 | 
														
															       <img src="source/logo.png" alt="logo" id="logo"> 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       <h1>Bedrock Server Application</h1> 
														 | 
														
														 | 
														
															       <h1>Bedrock Server Application</h1> 
														 |