<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$pageTitle?></title>

<style><!--
body{ background:#6986A4 url(img/bg.bmp) repeat-x; padding-top:50px;}
table{ font-family:Arial; font-weight:500;}
--></style>
<link type="text/css" href="style.css" media="all" rel="stylesheet" />
</head>

<body>
<a href="index.php" style="position:absolute; right:10px; top:10px; text-decoration:none; font-family:Arial;"><font size="+2" color="#FFFFFF">رئيسية الادارة</font></a>
<div style="position:absolute; top:0px; right:90%; font-size:12px;">
<a href="index.php" style="text-decoration:none; font-family:Arial; color:#FFFFFF;">الرئيسية</a>
<?
$SESSION = "";
if(isset($_SESSION['admin'])){ $SESSION = $_SESSION['admin']; }
if ($SESSION !== "")
{
	$con = mysqli_connect($DBHOST,$DBUSER,$DBPASS,$DBNAME) or die("Some error occurred during connection " . mysqli_error($con));
	mysqli_query($con, "SET CHARACTER SET 'utf8'");
	$sessionid = $_SESSION['session'];
	$RES = mysqli_query($con, "SELECT * FROM `admin` WHERE `user`='$SESSION' AND `session`='$sessionid'");
	if(mysqli_num_rows($RES) == 0)
	{
	header("location:logout.php");
	}
?>
&nbsp;|&nbsp;
<a href="logout.php" style="text-decoration:none; font-family:Arial; color:#FFFFFF;">تسجيل الخروج (<?=$_SESSION['admin']?>)</a>
<? } ?>
</div>
<table cellpadding="20" border="0" style="border:1px solid #006291; background:#FFFFFF;" align="center">
<tr>
<td valign="top">