 |
 |

|
|
$today = date("Ymd");
$filepath = file("admin/raw_spirit_events.dat");
sort($filepath);
$i = 0;
while ($i != count($filepath)) {
// inside loop to grab the line then $eric2[0] and so on.
list($dates, $location, $times, $cost, $address, $phone_number, $contact_name, $contact_email, $url, $title, $description, $misc) = explode("|", $filepath[$i]);
//Print user's info
if ($dates >= "$today") {
$dateString = "";
$body = "";
$monthArray = array( 1=> "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$year = substr($dates, 0, 4);
$month = substr($dates, 4, 2);
settype($month, "integer");
$day = substr($dates, 6, 2);
$dateString .= $monthArray[$month];
$dateString .= " ";
$dateString .= $day;
$dateString .= ", ";
$dateString .= $year;
$day = date ("l", mktime(0,0,0,"$month","$day","$year"));
$body .= "| $title | \n";
$body .= "| $day, $dateString | \n";
if ($location) {$body .= " | $location | \n";}
if ($times) {$body .= " | $times | \n";}
if ($cost) {$body .= " | $cost | \n";}
if ($address) {$body .= " | $address | \n";}
$body .= "| For More Information and R.S.V.P. Contact: | \n";
if ($contact_name) {$body .= "| | $contact_name | \n";}
if ($phone_number) {$body .= " | $phone_number | \n";}
if ($contact_email) {$body .= " | $contact_email | \n";}
if ($url) {$body .= " | $url | \n";}
if ($description) {$body .= " | $description | \n";}
if ($misc) {$body .= " | $misc | \n";}
$body .= "
| ";
echo $body;
}
$i++;
}
?>
|
|
 |
|
 |
 |