Просмотр файла darkworld/adminka2/news.php

Размер файла: 2.18Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
$ref=rand(100,10000000);

header("Content-type:text/vnd.wap.wml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">";
echo "<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>";
echo "<card id=\"index\" title=\"GM-panel\">";
echo "<p align=\"left\">";

$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
/////////////////////////////////////////////////////
$text = @file("../data/reg/$log.dat"); 
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {

$u = explode(".",$login);

if($log=="$u[0].GM"){


switch($go) {

default:

echo "<small>&#x417;&#x430;&#x433;&#x43E;&#x43B;&#x43E;&#x432;&#x43E;&#x43A;:</small><br/>";
echo "<input name=\"zag\" maxlength=\"100\" title=\"zag\"/><br/>";
echo "<small>&#x41D;&#x43E;&#x432;&#x43E;&#x441;&#x442;&#x44C;:</small><br/>";
echo "<input name=\"msg\" maxlength=\"999\" title=\"msg\"/><br/>";
echo "<small><anchor title=\"go\">OK<go href=\"news.php?log=$log&amp;pas=$pas&amp;go=go\" method=\"post\">";
echo "<postfield name=\"zag\" value=\"$(zag)\"/>";
echo "<postfield name=\"msg\" value=\"$(msg)\"/>";
echo "</go></anchor></small><br/>";

break;

case 'go':

$date=date("d.m.y");


$tex="$zag||$date||$msg"; 

$fp=@fopen("../data/news.dat","a+");  
flock ($fp,LOCK_EX);                                                              
fputs($fp,"$tex\r\n");
fflush ($fp);
flock ($fp,LOCK_UN);
fclose($fp);  

echo"<small>&#x41D;&#x43E;&#x432;&#x43E;&#x441;&#x442;&#x44C; &#x443;&#x441;&#x43F;&#x435;&#x448;&#x43D;&#x43E; &#x441;&#x43E;&#x437;&#x434;&#x430;&#x43D;&#x430;.</small>";




break;

}
}
}else{echo"<small>&#x41F;&#x430;&#x440;&#x43E;&#x43B;&#x44C; &#x438;&#x43B;&#x438; &#x43B;&#x43E;&#x433;&#x438;&#x43D; &#x43D;&#x435;&#x432;&#x435;&#x440;&#x435;&#x43D;!</small>";}


echo "</p></card></wml>"; 

?>