<?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 
$SQLTODO=DB_query("SELECT  * FROM to_do WHERE  day(due_date)='".$_REQUEST['day']."' and month(due_date)='".$_REQUEST['month']."' AND  year(due_date)='".$_REQUEST['year']."'",$db);
?>
<h1>To Do</h1>
<table width="100%" cellpadding="3" cellspacing="0" border="1">
	<tr class="row1">
		<td class="tabledata">To Do</td>
		<td class="tabledata">ToDo Description</td>
		<td class="tabledata">Status</td>
		<td class="tabledata">Date</td>
	</tr>
<?php while($TODOView=DB_fetch_array($SQLTODO)) {?>
	<tr class="row1">
		<td><?php echo $TODOView['to_do']; ?></td>
		<td><?php echo $TODOView['description']; ?></td>
		<td><?php echo $TODOView['status1']; ?></td>
		<td><?php echo ConvertSQLDate($TODOView['due_date']); ?></td>
	</tr>
<?php }?>
</table>