瀏覽代碼

Logout/Login: Clear session on login.php instead of logout.php - allows refresh to easily rotate background photos, if desired.

Nate Jones 11 年之前
父節點
當前提交
d6b83b05d8
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 5 0
      login.php
  2. 0 5
      logout.php

+ 5 - 0
login.php

@@ -25,6 +25,11 @@
 */
 */
 include "root.php";
 include "root.php";
 
 
+//clear the session variables
+	session_start();
+	session_unset();
+	session_destroy();
+
 //if config.php file does not exist then redirect to the install page
 //if config.php file does not exist then redirect to the install page
 	if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
 	if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
 		//do nothing
 		//do nothing

+ 0 - 5
logout.php

@@ -26,11 +26,6 @@
 
 
 include "root.php";
 include "root.php";
 
 
-//clear the session variables
-	session_start();
-	session_unset();
-	session_destroy();
-
 //redirect the user to the index page
 //redirect the user to the index page
 	header("Location: ".PROJECT_PATH."/login.php");
 	header("Location: ".PROJECT_PATH."/login.php");
 	return;
 	return;