Размер файла: 7.55Kb
<?
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>Здарова GM!</small>";
echo"<small><br/><br/><a href=\"gm.php?log=$log&pas=$pas&go=profil\">Профиль игроков</a>";
echo"<br/><a href=\"backup.php?log=$log&pas=$pas\">Сделать BACKUP</a>";
echo"<br/><a href=\"priz.php?log=$log&pas=$pas\">Подарки</a>";
echo"<br/><a href=\"chat.php?log=$log&pas=$pas\">Чат</a>";
echo"<br/><a href=\"4istka.php?log=$log&pas=$pas\">Удаление игроков с 0 лвл'ом</a>";
echo"<br/><a href=\"chatonoff.php?log=$log&pas=$pas\">Чат on/off</a>";
echo"<br/><a href=\"alldelmsg.php?log=$log&pas=$pas\">Чистка писем</a>";
echo"<br/><a href=\"new.php?log=$log&pas=$pas\">Создать игрока</a>";
echo"<br/><a href=\"news.php?log=$log&pas=$pas\">Новости</a></small>";
break;
case 'profil':
echo "<small>Логин:</small><br/>";
echo "<input name=\"loginn\" maxlength=\"10\" title=\"nick\"/><br/>";
echo "<small><anchor title=\"go\">OK<go href=\"gm.php?log=$log&pas=$pas&go=profiledit\" method=\"post\">";
echo "<postfield name=\"logi\" value=\"$(loginn)\"/>";
echo "</go></anchor></small><br/>";
break;
case 'profiledit':
$logi=$_POST['logi'];
$text = @file("../data/reg/$logi.dat");
$udata = explode(":||:",$text[0]);
$aden=trim($udata[8]);
$exp=trim($udata[19]);
$pol=trim($udata[2]);
$lvl=trim($udata[9]);
$sp=trim($udata[31]);
$lovk=trim($udata[3]);
$profa=trim($udata[33]);
$email=trim($udata[18]);
$met=trim($udata[4]);
$hp=trim($udata[16]);
$mp=trim($udata[29]);
$paty=trim($udata[25]);
$clan=trim($udata[23]);
$ignor=trim($udata[36]);
$klass=trim($udata[27]);
$rassa=trim($udata[26]);
echo "<small>Уровень:</small><br/>";
echo "<input name=\"lvl$ref\" maxlength=\"100\" value=\"$lvl\"/><br/>";
echo "<small>Деньги:</small><br/>";
echo "<input name=\"aden$ref\" maxlength=\"10\" value=\"$aden\"/><br/>";
echo "<small>Опыт:</small><br/>";
echo "<input name=\"exp$ref\" maxlength=\"10\" value=\"$exp\"/><br/>";
echo "<small>SP:</small><br/>";
echo "<input name=\"sp$ref\" maxlength=\"100\" value=\"$sp\"/><br/>";
echo "<small>Ловкость:</small><br/>";
echo "<input name=\"lovk$ref\" maxlength=\"100\" value=\"$lovk\"/><br/>";
echo "<small>Меткость:</small><br/>";
echo "<input name=\"met$ref\" maxlength=\"100\" value=\"$met\"/><br/>";
echo "<small>HP:</small><br/>";
echo "<input name=\"hp$ref\" maxlength=\"100\" value=\"$hp\"/><br/>";
echo "<small>MP:</small><br/>";
echo "<input name=\"mp$ref\" maxlength=\"100\" value=\"$mp\"/><br/>";
echo "<small>Мыло:</small><br/>";
echo "<input name=\"email$ref\" maxlength=\"100\" value=\"$email\"/><br/>";
echo "<small>Профа:</small><br/>";
echo "<input name=\"profa$ref\" maxlength=\"100\" value=\"$profa\"/><br/>";
echo "<small>Пати:</small><br/>";
echo "<input name=\"paty$ref\" maxlength=\"100\" value=\"$paty\"/><br/>";
echo "<small>Клан:</small><br/>";
echo "<input name=\"clan$ref\" maxlength=\"100\" value=\"$clan\"/><br/>";
echo "<small>Пол (Ж,M(англ):</small><br/>";
echo "<input name=\"pol$ref\" maxlength=\"100\" value=\"$pol\"/><br/>";
echo "<small>Класс (wizard,fighert):</small><br/>";
echo "<input name=\"klass$ref\" maxlength=\"100\" value=\"$klass\"/><br/>";
echo "<small>Расса (elf,darkelf,gnom,human,orc):</small><br/>";
echo "<input name=\"rassa$ref\" maxlength=\"100\" value=\"$rassa\"/><br/>";
echo "<small><anchor title=\"go\">OK<go href=\"gm.php?log=$log&pas=$pas&go=profilsave\" method=\"post\">";
echo "<postfield name=\"lvl\" value=\"$(lvl$ref)\"/>";
echo "<postfield name=\"aden\" value=\"$(aden$ref)\"/>";
echo "<postfield name=\"exp\" value=\"$(exp$ref)\"/>";
echo "<postfield name=\"sp\" value=\"$(sp$ref)\"/>";
echo "<postfield name=\"login\" value=\"$logi\"/>";
echo "<postfield name=\"lovk\" value=\"$(lovk$ref)\"/>";
echo "<postfield name=\"met\" value=\"$(met$ref)\"/>";
echo "<postfield name=\"mp\" value=\"$(mp$ref)\"/>";
echo "<postfield name=\"hp\" value=\"$(hp$ref)\"/>";
echo "<postfield name=\"paty\" value=\"$(paty$ref)\"/>";
echo "<postfield name=\"clan\" value=\"$(clan$ref)\"/>";
echo "<postfield name=\"email\" value=\"$(email$ref)\"/>";
echo "<postfield name=\"profa\" value=\"$(profa$ref)\"/>";
echo "<postfield name=\"pol\" value=\"$(pol$ref)\"/>";
echo "<postfield name=\"klass\" value=\"$(klass$ref)\"/>";
echo "<postfield name=\"rassa\" value=\"$(rassa$ref)\"/>";
echo "</go></anchor></small><br/>";
break;
case 'profilsave':
$login=$_POST['login'];
$fal = @file("../data/reg/$login.dat");
$uda = explode(":||:",$fal[0]);
$uda[2]=$_POST['pol'];
$sp=$_POST['sp'];
$aden=$_POST['aden'];
$lvl=$_POST['lvl'];
$uda[19]=$_POST['exp'];
$uda[3]=$_POST['lovk'];
$uda[4]=$_POST['met'];
$uda[16]=$_POST['hp'];
$uda[29]=$_POST['mp'];
$uda[25]=$_POST['paty'];
$uda[23]=$_POST['clan'];
$uda[36]=$_POST['ignor'];
$uda[18]=$_POST['email'];
$uda[33]=$_POST['profa'];
$uda[27]=$_POST['klass'];
$uda[26]=$_POST['rassa'];
$t=$uda[0].':||:'.$uda[1].':||:'.$uda[2].':||:'.$uda[3].':||:'.$uda[4].':||:'.$uda[5].':||:'.$uda[6].':||:'.$uda[7].':||:'.$aden.':||:'.$lvl.':||:'.$uda[10].':||:'.$uda[11].':||:'.$uda[12].':||:'.$uda[13].':||:'.$uda[14].':||:'.$uda[15].':||:'.$uda[16].':||:'.$uda[17].':||:'.$uda[18].':||:'.$uda[19].':||:'.$uda[20].':||:'.$uda[21].':||:'.$uda[22].':||:'.$uda[23].':||:'.$uda[24].':||:'.$uda[25].':||:'.$uda[26].':||:'.$uda[27].':||:'.$uda[28].':||:'.$uda[29].':||:'.$uda[30].':||:'.$sp.':||:'.$uda[32].':||:'.$uda[33].':||:'.$uda[34].':||:'.$uda[35].':||:'.$uda[36].':||:'.$uda[37].':||:'.$uda[38].':||:'.$uda[39].':||:'.$uda[40].':||:';
$fp=fopen("../data/reg/$login.dat","w");
flock($fp,LOCK_EX);
ftruncate($fp,0);
fputs($fp,"$t");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
echo"Профиль изменен!";
break;
}
}
}else{echo"<small>Пароль или логин неверен!</small>";}
echo "</p></card></wml>";
?>