/*==================================================================*\ ###################################################################### # eDirectory 4.0.1 - Licence Number L62338e2 # # ------------------------------------------------------------------ # # Copyright 2005 Arca Solutions, Inc. All Rights Reserved. # # # # This file may not be redistributed in whole or part. # # # # ---------------- eDirectory IS NOT FREE SOFTWARE ----------------- # # # # http://www.edirectory.com | http://www.edirectory.com/license.html # ###################################################################### \*==================================================================*/ # ---------------------------------------------------------------------------------------------------- # * FILE: /conf/preconfig.inc.php # ---------------------------------------------------------------------------------------------------- error_reporting(E_ALL ^ E_NOTICE); # ---------------------------------------------------------------------------------------------------- # SUPPORT HTACCESS # ---------------------------------------------------------------------------------------------------- define(SUPPORT_HTACCESS, true); # ---------------------------------------------------------------------------------------------------- # INCLUDE GENERAL CONFIG # ---------------------------------------------------------------------------------------------------- include("config.inc.php"); ?> /*==================================================================*\ ###################################################################### # eDirectory 4.0.1 - Licence Number L62338e2 # # ------------------------------------------------------------------ # # Copyright 2005 Arca Solutions, Inc. All Rights Reserved. # # # # This file may not be redistributed in whole or part. # # # # ---------------- eDirectory IS NOT FREE SOFTWARE ----------------- # # # # http://www.edirectory.com | http://www.edirectory.com/license.html # ###################################################################### \*==================================================================*/ # ---------------------------------------------------------------------------------------------------- # * FILE: /contactus.php # ---------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # LOAD CONFIG # ---------------------------------------------------------------------------------------------------- include("./conf/loadconfig.inc.php"); # ---------------------------------------------------------------------------------------------------- # SESSION # ---------------------------------------------------------------------------------------------------- session_start(); # ---------------------------------------------------------------------------------------------------- # AUX # ---------------------------------------------------------------------------------------------------- extract($_GET); extract($_POST); # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/layout/header.php"); ?>
/* LEFT COLUMN */ ?> // BASE JOIN include(INCLUDES_DIR."/views/view_join.php"); ?> if(GOOGLE_ADS_ENABLED == "on") { echo ""; include(INCLUDES_DIR."/code/google_ads.php"); echo " "; } ?>
$contentObj = new Content(); $content = $contentObj->retrieveContentByType("Contact Us"); if ($content) { echo "# ---------------------------------------------------------------------------------------------------- # FOOTER # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/layout/footer.php"); ?>".$content.""; } ?> // Contact Us ///////////////////////////////////////////// if (($send == "Send") && ($_POST)) { $_POST["email"] = stripslashes($_POST["email"]); $_POST["name"] = stripslashes($_POST["name"]); $_POST["title"] = stripslashes($_POST["title"]); $_POST["messageBody"] = stripslashes($_POST["messageBody"]); $contactusformerror = false; if (md5($_POST["captchatext"]) != $_SESSION["captchakey"]) { $captchaerror = true; } $emailerror = false; if (!validate_email($_POST["email"])) { $emailerror = true; } $fieldserror = false; $email = urldecode($_POST["email"]); $subject = urldecode($_POST["title"]); $name = urldecode($_POST["name"]); if ( ((strpos($email, "\n") !== false) || (strpos($email, "\r") !== false)) || ((strpos($subject, "\n") !== false) || (strpos($subject, "\r") !== false)) || ((strpos($name, "\n") !== false) || (strpos($name, "\r") !== false)) || !($_POST["email"]) || !($_POST["messageBody"]) || !($_POST["name"]) ){ $fieldserror = true; } if (!$fieldserror && !$captchaerror && !$emailerror) { $from_email = $_POST["email"]; $from_name = $_POST["name"]; $subject = $_POST["title"]; $messageBody = $_POST["messageBody"]; $messageBody = str_replace("\r\n", "\n", $messageBody); $messageBody = str_replace("\n", "\r\n", $messageBody); setting_get("sitemgr_email", $sitemgr_email); $sitemgr_emails = split(",", $sitemgr_email); setting_get("sitemgr_contactus_email", $sitemgr_contactus_email); $sitemgr_contactus_emails = split(",", $sitemgr_contactus_email); if ($sitemgr_contactus_emails[0]) { foreach ($sitemgr_contactus_emails as $sitemgr_contactus_email) { system_mail("$from_name <$from_email>", $sitemgr_contactus_email, "", "", "[Message sent through ".EDIRECTORY_TITLE." - Contact Us] ".stripslashes($subject), stripslashes($messageBody), "text/html"); } } elseif ($sitemgr_emails[0]) { foreach ($sitemgr_emails as $sitemgr_email) { system_mail("$from_name <$from_email>", $sitemgr_email, "", "", "[Message sent through ".EDIRECTORY_TITLE." - Contact Us] ".stripslashes($subject), stripslashes($messageBody), "text/html"); } } $contactus_message = "Message successfully sent !"; unset($_POST["name"], $_POST["email"], $_POST["title"], $_POST["messageBody"]); } else { if ($fieldserror) { $contactus_message .= "Field name or e-mail are empty or contain invalid characters like \" \\n \", \" \\r \" or \" \\r\\n \".
"; } if ($captchaerror) { $contactus_message .= "Please type the code correctly!
"; } if ($emailerror) { $contactus_message .= "Please enter a valid email address!
"; } if ($fieldserror || $captchaerror || $emailerror) { $contactus_message .= "Please correct it and try again."; } } } /////////////////////////////////////////////////////////// ?> if ($contactus_message) { ?>=$contactus_message?>
} ?>