<?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/link.gif" alt="Link" align="bottom"> <?php echo TXT_LINK; ?></div>
<?php
if (!isset($action))
{
}
else if ($action == "view")
{
include("link/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("link/add.php");
}
else if ($action == "edit")
{
include("link/edit.php");
}
else if ($action == "delete")
{
include("link/delete.php");
}
else
{
include("pagenotfound.php");
}
}
else
{
echo "<center><div id=\"status\" style=\"color:red\"><img src=\"images/forbidden.png\" alt=\"FORBIDDEN\"><br><br>";
echo TXT_FORBIDDEN;
echo "</div></center>";
}
}
?>