<?php 
session_name('CAKEPHP'); session_start();
$PageSecurity = 11;
include('includes/session.inc');
//include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');
include("includes/function_lib.php");
include('CRM/functions.php');
?>
<?php 
$SQLEV=DB_query("SELECT  * FROM event WHERE  day(event_start_date)='".$_REQUEST['day']."' and month(event_start_date)='".$_REQUEST['month']."' AND  year(event_start_date)='".$_REQUEST['year']."'",$db);
?>
<h1>Events</h1>
<table width="100%" cellpadding="3" cellspacing="0" border="1">
	<tr class="row1">
		<td class="tabledata">Event Type</td>
		<td class="tabledata">Event Name</td>
		<td class="tabledata">Event Location</td>
		<td class="tabledata">Status</td>
		<td class="tabledata">Date</td>
	</tr>
<?php while($EventView=DB_fetch_array($SQLEV)) {?>
	<tr class="row1">
		<td><?php echo $EventView['event_type']; ?></td>
		<td><?php echo $EventView['event_name']; ?></td>
		<td><?php echo $EventView['event_location']; ?></td>
		<td><?php echo $EventView['event_status']; ?></td>
		<td><?php echo ConvertSQLDate($EventView['event_start_date']); ?></td>
	</tr>
<?php }?>
</table>