<?php
	////////////////////////////////////////////////////////////////////////
	// Breeze Website Builder
	// Copyright EB Dynamics, Inc., Edward Lemmers, P.E.
	// For licensing, see license.txt.
	// Created: 10/27/2010	ELL
	// 
	
	include ("check_session.php");

	$query = "SELECT * FROM schedule ORDER BY EventDateSort";

	$result = mysql_query($query, $link);
	$row = mysql_fetch_array($result);

	if (mysql_num_rows($result) < 1)
	{
		echo "-no data-";
		exit;
	}
	$result = mysql_query($query, $link);

	while ($row = mysql_fetch_array($result))
	{
		$ID = $row['ID'];
		$Description = $row['Description'];
		$EventDate = $row['EventDate'];
		$StartTime = $row['StartTime'];
		$EndTime = $row['EndTime'];
		$URL = $row['URL'];
		$Active = $row['Active'];
		
		$Description = stripslashes($Description);
		$EventDate = stripslashes($EventDate);
		$EventDateArr = explode("/", $EventDate);
		$EventDate = $EventDateArr[2] . "-" . $EventDateArr[0] . "-" . $EventDateArr[1];
		$StartTime = stripslashes($StartTime);
		$EndTime = stripslashes($EndTime);
		$URL = stripslashes($URL);

		$rows .= $row_delim . "$ID::$Description::$EventDate::$StartTime::$EndTime::$URL::$Active";
		$row_delim = "@@";
	}

	print $rows;
?>