السلام عليكم
بيظهرلي خطأ في الكود
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\administrator\index.php on line 15
<?
session_start(); //EI? C????E
if($cancel){ header("Location: ?p=$p"); }
include "../conf.php"; // ??C?E ??E??CE ???E C???ICICE ??? ??? C????E
include "template.inc"; // ??C?E ??E??CE ???E C???ICICE ??? ??? C????E
if($out){ // ???C? C????E
session_unset();
session_destroy();
}
if($login)
{ // ????E E???? II?? C??I??
$result = mysql_query("SELECT * FROM users WHERE Login_name = '$useradmin' AND password = '$passadmin' LIMIT 1",$link); // C???E??C? ?? ???I ??C C???? ????E C??? ?? ?I?? C???EII???
while ($row = mysql_fetch_array($result, MYSQL_NUM))
{
session_register("IDUSER_ADMIN"); // C????? ??? ??C ???? ???I ??C C???EII? ?EE? ????? E???? ?EU??CE ???E C???? ??E? ??E?C ?? ?E?E C????E
session_register("username");
$IDUSER_ADMIN=$row[0];
$username=$row[1];
$yes_found=1; //???? ?? ??? ??C ?EU?? E?E? ???E? ?C?I ??I? ??? ?? C???EII? ??I
}
if(!$yes_found){ $err_msg ="please try agean "; } // ??C C??EU?? ?C???? ???? ??C C???EII? U?? ????I ?? ?C?IE C?E?C?CE
}
if($IDUSER_ADMIN){ // ??C ?C?E ???E C???? ?C??E ?EU?? C????C? ?C????CE ????E C?E???
$button_link="<a href='?'>main page</a> | <a href='?p=admin'>Admin page</a> | <a href='?p=sett'>Setting</a> | <a href='?p=page'>Pages manager</a> ";//????C C?????CE ?? ?EU?? ??? ?E??? ?? ??C?E ????CE ?I?? E?? ?????
$body ="welcome <br> $username.<br><a href='?out=1'> Loguot </a><br/>$button_link";
include("../FCKeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = '../FCKeditor/';
if($p){ @include($p.".php"); } // ??C ?E? I?? C????E C?E? ???I?C ??? E??? ????C I?? ??EICI ???C?E C?@ ???E ??? ??? ?C?U?? I?? ?? ?C? ?C? OI? E?ECEE ??? ???E U?? ????I?
}else{ // C????E ?? E?O? E?I ???E ?? ?U?? ????? C?E????
$body='<br><br><br><br><form method="POST" action="?">
<div align="center">
<table border="1" width="100" cellspacing="1">
<tr>
<td>
<font color="#014D5F"><b>User</b></font></td>
<td><font color="#FF0000"><input name="useradmin" size="20" style="font-weight: 700"></font></td>
</tr>
<tr>
<td>
<font color="#014D5F"><b>Password</b></font></td>
<td><font color="#FF0000">
<input name="passadmin" type="password" style="font-weight: 700" size="20"></font></td>
</tr>
</table>
</div>
<p align="center" style="margin-top: 0; margin-bottom: 0">
</p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<font color="#FF0000">
<input type="submit" value="Login" name="login" style="font-weight: 700"></font></p>
</form>';
}
//?U?C? C??EC??
echo '<meta http-equiv="Content-Type" content="text/html; charset=windows-1256"> <head>';
echo "$err_msg <br> $body";
echo " $admin_page_text <br/> $admin_page_from_text <br/> $error_msg";
if($admin_page_from_text1){
echo $admin_page_from_text1;
$oFCKeditor->Value = $FCKeditor1;
$oFCKeditor->Create() ;
echo $admin_page_from_text2;
}
?>