<?php
  session_start();
$username = $_SESSION['User_Name'];

include_once('dashboard_desk.php');
 require_once('convert_marathi.php');
################################## Displaying Approved Letters InData Table To Perform Action #################################

?>
<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tapal Admin System</title>

<script>
function disp_count_list(cnt)
{
	var xmlhttp = new XMLHttpRequest();
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				document.getElementById("d1").innerHTML = xmlhttp.responseText;
			}
		};
		xmlhttp.open("GET", "disp_count_list.php?cnt="+cnt, true);
		xmlhttp.send();
}
</script>

</head>
<body>
	<div class="rightpanel">
		<ul class="breadcrumbs">
            <li><a href="dashboard_desk.php"><i class="iconfa-home"></i></a> <span class="separator"></span></li>
            <li><a href="dashboard_desk.php">Tables</a> <span class="separator"></span></li>
            <li> वारंवार येणारे पत्र  </li>
        </ul>
        <div class="pageheader">
            <div class="pageicon"><span class="iconfa-table"></span></div>
            <div class="pagetitle">
                <h5>Tables</h5>
                <h1> वारंवार येणारे पत्र  </h1>
            </div>
        </div><!--pageheader-->
        <div class="maincontent">
            <div class="maincontentinner">
				<h4 class="widgettitle"> वारंवार येणारे पत्र  </h4>  
					
				<br><br>
				<center>
					
					Enter Count :&nbsp;&nbsp; <input type="text" name="count" onblur="disp_count_list(this.value)">


				</center>
				
				
				<div id="d1">
					<!--
					<table id="" class="table table-bordered">
						<thead>
							<tr>
								<th class="head0 center"> कोणाकडून प्राप्त झाले </th>
								<th class="head1 center"> मोबाईल नं. </th>
								<th class="head0 center"> Count </th>
							</tr>
						</thead>
						<tbody>	
							<?php	
							/*
							convert_marathi();
							$qry8=("SELECT sender_name, mobile_no, COUNT(*) as cnt from incoming_letters_transaction i, tapal_to_dpt_transaction t, desk_transaction de
							where  i.ltr_id=t.ltr_id
							AND t.dpt_ltr_id=de.dpt_ltr_id
							AND de.desk_id_from=(select desk_id from login where login_id='$username') 
							GROUP BY sender_name,mobile_no ORDER BY cnt DESC");
				
							$rs8=mysql_query($qry8) or die("".mysql_error());
							$cn=mysql_num_rows($rs8);
							//echo $cn;
							
							while($rws=mysql_fetch_array($rs8))
							{	
								
								$sender_name= $rws['sender_name'];
								$mobile_no= $rws['mobile_no'];
								$cnt= $rws['cnt'];
								
									echo "<tr class='gradeX'>";
								
									echo "<td class='center'>".$sender_name." </td>
									<td class='center' >".$mobile_no." </td>
									<td class='center' ><a href='view_freq.php?sender_name=".$sender_name."&mobile_no=".$mobile_no."'>".$cnt." </a></td>";
									
									echo "</td>
									</tr>";
									
											
							}
							*/
							?>
						</tbody> 
					</table>
					-->
				</div>
				
				
				
				
				
				
				
				
				
				
				
              <br /><br />
                
			<!--##################### Displaying Approved Letters InData Table To Perform Action ########-->
                <?php include_once('footer.php'); ?>
            </div><!--maincontentinner-->
        </div><!--maincontent-->
    </div><!--rightpanel-->
</div><!--mainwrapper-->
</body>
</html>
