<?php 
 
$getrec=DB_query("select * from crm_add_to_do where day(todo_date)='".$_REQUEST['day']."' and
	  year(todo_date)='".$_REQUEST['year']."' and  month(todo_date)='".$_REQUEST['month']."'",$db);
 ?>
<table width="100%" border="0">
<tr>
<td><h1 style="font-size:12px; padding-top:5px; padding-bottom:5px; padding-left:10px;" align="left"><strong>Showing Activities For Date <?php echo $_REQUEST['day'].'/'.$_REQUEST['month'].'/'.$_REQUEST['year'];?></strong></h1></td>
</tr>
</table>
<div align="center"><a onclick='popup("field_visit_todo-print.php?day=<?php echo $_REQUEST['day']; ?>&month=<?php echo $_REQUEST['month']; ?>&year=<?php echo $_REQUEST['year']; ?>",1000,1000)' href="#"   >Print</a></div>
<table width="100%" border="0">
	<tr bgcolor="#CCCCCC" height="25px;" style="font-weight:bold;">
		<td width="18%"><center>To Do Date</center></td>
		<td width="17%"><center>Subject</center></td>
		<td width="15%"><center>Description</center></td>
		<td width="17%"><center>Priority</center></td>
		<td width="17%"><center>Time</center></td>
		<td width="14%"><center>User</center></td>
	</tr>
	<?php while($getrecRor=DB_fetch_array($getrec)) {?>
	<tr>
		<td><center><?php echo ConvertSQLDate($getrecRor['todo_date']); ?></center></td>
		<td><center><?php echo $getrecRor['subject']; ?></center></td>
		<td><center><?php echo $getrecRor['description']; ?></center></td>
		<td><center><?php echo $getrecRor['priority']; ?></center></td>
		<td><center><?php echo $getrecRor['todostart_time']; ?></center></td>
		<td><center><?php
$user=explode(',',$getrecRor['createdby']);
$User1=implode("','",$user);
$Username="select * from www_users where id IN('".$User1."')";
$UserSql=DB_query($Username,$db);
while($UserRow=DB_fetch_array($UserSql))
{
echo $UserRow['userid']," ,";
} 
 ?></center></td>
	</tr>
	<?php } ?>
</table>