function action_logout() { ses_unset("userID"); // id 9 Logs current user out of system ses_end(); action_redirect("login.php"); }
header("Pragma: no-cache"); ses_start(); sql_connect(); if (!action_checklogin()) { if (!action_login()) { action_redirect("login.php"); } } $mod = $_GET['m']; if ($mod) { ses_set("module", $mod); } else { $mod = ses_get("module"); } switch ($_GET['a']) { case 1: unset($mod); break; case 3: action_redirect($_GET['page']); break; case 9: action_logout(); break; } if (mod_getadmin($mod)) { if (!ses_get("admin")) { unset($mod); } } mod_execute($mod);