<?php  $PageSecurity = 4;
$PageName = 'Add Items';
 include('includes/session.inc');
 //include('includes/header.inc');
include('includes/function_lib.php');
   global $db;
   echo '<link href="'.$rootpath. '/css/'. $_SESSION['Theme'] .'/default.css" rel="stylesheet" type="text/css" />';?>
   <script language="javascript">
   function alertfun()
   {
 	 opener.window.location="index.php?route=CRM/CRMAlerts&action=Edit&modid=12&frmid=311";self.close();
   }
   </script>
<center>   <h2>Alerts</h2></center>
<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');
//echo "select * from crm_leadtodo where groupid='".$_SESSION['ACGRoleId']."' and lead_type='Visit' and tododatetime>='$curdate' and todostatus!='Confirm'";
	$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="#" onclick="alertfun();"><?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>
