Save(); $contact = new Contact($_POST); $contact->setNumber("account_id", $account->getNumber("id")); $contact->Save(); $profileObj = new Profile(sess_getAccountIdFromSession()); $profileObj->setNumber("account_id", $account->getNumber("id")); if (!$profileObj->getString("nickname")) { $profileObj->setString("nickname", $_POST["first_name"]." ".$_POST["last_name"]); } $profileObj->Save(); $accDomain = new Account_Domain($account->getNumber("id"), SELECTED_DOMAIN_ID); $accDomain->Save(); $accDomain->saveOnDomain($account->getNumber("id"), $account, $contact, $profileObj); sess_registerAccountInSession($_POST["username"]); setcookie("username", $_POST['username'], time()+60*60*24*30, "".EDIRECTORY_FOLDER."/members"); /***************************************************** * * E-mail notify * ******************************************************/ setting_get("sitemgr_send_email",$sitemgr_send_email); setting_get("sitemgr_email",$sitemgr_email); $sitemgr_emails = split(",",$sitemgr_email); setting_get("sitemgr_account_email",$sitemgr_account_email); $sitemgr_account_emails = split(",",$sitemgr_account_email); // sending e-mail to user ////////////////////////////////////////////////////////////////////////// // $error = false; // $body = system_showText(LANG_DEAR)." ".$contact->getString("first_name")." ".$contact->getString("last_name").",\n".system_showText(LANG_MSG_THANK_YOU_FOR_SIGNING_UP)." ".EDIRECTORY_TITLE." (".DEFAULT_URL.").\n".system_showText(LANG_MSG_LOGIN_TO_MANAGE_YOUR_ACCOUNT)."\n\n".system_showText(LANG_LABEL_USERNAME).": ".$_POST["username"]."\n".system_showText(LANG_LABEL_PASSWORD).": ".$_POST["password"]."\n\n".system_showText(LANG_MSG_YOU_CAN_SEE).":\n".system_showText(LANG_MSG_YOUR_ACCOUNT_IN)." ".DEFAULT_URL."/members/account/account.php?id=".$account->getNumber("id")."\n"; // system_mail($contact->getString("email"), "[".EDIRECTORY_TITLE."] ".system_showText(LANG_LABEL_SIGNUP_NOTIFICATION), $body, EDIRECTORY_TITLE." <$sitemgr_email>", 'text/plain', '', '', $error); //////////////////////////////////////////////////////////////////////////////////////////////////// // sending e-mail to user ////////////////////////////////////////////////////////////////////////// if ($emailNotificationObj = system_checkEmail(SYSTEM_NEW_PROFILE, $contact->getString("lang"))) { $subject = $emailNotificationObj->getString("subject"); $body = $emailNotificationObj->getString("body"); $body = str_replace("ACCOUNT_USERNAME",$_POST["username"],$body); $body = str_replace("ACCOUNT_PASSWORD",$_POST["password"],$body); $body = str_replace("ACCOUNT_NUMBER",$account->getNumber("id"),$body); $body = system_replaceEmailVariables($body, $account->getNumber("id"), 'account'); $subject = system_replaceEmailVariables($subject, $account->getNumber("id"), 'account'); $body = html_entity_decode($body); $subject = html_entity_decode($subject); system_mail($contact->getString("email"), $subject, $body, EDIRECTORY_TITLE." <$sitemgr_email>", $emailNotificationObj->getString("content_type"), "", $emailNotificationObj->getString("bcc"), $error); } //////////////////////////////////////////////////////////////////////////////////////////////////// // site manager warning message ///////////////////////////////////// $sitemgr_msg = "
Site Manager,

A new account was created in ".EDIRECTORY_TITLE.".
Please review the account information below:

"; $sitemgr_msg .= "Username: ".$account->getString("username")."
"; $sitemgr_msg .= "First Name: ".$contact->getString("first_name")."
"; $sitemgr_msg .= "Last Name: ".$contact->getString("last_name")."
"; $sitemgr_msg .= "Company: ".$contact->getString("company")."
"; $sitemgr_msg .= "Address: ".$contact->getString("address")." ".$contact->getString("address2")."
"; $sitemgr_msg .= "City: ".$contact->getString("city")."
"; $sitemgr_msg .= "State: ".$contact->getString("state")."
"; $sitemgr_msg .= "".string_ucwords(ZIPCODE_LABEL).": ".$contact->getString("zip")."
"; $sitemgr_msg .= "Phone: ".$contact->getString("phone")."
"; $sitemgr_msg .= "Fax: ".$contact->getString("fax")."
"; $sitemgr_msg .= "Email: ".$contact->getString("email")."
"; $sitemgr_msg .= "URL: ".$contact->getString("url")."
"; $sitemgr_msg .= "I agree with the terms of use: ".(($account->getString("agree_tou") ==1) ? "Yes" : "No")."
"; $sitemgr_msg .="
getNumber("id")."\" target=\"_blank\">".DEFAULT_URL."/sitemgr/account/view.php?id=".$account->getNumber("id")."

"; if ($sitemgr_send_email == "on") { if ($sitemgr_emails[0]) { foreach ($sitemgr_emails as $sitemgr_email) { system_mail($sitemgr_email, "[".EDIRECTORY_TITLE."] Account Notification", $sitemgr_msg, EDIRECTORY_TITLE." <$sitemgr_email>", "text/html", '', '', $error); } } } if ($sitemgr_account_emails[0]) { foreach ($sitemgr_account_emails as $sitemgr_account_email) { system_mail($sitemgr_account_email, "[".EDIRECTORY_TITLE."] Account Notification", $sitemgr_msg, EDIRECTORY_TITLE." <$sitemgr_account_email>", "text/html", '', '', $error); } } //////////////////////////////////////////////////////////////////// header("Location: ".SOCIALNETWORK_URL."/"); exit; } else { // removing slashes added if required $_POST = format_magicQuotes($_POST); $_GET = format_magicQuotes($_GET); extract($_POST); extract($_GET); } } # ---------------------------------------------------------------------------------------------------- # SITE CONTENT # ---------------------------------------------------------------------------------------------------- $contentObj = new Content("", EDIR_LANGUAGE); $sitecontentSection = "Profile Page"; $sitecontentinfo = $contentObj->retrieveContentInfoByType($sitecontentSection); if ($sitecontentinfo) { $headertagtitle = $sitecontentinfo["title"]; $headertagdescription = $sitecontentinfo["description"]; $headertagkeywords = $sitecontentinfo["keywords"]; $sitecontent = $sitecontentinfo["content"]; } else { $headertagtitle = ""; $headertagdescription = ""; $headertagkeywords = ""; $sitecontent = ""; } # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- $headertag_title = $headertagtitle; $headertag_description = $headertagdescription; $headertag_keywords = $headertagkeywords; $hide_search = true; include(EDIRECTORY_ROOT."/layout/header.php"); # ---------------------------------------------------------------------------------------------------- # AUX # ---------------------------------------------------------------------------------------------------- require(EDIRECTORY_ROOT."/frontend/checkregbin.php"); # ---------------------------------------------------------------------------------------------------- # BODY # ---------------------------------------------------------------------------------------------------- if (EDIR_THEME) { include(THEMEFILE_DIR."/".EDIR_THEME."/body/profile_add.php"); } else { include(EDIRECTORY_ROOT."/frontend/body/profile_add.php"); } # ---------------------------------------------------------------------------------------------------- # FOOTER # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/layout/footer.php"); ?>