Location: PHPKode > projects > Write2Left > Base/Logout.php
<?php
/*
+------------------------------------------------------
| Write2Left
| (c) timdorr
| http://www.write2left.com
| hide@address.com
| See License.txt for license info
|------------------------------------------------------
| Script: Logout.php
| Description:
|   Handles the logouts of a user
| Created Sep-02-2002
+------------------------------------------------------
*/

/* Class: Logout
 * Description:
 *   Driver for logouts
 */
class Logout
{
	var $menu = false;
		
	function run()
	{
		global $userinfo;
		
		// Remove our session cookie
		setcookie( 'as', '',  time() - 999 );
		
		// Remove our session
		$userinfo->remove_session();
		
		// Do not pass go, do not collect $200
		header( "Location: index.php" );
		
		exit;
	}
}

$driver = new Logout();
?>
Return current item: Write2Left