Location: PHPKode > projects > igloo opensource > xmods/x_logout.php
<?php

/*-------1---------2---------3---------4---------5---------6---------7---------8---*/
// +----------------------------------------------------------------------+
// | PHP version 4                                                        |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The YHA (Yono Hendro Arie) Group             |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license,       |
// | that is bundled with this package in the file LICENSE, and is        |
// | available through the world-wide-web at                              |
// | http://www.php.net/license/2_02.txt.                                 |
// | If you did not receive a copy of the PHP license and are unable to   |
// | obtain it through the world-wide-web, please send a note to          |
// | hide@address.com so we can mail you a copy immediately.               |
// +----------------------------------------------------------------------+
// | Library Automation login script                                      |
// | ARIE NUGRAHA 2005                                                    |
// +----------------------------------------------------------------------+
// | Author: Hendro Wicaksono <hide@address.com>                 |
// | Igloo Re-engineering: Arie Nugraha <hide@address.com>               |
// | Library Automation: Arie Nugraha <hide@address.com>                 |
// +----------------------------------------------------------------------+
//
// $Id$

session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Logout Sistem Automasi Perpustakaan</title>
	<link rel="stylesheet" type="text/css" href="css/la_fancy.css">
</head>
<body>
<?php
// unset all session variabel
unset($_SESSION);
if(session_destroy()){
	echo "<script language='javascript'>\n";
	echo "alert('You had been Log Out from Library Automation System');";
	echo "location.href = '../index.php';";
	echo "</script>\n";
} else {
	echo "<script language='javascript'>\n";
	echo "alert('Log Out failed!!\\nPlease Re-try to logout again');";
	echo "self.history.back();";
	echo "</script>\n";
}

echo "<p class='bodyText'><b>Click <a href='index.php'>Here</a>"
	." if your browser doesn't support redirecting</b></p>";
?>
<body>
</html>
Return current item: igloo opensource