$smarty->display('search.tpl'); } else { handle_error_no_exit('search.code: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } } else { if ($search_pref == 'by_venue') { if ($query_result = mysql_query('SELECT VenueID,VenueName,SanitizedVenueName,RegionCode FROM Venues WHERE VenueName LIKE ' . "'%" . $keywords . "%' ORDER BY VenueName ASC")) { while ($table_row = mysql_fetch_array($query_result)) { $venueID = $table_row['VenueID']; $venueName = utf8_decode($table_row['VenueName']); $sanitizedVenueName = $table_row['SanitizedVenueName']; $regionCode = $table_row['RegionCode']; $url = make_venues_url($venueName, $sanitizedVenueName, $regionCode); $venues[] = array("name" => "{$venueName}", "url" => "{$url}"); } $smarty->assign("Venues", $venues); $smarty->assign("NumVenues", count($venues)); $smarty->display('search.tpl'); } else { handle_error_no_exit('search.code: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } } } mysql_close($dbh); } else {
$breadcrumb_string .= "<img src=\"{$root_url}/Images/SmallArrow.jpg\" alt=\" \"/> Search Results"; $smarty->assign("Breadcrumbs", $breadcrumb_string); $smarty->display('search.tpl'); } else { handle_error_no_exit('search.code: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } } else { if ($search_pref == 'by_venue') { if ($query_result = mysql_query('SELECT VenueID,VenueName FROM Venues WHERE VenueName LIKE ' . "'%" . $keywords . "%' ORDER BY VenueName ASC")) { while ($table_row = mysql_fetch_array($query_result)) { $venueID = $table_row['VenueID']; $venueName = utf8_decode($table_row['VenueName']); $url = make_venues_url($venueName, $venueID); $venues[] = array("name" => "{$venueName}", "url" => "{$url}"); } $smarty->assign("Venues", $venues); $smarty->assign("NumVenues", count($venues)); $smarty->display('search.tpl'); } else { handle_error_no_exit('search.code: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } } } mysql_close($dbh); } else {