<?php
include_once("conf.php");
session_name("ARM");
session_start();
if (!isset($_SESSION["sesid"]))
{
header("Location: administrator/admin.php");
exit;
}
if ($sesid != $login.$logintime.$password)
{
header("Location: administrator/admin.php");
exit;
}
?>
<html>
<head>
<title>Axborot Resurs Markazi</title>
<LINK rel="stylesheet" type="text/css" href="main.css">
</head>
<?
$act = isset($HTTP_GET_VARS["act"])?$HTTP_GET_VARS["act"]:"";
?>
<body>
<div id="wrapper">
<div id="header">
<div id="joomla"><img src="administrator/icons/header_text.png" alt="ARM" /></div>
</div>
</div>
<br>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="10" background="images/top_left_corner.png"></td>
<td background="images/top_line.png"></td>
<td width="10" height="10" background="images/top_right_corner.png"></td>
</tr>
<tr>
<td class="leftline"> </td>
<td valign="middle" align="center">
<table cellpadding="3" cellspacing="0" border="0" width="100%" >
<tr>
<?php
if($_GET["admenter"] == md5(1))
{
$k = mysql_query("SELECT * FROM `menu`");
}
elseif($_GET["admenter"] == md5(0))
{
$k = mysql_query("SELECT * FROM `menu` WHERE `menu_adm` = 1");
}
else
{
session_destroy();
echo "<SCRIPT language=javascript>document.location.href='administrator/admin.php';</SCRIPT>";
exit;
}
while($menu_array = mysql_fetch_array($k))
{
?>
<td class="main"><a href="<?= $menu_array["link_menu"]."&admenter=".$_GET["admenter"]?>" class="acategory">
<img src="<?= $menu_array["icon_menu"] ?>" border="0"/><BR><?= $menu_array["name_menu"]?> </a>
</td>
<?php } ?>
</tr>
</table>
</td>
<td class="rightline"> </td>
</tr>
<tr>
<td width="10" height="10" background="images/bottom_left_corner.png"></td>
<td background="images/bottom_line.png"></td>
<td width="10" height="10" background="images/bottom_right_corner.png"></td>
</tr>
</table>
<BR clear="all"/>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<TR>
<td width="9" height="10" background="images/top_left_corner.png"></td>
<td background="images/top_line.png"></td>
<td width="9" height="10" background="images/top_right_corner.png"></td>
</TR>
<TR>
<td width="10" class="leftline"> </td>
<td>
<?
switch ($act)
{
case "markaz":
include("markaz.php");
break;
case "category":
include("category.php");
break;
case "books":
include("books.php");
break;
case "students":
include("students.php");
break;
case "report":
include("reports.php");
break;
case "logout":
session_destroy();
echo "<SCRIPT language=javascript>document.location.href='administrator/admin.php';</SCRIPT>";
exit;
break;
default:
?>
<CENTER>
<img src="images/index.png">
</CENTER>
<?
break;
}
?>
</td>
<td width="10" class="rightline"> </td>
</TR>
<TR>
<td width="10" height="10" background="images/bottom_left_corner.png"></td>
<td background="images/bottom_line.png"></td>
<td width="10" height="10" background="images/bottom_right_corner.png"></td>
</TR>
</table>
<table width="100%" border="0">
<tr>
<td align="center"><div align="center"> <?php for ($i = 1; $i <= $view_list; $i++) :
?>
<a href="<?php echo $page_link, $i; ?>"><?php echo $i; ?></a> |
<?php
endfor;
?>
</div>
</td></tr></table>
</body>
</html>