Location: PHPKode > projects > Kwalbum > kwalbum/pages/LogoutPage.php
<?php

/*
 * Created on Aug 19, 2008
 * 2.0
 */
require_once 'include/IPage.php';

class LogoutPage implements IPage
{
	function LogoutPage()
	{
		session_start();
		unset($_SESSION[PAGE_URL.'id']);
		unset($_SESSION[PAGE_URL.'admin']);
		unset($_SESSION[PAGE_URL.'add']);
		unset($_SESSION[PAGE_URL.'view']);
		unset($_SESSION[PAGE_URL.'edit']);
		setcookie(COOKIE_NAME, '', time() - 36000, '/');
		session_write_close();
	}
	function GetHead(& $title)
	{
		$title = 'Logout';
	}

	function ShowBody()
	{
		global $URLP;
		echo '<p class="error">You are logged out and can continue <a href="'.$URLP->GetExtendedURL().'">browsing</a>.</p>';
	}
}
?>
Return current item: Kwalbum