Location: PHPKode > projects > OpenDataCenter Network Management System > logout.php
<?php
// ----------------------------------------------------------------------
// Copyright (C) 2007 by GREGORY LE BRAS
// ----------------------------------------------------------------------
// LICENSE
//
// This file is part of ODCNMS - Open DataCenter Network Management System
// 
// ODCNMS is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// Foobar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with Foobar; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
// ----------------------------------------------------------------------
// Original Author of file: GREGORY LE BRAS - http://www.odcnms.org/
// ----------------------------------------------------------------------

include ("config/config.php");
include ("function/function.php");
include ("class/syslog.php");

session_start();
$currentdate = date('Y-m-d');
$currenttime = date("H:i:s"); 

user_log ($_SESSION['login'],$name_table_users,$name_table_users_log,"logout","logout","logout",$mysql_hostname,$mysql_username,$mysql_password,$mysql_database);

foreach ($syslog_server as $arrayvalue)
{
	$syslog = new Syslog();
	$syslog->SetFacility(13);
	$syslog->SetSeverity(5);
	$syslog->SetProcess('odcnms');
	$syslog->SetHostname('');
	$syslog->SetFqdn('');
	$syslog->SetIpFrom('');		
	$syslog->SetContent($currentdate.' '.$currenttime.' user: '.$_SESSION['login'].' - logout');
	$syslog->SetServer($arrayvalue);
	$syslog->Send();
}
session_destroy();
header("location:index.php?status=logout");
?>
Return current item: OpenDataCenter Network Management System