getNumber("id") || ($listingObject->getNumber("id") <= 0)) { header("Location: ".LISTING_DEFAULT_URL."/"); exit; } if ($listingObject->getNumber("account_id")) { header("Location: ".LISTING_DEFAULT_URL."/"); exit; } if ($listingObject->getString("claim_disable") != "n") { header("Location: ".LISTING_DEFAULT_URL."/"); exit; } # ---------------------------------------------------------------------------------------------------- # SUBMIT # ---------------------------------------------------------------------------------------------------- if (($_SERVER['REQUEST_METHOD'] == "POST")) { $request_method_seckey = "post"; include(EDIRECTORY_ROOT."/includes/code/seckey.php"); $validate_account = validate_addAccount($_POST, $message_account); $validate_contact = validate_form("contact", $_POST, $message_contact); if ($boolean_seckey && $validate_account && $validate_contact) { $account = new Account($_POST); $account->save(); $contact = new Contact($_POST); $contact->setNumber("account_id", $account->getNumber("id")); $contact->save(); /**************************************************************************************************/ /* */ /* E-mail notify */ /* */ /**************************************************************************************************/ setting_get("sitemgr_send_email",$sitemgr_send_email); setting_get("sitemgr_email",$sitemgr_email); $sitemgr_emails = split(",",$sitemgr_email); if ($sitemgr_emails[0]) $sitemgr_email = $sitemgr_emails[0]; setting_get("sitemgr_account_email",$sitemgr_account_email); $sitemgr_account_emails = split(",",$sitemgr_account_email); // sending e-mail to user ////////////////////////////////////////////////////////////////////////// if ($emailNotificationObj = system_checkEmail(SYSTEM_CLAIM_SIGNUP, $contact->getString("lang"))) { $subject = $emailNotificationObj->getString("subject"); $body = $emailNotificationObj->getString("body"); $body = str_replace("ACCOUNT_NAME",$contact->getString("first_name").' '.$contact->getString("last_name"),$body); $body = str_replace("ACCOUNT_USERNAME",$_POST["username"],$body); $body = str_replace("ACCOUNT_PASSWORD",$_POST["password"],$body); $body = system_replaceEmailVariables($body, $listingObject->getNumber('id'), 'listing'); $subject = system_replaceEmailVariables($subject, $listingObject->getNumber('id'), 'listing'); if ($emailNotificationObj->getString("content_type") == "text/html"); $body = html_entity_decode($body); system_mail($contact->getString("email"), $subject, $body, EDIRECTORY_TITLE." <$sitemgr_email>", $emailNotificationObj->getString("content_type"), "", $emailNotificationObj->getString("bcc")); } //////////////////////////////////////////////////////////////////////////////////////////////////// // site manager warning message //////////////////////////////////////////////////////////////////// $sitemgr_msg = "
Site Manager,

New signup claim in ".EDIRECTORY_TITLE.".

Account:

"; $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 .= "Town: ".$contact->getString("city")."
"; $sitemgr_msg .= "County: ".$contact->getString("state")."
"; $sitemgr_msg .= "".ucwords(ZIPCODE_LABEL).": ".$contact->getString("zip")."
"; $sitemgr_msg .= "Country: ".$contact->getString("country")."
"; $sitemgr_msg .= "Phone: ".$contact->getString("phone")."
"; $sitemgr_msg .= "E-mail: ".$contact->getString("email")."
"; $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."] Signup Claim Notification", $sitemgr_msg, EDIRECTORY_TITLE." <$sitemgr_email>", "text/html"); } } } if ($sitemgr_account_emails[0]) { foreach ($sitemgr_account_emails as $sitemgr_account_email) { system_mail($sitemgr_account_email, "[".EDIRECTORY_TITLE."] Signup Claim Notification", $sitemgr_msg, EDIRECTORY_TITLE." <$sitemgr_account_email>", "text/html"); } } //////////////////////////////////////////////////////////////////////////////////////////////////// sess_registerAccountInSession($account->getString("username")); setcookie("username", $account->getString("username"), time()+60*60*24*30, "".EDIRECTORY_FOLDER."/members"); header("Location: ".DEFAULT_URL."/members/claim/getlisting.php?claimlistingid=".$claimlistingid); exit; } else { // removing slashes added if required $_POST = format_magicQuotes($_POST); $_GET = format_magicQuotes($_GET); extract($_POST); extract($_GET); } } # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- $extrastyle = array(DEFAULT_URL."/layout/general_order.css", DEFAULT_URL."/layout/listing_result.css"); $headertag_title = $listingObject->getString("title")." - ".system_showText(LANG_LISTING_CLAIMTHIS); $headertag_description = $listingObject->getString("description"); $headertag_keywords = str_replace(" || ", ", ", $listingObject->getString("keywords")); include(EDIRECTORY_ROOT."/layout/header.php"); ?>