MM/DD/YY | $Venue | $City,$State ($Country) |
*/
$MonthHeader=""; // actual printing of the month
$Month= array(
"00" => "blank",
"01" => "January",
"02" => "February",
"03" => "March",
"04" => "April",
"05" => "May",
"06" => "June",
"07" => "July",
"08" => "August",
"09" => "September",
"10" => "October",
"11" => "November",
"12" => "December"
);
$Today = date("Ymd"); // YYYYMMDD
for ($index=0; $index < count($Gigs)-1 ; $index++) // dummy line is now at the end
{
$Gigs[$index] = chop($Gigs[$index]);
$Gigs[$index] = stripslashes($Gigs[$index]);
$Gigs[$index] = ereg_replace("[\t]+", "
",$Gigs[$index]);
$ThisGig=explode("|",$Gigs[$index]); // $ThisGig array starts at zero
/////////////////////////////////////////////////////////////////////////////
// For each $ThisGig, create the full table row in a variable, then decide on the month header
/////////////////////////////////////////////////////////////////////////////
unset ($Y , $M , $D , $Then, $FullDate, $Time, $URL, $Venue, $Street, $Nabe, $City, $Country, $Comments, $Phone, $With, $And, $Sep, $Cost);
$Y = $ThisGig[0];
$M = $ThisGig[1];
$D =$ThisGig[2];
$Then = $Y . $M . $D;
if ( $Then >= $Today)
{
continue; // skip future dates
}
// OK, the date is past
// $TimeStamp= mktime (0,0,0,$M,$D,$Y);
$Date="$M/$D/$Y";
// $Time=$ThisGig[4];
// $URL=$ThisGig[5];
$Venue=$ThisGig[6];
// $Street=$ThisGig[7];
// if (!empty($ThisGig[8]))
// {
// $Nabe="\n($ThisGig[8])";
// }
if (!empty($ThisGig[10]))
{
$City="$ThisGig[9], $ThisGig[10]";
}
else
{
$City="$ThisGig[9]";
}
if ( $ThisGig[11] !="USA" AND $ThisGig[11] !="")
{
$Country=", $ThisGig[11]";
}
// if (!empty($ThisGig[12]))
// {
// $Cost="
$ThisGig[12]";
// }
// $Comments=$ThisGig[13];
// if (!empty($ThisGig[14]))
// {
// $Phone="
$ThisGig[14]";
// }
// if (!empty($ThisGig[15]))
// {
// $With=$ThisGig[15];
// $And=strrpos($With, "/");
// if ($And !== false)
// {
// $With=substr_replace($With, " and ",$And,1); // replace last "/"
// }
// $With=str_replace("/", ", ",$With); // replace the other slashes with commas
// $With="\nwith $With";
// }
// if ( $URL != "http://")
// {
// $Venue="$Venue";
// }
//
// $Address="$Street$Nabe\n$City\n$Country";
// $Address=trim($Address);
// $Address=nl2br($Address);
//
// $Time.=$Cost;
//
// $Comments.=$With;
// $Comments=nl2br(trim($Comments));
//
// if( $CurrentMonth != $Month[$M] )
// {
// $CurrentMonth = $Month[$M]; // it's a month change
// $MonthHeader="$Month[$M] $Y |
\n";
// }
//
$Row[]=<<
$Date | $Venue | $City $Country |
END;
$MonthHeader=""; // reset so it is printed only once per month
unset($Y,$M,$D,$Date,$Time,$URL,$Venue,$Address,$Street,$Nabe,$City,$State,$Country,$Cost,$Comments,$Phone,$With);
}
///////////////////////////////////////////////////////////////////////////////////////////////
// All the valid dates are now in the array $Row[]
///////////////////////////////////////////////////////////////////////////////////////////////
print("\n\n");
for ($i=0;$i");
exit;
?>