$error[]=_("Your passwords are not the same, or contains special characters (unicode and accents authorized though), please try again");
}
if(count($error)==0){
sleep(5);// Let create some artificial waiting for the one who want to create many accounts ...
// Try to create the account.
$already=@mysql_fetch_assoc(mysql_query("SELECT id FROM accounts WHERE jabberid='".addslashes($_POST["login"]."@$domain")."';"));
if($already){
$error[]=_("This account already exist, or is disabled. You can't create that login now, please find another one!");
}
if(count($error)==0){
mysql_query("INSERT INTO accounts SET jabberid='".addslashes($_POST["login"]."@$domain")."', createdate=NOW(), email='".hashmail(trim($_POST["email"]))."', ack=0;");
// Connect to the telnet console of prosody.
$f=fsockopen("localhost",5582,$errno,$errstr,5);
if(!$f){
$error[]=_("Can't connect to jabber server");
mysql_query("DELETE FROM accounts WHERE jabberid='".addslashes($_POST["login"]."@$domain")."';");
<li><?php__("Any account unused for 6 months will be disabled, and this login will not be allowed as registration for 6 more months. During that time, you will be allowed to recover that account if we have an email address for this account. After that, any disabled account will be permanently destroyed and the login will be available again for other users");?></li>
<li><?php__("We don't store your password or email in cleartext, but only a hashed version. We don't verify your email address, so write it down properly. We will only use it to send you a recover link if you lose your password.");?></li>
$error[]=_("Your passwords are not the same, or contains special characters (unicode and accents authorized though), please try again");
}
if(count($error)==0){
sleep(5);// Let create some artificial waiting for the one who want to create many accounts ...
// Try to create the account.
$already=@mysql_fetch_assoc(mysql_query("SELECT id FROM accounts WHERE jabberid='".addslashes($_POST["login"]."@".$domain)."';"));
if($already){
$error[]=_("This account already exist, or is disabled. You can't create that login now, please find another one!");
}
if(count($error)==0){
mysql_query("INSERT INTO accounts SET jabberid='".addslashes($_POST["login"]."@".$domain)."', createdate=NOW(), email='".hashmail(trim($_POST["email"]))."', ack=0;");
// Connect to the telnet console of prosody.
$f=fsockopen("localhost",5582,$errno,$errstr,5);
if(!$f){
$error[]=_("Can't connect to jabber server");
mysql_query("DELETE FROM accounts WHERE jabberid='".addslashes($_POST["login"]."@".$domain)."';");
$error[]=_("The login must be between 3 and 80 characters long, and must not contains special characters (unicode and accents authorized though)");
}
if(count($error)==0){
sleep(5);// Let create some artificial waiting for the one who want to restore many accounts ...
// Does it exist?
$already=@mysql_fetch_assoc(mysql_query("SELECT id FROM accounts WHERE jabberid='".addslashes($_POST["login"]."@jabber.lqdn.fr")."';"));
if(!$already){
$error[]=sprintf(_("This account doesn't exist, or have been permanently destroyed. <a href=\"%s\">Click here to create a new account with this login</a>."),"create.php");
$error[]=_("The login must be between 3 and 80 characters long, and must not contains special characters (unicode and accents authorized though)");
}
if(count($error)==0){
sleep(5);// Let create some artificial waiting for the one who want to restore many accounts ...
// Try to create the account.
$already=@mysql_fetch_assoc(mysql_query("SELECT id FROM accounts WHERE jabberid='".addslashes($_POST["login"]."@jabber.lqdn.fr")."';"));
if(!$already){
$error[]=_("This account doesn't exist, or have been permanently destroyed. You can't restore that login now. You'd better create a new account altogether");