ضع أول عشر سطور من الملف .
			
		 
	 
  
	كود:
	<?php
session_start();
include_once "header.php";
include_once "../config.php";
include_once "../connect.php";
if(!isset($aid)) {
  ?>
  <html>
  <head>
  <title> Admin Login  </title>
  </head>
  <body><center>
<br><p align="right"><font color="#FF6600"><strong><br>
  منطقة إدارة الموقع</strong></font>
<hr size="1" color=#FF6600></p>
  <p><form method="post" action="<?=$PHP_SELF?>">
<table>
<tr>
 <td>إسم المستخدم:</td>
 <td> <input type="text" name="aid" size="15"></td>
</tr>
<tr>
 <td>الرقم السري:</td>
 <td><input type="password" name="apass" size="15"></td>
</tr>
<tr>
 <td colspan=2 align=right><input type="submit" value="تسجيل دخول"></td>
</tr>
</table>
  </form></p>
  </center>
  </body>
  </html>
  <?php
 include "footer.php";
  exit;
}
 
session_register("aid");
session_register("apass");
$sql = "SELECT * FROM admin WHERE
        aid = '$aid' AND apass = '$apass'";
$result = mysql_query($sql);
if (!$result)
{
  echo "يوجد خطأ حدث في قاعدة البيانات بينما كان يدقق في تفاصيل اتصالك. <br>If this error persists, please contact $myemail";
}
elseif (mysql_num_rows($result) == 0) {
  session_unregister("aid");
  session_unregister("apass");
  ?>
  <html>
  <head>
  <title> <?=$ACCDENIED?> </title>
  </head>
  <body>
  <h1> <?=$ACCDENIED?> </h1>
  <p>بيانات تسجيلك خاطئة أو أنك لست مخولا للدخول لهذه المنطقة
     <a href="<?=$PHP_SELF?>">أعد المحاولة</a>. </p>
  </body>
  </html>
  <?php
   include "footer.php";
  exit;
}
?>