Tour Dates
function city($t_id) {
global $link;
$sql = "SELECT city FROM markers WHERE vid = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
function stco($t_id) {
global $link;
$sql = "SELECT stco FROM markers WHERE vid = '$t_id'" ;
$sql_result = mysql_query ($sql, $link ) or die ('request "Could not execute SQL query"');
$row = mysql_fetch_row( $sql_result );
return $row[0];
};
try
{
$today = date("Y-m-d");
$dbh = new PDO('mysql:host=localhost;dbname=the_gauntlet_com', 'thegaunt', 't4ntr1c');
$SQL = "SELECT gig_bands.*, gigs.* FROM gig_bands LEFT JOIN gigs ON gig_bands.gid = gigs.gid WHERE dt = '$date' GROUP BY dt,admat";
$dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$sth = $dbh-> prepare ($SQL);
$sth->execute();
$sth->setFetchMode(PDO::FETCH_OBJ);
while($row = $sth->fetch()) {
$band = $row->tour_title;
$band2 = $row->twitter;
$patterns[0] = '/ /';
$patterns[1] = '/\'/';
$patterns[2] = '/\//';
$patterns[3] = '/$/';
$patterns[4] = '/@/';
$patterns[5] = '/\?/';
$patterns[6] = '/\"/';
$patterns[7] = '/\,/';
$patterns[8] = '/\)/';
$patterns[9] = '/\(/';
$patterns[10] = '/&/';
$patterns[11] = '/!/';
$replacements[0] = '+';
$replacements[1] = '';
$replacements[2] = '+';
$replacements[3] = '';
$replacements[4] = '';
$replacements[5] = '';
$replacements[6] = '';
$replacements[7] = '';
$replacements[8] = '';
$replacements[9] = '';
$replacements[10] = 'and';
$replacements[11] = '';
$newband = preg_replace($patterns, $replacements, $band);
$newband2 = preg_replace($patterns, $replacements, $band2);
?>
}
}
catch(PDOException $e) {
echo $e->getMessage ();
} ?>
include("/home2/thegaunt/www/common/footer-new.php");
?>
function build_calendar($year, $month) {
global $link;
$timestamp = mktime(0,0,0,$month,1,$year);
$thismonth = getdate ($timestamp);
$startdate = $thismonth['wday'];
$maxday = date("t",mktime(0, 0, 0, $month, 1, $year));
$daysi = 1-$startdate-1;
if ($month==12) { $next_month = 1; $next_year=$year+1; } else { $next_month = $month+1; $next_year=$year; };
if ($month==1) { $prev_month = 12; $prev_year=$year-1; } else { $prev_month = $month-1; $prev_year=$year; };
if ($month<10) $month='0'.$month;
?>