Location: PHPKode > projects > OpenDataCenter Network Management System > include/mainview_page/path.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/
// ----------------------------------------------------------------------
?>
<div class="title"><img src="images/map.gif" alt="Path" align="bottom"> Path</div>
<?php
if (!isset($action))
{
?>

<br><center><a href="javascript:history.go(-1);">Back</a></center>
<?php
}
else if ($action == "view")
{
	include("path/view.php");
}
else
{
	$request=mysql_query("SELECT administrator FROM $name_table_users WHERE username=\"$login\"") or die ("ERROR!");

	while($tmp_request=mysql_fetch_array($request))
	{
		$user_privilege = $tmp_request['administrator'];
	}

	if (($user_privilege=="1") || ($user_privilege=="2"))
	{
		if ($action == "add")
		{
			include("path/add.php");
		}
		else if ($action == "edit")
		{
			include("path/edit.php");
		}
		else if ($action == "delete")
		{
			include("path/delete.php");
		}
		else
		{
			include("pagenotfound.php");
		}
	}
	else
	{
		echo "<center><div id=\"status\" style=\"color:red\"><img src=\"images/forbidden.png\" alt=\"FORBIDDEN\"><br><br>Forbidden. You don't have permission to access administration actions.</div></center>";
	}
}
?>
Return current item: OpenDataCenter Network Management System