<?php
session_start();
if($_SESSION["username"]=="")
{
 	echo "You are not Logged in Please <a href='index.html'>Sign in </a> First ";
}
else
{


?>
<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->

<head>
   <?php include("includes/header.php") ?>
</head>

<body>


    <!-- Left Panel -->

   <!-- /#left-panel -->

    <!-- Left Panel -->

    <!-- Right Panel -->

    <div id="right-panel" class="right-panel">

        <!-- Header-->
        
        <!-- Header-->

        

        <div class="content mt-3">
            <div class="animated fadeIn">
                <div class="row">

                    <div class="col-md-14">
                        <div class="card">
						<div class="page-title">
                        <h2><center><? echo "" . $_SESSION["userid"]; ?></center></h2>
                    </div>
                            <div class="card-header">
							
                                <strong class="card-title"><center>Daily Inquiry Report</center> </strong>
                            </div>
                            <div class="card-body">
							<?php

include 'dbc.php';


$userid=$_SESSION["userid"];
$from_date=$_POST["from_date"];
$to_date=$_POST["to_date"];


?>
                                <table id="bootstrap-data-table-export" class="table table-striped table-bordered">
                                    <thead>
									<?php
echo "<th > Inq# </th>";
echo "<th > Inq Date</th>";
echo "<th > Studnet Name </th>";
echo "<th > Father Name </th>";
echo "<th > Class Name </th>";
echo "<th > Sec </th>";
echo "<th > Cell 1 </th>";
echo "<th > DOB</th>";
echo "<th > Nic No</th>";
echo "<th > Address</th>";
echo "<th > Remarks</th>";


echo "</tr>";
?>
                                    </thead>
									
                                    <tbody>
									<?php
									$sql = "SELECT * FROM inq where date between '$from_date' and '$to_date' order by id";
$result=$conn->query($sql);
                                       while($row = $result->fetch_assoc())
 
  {
  $id = $row['id'];	
   echo "<tr>";
  echo "<td>" .$row['adm_no'] . "</td>";
   echo "<td>" .$row['date'] .  "</td>";
  echo "<td>" .$row['std_name'] .  "</td>";
 echo "<td>" .$row['fname'] . "</td>";
 echo "<td>" .$row['class_name'] .  "</td>";
 echo "<td>" .$row['cls_sec'] .  "</td>";
 echo "<td>" .$row['cell_1'] .  "</td>";
 
 echo "<td>" .$row['dob'] .  "</td>";
 echo "<td>" .$row['fnic'] .  "</td>";
 echo "<td>" .$row['address'] .  "</td>";
 echo "<td>" .$row['remarks'] .  "</td>";

    echo"<th> <a href ='Add_Student_Registration1.php?id=$id'>"?><button type="button" class="btn btn-primary">  Convert to Admission </button><?php "</a>";
  echo "</tr>";

$trecord=$trecord + 1;
}
   echo "<tr>";
	echo "<td colspan=4 align=right><b>" ."Total Records::". $trecord ."</b></td>";
	  echo "</tr>";
	 
  ?>
                                       
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>


                </div>
            </div><!-- .animated -->
        </div> <!-- .content -->
    </div><!-- /#right-panel -->

    <!-- Right Panel -->

   <?php include("includes/footermenu.php") ?>

</body>

</html>
<?php
}
?>