<table width="100%" border="1">
<tr><td>SNo.</td>
<td>Priority</td>
<td>Time</td>
<td>Date</td><td>Status</td>
  <td>&nbsp;</td>
</tr>
<?php $i=0;
$curdate=date('Y-m-d');
    
	$getlead_event=DB_query("select * from crm_leadtodo where groupid='".$_SESSION['ACGRoleId']."' and lead_type='Visit' and tododatetime>='$curdate' and todostatus!='Confirm'",$db);
while($rows=DB_fetch_array($getlead_event))
{
 ?>
    <tr><td><?php echo ++$i; ?></td>
   <td><a href="index.php?route=CRM/CrmLeadEvent&action=Edit&&todoid=<?php echo $rows['todoid']?>&leadid=<?php echo $rows['mst_leadid'].$rurl?>"><?php echo $rows['lead_priority'];?>
   </a></td>
	<td><?php echo $rows['tododatetime'];?></td>
	<td><?php echo $rows['todostart_time'];?></td>
	
		<td><?php echo $rows['todostatus'];?></td>
     <td><?php echo $rows['notification_matter'];?></td>
   </tr>
<?php } ?>  
</table>
