Skip to content

Instantly share code, notes, and snippets.

@evandrix
Forked from trietptm/gist:4468160
Created January 7, 2013 04:47
Show Gist options
  • Save evandrix/4472418 to your computer and use it in GitHub Desktop.
Save evandrix/4472418 to your computer and use it in GitHub Desktop.
<?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