/** * Main.php * * This is an example of the main page of a website. Here * users will be able to login. However, like on most sites * the login form doesn't just have to be on the main page, * but re-appear on subsequent pages, depending on whether * the user has logged in or not. * * Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC) * Updated, Configured and changed by Sam Swift Business Solution ---> Last Updated: August 26, 2004 */ include("session.php"); ?>
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
if($session->userlevel < 2){
$ses="process.php";
$hd = "";
echo $hd;
}
echo "Logged In"; echo "Welcome $session->Fname, you are logged in as $session->adminlevel." ."[userid\">My Account] " ."[Edit Account] " ."[Logout] "; if($session->isAdmin()){ echo "[Admin Center] "; include("view_active.php"); echo " Menu:"; echo ">>NAM Membership Category"; echo ">>NAM Contribution Category"; echo " >>NAM Member DB"; echo " >>Web auto approval and updates"; echo " >>Convention Registration Admin"; } echo " Reports:"; echo ">>Church List Report"; echo ">>Regional Summary Report"; exit; } else{ ?> Login/** * User not logged in, display the login form. * If user has already tried to login, but errors were * found, display the total number of errors. * If errors occurred, they will be displayed. */ if($form->num_errors > 0){ echo " * User or password error"; } ?> } $session->logout(); /** * Just a little page footer, tells how many registered members * there are, how many users currently logged in and viewing site, * and how many guests viewing site. Active users are displayed, * with link to their user information. */ /* echo " |
"; echo "Member Total: ".$database->getNumMembers()." "; echo "There are $database->num_active_users registered members and "; echo "$database->num_active_guests guests viewing the site. "; */ include("include/view_active.php"); ?> |