<?
include 'mysql.php';
include 'inclydings/sesi.php';
Error_Reporting(E_ALL & ~E_NOTICE);
$ref=rand(10,100);

include_once("inclydings/antixak.php");
$_title = 'Lineage2';
include 'inclydings/zag.php';
include 'inclydings/ini.php';
$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
$name = htmlspecialchars(stripslashes($name));
/////////////////////////////////////////////////////
$text = @file("L2dbnam/esql2db/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
include_once("inclydings/sesi.php");
if (isset($user)) {

switch($go) {

default:
if($udata[9]<"0"){
echo"Ты еще ненабрал 500 постов.";
include_once"inclydings/down.php"; exit;}
echo "<form action=\"mystatus.php?$sd&go=savestatus\" method=\"post\">";
echo "Введите Статус:<br/>";
echo "<input name=\"statusus\" maxlength=\"150\"/><br/>";
echo '<input type="submit" value="Изменить"/></form>';
break;
case 'savestatus':
if(!@file("L2dbnam/esql2db/reg/$log.dat")){echo"Такого игрока нет."; include_once"include/down.php"; exit; }

if(@file("L2dbnam/esql2db/reg/$log.dat")){

$text = @file("L2dbnam/esql2db/reg/$log.dat");
$data = explode(":||:",$text[0]);
$nick=$_POST['log'];
$statusus=$_POST['statusus'];
$text=$log.':||:'.$statusus.':||:';
$fp=fopen("L2dbnam/esql2db/mystatus/$log.dat","w");
flock($fp,LOCK_EX);
ftruncate($fp,0);
fputs($fp,"$text");
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);
echo"Вы успешно присвоили себе $log статус:<br/> $statusus"; include_once"inclydings/down.php"; exit; }
echo'Вы можете присвоить статус только себе.<br/>';include_once"inclydings/down.php"; exit;
break;

}

}else{echo"Пароль или ник неверен.Возможно сессия устарела.Попробуйте авторизироваться заново...";}

include_once"inclydings/down.php";
?>
