Created
May 21, 2014 05:04
-
-
Save Nasawa/a6665e19be669f3364cd to your computer and use it in GitHub Desktop.
Just some auth / injection stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
if ($login) | |
{ | |
$id = $_SESSION['user']; | |
if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 3600)) | |
{ | |
// last request was more than 30 minutes ago | |
session_unset(); // unset $_SESSION variable for the run-time | |
session_destroy(); // destroy session data in storage | |
?> | |
<script type='text/javascript'> | |
/*Authentication*/ | |
</script> | |
<? | |
} | |
$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp | |
?> | |
<script type='text/javascript'> | |
/*Authentication*/ | |
</script> | |
<? | |
} | |
//-----------------------------HEADER--------------------------- | |
echo (file_get_contents("partial/header.html",false,null,3)); | |
//-----------------------------MANAGER ADD---------------------- | |
if ($_SESSION['type'] == "Manager") | |
echo (file_get_contents("partial/manageradd.html",false,null,3)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment