"; mysql_connect (localhost, tickettriangle, snocone); mysql_select_db (tickettriangle_com); if ($city != '' AND $state != '') { $icityquery="SELECT * FROM citylistfull where city = '$city' AND state = '$state'"; //echo "$icityquery
"; $icityresult=mysql_query($icityquery); $icitynum=mysql_numrows($icityresult); if ($icitynum > 0){ $icity=ucwords(mysql_result($icityresult,0,"city")); $istate=mysql_result($icityresult,0,"state"); } } if ($icity == '') { $icity = ucwords($city); } if ($istate == '') { $istate = strtoupper($state); } $altcityquery="SELECT distinct altcity,altstate FROM cities where dbcity = '$icity' and dbstate = '$istate'"; //echo $altcityquery ."
"; $altcityresult=mysql_query($altcityquery); $altcitynum=mysql_numrows($altcityresult); if ($altcitynum > 0) { for ($ac = 0, $altcitynum; $ac < $altcitynum; $ac++) { $mainaltcity=mysql_result($altcityresult,$ac,"altcity"); $mainaltstate=mysql_result($altcityresult,$ac,"altstate"); $altcities = $altcities . "" . $mainaltcity . " - "; $altcitysql = $altcitysql . " OR "; $altcitysql = $altcitysql . "(Events.City = '$mainaltcity' AND Events.State='$mainaltstate')"; } } $altcity2query="SELECT distinct dbcity,dbstate FROM cities where altcity = '$icity' and altstate = '$istate'"; //echo $altcity2query ."
"; $altcity2result=mysql_query($altcity2query); $altcity2num=mysql_numrows($altcity2result); if ($altcity2num > 0) { for ($ac = 0, $altcity2num; $ac < $altcity2num; $ac++) { $mainaltcity2=mysql_result($altcity2result,$ac,"dbcity"); $mainaltstate2=mysql_result($altcity2result,$ac,"dbstate"); // $altcities = $altcities . "" . ucwords($performer) . " " . $mainaltcity2 . "  "; $altcitysql = $altcitysql . " OR "; $altcitysql = $altcitysql . "(Events.City = '$mainaltcity2' AND Events.State='$mainaltstate2')"; } } $aliasquery="SELECT PerformerID,PerformerName,PerformerNameAlias FROM EventPerformersAlias WHERE PerformerNameAlias = '$performer' ORDER BY PerformerName ASC"; $aliasresult=mysql_query($aliasquery); $aliasnum=mysql_numrows($aliasresult); $a=0; while ($a < $aliasnum) { $performerid=mysql_result($aliasresult,$a,"PerformerID"); $performername=ucwords(mysql_result($aliasresult,$a,"PerformerName")); if ($a > 0) { if ($aliasnum-$a > 0 ) { $aliassql = $aliassql . " OR "; } else { $aliassql = $aliassql . " AND "; } } $aliassql = $aliassql . "EventPerformers.PerformerID = $performerid"; $a++; } //echo "$performername Tickets $icity"; //echo ""; //echo ""; //echo ""; $cityquery="SELECT DISTINCT Events.City, Events.State FROM Events LEFT JOIN EventPerformers ON Events.EventID=EventPerformers.EventID WHERE EventPerformers.EventID = Events.EventID AND ($aliassql) ORDER BY Events.City ASC"; $cityresult=mysql_query($cityquery); $citynum=mysql_numrows($cityresult); if ($citynum < 1) { // header("HTTP/1.0 404 Not Found"); $invalidpage = 1; // echo "

TEST 1

