Created
January 6, 2013 16:03
-
-
Save trietptm/4468160 to your computer and use it in GitHub Desktop.
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
<?php | |
//Note: PHP < 4.2.0 only | |
$user = $_POST['user']; | |
$pass = $_POST['pass']; | |
if ($user->login($user, $pass)) { | |
$loggedIn = true; | |
if ($user->isAdmin()) { | |
$priv = 1; | |
} | |
} | |
// ... | |
if (!$loggedIn) { | |
include("login.php"); | |
} else if ($priv > 0) { | |
include("admin.php"); | |
} else { | |
include("intro.php"); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
register_globals