function GetVenueMapUrl($venueID, $eventID) { require_once '../include/EventInventoryWebServices.inc.php'; require_once '../lib/nusoap.php'; $method = 'GetVenueMapURL'; $soapAction = $namespace . $method; $soapclient = new nusoap_client($serverpath); #$soapclient = new soapclientNusoap($serverpath); $soapclient->timeout = 500; $soapclient->response_timeout = 500; $param = array('APPCLIENT_ID' => "{$securitytoken}", 'EVENT_ID' => "{$eventID}", 'VENUE_ID' => "{$venueID}"); // make the call $result = $soapclient->call($method, $param, $namespace, $soapAction); // if a fault occurred, output error info if (isset($fault)) { handle_error_no_exit("venues.new_urls.php: web services returned fault when trying to get venue URL" . $fault); } else { if ($result) { if (isset($result['faultstring'])) { handle_error_no_exit("venues.new_urls.php: web services returned failure when trying to get venue URL" . $result['faultstring']); } else { $root = $result['ROOT']; if (isset($root['MESSAGE'])) { print_message($root['MESSAGE']); } else { $data = $root['DATA']; if ($data != '') { $row = $data['row']; $url = $row['!venuemap']; } # end if no data } } } else { handle_error_no_exit("venues.new_urls.php: No result"); } } // kill object unset($soapclient); return htmlspecialchars($url); }
function BuildTextContent($categoryID, $top_event_names) { switch ($categoryID) { case 3: $textPrefix = "Find tickets for your favorite teams at MongoTickets.com. We've compacted a complete array of tickets available for you to choose from, including "; $eventSuffix = ""; $textSuffix = ". View from the best seats in the house or the bleachers, either way you're sure to have an awesome time."; break; case 2: $textPrefix = "Whether you're in New York, San Francisco, Las Vegas, or Chicago you can find premium seats to each and every concert at MongoTickets.com. "; $eventSuffix = " Tickets"; $textSuffix = " are available in nearly all tour locations. Enjoy your favorite genre of music from rock to classical, live at a venue near you."; break; case 4: $textPrefix = "Dating back to the ancient Roman's man has been attending theater events of one kind or another. Today, we've mastered the art of acting showcasing events like "; $eventSuffix = ""; $textSuffix = ". Don't miss your chance to buy your tickets today."; break; default: handle_error_no_exit('BuildTextContent: unknown category ID'); } $textEvents = ""; for ($i = 0; $i < count($top_event_names) && $i < 3; $i++) { if (strlen($textEvents) > 0) { $textEvents .= ", " . $top_event_names[$i] . $eventSuffix; } else { $textEvents = $top_event_names[$i] . $eventSuffix; } } $text = $textPrefix . $textEvents . $textSuffix; return $text; }
if ($eventBanner["image_pathname"] != "") { $smarty->assign("EventImagePathname", $eventBanner["image_pathname"]); } $smarty->assign("Productions", $productions); $smarty->assign("NumProductions", count($productions)); $smarty->display('productions_at_venue.tpl'); } else { $smarty->assign("title", $title); $smarty->display('main.tpl'); handle_error_no_exit('tickets_for_venue.php: EventID and city lookup failed: eventID=' . $eventID . ' sancity= ' . $sanCity . ' : ' . mysql_error() . ' ' . $_SERVER['REQUEST_URI'] . ' returning 500'); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } mysql_close($dbh); } else { $smarty->assign("title", $title); $smarty->display('main.tpl'); handle_error_no_exit('tickets_for_venue.php: I cannot connect to the database because: ' . mysql_error() . ' ' . $_SERVER['REQUEST_URI'] . ' returning 500'); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } $smarty->display('footer.tpl'); function BuildTheaterKeywordList($categoryID, $eventName, $eventID) { $lowerEventName = strtolower($eventName); $lowerEventName = RemoveSpecialChars($lowerEventName); $keywords = "{$lowerEventName} tickets"; return $keywords; }
$breadcrumb_str = AppendBreadcrumbNoAnchor($breadcrumb_str, " {$venueName} Events"); $smarty->assign("Breadcrumbs", $breadcrumb_str); if (count($events) > 0) { $smarty->assign("venueName", $venueName); $smarty->assign("EventsArray", $events); $smarty->assign("NumEvents", count($events)); $smarty->display('venue_events.tpl'); } else { echo "<div id=\"content\">"; echo "<div id=\"breadcrumb_trail\">{$breadcrumb_str}</div>"; echo "<div id=\"no_tickets\">"; echo "<h1>{$venueName} Events</h1>"; echo "<p>There are currently no events at {$venueName}</p>"; echo "</div>"; } } else { handle_error_no_exit('productions.code: ' . mysql_error()); $smarty->display('main.tpl'); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } mysql_close($dbh); } else { handle_error_no_exit('productions.code: I cannot connect to the database because: ' . mysql_error()); $smarty->display('main.tpl'); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } $smarty->display('footer.tpl');
<?php # # Copyright (c) 2007, Jassen Moran. All rights reserved. # MongoTickets.com Confidential Proprietary. # require_once '../include/new_urls/ticket_db.php'; include '../include/error.php'; include '../include/new_urls/url_factory.inc.php'; if ($dbh = mysql_connect($host_name, $db_username, $db_password)) { mysql_select_db("mongo_tickets2"); $query = "SELECT CategoryName,CategoryID FROM AdjacencyListCategories WHERE 1"; if ($query_result = mysql_query($query)) { $adjCats = array(); while ($table_row = mysql_fetch_row($query_result)) { $catName = $table_row[0]; $catID = $table_row[1]; $adjCats[$catID] = strtolower(_prepare_url_text($catName)); print "."; } foreach ($adjCats as $id => $sanCatName) { $bsql = "UPDATE AdjacencyListCategories SET SanitizedCategoryName= '" . $sanCatName . "' WHERE CategoryID=" . $id; $query_result = mysql_query($bsql) or print ': ' . mysql_error(); } } mysql_close($dbh); } else { handle_error_no_exit('sanitize_AdjacencyListCategories.php: I cannot connect to the database because: ' . mysql_error()); }
} } 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 { handle_error_no_exit('search.code: I cannot connect to the database because: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } $smarty->display('footer.tpl');
function BuildSportsKeywordList($id, $eventName) { $sportName = ""; $query = "SELECT SportName FROM CategoryToSportName WHERE CategoryID={$id}"; if ($query_result = mysql_query($query)) { while ($table_row = mysql_fetch_row($query_result)) { $sportName = $table_row[0]; } $lowerEventName = strtolower($eventName); $lowerEventName = RemoveSpecialChars($lowerEventName); $keywords = "{$lowerEventName} tickets"; #if(strlen($sportName) > 0 ) { # $keywords .= ", $lowerEventName $sportName, $sportName, $sportName tickets"; #} #$keywords .= ", sports tickets, tickets"; } else { handle_error_no_exit('productions.code BuildSpKeyL: ' . mysql_error()); } return $keywords; }
handle_error_no_exit('simple_url_dispatch.php: production id provided to non-event url ' . $_SERVER['REQUEST_URI'] . ' returning 301'); redir_301(); break; } # handle_error_no_exit ('simple_url_dispatch.php: should not get here ' . $_SERVER['REQUEST_URI'] . ' returning 301'); # redir_301(); exit; } } else { # 5xx status code header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('simple_url_dispatch.php: UrlLookup_temp query failed: ' . $_SERVER['REQUEST_URI'] . ' ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); } } else { handle_error_no_exit('simple_url_dispatch.php: no event, category, or venue in URL ' . $_SERVER['REQUEST_URI'] . ' returning 301'); redir_301(); } mysql_close($dbh); } else { # 5xx status code header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('simple_url_dispatch.php: I cannot connect to the database because: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); }
function GetList($eventID, $eventName, $home_only, $categoryID, $max_display) { $bsql = "SELECT TNDProductions.ProductionID, DATE_FORMAT(ProductionDate, '%a. %M %e, %Y %h:%i %p'), VenueName, ProductionName, City, StateProvince, EventName FROM TNDProductions left join TNDEventPerformers on (TNDProductions.ProductionID=TNDEventPerformers.ProductionID) where TNDEventPerformers.EventName='" . $eventName . "' AND DATEDIFF(NOW(), ProductionDate) <= 0 ORDER BY ProductionDate ASC"; $num_productions = 0; $count = 0; if ($query_result = mysql_query($bsql)) { while ($table_row = mysql_fetch_row($query_result)) { $productionID = $table_row[0]; $eventDate = $table_row[1]; $venueName = utf8_decode($table_row[2]); # $homeEventName = $table_row[3]; $productionName = $table_row[3]; $eventTypeID = 3; $city = utf8_decode($table_row[4]); $regionCode = $table_row[5]; $eventName = utf8_decode($table_row[6]); $ticket_page_title_date = $table_row[1]; # $opponentEventName = $table_row[9]; # $opponentEventName = substr($opponentEventName, 19); # $opponentName = $opponentEventName; # if(($count % 5) == 0) { # $opponentEventName = str_replace(' ', '', $opponentEventName); # } # elseif(($count % 9) == 0) { # $opponentEventName = rtrim($opponentEventName, 's'); # } # elseif(($count % 13) == 0) { # $opponentEventName = str_replace(' ', '', $opponentEventName . '.com'); # } if ($eventTypeID == 3) { $ticket_page_title = "{$eventName} Tickets at {$venueName} {$regionCode} on {$ticket_page_title_date}"; } else { $ticket_page_title = "{$eventName} Tickets at {$venueName} in {$city}, {$regionCode} on {$ticket_page_title_date}"; } $eventDescr = $eventName; $url = make_production_url($eventName, $productionID, $city, $eventTypeID); $productions[] = array("eventname" => "{$productionName}", "url" => "{$url}", "venuename" => "{$venueName}<br />{$city}, {$regionCode}", "date" => "{$eventDate}<br />", "eventid" => "{$eventID}", "eventDescr" => "{$productionName}", "ticket_page_title" => "{$ticket_page_title}"); $count++; $num_productions++; } } else { handle_error_no_exit('GetProductionList: ' . mysql_error()); $productions = "Error"; } return $productions; }
if ($eventBanner["image_pathname"] != "") { $smarty->assign("EventImagePathname", $eventBanner["image_pathname"]); } $smarty->assign("Productions", $productions); $smarty->assign("NumProductions", count($productions)); $smarty->display('productions_at_venue.tpl'); } else { $smarty->assign("title", $title); $smarty->display('main.tpl'); handle_error_no_exit('tickets_for_venue.code: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } mysql_close($dbh); } else { $smarty->assign("title", $title); $smarty->display('main.tpl'); handle_error_no_exit('tickets_for_venue.code: I cannot connect to the database because: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } $smarty->display('footer.tpl'); function BuildTheaterKeywordList($categoryID, $eventName, $eventID) { $lowerEventName = strtolower($eventName); $lowerEventName = RemoveSpecialChars($lowerEventName); $keywords = "{$lowerEventName} tickets"; return $keywords; }
foreach ($data->row as $event) { $attrib = $event->attributes(); $num_events_returned++; $eid = $attrib->EventID; $raw_ename = $attrib->EventName; $ename = mysql_escape_string($attrib->EventName); $etypeid = $attrib->EventTypeID; $cid = $attrib->CategoryID; InsertIntoEvents_temp($eid, $ename, $raw_ename, $etypeid, $cid, $eventRank); } } catch (Exception $e) { $errors = libxml_get_errors(); $error = $errors[0]; } } catch (SoapFault $flt) { handle_error_no_exit("ImportEventsFromWS.php: " . $flt); echo "SOAP Fault: (faultcode: {" . $flt->faultcode . "}\n" . "faultstring: {" . $flt->faultstring . " })"; } // kill object unset($soapclient); $bsql = "DELETE FROM Events_temp WHERE EventID=1"; $query_result = mysql_query($bsql) or die('DELETE EventID=1 FROM Events_temp query failed: ' . mysql_error()); $eventName_mod_list = array(14255 => 'Ourglass Concert', 8405 => 'Strunz n Farah', 14340 => 'The Jena Six Empowerment Concert', 15874 => 'Revolution Dance', 18251 => 'BamaJam Music n Arts Festival', 19734 => 'Rebel Concert', 24620 => 'Mr Brown and Cora Comedy'); foreach ($eventName_mod_list as $eid => $ename) { $san_ename = strtolower(_prepare_url_text($ename)); $bsql = "UPDATE Events_temp SET EventName='{$ename}',SanitizedEventName='{$san_ename}' WHERE EventID={$eid}"; $query_result = mysql_query($bsql) or die('UPDATE Events_temp SET EventName failed: ' . mysql_error()); } mysql_close($dbh); if ($num_events_returned < 1) { send_an_email('*****@*****.**', 'No result!!!!', 'No result!!!!' . ${$root}['MESSAGE']);
$title = "{$fullEventName} Tickets, {$fullEventName} Schedule, {$fullEventName} Dates"; $heading1 = $fullEventName; $subheading = "<strong>{$eventName} Tickets</strong>"; } else { $meta_descr = "{$eventName} - Buy {$eventName} tickets for {$shortDate} at {$venueName} in {$city}, {$regionCode} at MongoTickets!"; $breadcrumb_str = AppendBreadcrumbNoAnchor($breadcrumb_str, " {$eventName} Tickets"); $title = "{$gameName} Tickets at {$venueName} {$regionCode} on {$shortDate}"; $heading1 = "{$gameName} Tickets"; $subheading = "<strong>{$gameName} Tickets</strong>"; # $eventName = $eventName; } $smarty->assign("MetaDescr", $meta_descr); mysql_close($dbh); } else { header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('tickets.tnd.php: I cannot connect to the database because: ' . mysql_error() . ' production id= ' . $id . ' event id = ' . $eventID . ' uri= ' . $_SERVER['REQUEST_URI'] . ' returning 500'); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); } $keywords = ""; $keywords = BuildEventKeywordList($eventName, $city); $keywords = AmpersandToAnd($keywords); $smarty->assign("SeoKeywords", $keywords); $smarty->assign("title", $title); $smarty->display('main.tpl'); $venueUrl = ''; $smarty->assign("Breadcrumbs", $breadcrumb_str); $smarty->assign("EventName", $eventName); $smarty->assign("Heading1", $heading1);
$smarty->template_dir = '../smarty/templates/new_urls/'; $smarty->compile_dir = '../smarty/templates_c/new_urls/'; $smarty->cache_dir = '../smarty/cache/new_urls/'; $smarty->config_dir = '../smarty/configs'; $smarty->compile_check = true; $smarty->assign("RootUrl", $root_url); if ($dbh = mysql_connect($host_name, $db_username, $db_password)) { mysql_select_db($db_name); $smarty->assign("CategoryName", $categoryName); $breadcrumb_str = Breadcrumbs($categoryID, 0); $smarty->assign("Breadcrumbs", $breadcrumb_str); switch ($categoryID) { case 3: $smarty->display('sports.tpl'); break; case 2: $smarty->display('concerts.tpl'); break; case 4: $smarty->display('theater.tpl'); break; } mysql_close($dbh); } else { $smarty->display('main.tpl'); handle_error_no_exit('top_level_categories.code: I cannot connect to the database because: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('error_page.tpl'); } $smarty->display('footer.tpl');
function list_all_venues($smarty) { $query = "SELECT SanitizedRegionCode, RegionCode FROM Venues WHERE 1 GROUP BY RegionCode ORDER BY RegionCode ASC"; # $query = "SELECT SanitizedRegionCode, RegionCode FROM Productions LEFT JOIN Venues on (Productions.VenueID = Venues.VenueID) WHERE 1 GROUP BY RegionCode ORDER BY RegionCode ASC"; if ($query_result = mysql_query($query)) { while ($table_row = mysql_fetch_row($query_result)) { $sanitizedRegionCode = $table_row[0]; $regionCode = $table_row[1]; $url = "/venues/{$sanitizedRegionCode}/"; $states[] = array("name" => "{$regionCode}", "url" => "{$url}"); } $title = "Find All Venues"; $smarty->assign("title", $title); $keywords = "find all Venues, find all venue tickets"; $smarty->assign("SeoKeywords", $keywords); $smarty->assign("MetaDescr", "All Venues. Select a venue to find and buy event Tickets at MongoTickets."); $smarty->display('main.tpl'); $breadcrumb_str = '<a href="/">Home</a>'; $breadcrumb_str = AppendBreadcrumb($breadcrumb_str, '/venues/', 'Venues'); $smarty->assign("Breadcrumbs", $breadcrumb_str); $smarty->assign("h1", 'Choose a Region'); if (count($states) > 0) { $smarty->assign("States", $states); $smarty->assign("NumStates", count($states)); $smarty->display('all_venues.tpl'); } else { echo "<div id=\"content\">"; echo "<div id=\"breadcrumb_trail\">{$breadcrumb_str}</div>"; echo "<div id=\"no_tickets\">"; echo "<h1>All Venues</h1>"; echo "<p>There are no venues</p>"; echo "</div>"; } } else { # 5xx status code header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('venues.code:list_venues_in_state(): I cannot connect to the database because: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); } }
function resolve_ambiguous_event($smarty, $cats, $sanEventName) { $categoryInfo = fixup_url($smarty, $cats); $query = "SELECT EventID, EventName, CategoryID FROM Events WHERE SanitizedEventName='" . $sanEventName . "' AND " . "CategoryID=" . $categoryInfo['categoryID']; if ($query_result = mysql_query($query)) { $num_rows = mysql_num_rows($query_result); if ($num_rows == 1) { $table_row = mysql_fetch_row($query_result); $eventDetails['eventID'] = $table_row[0]; $eventDetails['eventName'] = $table_row[1]; $eventDetails['categoryID'] = $table_row[2]; } ## put redirect or something here } else { # 5xx status code header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('ticket_dispatch.code: resolve_ambiguous_event query failed: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); } return $eventDetails; }
} $smarty->assign("EventsArray", $events); $smarty->assign("NumEvents", count($events)); $smarty->assign("categoryName", $categoryName . ' Tickets'); if (count($events) > 0 || count($subcategories) > 0) { $smarty->display('events.tpl'); } else { $smarty->assign("EventName", $categoryName); $smarty->display('no_tickets.tpl'); } } } mysql_close($dbh); } else { header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('category.code: failure: category id= ' . $id . ' uri= ' . $_SERVER['REQUEST_URI'] . ' I cannot connect to the database because: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); } $smarty->display('footer.tpl'); function DisplayPlayoffEvents($categoryID, $categoryName) { $categoryToEventCategories = array(24 => array(25, 30), 82 => array(83, 87), 1999 => array(19, 15), 250 => array(93, 97)); echo "<div class=\"category_event_list\">\n"; echo "<h1>{$categoryName}</h1>\n"; if (array_key_exists($categoryID, $categoryToEventCategories)) { echo "<ul>\n"; foreach ($categoryToEventCategories[$categoryID] as $id) { $events = GetEventsUnderCategory($id);
$edate = tnow_date_to_mysqldate($attrib->EventDate); $eid = $attrib->EventID; $oeid = $attrib->OpponentEventID; $vid = $attrib->VenueID; $snote = mysql_escape_string($attrib->ShortNote); $mincost = $attrib->MinCost; $maxcost = $attrib->MaxCost; $bsql = "INSERT INTO Productions_temp " . "(ProductionID, EventDate, EventID, OpponentEventID, VenueID, ShortNote, MinCost, MaxCost) " . "VALUES ('{$pid}', '{$edate}', '{$eid}', '{$oeid}', '{$vid}', '{$snote}', '{$mincost}', '{$maxcost}')"; $insert_result = mysql_query($bsql) or print_message('ImportProductionsFromWS: ' . mysql_error()); } # end for } catch (Exception $e) { $errors = libxml_get_errors(); $error = $errors[0]; } } catch (SoapFault $flt) { handle_error_no_exit("ImportProductionsFromWS.php: " . $flt); echo "SOAP Fault: (faultcode: {" . $flt->faultcode . "}\n" . "faultstring: {" . $flt->faultstring . " })"; } unset($soapclient); print_message("ImportProductionsFromWS: Done. "); mysql_close($dbh); if ($num_productions_returned < 1) { print_message("ImportProductionsFromWS: No productions returned, exiting..."); } print_message("Finished Importing " . $num_productions_returned . " Productions.\n"); function tnow_date_to_mysqldate($date) { $date = str_replace('T', ' ', $date); return $date; }
<?php # # Copyright (c) 2007, Jassen Moran. All rights reserved. # Quad tickets Confidential Proprietary. # require_once '../include/new_urls/ticket_db.php'; include_once '../include/host_info.inc.php'; require_once '../include/new_urls/url_factory.inc.php'; $dbh = mysql_connect($host_name, $db_username, $db_password) or die('I cannot connect to the database because: ' . mysql_error()); mysql_select_db($db_name); for ($i = 2; $i < 5; $i++) { echo "\n\n"; $Bsql = 'SELECT VenueName, SanitizedVenueName, COUNT(Productions.ProductionID) as num_prods FROM Venues inner join Productions on (Venues.VenueID = Productions.VenueID) inner join Events on (Events.EventID = Productions.EventID) WHERE EventTypeID=' . $i . ' GROUP BY Venues.VenueID ORDER BY num_prods DESC LIMIT 10'; if ($query_result = mysql_query($Bsql)) { $ary = array(); while ($table_row = mysql_fetch_array($query_result)) { echo "\n" . '<a href="' . make_venue_url($table_row['SanitizedVenueName']) . '">' . $table_row['VenueName'] . '</a>'; } } else { handle_error_no_exit(': ' . mysql_error()); } }
handle_error_no_exit("tickets.code: web services returned fault when trying to get venue URL" . $fault); } else { if ($result) { if (isset($result['faultstring'])) { handle_error_no_exit("tickets.code: web services returned failure when trying to get venue URL" . $result['faultstring']); } else { $root = $result['ROOT']; $data = $root['DATA']; if ($data != '') { $row = $data['row']; $url = $row['!venuemap']; } # end if no data } } else { handle_error_no_exit("tickets.code: No result"); } } // kill object unset($soapclient); $altstring = preg_replace('/\\s*&\\s*/', ' and ', $venueName); // remove all characters that aren't a-z, 0-9, dash, underscore or space $NOT_acceptable_characters_regex = '#[^-a-zA-Z0-9_ ]#'; $altstring = preg_replace($NOT_acceptable_characters_regex, '', $altstring); # print_r($tickets); $url = htmlspecialchars($url); echo "<div class=\"venueMap\"><strong>{$venueName}</strong> Seating Chart<a href=\"{$url}\" onclick=\"window.open('{$url}','popup','width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false\" style=\"color: red\"><img height=\"100\" width=\"100\" src=\"{$url}\" alt=\"{$altstring} seating chart\"/><br />Click to Enlarge</a>"; #echo "<div class=\"venueMap\"><a href=\"$url\" onclick=\"window.open('$url','popup','width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false\" style=\"color: black\"><img height=\"100\" width=\"100\" src=\"$url\" alt=\"venue map\"/>$venueName</a>"; # echo "<div style=\"padding: 0px 0px 0px 12px;\"><a href=\"$url\" onclick=\"window.open('$url','popup','width=500,height=500,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false\" style=\"color: red\"><img height=\"100\" width=\"100\" src=\"$url\" alt=\"venue map\"/><br />Venue Map</a><br /><br />"; echo "</div>"; echo "</div>";
$smarty->display('error_page.tpl'); } } else { $sanCategoryUrl = mysql_escape_string($cats); $query = "SELECT CategoryID, CategoryName FROM ModifiedPreorderTreeTraversalCategories " . " WHERE CategoryUrl = {$sanCategoryUrl}"; if ($query_result = mysql_query($query)) { $num_rows = mysql_num_rows($query_result); if ($num_rows == 1) { $table_row = mysql_fetch_row($query_result); $_REQUEST['id'] = $table_row[0]; $_REQUEST['name'] = $table_row[1]; mysql_close($dbh); require 'category.php'; exit; } else { fixup_url($smarty, $cats); header('HTTP/1.1 301 Moved Permanently'); header('Location: http://www.mongotickets.com/'); } } else { # 5xx status code header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('ticket_dispatch.code: ModifiedPreorderTreeTraversalCategories database query failed: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); } } mysql_close($dbh); }
function GetKeywordsForCategoryID($categoryID) { $Bsql = "SELECT Keywords FROM CategoryKeywords WHERE CategoryID=" . $categoryID; if ($query_result = mysql_query($Bsql)) { while ($table_row = mysql_fetch_array($query_result)) { $keywords = $table_row['Keywords']; } } else { handle_error_no_exit('GetKeywordsForCategoryID: ' . mysql_error()); $keywords = ''; } return $keywords; }
#$_REQUEST['vid'] = $matches[1]; $_REQUEST['name'] = $eventName; $_REQUEST['catid'] = $parentCategoryID; mysql_close($dbh); require 'tickets_for_venue.php'; } else { $_REQUEST['id'] = $eventID; mysql_close($dbh); require 'productions.php'; } exit; } } } else { $is_category = 1; $_REQUEST['id'] = $parentCategoryID; $_REQUEST['name'] = $parentCategoryName; mysql_close($dbh); require 'category.php'; exit; } mysql_close($dbh); } else { # 5xx status code header('HTTP/1.0 500 Internal Server Error'); handle_error_no_exit('ticket_dispatch.code: I cannot connect to the database because: ' . mysql_error()); $error_message = get_error_message(); $smarty->assign("ErrorMessage", $error_message); $smarty->display('main.tpl'); $smarty->display('error_page.tpl'); }