<?
include("../includes/config.php");
$adminuser = @mysql_db_query("$dbName", "select *  from admin where  admin_id = '1'") ;
while  ($ab = mysql_fetch_array($adminuser)){
$adminu = $ab['admin_name'];
$adminp = $ab['admin_password'];
}
$loguser= $_COOKIE['adminuser'];
$logipass= $_COOKIE['adminpassword'];



if ( $adminp == $logipass  && $adminu == $loguser ){

?>
<html dir="rtl">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="ar-sa">
<meta name="GENERATOR" content="Traidnt.com">
<link rel="stylesheet" href="stylesheet.css" type="text/css">

<title>لوحة تحكم الادارة</title>
</head>
<body leftmargin="0" rightmargin="0" bottommargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#FCFAF7" text="#000000" >

<div align="left">
  <table border="0" cellpadding="0" cellspacing="0" width="100%" height="41">
    <tr>
      <td width="150%" bgcolor="#000000" height="1"></td>
    </tr>
    <tr >
      <td width="100%" align="left" valign="bottom" bgcolor="#FFFFFF" class="topheader"  >
        <p align="right"><a href="index.php">واجهة الادارة - </a>
		<a target="_blank" href="../index.php"><font color="#000000">&nbsp;واجهة
		الموقع</font></a></td>
    </tr>
  </table>
</div>

<div align="left">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td width="20%" valign="top">
        <? include("links.php"); ?>
      </td>
      <td width="80%" valign="top" align="center">
      <br>

   <?
   if(($_GET['go'])==('update')){
    $value = $_POST[value];
    $value= addslashes($value);
    $update = @mysql_db_query("$dbName", "UPDATE `pages` SET `page_value` = '$value' WHERE `pages`.`page_id` =1 LIMIT 1 ;") ;
    if($update){
     echo "<b>تم التعديل بنجاح</b>";
     echo"<META HTTP-EQUIV='Refresh' CONTENT='1; url=poet.php?do=cv'>";
    	}else{
    	echo"هناك مشكلة بتعديل الصفحة";
    	}
   	}
  $insert = @mysql_db_query("$dbName", "SELECT * FROM `pages` WHERE `page_id` = '1' ") ;
    while  ($v = mysql_fetch_array($insert)){
       $cv = $v[page_value];
    }
   ?>

  <br>
  <form name="" action="poet.php?do=cv&go=update" method="post">
  <table width="20%" align="center"  cellpadding="0" cellspacing="0" class="mytable">
    <tr>
      <td>
      <div align="center">
          <table width="692" height="100%" align="center" bordercolor="#006633">
            <tr>
              <td width="686" class="backtablemun">
				<p align="center"><span lang="ar-sa">تعديل الملف الشخصي ( من
				أنا) .</span></td>
            </tr>
            <tr>
              <td width="576" class="submun">
				<p align="center"><font color="#FF0000">ضع بالأسفل كود <span lang="en-us">HTML </span>
				<span lang="ar-sa">&nbsp;الخاص بــ&nbsp; معلوماتك الشخصية ليتم
				عرضها للزوار .</span></font></td>
            </tr>
            <tr>
              <td width="576"  class="subsub">
				<textarea dir="ltr" rows="13" cols="83" name="value" style="border-style: inset; border-width: 1px"><?echo $cv;?></textarea></td>
            </tr>
            <tr>
              <td width="576"  class="subsub">
				<p align="center">&nbsp;<input type="submit" value="تعديل"></td>
            </tr>
            </table>
            </form>
        </div>
        </td>
    </tr>
  </table>





  <br>
        <br>
      </td>
    </tr>

  </table>
</div>
</body>

</html>
<?
}else {

include("login.php");
	}
?>