/*==================================================================*\ ###################################################################### # # # Copyright 2005 Arca Solutions, Inc. All Rights Reserved. # # # # This file may not be redistributed in whole or part. # # eDirectory is licensed on a per-domain basis. # # # # ---------------- eDirectory IS NOT FREE SOFTWARE ----------------- # # # # http://www.edirectory.com | http://www.edirectory.com/license.html # ###################################################################### \*==================================================================*/ # ---------------------------------------------------------------------------------------------------- # * FILE: /order_event.php # ---------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # LOAD CONFIG # ---------------------------------------------------------------------------------------------------- include("./conf/loadconfig.inc.php"); # ---------------------------------------------------------------------------------------------------- # AUX # ---------------------------------------------------------------------------------------------------- extract($_POST); extract($_GET); # ---------------------------------------------------------------------------------------------------- # VALIDATE FEATURE # ---------------------------------------------------------------------------------------------------- if (EVENT_FEATURE != "on") { exit; } $evLevelObj = new EventLevel(); $evLevelValue = $evLevelObj->getValues(); if (!in_array($level, $evLevelValue)) { header("Location: ".DEFAULT_URL."/advertise.php?event"); 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_event = validate_form("event", $_POST, $message_event); $_POST["email"] = $tmpEMAIL; $validate_discount = is_valid_discount_code($_POST["discount_id"], "event", $_POST["id"], $message_discount, $discount_error_num); if($validate_account && $validate_contact && $validate_event && $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"]); $event = new Event($_POST); $event->setNumber("account_id", $account->getNumber("id")); $status = new EventStatus(); $event->setString("status", $status->getDefaultStatus()); $event->setDate("renewal_date", "00/00/0000"); $event->Save(); /**************************************************************************************************/ /* */ /* 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_event_email",$sitemgr_event_email); $sitemgr_event_emails = split(",",$sitemgr_event_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 event in ".DEFAULT_URL."/members/events/view.php?id=".$event->getNumber("id"); system_mail($contact->getString("email"), "[".EDIRECTORY_TITLE."] Signup Notification", $body, EDIRECTORY_TITLE." <$sitemgr_email>"); //////////////////////////////////////////////////////////////////////////////////////////////////// // site manager warning message //////////////////////////////////////////////////////////////////// $sitemgr_msg = "
Select a package | Do you already have an account? |
---|---|
|