Please, insert your name."; if (!validate_email($to)) $error .= "
  • Please, insert a valid email address.
  • "; if (!validate_email($from)) $error .= "
  • Please, insert a valid email address.
  • "; if (!$body) $error .= "
  • Please type an additional message.
  • "; if (md5($_POST["captchatext"]) != $_SESSION["captchakey"]) { $error .= "
  • Please type the code correctly!"; } if (empty($error)) { $body .= "\nSent by ". $name; if (empty($subject)) $subject = "About ".$listing->getString("title")." from the ".EDIRECTORY_TITLE; $subject = stripslashes($subject); $body = stripslashes($body); $subject = "[Message sent through ".EDIRECTORY_TITLE."] ".$subject; $return = system_mail($from, $to, "", "", $subject, $body); if ($return) $error = "Your email has been sent. Thank you."; else $error = "
  • There was a problem sending this email. Please try again."; if($return){ // Loging the e-mail sent. $ip = getenv("REMOTE_ADDR"); $objReports = new Reports(); $objReports->setString("listing_id", $_POST["id"]); $objReports->setString("report_type", LISTING_REPORT_EMAIL_SENT); $objReports->setString("ip", $ip); $objReports->Save(); unset($from, $subject, $body); } } } # ---------------------------------------------------------------------------------------------------- # LISTING # ---------------------------------------------------------------------------------------------------- if (($_GET["id"]) || ($_POST["id"])) { $id = $_GET["id"] ? $_GET["id"] : $_POST["id"]; $listing = new Listing($id); $level = new Level(); unset($listingMsg); if ((!$listing->getNumber("id")) || ($listing->getNumber("id") <= 0)) { $listingMsg = "Listing not found!"; } elseif ($listing->getString("status") != "A") { $listingMsg = "Listing not available!"; } elseif ($level->getDetail($listing->getNumber("level")) != "y") { $listingMsg = "Listing not available!"; } else { // Loging the access. $objReports = new Reports(); $objReports->setString("listing_id", $id); $objReports->setString("report_type", LISTING_REPORT_DETAIL_VIEW); $objReports->setString("ip", getenv("REMOTE_ADDR")); $objReports->Save(); } } else { header("Location: /index.php"); exit; } # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- if (($listing->getNumber("id")) && ($listing->getNumber("id") > 0)) { $listCategs = $listing->getCategories(); if ($listCategs) { foreach ($listCategs as $listCateg) { $category_id[] = $listCateg->getNumber("id"); } } } $_POST["category_id"] = $category_id; $extrastyle = array(DEFAULT_URL."/layout/listing_detail.css", DEFAULT_URL."/layout/listing_color.css"); $banner_section = "listing"; $headertag_title = $listing->getString("title", true); if (empty($subject)) $subject = "About ".$listing->getString('title')." from the ".EDIRECTORY_TITLE; if (empty($body)) $body = "I would like more information regarding ".$listing->getString('title'); include(EDIRECTORY_ROOT."/layout/header.php"); ?>



    « Back to Search */ ?> getNumber("level").".inc"); } else { echo "

    ".$listingMsg."

    "; } ?>