Размер файла: 1.35Kb
<?
if(QUERY_STRING=="logged");
$logged=0;
session_start();
include"params.php";
if ($epass == $pass and $elog == $log)
$logged=1;
else
{
$logged=0;
print "<font face=\"Verdana\" size=\"1\" color=\"#000000\">Доступ невозможен!</font><BR>";
}
if($logged==1)
{
print"
<form action=admin.php?do=logandpass method=post>
<input type=hidden name=seenform value=y>
Новый пароль:<BR>
<input name='ppassword' type=text><BR>
Новый логин:<BR>
<input name='llogin' type=text value=$log><BR>
<input type=submit value=Изменить!>";
if ($seenform == y and $ppassword!="" and $logged==1 and $llogin!="")
{
$fo = fopen("params.php", "w");
$update = "<?\r\n";
$update.="\$nums = \"$nums\";\r\n";
$update.="\$pass = \"$ppassword\";\r\n";
$update.="\$log = \"$llogin\";\r\n";
$update.="\$maxforname = \"$maxforname\";\r\n";
$update.="\$maxformail = \"$maxformail\";\r\n";
$update.="\$maxforicq = \"$maxforicq\";\r\n";
$update.="\$maxfordesc = \"$maxfordesc\";\r\n";
$update.="\$maxfortitle = \"$maxfortitle\";\r\n";
$update.="\$maxforurl = \"$maxforurl\";\r\n";
$update.="\$maxformsg = \"$maxformsg\";\r\n";
$update.="\$maxforword = \"$maxforword\";\r\n";
$update.="?>";
fputs($fo, $update);
fclose($fo);
session_destroy();
print "<meta http-equiv=refresh content='0; url=login.php'>";
}
}
?>