/*==================================================================*\ ###################################################################### # # # 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: /event/results.php # ---------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # LOAD CONFIG # ---------------------------------------------------------------------------------------------------- include("../conf/loadconfig.inc.php"); # ---------------------------------------------------------------------------------------------------- # MOD-REWRITE (Must be the first include loaded) # ---------------------------------------------------------------------------------------------------- include(EVENT_EDIRECTORY_ROOT."/mod_rewrite.php"); # ---------------------------------------------------------------------------------------------------- # VALIDATE FEATURE # ---------------------------------------------------------------------------------------------------- if (EVENT_FEATURE != "on") { exit; } # ---------------------------------------------------------------------------------------------------- # VALIDATION # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/includes/code/validate_querystring.php"); # ---------------------------------------------------------------------------------------------------- # USER ZIP LOCATION # ---------------------------------------------------------------------------------------------------- $expire = 60*60*24*30*12; unset($userZipLocation); if ($_COOKIE["UserZipLocation"]) { setcookie("UserZipLocation", $_COOKIE["UserZipLocation"], time() + $expire, "".EDIRECTORY_FOLDER.""); $userZipLocation = $_COOKIE["UserZipLocation"]; } if (isset($_GET["zip"]) || isset($_POST["zip"])) { $userziplocation = $_GET["zip"] ? $_GET["zip"] : $_POST["zip"]; if ($userziplocation) { setcookie("UserZipLocation", $userziplocation, time() + $expire, "".EDIRECTORY_FOLDER.""); $userZipLocation = $userziplocation; } else { setcookie("UserZipLocation", "", time() - $expire, "".EDIRECTORY_FOLDER.""); unset($userZipLocation); } } if ($userZipLocation) { $_POST["zip"] = $userZipLocation; $_GET["zip"] = $userZipLocation; $zip = $userZipLocation; } # ---------------------------------------------------------------------------------------------------- # SITE CONTENT # ---------------------------------------------------------------------------------------------------- $contentObj = new Content(); $sitecontentinfo = $contentObj->retrieveContentInfoByType("Event 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 (EVENT_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_frontEventSearch($_GET, "event"); $pageObj = new pageBrowsing($searchReturn["from_tables"], $screen, 10, $searchReturn["order_by"], "Event.title", $letter, $searchReturn["where_clause"], $searchReturn["select_columns"], "Event", $searchReturn["group_by"]); $events = $pageObj->retrievePage(); $paging_url = EVENT_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/event_result.css", DEFAULT_URL."/layout/event_color.css"); $banner_section = "event"; $headertag_title = $headertagtitle; $headertag_description = $headertagdescription; $headertag_keywords = $headertagkeywords; include(EDIRECTORY_ROOT."/layout/header.php"); $user = true; ?> /*
include(EVENT_EDIRECTORY_ROOT."/search.php"); ?>*/ ?> //GOOGLE ADS include(INCLUDES_DIR."/code/google_ads.php"); ?> $banner_section = "event"; $banner = system_showBanner("SPONSORED_LINKS", $category_id, $banner_section, $amount = 3); if ($banner) { ?> }
/* RIGHT COLUMN */ ?> if ($sitecontent) { echo "".$sitecontent.""; } if ($_GET["this_date"]) { $ts_time = mktime(0,0,0,(int)substr($_GET["this_date"],4,2),(int)substr($_GET["this_date"],6,2),(int)substr($_GET["this_date"],0,4)); } else { $today = "0,0,0,".date("m,d,Y"); $ts_time = mktime("$today"); } $str_time = ""; if (!$_GET["month"]) $str_time = "".date("F jS, Y",$ts_time).""; else $str_time = "".date("F Y",$ts_time).""; if (!$_GET["month"] && !$_GET["this_date"]) { $str_time = ""; } if ($str_time) echo "".$str_time." Events:
"; if (!$events) { if ($search_lock) { echo "Please search at least one parameter on the search box!
"; } else { $db = db_getDBObject(); if ($db->getRowCount("Event") > 0) { ?>No results were found for the search criteria you requested.
} else { ?>
Please try your search again.No events registered yet.
} } } elseif ($events){ include(INCLUDES_DIR."/tables/table_paging.php"); $level = new EventLevel(); foreach ($events as $each_event) { if ($event = $each_event) { report_newRecord("event", $each_event->getString("id"), EVENT_REPORT_SUMMARY_VIEW); include(INCLUDES_DIR."/views/view_event_summary_".$each_event->getNumber("level").".php"); } } include(INCLUDES_DIR."/tables/table_paging.php"); } $contentObj = new Content(); $content = $contentObj->retrieveContentByType("Event Results Bottom"); if ($content) { echo ""; echo ""; } ?>".$content.""; echo "
// EVENT CALENDAR include(EDIRECTORY_ROOT.'/functions/calendar_funct.php'); if ($_GET["this_date"]) cal_display_month("",$_GET["this_date"]); else cal_display_month(); ?> $banner_section = "event"; $banner = system_showBanner("FEATURED", $category_id, $banner_section, $amount = 3); if ($banner) { ?># ---------------------------------------------------------------------------------------------------- # FOOTER # ---------------------------------------------------------------------------------------------------- $banner_section = "event"; include(EDIRECTORY_ROOT."/layout/footer.php"); ?>} ?>