<?php include "layouts/menu.php"; ?> <div class="right_col" role="main">
            <div class="row">
                 <!-- page header -->
             
                <!--end page header -->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <!-- Form Elements -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Login History
                        </div>
                        <div class="panel-body">
                            <div class="row">
                   <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post"  enctype="multipart/form-data">
  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label thicker" >Enter From Date</label>
    <div class="col-sm-4">
    <input type="date" class="form-control thicker" id="datepicker" name="fdate" value="<?php echo date("Y-m-d"); ?>" placeholder="DD/MM/YYYY" onfocus="insertDate(this,'DD-MM-YYYY')">
    </div>
  </div>
  <div class="form-group">
     <label for="inputPassword3" class="col-sm-2 control-label thicker" >Enter To Date</label>
    <div class="col-sm-4">
    <input type="date" class="form-control thicker" id="datepicker" name="tdate" value="<?php echo date("Y-m-d"); ?>" placeholder="DD/MM/YYYY" onfocus="insertDate(this,'DD-MM-YYYY')">
    </div>
  </div>
  
   <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label thicker" >Staff</label>
    <div class="col-sm-4">
    <select type="text" class="form-control thicker" id="datepicker" name="byy" value="" >
    <option>All</option>
    <?php $sqll = mysqli_query($conn, "select * from customer");
    while($row2=mysqli_fetch_array($sqll)) { ?>
    <option><?php echo $row2['mail']; ?></option>
    <?php } ?></select>
    </div>
  </div>
	<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-default" name="s15">Show it</button>
    </div>
  </div>
                  </div>
                </div>
              </div>
              
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title" >
                    <h2>Customer Details <small></small></h2>
                    
                  </div>
                  <div class="x_content">
                    <div class="row">
                      <div class="col-sm-12">
                        <div class="card-box table-responsive">
                          
                                        <?php
		
								if(isset($_POST['s15']))
								{
									extract($_POST);
		
						?></p>
				<table id="datatable-buttons" id="datatable-buttons" class="table table-striped table-bordered">
				<thead>
						<tr>
					<th>S.No</th><th>Date Time</th>	<th>User Name</th>
						
						<th>Staff Code</th>
							<th>IP Address</th>
							<th>Finance</th>
						
				
					</tr><thead><tbody>
					<?php if($byy == 'All') {
$qry=mysqli_query($conn, "select * from loginlog where date between '$fdate' and '$tdate'");
					}
					else {
					$qry=mysqli_query($conn, "select * from loginlog where uname='$byy' && date between '$fdate' and '$tdate'");
	
					}
				$n=mysqli_num_rows($qry); $i = 0;
				while($row=mysqli_fetch_array($qry))
  { 
$i++;
?>				<tr>
				<td><?php echo $i; ?></td>
						
<td><?php echo $row['dtime'];?></td>
<td><?php echo $row['uname'];?></td>

<td><?php echo $row['code'];?></td>



			<td><?php echo $row['ipp'];?></td>
	<td><?php echo $row['mfin'];?></td>			
		</tr>
					<?php
						$x++; }
					}
				
					?></tbody>
					</table>
					
</div>
</div></div>
</div></div></div>      <footer>
          <div class="pull-right">
             <a href="https://infossel.com">Infossel Soft Solution</a>
          </div>
          <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
      </div>
    </div>

    <!-- jQuery -->
    <script src="vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="vendors/nprogress/nprogress.js"></script>
    <!-- iCheck -->
    <script src="vendors/iCheck/icheck.min.js"></script>
    <!-- Datatables -->
    <script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
    <script src="vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
    <script src="vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
    <script src="vendors/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
    <script src="vendors/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
    <script src="vendors/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
    <script src="vendors/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
    <script src="vendors/datatables.net-scroller/js/dataTables.scroller.min.js"></script>
    <script src="vendors/jszip/dist/jszip.min.js"></script>
    <script src="vendors/pdfmake/build/pdfmake.min.js"></script>
    <script src="vendors/pdfmake/build/vfs_fonts.js"></script>

    <!-- Custom Theme Scripts -->
    <script src="build/js/custom.min.js"></script>

  </body>
</html>