"; } $citycount=0; $dash=' - '; while ($citycount < $citynum) { $bcity=mysql_result($cityresult,$citycount,"city"); // $bcitylc=str_replace(' ','-',str_replace('#', '',str_replace(' # ', ' ',str_replace('.', '',str_replace(')', '',str_replace('(', '',str_replace('@', 'at',str_replace(' @ ', ' at ',str_replace('?', '',str_replace('=', ' ',str_replace(' = ', ' ',str_replace(';', '',str_replace('+', ' ',str_replace('$', '',str_replace(':', ' ',str_replace(': ', ' ',str_replace('/', ' ',str_replace(' / ', ' ',str_replace('-', ' ',str_replace(' - ', ' ',str_replace('&', 'and',str_replace('"', '',str_replace('\'', '', strtolower($bcity)))))))))))))))))))))))); $bcitylc=str_replace(' ','-',str_replace('!', '',str_replace(',','',str_replace(' ,','',str_replace(', ','',str_replace(' , ',' ',str_replace('%','',str_replace('#', '',str_replace(' # ', ' ',str_replace('.', '',str_replace(')', '',str_replace('(', '',str_replace('@', 'at',str_replace(' @ ', ' at ',str_replace('?', '',str_replace('=', ' ',str_replace(' = ', ' ',str_replace(';', '',str_replace('+', ' ',str_replace('$', '',str_replace(':', ' ',str_replace(': ', ' ',str_replace('/', ' ',str_replace(' / ', ' ',str_replace('-', ' ',str_replace(' - ', ' ',str_replace('&', 'and',str_replace('"', '',str_replace('\'', '', strtolower($bcity)))))))))))))))))))))))))))))); $bstate=mysql_result($cityresult,$citycount,"state"); $bstatelc=strtolower($bstate); if ($citynum-$citycount == 1) { $dash=''; } $citylistdropdown = $citylistdropdown . ""; $allcitylist = $allcitylist . "$bcity$dash"; // $citylistdropdown = $citylistdropdown . ""; $citycount++; } $hquery="SELECT imageURL FROM EventPerformersInfo WHERE PerformerNameAlias = '" . $performer . "'"; $hresult=mysql_query($hquery); $hnum=mysql_numrows($hresult); if ($hnum > 0) { $imageURL=mysql_result($hresult,0,"imageURL"); if ($imageURL != '') { $image = ""; } else { $image = ""; } } else { $image = ""; } $equery="SELECT EventPerformers.*, Events.* FROM Events LEFT JOIN EventPerformers ON Events.EventID=EventPerformers.EventID WHERE EventPerformers.EventID = Events.EventID AND ($aliassql) AND ((Events.City = '$icity' AND Events.State = '$istate')$altcitysql) ORDER BY Events.EventDate ASC"; //echo "$equery
"; $eresult=mysql_query($equery); $enum=mysql_numrows($eresult); if ($enum < 1) { // header("HTTP/1.0 404 Not Found"); $invalidpage = 1; // echo "

TEST 2

