its the following script that does this problem:
<?PHP
function sitehead()
{
$head = 'ACCOUNT CREATOR';
require('./menu.php4');
};
function sitetext()
{
echo 'To create an account fill out all the info below, when that is done you will in a e-mail recive a password to <a href="activate.php4">enable</a> your account.';
};
function siteform()
{
?>
<form method="post" enctype="multipart/form-data" action="<? echo $PHP_SELF ?>">
<font face='GothicE' color='#909291' size='3'>Account name:</font><br>
<input type="text" name="bruger" size="16" value="" maxlength="15"><br>
<font face='GothicE' color='#909291' size='3'>Password and confirmation: </font><br>
<input type="password" name="kodeord" value="" size="16" maxlength="14">
<input type="password" name="kodeord2" value="" size="16" maxlength="14"><br>
<font face='GothicE' color='#909291' size='3'>E-mail:</font><br>
<input type="text" name="epost" value="" size="38"><br><br>
<input checked type='checkbox' name='epostvis' value='1'>
<font face='GothicE' color='#909291' size='3'>Allow others to see my e-mail when I post in the forum.</font><br><br>
<input checked type='checkbox' name='nyhedsbrev' value='1'>
<font face='GothicE' color='#909291' size='3'>I wish to receive the KotoC Newsletter.</font><br><br>
<input type="submit" value="Add account" Class='Submitknap'>
</form>
<?
}
function sitefooter()
{
require('./bottom.php4');
};
function user_account($username,$password,$enabled,$banned,$cmdlevel,$emailaddress,$emailvis,$newsletter)
{
$accepted = false;
$usraccept = null;
$filename = "
http://geffenweb.dyndns.org/blahblah/account.txt"; $fd = @fopen("$filename", "r");
if ($fd)
{
$inline = file($filename);
$number_of_lines = count($inline);
$nr = -1;
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;
$enable[$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;
$activation[$nr] = $inline[$x];
$x = $x + 2;
};
$mail = false;
$accountname = false;
$nummer = 0;
for($nummer = 0; $nummer <= $nr ;$nummer++)
{
$emailer = explode(chr(9),$email[$nummer]);
$usser = explode(chr(9),$name[$nummer]);
if (strtolower(trim($usser[2]))==strtolower(trim($username)))
{
$accountname = true;
}
if (strtolower(trim($emailer[2]))==strtolower(trim($emailaddress)))
{
$mail = true;
}
}
}
if($mail==true)
{
sitehead();
echo 'You already got an account';
siteform();
sitefooter();
}
elseif ($accountname==true)
{
sitehead();
echo 'Account name is already in use, select another.';
siteform();
sitefooter();
}
else
{
$enabled = "0";
$banned = "0";
$cmdlevel = "0";
if($emailvis!=="")
{
$emailvis = "0";
};
if($newsletter!=="")
{
$newsletter = "0";
};
$activation = RAND(111,999)*RAND(111,999)*RAND(111,999);
$subject = "You KotoC account.";
$message = '
<html>
<head>
<title>You KotoC account</title>
</head>
<body>
Greetings<br>
<br>
Thank you for joining the KotoC Shard, your account has been created and its now time to activate it.<br>
Click here to activate your account: <a href="
http://geffenweb.dyndns.org/myweb/New/activate.php4?activation='.$activation.'&emailaddress='.$emailaddress.'">Activate me</a><br>
Your activation code is: '.$activation.'<br>
<br>
Best regards<br>
KotoC<br>
<a href="mailto:KotoCShard@Hotmail.com">KotoCShard@Hotmail.com</a><br>
<a href="
http://www.GeffenWeb.dk/kotoc/">http://www.geffenweb.dk/kotoc/</a> </body>
</html>
';
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: The KotoC Shard<KotoCShard@hotmail.com>\r\nReply-to: KotoCShard@hotmail.com\r\n";
$headers .= "Error-to: KotoCShard@hotmail.com\r\n";
if(mail("$emailaddress", "$subject", "$message", "$headers")==true)
{
$accounting = "
Account
{
Name ".$username."
Password ".$password."
Enabled ".$enabled."
Banned ".$banned."
//Staffs ".$cmdlevel."
//E-mail ".$emailaddress."
//E-mailvis ".$emailvis."
//Newsletter ".$newsletter."
//Activation ".$activation."
}
";
$filename = "
http://geffenweb.dyndns.org/blahblah/writeit.php4?mode=aa&txt=".urlencode($accounting);
$fd = fopen($filename, "r");
fclose($fd);
sitehead();
echo 'your account has been created, you will recieve a mail with the activation code...' . $mailtjek;
sitefooter();
}
else
{
sitehead();
echo 'There has ercurd an error trying to sent the e-mail, please type a valid e-mail address' . $mailtjek;
sitefooter();
};
};
};
if ($bruger!=null)
{
if ($kodeord!=null)
{
if ($kodeord == $kodeord2)
{
if ($epost!=null)
{
user_account($bruger,$kodeord,$aktiv,$bortvis,$cmd,$epost,$epostvis,$nyhedsbrev);
}
else
{
sitehead();
echo 'You forgot to type a email.';
siteform();
sitefooter();
};
}
else
{
sitehead();
echo 'Your two passwords is not alike.';
siteform();
sitefooter();
};
}
else
{
sitehead();
echo 'You forgot to type your password.';
siteform();
sitefooter();
};
}
else
{
sitehead();
sitetext();
siteform();
sitefooter();
};
?>