<?PHP
$filename = "
http://geffenweb.dyndns.org/POL/data/account.txt"; $fd = @fopen("$filename", "r");
if ($fd)
{
$inline = file($filename);
$number_of_lines = count($inline);
$nr = -1;
fclose($fd);
for($x = 0; $x <= $number_of_lines ;$x++)
{
$nr++;
$x = $x + 2;
$name[$nr] = $inline[$x];
$x = $x + 1;
$pass[$nr] = $inline[$x];
$x = $x + 1;
$enabled[$nr] = $inline[$x];
$x = $x + 1;
$banned[$nr] = $inline[$x];
$x = $x + 1;
$staffs[$nr] = $inline[$x];
$x = $x + 1;
$email[$nr] = $inline[$x];
$x = $x + 1;
$emailvis[$nr] = $inline[$x];
$x = $x + 1;
$news[$nr] = $inline[$x];
$x = $x + 1;
$activate[$nr] = $inline[$x];
$x = $x + 2;
};
$nummer = 0;
$fejl = "okay";
for($nummer = 0; $nummer <= $nr ;$nummer++)
{
$namer = explode(chr(9),$name[$nummer]);
$passer = explode(chr(9),$pass[$nummer]);
$enabler = explode(chr(9),$enabled[$nummer]);
$banner = explode(chr(9),$banned[$nummer]);
$staffer = explode(chr(9),$staffs[$nummer]);
$emailer = explode(chr(9),$email[$nummer]);
$emailviser = explode(chr(9),$emailvis[$nummer]);
$newser = explode(chr(9),$news[$nummer]);
$activater = explode(chr(9),$activate[$nummer]);
if($first=="Thefirst")
{
$accounting .= "\n";
};
$enabling = trim($enabler[2]);
if(strtolower(trim($emailer[2]))==strtolower(trim($emailaddress)))
{
if(strtolower(trim($activater[2]))==strtolower(trim($activation)))
{
$enabling = "1";
}
else
{
$fejl = "true";
};
}
$accounting .= "Account
{
Name ".trim($namer[2])."
Password ".trim($passer[2])."
Enabled ".$enabling."
Banned ".trim($banner[2])."
//Staffs ".trim($staffer[2])."
//E-mail ".trim($emailer[2])."
//E-mailvis ".trim($emailviser[2])."
//Newsletter ".trim($newser[2])."
//activation ".trim($activater[2])."
}
";
$first = "Thefirst";
};
if($fejl=="okay")
{
$filename = "
http://geffenweb.dyndns.org/writeit/writeit.php4?mode=w&txt=".urlencode($accounting);
$fd = fopen($filename, "r");
fclose($fd);
echo $accounting;
}
else
{
echo 'fejl';
};
}
else
{
echo 'unknown error';
};
?>