getValues(); if (!in_array($level, $listLevelValue)) { header("Location: ".DEFAULT_URL."/advertise.php?listing"); exit; } # ---------------------------------------------------------------------------------------------------- # SUBMIT # ---------------------------------------------------------------------------------------------------- if (($_SERVER['REQUEST_METHOD'] == "POST")) { $_POST["friendly_url"] = str_replace(".htm", "", $_POST["friendly_url"]); $_POST["friendly_url"] = str_replace(".html", "", $_POST["friendly_url"]); $_POST["friendly_url"] = trim($_POST["friendly_url"]); $validate_account = validate_addAccount($_POST, $message_account); $validate_contact = validate_form("contact", $_POST, $message_contact); $tmpEMAIL = $_POST["email"]; unset($_POST["email"]); $validate_listing = validate_form("listing", $_POST, $message_listing); $_POST["email"] = $tmpEMAIL; $validate_discount = is_valid_discount_code($_POST["discount_id"], "listing", $_POST["id"], $message_discount, $discount_error_num); if ($validate_account && $validate_contact && $validate_listing && $validate_discount) { $account = new Account($_POST); $account->save(); $contact = new Contact($_POST); $contact->setNumber("account_id", $account->getNumber("id")); $contact->save(); unset($_POST["email"]); unset($_POST["phone"]); unset($_POST["address"]); unset($_POST["address2"]); $listing = new Listing($_POST); $listing->setNumber("account_id", $account->getNumber("id")); $status = new Status(); $listing->setString("status", $status->getDefaultStatus()); $listing->setDate("renewal_date", "00/00/0000"); $listing->Save(); $return_categories_array = explode(",", $return_categories); $listing->setCategories($return_categories_array); /**************************************************************************************************/ /* */ /* 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); setting_get("sitemgr_listing_email",$sitemgr_listing_email); $sitemgr_listing_emails = split(",",$sitemgr_listing_email); // sending e-mail to user ////////////////////////////////////////////////////////////////////////// $body = "Dear ".$contact->getString("first_name")." ".$contact->getString("last_name").",\nThank you for signing up for an account in ".EDIRECTORY_TITLE." (".DEFAULT_URL.").\nLogin to manage your account with the username and password below.\n\nUsername: ".$_POST["username"]."\nPassword: ".$_POST["password"]."\n\nYou can see:\nYour account in ".DEFAULT_URL."/members/accounts/account.php?id=".$account->getNumber("id")."\nAnd\nYour listing in ".DEFAULT_URL."/members/listings/view.php?id=".$listing->getNumber("id"); system_mail($contact->getString("email"), "[".EDIRECTORY_TITLE."] Signup Notification", $body, EDIRECTORY_TITLE." <$sitemgr_email>"); //////////////////////////////////////////////////////////////////////////////////////////////////// // site manager warning message //////////////////////////////////////////////////////////////////// $sitemgr_msg = "
Site Manager,

New signup 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 .= "City: ".$contact->getString("city")."
"; $sitemgr_msg .= "State: ".$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/accounts/view.php?id=".$account->getNumber("id")."

"; $sitemgr_msg .= "Listing:

"; $sitemgr_msg .= "Title: ".$listing->getString("title")."
"; $sitemgr_msg .= "
getNumber("id")."\" target=\"_blank\">".DEFAULT_URL."/sitemgr/listings/view.php?id=".$listing->getNumber("id")."

"; if ($sitemgr_send_email == "on") { if ($sitemgr_emails[0]) { foreach ($sitemgr_emails as $sitemgr_email) { system_mail($sitemgr_email, "[".EDIRECTORY_TITLE."] Signup 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 Notification", $sitemgr_msg, EDIRECTORY_TITLE." <$sitemgr_account_email>", "text/html"); } } if ($sitemgr_listing_emails[0]) { foreach ($sitemgr_listing_emails as $sitemgr_listing_email) { system_mail($sitemgr_listing_email, "[".EDIRECTORY_TITLE."] Signup Notification", $sitemgr_msg, EDIRECTORY_TITLE." <".$sitemgr_listing_email.">", "text/html"); } } //////////////////////////////////////////////////////////////////////////////////////////////////// if ($checkout) $payment_method = "checkout"; sess_registerAccountInSession($account->getString("username")); setcookie("username", $account->getString("username"), time()+60*60*24*30, "".EDIRECTORY_FOLDER."/members"); if ($payment_method == "checkout") header("Location: ".DEFAULT_URL."/members/signup/checkout.php"); elseif ($payment_method == "invoice") header("Location: ".DEFAULT_URL."/members/signup/invoice.php"); else header("Location: ".DEFAULT_URL."/members/signup/payment.php?payment_method=".$payment_method); exit; } else { // removing slashes added if required $_POST = format_magicQuotes($_POST); $_GET = format_magicQuotes($_GET); extract($_POST); extract($_GET); } } # ---------------------------------------------------------------------------------------------------- # CODE # ---------------------------------------------------------------------------------------------------- if ($return_categories){ $return_categories_array = explode(",", $return_categories); if ($return_categories_array){ foreach ($return_categories_array as $each_category){ $categories[] = new Category($each_category); } } } $feedDropDown = ""; $listingLevelObj = new Level(); $levelValue = $listingLevelObj->getValues(); $formloginaction = DEFAULT_URL."/members/login.php?destiny=".DEFAULT_URL."/members/listings/listinglevel.php"; # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- $extrastyle = array(DEFAULT_URL."/layout/general_order.css"); include(EDIRECTORY_ROOT."/layout/header.php"); $template_title_field = false; ?>
Select a package Do you already have an account?
Listing Template: getString("status")=="enabled") { $template_title_field = $templateObj->getListingTemplateFields("title"); } } else { $template_title_field = false; } ?>