[ Index ] |
|
Code source de Joomla 1.0.13 |
1 <?php 2 /** 3 * @version $Id: logout.php 5610 2006-10-30 22:24:43Z facedancer $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. 6 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // no direct access 15 defined( '_VALID_MOS' ) or die( 'Restricted access' ); 16 17 global $database, $_VERSION; 18 19 // check to see if site is a production site 20 // allows multiple logins with same user for a demo site 21 if ( $_VERSION->SITE == 1 ) { 22 // update db user last visit record corresponding to currently logged in user 23 if ( isset( $_SESSION['session_user_id'] ) && $_SESSION['session_user_id'] != '' ) { 24 $currentDate = date( "Y-m-d\TH:i:s" ); 25 26 $query = "UPDATE #__users" 27 . "\n SET lastvisitDate = " . $database->Quote( $currentDate ) 28 . "\n WHERE id = " . (int) $_SESSION['session_user_id'] 29 ; 30 $database->setQuery( $query ); 31 32 if (!$database->query()) { 33 echo $database->stderr(); 34 } 35 } 36 37 // delete db session record corresponding to currently logged in user 38 if ( isset( $_SESSION['session_id'] ) && $_SESSION['session_id'] != '' ) { 39 $query = "DELETE FROM #__session" 40 . "\n WHERE session_id = " . $database->Quote( $_SESSION['session_id'] ) 41 ; 42 $database->setQuery( $query ); 43 44 if (!$database->query()) { 45 echo $database->stderr(); 46 } 47 } 48 } 49 50 $name = ''; 51 $fullname = ''; 52 $id = ''; 53 $session_id = ''; 54 55 // destroy PHP session 56 session_destroy(); 57 58 // return to site homepage 59 mosRedirect( '../index.php' ); 60 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |