"; } if(trim($accountname)=="") $message = ", \"$lang[MSG_USERNAME]\""; elseif(!eregi("^[a-z0-9\_\-\.]+$", $accountname)) $message2 .= $lang[MSG_INCORECTUNAME]."
"; if ($password == "") $message .= ", \"$lang[MSG_PASSWORD]\""; if ($passwordconfirm == "") $message .= ", \"$lang[MSG_PASSWORD_CONFIRM]\""; if (!$integrate && $email == "") $message .= ", \"$lang[MSG_EMAILADDR]\""; if ($message2.$message !== "") { $message = $message2.($message?$emptyfields["MESSAGE"] . substr($message, 2, strlen($message) - 2):''); $skindata['message'] = showmessage($message,'','', true, $showmessage_errorcolor, true); include_once("self.html"); die(); } if ($ddomain) $accountname = "$ddomain/$accountname"; $account["USER"] = $accountname; $accountpass = $password; if ($password <> $passwordconfirm) { $skindata['message'] = showmessage($passwordnotconfirmed,'','', true, $showmessage_errorcolor, true); include_once("self.html"); die(); } $account["PASS"] = $accountpass; if ($integrate) { $add = ""; list($fdomain, $username) = explode("/", $accountname); if (!$username) { list($fdomain) = explode(";", $domain); $username = $accountname; } if (!strpos($username, "@")) $add = "@" . $fdomain; $account["EMAIL"] = $username . $add; $account["HOSTUSER"] = $accountname; $account["HOSTPASS"] = $accountpass; $account["HOST"] = $mailserver; } else { $account["EMAIL"] = $email; $account["HOSTUSER"] = $hostuser; $account["HOSTPASS"] = $hostpass; $account["HOST"] = $host?$host:$mailserver; } $account["DELETE"] = !($dleavemessages); $account["DELETESERVER"] = $otherconfig["DELETEMESSAGES"]; $account["UIDLDELETE"] = $otherconfig["DELETEDELETED"]; $account["FULLNAME"] = $fullname; $account["ADMIN"] = false; $account["REPLYTO"] = ""; $account["FULLHEADER"] = ""; $account["MULTI"] = ""; $account["ATTACH"] = ""; $account["ALTEMAIL"] = $altemail; if (getnewaccountid($accounts, $account["USER"])) $accounts[] = $account; else { $skindata['message'] = showmessage($alreadyexists,'','', true, $showmessage_errorcolor, true); include_once("self.html"); exit; } if (!$integrate) { saveaccounts($accounts); $username = $accountname; $password = $accountpass; $accountcreated = true; include_once("index.html"); } else { if ($otherconfig["FULLMERAK"]) { include_once("integrateinclude.html"); $xdomain = ""; if ($fdomain) $xdomain = "@" . $fdomain; $result = integrateadduser($username . $xdomain, $fullname, $accountpass); } if (!$result) { $nocreateuser = true; include_once("self.html"); die(); } else { // Alternate Email if($altemail) { mkdirtree(usersdir . $account["USER"]); saveuserconfig($account["USER"], $account); } if (!$otherconfig["FULLMERAK"]) saveaccounts($accounts); $accountcreated = true; if($otherconfig[SENDCREATE] && $otherconfig[SENDCREATEMAIL]) { $from= getemail($otherconfig[SENDCREATEMAIL]); $to2[]=$from; include_once("smtppop3.html"); if ($smtphost) $smtp = new smtp($smtphost, $smtpport, $connected); $ncdate= Date("D, d M Y H:i:s"); $body= sprintf (newaccountmail,$account["EMAIL"],$ncdate); $message = "Date: $ncdate +0100\r\n"; $message .= "From: $from\r\n"; $message .= "To: $from\r\n"; $message .= "Subject: " . putheader($body) . "\r\n"; $message .= "Message-ID: <" . md5(uniqid("")) . strstr($otherconfig[SENDCREATEMAIL],"@"). ">\r\n"; $message .= "X-Mailer: " . webmail . "\r\n"; $message .= "X-Originating-IP: " . $REMOTE_ADDR . "\r\n"; $message .= "\r\n"; $message.= dotconvert($body); $smtp->smtpmail($from, $to2, $message); $smtp->status["LASTRESULTTXT"]; $smtp->close(); $smtp = null; } include_once("index.html"); } } ?>