From 2917984d92b8bdfc48ab7865e6bb6fee4f8a185f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 20 May 2005 06:12:47 +0000 Subject: [PATCH] r167: Added cplogout action so we can log out of the Admin CP --- login.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/login.php b/login.php index 776b87a..90387fb 100755 --- a/login.php +++ b/login.php @@ -18,7 +18,7 @@ require_once('./global.php'); // ################################################################### -if ($bugsys->userinfo['userid'] AND $_REQUEST['do'] != 'logout' AND $_POST['do'] != 'cplogin') +if ($bugsys->userinfo['userid'] AND $_REQUEST['do'] != 'logout' AND $_POST['do'] != 'cplogin' AND $_REQUEST['do'] != 'cplogout') { echo 'You are already logged in.'; exit; @@ -97,6 +97,21 @@ if ($_REQUEST['do'] == 'logout') } } +// ################################################################### + +if ($_REQUEST['do'] == 'cplogout') +{ + if ($_COOKIE[COOKIE_PREFIX . 'adminsession']) + { + $funct->cookie(COOKIE_PREFIX . 'adminsession'); + echo 'logged out'; + } + else + { + echo 'you are not logged in'; + } +} + /*=====================================================================*\ || ################################################################### || # $HeadURL$ -- 2.43.5