include "header.inc.php";
include "config.php";
mysql_connect( "$dbhost", "$dbuser", "$dbpass") or die("$wort_konnte_datenbankverbindung_nicht_herstellen");
@mysql_select_db( "$dbname") or die("$wort_datenbank_nicht_gefunden");
if ($_POST['username']!=""&&$_POST['email']!=""&&$_POST['action']=="ja") {
$result=mysql_query("SELECT * from $tableuser where username='$_POST[username]'");
if (mysql_num_rows($result) == 0) {
srand((double)microtime()*1000000);
$newpass = md5(uniqid(rand()));
$pwd=substr($newpass,0,10);
$joint=time();
mysql_query("INSERT INTO $tableuser
(id,username,pwd,email,downloads,death,userlevel,joint,expire,lastlogin,uin)
VALUES ('','$_POST[username]',PASSWORD('$pwd'),'$_POST[email]','0','0','$anfang_level','$joint','','','')");
// Sprache neu includen
include ("lang/$language.lang");
// User Mail #########
mail($_POST['email'], $wort_mail_new_user_notify_subject, $wort_mail_new_user_notify,
"From: $webmaster_email
Content-Type:text/plain");
// Admin Mail ########
mail($webmaster_email, $wort_mail_new_user_notify_subject_admin, $wort_mail_new_user_notify_admin,
"From: $webmaster_email
Content-Type:text/plain");
echo "
| $wort_account_erfolgreich_erstellt! |
";
include "footer.inc.php";
exit;
} else {
echo "| $wort_username_bereits_vergeben! |
";
include "footer.inc.php";
exit;
}
} else {
?>
include "footer.inc.php";
}
?>