/*==================================================================*\ ###################################################################### # # # 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: /promotion/results.php # ---------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # LOAD CONFIG # ---------------------------------------------------------------------------------------------------- include("../conf/loadconfig.inc.php"); # ---------------------------------------------------------------------------------------------------- # MOD-REWRITE (Must be the first include loaded) # ---------------------------------------------------------------------------------------------------- include(PROMOTION_EDIRECTORY_ROOT."/mod_rewrite.php"); # ---------------------------------------------------------------------------------------------------- # VALIDATION # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/includes/code/validate_querystring.php"); # ---------------------------------------------------------------------------------------------------- # SITE CONTENT # ---------------------------------------------------------------------------------------------------- $contentObj = new Content(); $sitecontentinfo = $contentObj->retrieveContentInfoByType("Promotion Results"); if ($sitecontentinfo) { $headertagtitle = $sitecontentinfo["title"]; $headertagdescription = $sitecontentinfo["description"]; $headertagkeywords = $sitecontentinfo["keywords"]; $sitecontent = $sitecontentinfo["content"]; } else { $headertagtitle = ""; $headertagdescription = ""; $headertagkeywords = ""; $sitecontent = ""; } # ---------------------------------------------------------------------------------------------------- # AUX # ---------------------------------------------------------------------------------------------------- $_GET = format_magicQuotes($_GET); extract($_GET); # ---------------------------------------------------------------------------------------------------- # RESULTS # ---------------------------------------------------------------------------------------------------- $search_lock = false; if (PROMOTION_SCALABILITY_OPTIMIZATION == "on") { if (!$_GET["keyword"] && !$_GET["category_id"] && !$_GET["state_id"] && !$_GET["zip"] && !$_GET["id"]) { $_GET["id"] = 0; $search_lock = true; } } unset($searchReturn); $searchReturn = search_frontPromotionSearch($_GET, "promotion"); $pageObj = new pageBrowsing($searchReturn["from_tables"], $screen, 10, $searchReturn["order_by"], "Promotion.name", $letter, $searchReturn["where_clause"], $searchReturn["select_columns"], "Promotion", $searchReturn["group_by"]); $promotions = $pageObj->retrievePage(); $paging_url = PROMOTION_DEFAULT_URL."/results.php"; $array_search_params = array(); foreach ($_GET as $name => $value){ if ($name != "screen" && $name != "letter"){ $array_search_params[] = $name."=".$value; } } $url_search_params = implode("&", $array_search_params); $letters = $pageObj->getString("letters"); foreach ($letters as $each_letter) { if ($each_letter == "#") { $letters_menu .= "".strtoupper($each_letter).""; } else { $letters_menu .= "".strtoupper($each_letter).""; } } # PAGES DROP DOWN ---------------------------------------------------------------------------------------------- $pagesDropDown = $pageObj->getPagesDropDown($_GET, $paging_url, $screen, "Go to page: ", "this.form.submit();"); # -------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- $extrastyle = array(DEFAULT_URL."/layout/coupon_result.css", DEFAULT_URL."/layout/coupon_color.css"); $banner_section = "listing"; $headertag_title = $headertagtitle; $headertag_description = $headertagdescription; $headertag_keywords = $headertagkeywords; include(EDIRECTORY_ROOT."/layout/header.php"); ?> /*
include(PROMOTION_EDIRECTORY_ROOT."/search.php"); ?>*/ ?> //GOOGLE ADS include(INCLUDES_DIR."/code/google_ads.php"); ?> $banner_section = "listing"; $banner = system_showBanner("SPONSORED_LINKS", $category_id, $banner_section, $amount = 3); if ($banner) { ?> } ?>
if ($sitecontent) { echo "".$sitecontent.""; } ?> $user = true; if (!$promotions) { if ($search_lock) { echo "Please search at least one parameter on the search box!
"; } else { $db = db_getDBObject(); if($db->getRowCountSQL("SELECT COUNT(*) as total FROM Listing, Promotion WHERE Listing.promotion_id = Promotion.id;") > 0){ ?>No results were found for the search criteria you requested.
} else { ?>
Please try your search again.No promotions registered yet.
} } } elseif ($promotions){ include(INCLUDES_DIR."/tables/table_paging.php"); foreach ($promotions as $each_promotion) { if ($promotion = $each_promotion) { include(INCLUDES_DIR."/views/view_listing_promotion.php"); } } include(INCLUDES_DIR."/tables/table_paging.php"); } $contentObj = new Content(); $content = $contentObj->retrieveContentByType("Promotion Results Bottom"); if ($content) { echo ""; echo ""; } ?>".$content.""; echo "
$banner_section = "listing"; $banner = system_showBanner("FEATURED", $category_id, $banner_section, $amount = 3); if ($banner) { ?># ---------------------------------------------------------------------------------------------------- # FOOTER # ---------------------------------------------------------------------------------------------------- $banner_section = "listing"; include(EDIRECTORY_ROOT."/layout/footer.php"); ?>} ?>Advertisers