"; } $e=0; $np=0; while ($e < $enum) { $eventname=mysql_result($eresult,$e,"EventName"); $eventid=mysql_result($eresult,$e,"EventID"); $city=mysql_result($eresult,$e,"city"); $performername=mysql_result($eresult,$e,"PerformerName"); $state=mysql_result($eresult,$e,"state"); $displaydate=mysql_result($eresult,$e,"DisplayDate"); $formatteddatetime = strtotime($displaydate); if (strstr($displaydate,'TBA')) { $formatteddate=date("F j, Y",strtotime(str_replace(' TBA', '', $displaydate))); $formattedtime = ''; $timebreak = ''; } else { $formatteddate=date("F j, Y",$formatteddatetime); $formattedtime=date("l g:i A",$formatteddatetime); $timebreak = '
'; } $eventdate=mysql_result($eresult,$e,"EventDate"); $venue=mysql_result($eresult,$e,"Venue"); $parentcategoryid=mysql_result($eresult,$e,"ParentCategoryID"); $childcategoryid=mysql_result($eresult,$e,"ChildCategoryID"); $grandchilecategoryid=mysql_result($eresult,$e,"GrandChildCategoryID"); // $url = str_replace("__", "_",str_replace("___", "_",str_replace("____", "_",strtolower(preg_replace('/[^0-9a-z]/i','_',$performername . '_' . $city . '_' . $state . '_tickets'))))); // echo "" . $performername . "
"; // echo ""; if ( $e&1 ) { $eventrow="oddrow"; } else { $eventrow="evenrow"; } switch ($parentcategoryid) { case 1: if($performer != strtolower($eventnamealias)) { $dates = $dates . ""; } else { $dates = $dates . ""; } $typedesc = 'sporting event '; break; case 2: $dates = $dates . ""; $typedesc = 'concert '; break; case 3: $dates = $dates . ""; $typedesc = 'theater or musical '; break; case 4: // $dates = $dates . ""; $dates = $dates . ""; $typedesc = ''; break; } ++$e; } $performeruc = ucwords($performer); $templatefilemainheaderrow = "templates/mainheaderrow.txt"; $tfmhr1 = fopen($templatefilemainheaderrow, "r" ); $templatecontentmh1 = fread( $tfmhr1, filesize($templatefilemainheaderrow)); $templatefileb1 = "templates/concertbody1.html"; $templatefileb2 = "templates/concertdetailsbody1.html"; $tfb1 = fopen($templatefileb1, "r" ); $tfb2 = fopen($templatefileb2, "r" ); $templatecontentb1 = fread( $tfb1, filesize($templatefileb1)); $templatecontentb2 = fread( $tfb2, filesize($templatefileb2)); $templatecontentb1 = str_replace("*performer*", $performeruc,$templatecontentb1); $templatecontentb2 = str_replace("*performer*", $performeruc,$templatecontentb2); $templatecontentb2 = str_replace("*venue*", $venue,$templatecontentb2); $templatecontentb2 = str_replace("*citystate*", ucwords($city) . ", " . strtoupper($state),$templatecontentb2); $templatecontentb2 = str_replace("*city*", $icity,$templatecontentb2); $templatecontentb1 = str_replace('*type*', $typedesc,$templatecontentb1); $templatecontentb2 = str_replace('*type*', $typedesc,$templatecontentb2); fclose( $tfb1 ); fclose( $tfb2 ); //$clquery="SELECT EventPerformers.*, Events.* FROM Events LEFT JOIN EventPerformers ON Events.EventID=EventPerformers.EventID WHERE EventPerformers.EventID = Events.EventID AND ($aliassql) AND ((Events.City = '$icity' AND Events.State = '$istate')$altcitysql) ORDER BY Events.EventDate ASC"; $clquery="SELECT DISTINCT EventPerformers.PerformerName,Events.city,Events.state FROM Events LEFT JOIN EventPerformers ON Events.EventID = EventPerformers.EventID WHERE EventPerformers.EventID = Events.EventID AND ((Events.City = '$icity' AND Events.State = '$istate')$altcitysql) AND (Events.ParentCategoryID = '2' OR Events.ParentCategoryID = '3' OR Events.ParentCategoryID = '4') ORDER BY RAND() LIMIT 0 , 12"; //echo $clquery; $clresult=mysql_query($clquery); $clnum=mysql_numrows($clresult); $cl=0; $np=0; while ($cl < $clnum) { $clperformername=mysql_result($clresult,$cl,"EventPerformers.PerformerName"); $clcity=mysql_result($clresult,$cl,"Events.city"); $clstate=mysql_result($clresult,$cl,"Events.state"); // old $clperformernameurl = str_replace(' ','-',str_replace('#', '',str_replace(' # ', ' ',str_replace('.', '',str_replace(')', '',str_replace('(', '',str_replace('@', 'at',str_replace(' @ ', ' at ',str_replace('?', '',str_replace('=', ' ',str_replace(' = ', ' ',str_replace(';', '',str_replace('+', ' ',str_replace('$', '',str_replace(':', ' ',str_replace(': ', ' ',str_replace('/', ' ',str_replace(' / ', ' ',str_replace('-', ' ',str_replace(' - ', ' ',str_replace('&', 'and',str_replace('"', '',str_replace('\'', '', strtolower($clperformername)))))))))))))))))))))))); $clperformernameurl = str_replace(' ','-',str_replace('!', '',str_replace(',','',str_replace(' ,','',str_replace(', ','',str_replace(' , ',' ',str_replace('%','',str_replace('#', '',str_replace(' # ', ' ',str_replace('.', '',str_replace(')', '',str_replace('(', '',str_replace('@', 'at',str_replace(' @ ', ' at ',str_replace('?', '',str_replace('=', ' ',str_replace(' = ', ' ',str_replace(';', '',str_replace('+', ' ',str_replace('$', '',str_replace(':', ' ',str_replace(': ', ' ',str_replace('/', ' ',str_replace(' / ', ' ',str_replace('-', ' ',str_replace(' - ', ' ',str_replace('&', 'and',str_replace('"', '',str_replace('\'', '', strtolower($clperformername)))))))))))))))))))))))))))))); // old $clcityurl = str_replace(' ','-',str_replace('#', '',str_replace(' # ', ' ',str_replace('.', '',str_replace(')', '',str_replace('(', '',str_replace('@', 'at',str_replace(' @ ', ' at ',str_replace('?', '',str_replace('=', ' ',str_replace(' = ', ' ',str_replace(';', '',str_replace('+', ' ',str_replace('$', '',str_replace(':', ' ',str_replace(': ', ' ',str_replace('/', ' ',str_replace(' / ', ' ',str_replace('-', ' ',str_replace(' - ', ' ',str_replace('&', 'and',str_replace('"', '',str_replace('\'', '', strtolower($clcity)))))))))))))))))))))))); $clcityurl = str_replace(' ','-',str_replace('!', '',str_replace(',','',str_replace(' ,','',str_replace(', ','',str_replace(' , ',' ',str_replace('%','',str_replace('#', '',str_replace(' # ', ' ',str_replace('.', '',str_replace(')', '',str_replace('(', '',str_replace('@', 'at',str_replace(' @ ', ' at ',str_replace('?', '',str_replace('=', ' ',str_replace(' = ', ' ',str_replace(';', '',str_replace('+', ' ',str_replace('$', '',str_replace(':', ' ',str_replace(': ', ' ',str_replace('/', ' ',str_replace(' / ', ' ',str_replace('-', ' ',str_replace(' - ', ' ',str_replace('&', 'and',str_replace('"', '',str_replace('\'', '', strtolower($clcity)))))))))))))))))))))))))))))); $clpct = strtolower($clperformernameurl . "-tickets-" . $clcityurl . "--" . $clstate . ".htm"); $concertlinkscity = $concertlinkscity . "$clperformername  "; // echo "$clperformername - $clcity
"; $cl++; } $include = ""; $templatefile1 = "templates/eventdetails.html"; $tf1 = fopen($templatefile1, "r" ); $templatecontent1 = fread( $tf1, filesize($templatefile1)); if ($invalidpage != 1) { $templatecontent1 = str_replace("*title*", "$performeruc $icity Tickets",$templatecontent1); if ($performername == "AC/DC" OR $performername == "Tina Turner" OR $performername == "Celine Dion") { if ($performername == "AC/DC" and $icity == "Toronto" or $icity == "Cincinnati" or $icity == "Dallas" or $icity == "Kansas City" or $icity == "Minneapolis" or $icity == "Nashville" or $icity == "Omaha" or $icity == "Pittsburgh" or $icity == "Saint Paul" or $icity == "Saint Louis" or $icity == "Tulsa" or $icity == "Fargo") { $templatecontent1 = str_replace("*googlebot*", "",$templatecontent1); } else { //$templatecontent1 = str_replace("*googlebot*", "",$templatecontent1); } } else { $templatecontent1 = str_replace("*googlebot*", "",$templatecontent1); } $templatecontent1 = str_replace("*description*", "Buy $performeruc tickets for $icity online today!",$templatecontent1); $templatecontent1 = str_replace("*keywords*", "$performeruc tickets,$performeruc concert tickets,$performeruc,ticket,tickets,buy,sell,concert,cheap,discount,front row",$templatecontent1); $templatecontent1 = str_replace("*performer*", $performeruc,$templatecontent1); $templatecontent1 = str_replace("*performername*", $performername,$templatecontent1); $templatecontent1 = str_replace("*image*", $image,$templatecontent1); $templatecontent1 = str_replace("*dates*", $dates,$templatecontent1); $templatecontent1 = str_replace("*custombody*", $custombody,$templatecontent1); $templatecontent1 = str_replace("*city list*", $citylist,$templatecontent1); $templatecontent1 = str_replace("*city*", $icity,$templatecontent1); $templatecontent1 = str_replace("*altcities*", $altcities . $allcitylist,$templatecontent1); $templatecontent1 = str_replace("*include*", $include,$templatecontent1); $templatecontent1 = str_replace("*mainheaderbar*", $templatecontentmh1,$templatecontent1); } else { //$templatecontent1 = str_replace("*title*", "Performance not found",$templatecontent1); $templatecontent1 = str_replace("*title*", "$performeruc $icity Tickets",$templatecontent1); $templatecontent1 = str_replace("*description*", "",$templatecontent1); $templatecontent1 = str_replace("*keywords*", "",$templatecontent1); $templatecontent1 = str_replace("*performer*", $performeruc,$templatecontent1); $templatecontent1 = str_replace("*performername*", $performername,$templatecontent1); $templatecontent1 = str_replace("*image*", $image,$templatecontent1); $templatecontent1 = str_replace("*dates*", "

