Stahl jsem si tento script mel by vytvaret ucty do jedne hry ale z nejakeho duvodu nefunguje mohl by mi nekdo rict kde je chyba? dekuji
<?
Error_reporting(0);
/* ----------------------------------------------------------------------------------
DarkZero's Account Creator for Helbreath Servers
If you find a bug, have a suggestion for another script,
or need to contact me, please contact me one of the following ways:
Email: dz@suckas.net
AIM: DarkZeroPU
ICQ: 157544686
IRC: irc.hbportal.net #h2 #hbredemption
-------------------------------------------------------------------------------------
This file may be distributed freely as long as this part of the code is left intact.
I do not demand it, but please give me credit if you decide to use my script. No, it's
not that good but it did take a long time to make.
Everything herein is Copyright Brian Seeders 2003
-------------------------------------------------------------------------------------
The only thing you need to do is insert your character directory into the line
below (leave off the \ at the end)
Make sure to use double \'s
-------------------------------------------------------------------------------------
Release Notes:
August 30, 2003: First release
In the next release:
-Suggestions Needed-
---------------Edit this----------------*/
$dir = 'C:\\HBSERVER\\Account';
/*--------------------------------------*/
if(!$_POST){
echo '<form action='.$_SERVER['PHP_SELF'].' method=post>
Account-Name:
<input name=account type=text maxlength=10>
<br>
Password:
<input name=password type=password maxlength=10>
<br>
Password(Again):
<input name=confirm type=password maxlength=10>
<br>
E-Mail:
<input name=email type=text>
<br>
Security Question:
<input name=question type=text>
<br>
Answer:
<input name=answer type=text>
</font>
<br>
<input name=submit type=submit value=Submit>
<p>
Abuse of this system will result in deletion of accounts,characters, and permanent ban.</p>
';
}
else{
$account = $_POST['account'];
$confirm = $_POST['confirm'];
$date = date('F d, Y g:i A');
$password = $_POST['password'];
$email = $_POST['email'];
$question = $_POST['question'];
$answer = $_POST['answer'];
$ip = $_SERVER['REMOTE_ADDR'];
$firstletter = substr($account, 0, 1);
$ascii = ord($firstletter);
$filename = $dir . '\\ASCII'.$ascii.'\\'.$account.'.txt';
$lines = file('accountlog.txt');
foreach($lines as $b){
if(trim($b) == $ip){ $ipflag=TRUE; }
}
if($ipflag){ echo 'Account creation failed. You\'ve already registed an account.'; }
else{
if($account == '') { echo 'Account creation failed. Please fill out all fields.'; }
elseif(file_exists($filename)) { echo 'Account creation failed. Account name already exists.';}
elseif($email == '') { echo 'Account creation failed. Please fill out all fields.';}
elseif(!ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$", $email)){ echo 'Account Creation Failed. Please enter a valid E-Mail.'; }
elseif($password != $confirm) { echo '<body bgcolor=#666666 text=#CCCCCC link=#000000><font face=Arial, Helvetica, sans-serif><i>Account creation failed. Password does not match confirmation password.';}
else{
$fp = fopen($filename, 'w+');
$string = 'Account Created: '.$date.' With the IP: '.$ip.'
[NAME]
account-name = '.$account.'
[PASSWORD]
account-password = '.$password.'
[ACCOUNT-STATUS]
account-valid-time = 0
account-valid-date = 2003 4 5
account-change-password = 2003 3 29
[ETC]
account-Gender = Male
account-Age =
account-Birth-Year = xxxx
account-Birth-Month = xx
account-Birth-Day = xx
account-RealName = a
account-SSN = aaaaa
account-Email = '.$email.'
account-Quiz = '.$question.'
account-Answer = '.$answer.'
account-created-by = DarkZero\'s Account Generator';
$write = fputs($fp, $string);
fclose($fp);
$moo = fopen('accountlog.txt', 'a');
fwrite($moo, ''.$ip.'
');
fclose($moo);
echo 'Account created successfully, you may now login.';
}
}
}
?>
Mě to script funguje, musíš si vytvořit na disku adresář HBSERVER nebo nějaký jiný, ale to si musíš přepsat v této části scripu, je to hned na začátku scriptu! Tam se to potom ukládá Account.txt soubory, když to dáš na server, tak musíš udělat relativní adresář a povolit práva pro zápis do adresáře.
---------------Edit this----------------*/
$dir = 'C:\\HBSERVER\\Account';
/*--------------------------------------*/