[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 #CMS - CMS Made Simple 3 #(c)2004 by Ted Kulp (wishy@users.sf.net) 4 #This project's homepage is: http://cmsmadesimple.sf.net 5 # 6 #This program is free software; you can redistribute it and/or modify 7 #it under the terms of the GNU General Public License as published by 8 #the Free Software Foundation; either version 2 of the License, or 9 #(at your option) any later version. 10 # 11 #This program is distributed in the hope that it will be useful, 12 #but WITHOUT ANY WARRANTY; without even the implied warranty of 13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 #GNU General Public License for more details. 15 #You should have received a copy of the GNU General Public License 16 #along with this program; if not, write to the Free Software 17 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 # 19 #$Id: logout.php 3436 2006-09-16 18:12:41Z tsw $ 20 21 $CMS_ADMIN_PAGE=1; 22 23 require_once ("../include.php"); 24 25 $userid = ""; 26 if ($_SESSION['cms_admin_user_id']) { 27 $userid = $_SESSION['cms_admin_user_id']; 28 } 29 30 $username= ""; 31 if ($_SESSION['login_user_username']) { 32 $username = $_SESSION['login_user_username']; 33 } 34 35 36 audit($userid, $username, 'User Logout'); 37 38 #unset($_SESSION['cms_admin_user_id']); 39 #setcookie('cms_admin_user_id', '', time() - 3600); 40 #setcookie('cms_passhash', '', time() - 3600); 41 42 #Perform the logout_post callback 43 foreach($gCms->modules as $key=>$value) 44 { 45 if ($gCms->modules[$key]['installed'] == true && 46 $gCms->modules[$key]['active'] == true) 47 { 48 $gCms->modules[$key]['object']->LogoutPost(); 49 } 50 } 51 52 #Now call the event 53 Events::SendEvent('Core', 'LogoutPost'); 54 55 #echo ('<html><head><title>Logging in... please wait</title><meta http-equiv="refresh" content="1; url=./login.php"></head><body>Logging out. Redirecting to <a href="./login.php">login</a> page...</body></html>'); 56 $_SESSION['logout_user_now'] = "1"; 57 redirect("login.php"); 58 59 # vim:ts=4 sw=4 noet 60 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |