[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * phpGroupWare * 4 * http://www.phpgroupware.org * 5 * Written by Joseph Engo <jengo@phpgroupware.org> * 6 * -------------------------------------------- * 7 * This program is free software; you can redistribute it and/or modify it * 8 * under the terms of the GNU General Public License as published by the * 9 * Free Software Foundation; either version 2 of the License, or (at your * 10 * option) any later version. * 11 \**************************************************************************/ 12 13 /* $Id: logout.php 20295 2006-02-15 12:31:25Z $ */ 14 15 $egw_info = array(); 16 $GLOBALS['egw_info']['flags'] = array( 17 'disable_Template_class' => True, 18 'currentapp' => 'logout', 19 'noheader' => True, 20 'nofooter' => True, 21 'nonavbar' => True 22 ); 23 include('./header.inc.php'); 24 25 $GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE')); 26 $GLOBALS['kp3'] = get_var('kp3',array('GET','COOKIE')); 27 28 $verified = $GLOBALS['egw']->session->verify(); 29 if ($verified) 30 { 31 if (file_exists($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'])) 32 { 33 $dh = opendir($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']); 34 while ($file = readdir($dh)) 35 { 36 if ($file != '.' && $file != '..') 37 { 38 unlink($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file); 39 } 40 } 41 closedir($dh); 42 rmdir($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']); 43 } 44 $GLOBALS['egw']->hooks->process('logout'); 45 $GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']); 46 } 47 else 48 { 49 if(is_object($GLOBALS['egw']->log)) 50 { 51 $GLOBALS['egw']->log->write(array( 52 'text' => 'W-VerifySession, could not verify session during logout', 53 'line' => __LINE__, 54 'file' => __FILE__ 55 )); 56 } 57 } 58 $GLOBALS['egw']->session->phpgw_setcookie('eGW_remember'); 59 $GLOBALS['egw']->session->phpgw_setcookie('sessionid'); 60 $GLOBALS['egw']->session->phpgw_setcookie('kp3'); 61 $GLOBALS['egw']->session->phpgw_setcookie('domain'); 62 if(substr($GLOBALS['egw_info']['server']['sessions_type'],0,4) == 'php4') 63 { 64 $GLOBALS['egw']->session->phpgw_setcookie(EGW_PHPSESSID); 65 } 66 67 $GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=1&domain='.$GLOBALS['egw_info']['user']['domain']); 68 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |