\n";foreach (array_keys($_SESSION) as $key) { print "key of '$key', val of '$_SESSION[$key]'
\n"; } } else { print "No session.
\n";} if ($config["global_auth"]["value"] == "on") { $user_id = $HTTP_SESSION_VARS['user_id']; $user_hash = $HTTP_SESSION_VARS['user_hash']; $host = getenv("REMOTE_ADDR"); if (getenv("HTTP_REFERER") == "") { $referer = $HTTP_REFERER; }else{ $referer = getenv("HTTP_REFERER"); } if ($HTTP_SESSION_VARS['change_password'] == "1") { header ("Location: auth_changepassword.php?ref=$referer"); exit; } if ($guest_account == true) { /* don't even bother with the guest code if we're already logged in */ if ($user_id == "") { $sql_id = db_fetch_cell("select ID from auth_users where username=\"" . $config["guest_user"]["value"] . "\""); /* cannot find guest user */ if (sizeof($sql_id) == 0) { print "CANNOT FIND GUEST USER: " . $config["guest_user"]["value"] . ""; }else{ if ($user_id == "") { $user_id = $sql_id[ID]; } $res_id = db_fetch_assoc("select a.SectionID, a.UserID, s.ID, s.Section from auth_acl a left join auth_sections s on a.sectionid=s.id where s.section=\"$section\" and a.userid=$user_id"); if (sizeof($res_id) != 0) { $au = 1; } } } } if ($au != 1 && $user_id != 1) { $res_id = db_fetch_assoc("select a.SectionID, a.UserID, s.ID, s.Section from auth_acl a left join auth_sections s on a.sectionid=s.id where s.section=\"$section\" and a.userid=\"$user_id\""); $rows = sizeof($res_id); /* Make sure user is logged in */ if ($user_id == "") { include_once ("auth_login.php"); exit; } /* Make sure they are authenticated */ if ($rows != "") { $au = 1; }else{ $au = 0; include_once ("auth_noauth.php"); exit; } } } ?>