This performance no longer exists or was reached in error, please choose from the list box above or use the search box below to find the performance and tickets you want.

",$templatecontent1); $templatecontent1 = str_replace("*custombody*", "",$templatecontent1); $templatecontent1 = str_replace("*city list*", $citylist,$templatecontent1); $templatecontent1 = str_replace("*city*", $icity,$templatecontent1); $templatecontent1 = str_replace("*altcities*", "",$templatecontent1); $templatecontent1 = str_replace("*include*", "",$templatecontent1); $templatecontent1 = str_replace("*mainheaderbar*", $templatecontentmh1,$templatecontent1); $templatecontent1 = str_replace("*googlebot*", "",$templatecontent1); } if ($citycount > 1 AND $parentcategoryid != 1) { $templatecontent1 = str_replace('*cityoption*', "",$templatecontent1); } else { $templatecontent1 = str_replace('*cityoption*', "",$templatecontent1); } if ($performername == "AC/DC") { // $templatecontent1 = str_replace('*coupon*', "",$templatecontent1); $templatecontent1 = str_replace('*coupon*', "",$templatecontent1); } else { $templatecontent1 = str_replace('*coupon*', "",$templatecontent1); } ob_start(); showsidebar(); $sidebar=ob_get_clean(); $templatecontent1 = str_replace('*sidebar*', $sidebar,$templatecontent1); $templatecontent1 = str_replace("*body1*", $templatecontentb1,$templatecontent1); $templatecontent1 = str_replace("*body2*", $templatecontentb2,$templatecontent1); fclose( $tf1 ); mysql_close(); echo $templatecontent1; ?>
$performername Tickets in $icity
$eventname$city, $state$displaydateBuy Now
$eventname$displaydate$city, $state$venueView Tickets
$displaydate$city, $state$venueView Tickets
$eventname$formatteddate $timebreak $formattedtime$city, $state
$venue
View Tickets
$eventname$formatteddate $timebreak $formattedtime$city, $state
$venue
View Tickets
$eventname$formatteddate $timebreak $formattedtime$city, $state
$venue
View Tickets
$eventname$formatteddate $timebreak $formattedtime$city, $state
$venue
View Tickets
$concertlinkscity
Discount Code - Weekend Special!
After entering shipping and billing info at checkout enter
the Discount Code TTRocks for a special discount.