<?php include "layouts/menu.php"; ?>
		<script type="text/javascript">
	  $(function() {
   $("#datepicker").datepicker({ dateFormat: 'dd-mm-yy' });
  });
</script>
<script type="text/javascript">
function zp(n){
return n<10?("0"+n):n;
}
function insertDate(t,format){
var now=new Date();
var DD=zp(now.getDate());
var MM=zp(now.getMonth()+1);
var YYYY=now.getFullYear();
format=format.replace(/DD/,DD);
format=format.replace(/MM/,MM);
format=format.replace(/YYYY/,YYYY);
t.value=format;
}
</script>
    <script>
  $(function() {
   $("#datepicker1").datepicker({ dateFormat: 'dd-mm-yy' });
  });
  </script>
    <script>
  $(function() {
   $("#datepicker2").datepicker({ dateFormat: 'dd-mm-yy' });
  });
  </script>
      <script>
  $(function() {
   $("#datepicker8").datepicker({ dateFormat: 'dd-mm-yy' });
  });
  </script>
    <script>
  $(function() {
   $("#datepicker9").datepicker({ dateFormat: 'dd-mm-yy' });
  });
  </script>
   <script>
function add()
{
var x = document.getElementById("txt1").value;
var y = document.getElementById("txt2").value;
document.getElementById("bal").value =(x*1)-(y*1);
}
</script>
     
  <?php include "layouts/menu1.php"; ?>
            <!-- Right side column. Contains the navbar and content of the page -->
           <div class="right_col" role="main">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                       Staff Attendance
                      
                    </h1>
                   
                </section>
                   <div class="panel-body">
                            <div class="row">
   <div class="alert alert-info">Staff Attendance</div>
  <form name="form1" class="form-horizontal" method="post" action="" enctype="multipart/form-data">
	<?php
				$qry=mysqli_query($conn, "select * from customer");
				$row=mysqli_fetch_array($qry);
				?>
				  <div class="form-group">
    <label for="inputPassword3" class="col-sm-2 control-label">Today</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="bm12" name="date" required  value="" placeholder="Pay Date" onfocus="insertDate(this,'DD-MM-YYYY')">
    </div>   
</div>	
<?php $i=1;    $qry=mysqli_query($conn, "select * from customer");
				while($row=mysqli_fetch_array($qry))
				{
?> 
    <div class="row">
  <div class="col-xs-6">
  <?php echo $row['code'];?>    <?php echo $row['name'];?></div>
  <div class="col-xs-6">
   <div class="radio">
  <label class="radio-inline">
  <input type="radio" name="as<?php echo $i; ?>" id="inlineRadio2" value="p" checked> Present
</label>
</div>
 <div class="radio">
<label class="radio-inline">
  <input type="radio" name="as<?php echo $i; ?>" id="inlineRadio3" value="a"> Absent
</label>
</div>
<div class="radio">
<label class="radio-inline">
  <input type="radio" name="as<?php echo $i; ?>" id="inlineRadio3" value="h"> Half
</label>
</div>

<div class="radio">
<label class="radio-inline">
  <input type="radio" name="as<?php echo $i; ?>" id="inlineRadio3" value="P1/2H"> Half Hour Permission
</label>
</div>

<div class="radio">
<label class="radio-inline">
  <input type="radio" name="as<?php echo $i; ?>" id="inlineRadio3" value="P1H"> 1 Hour Permission
</label>
</div>

<div class="radio">
<label class="radio-inline">
  <input type="radio" name="as<?php echo $i; ?>" id="inlineRadio3" value="P2H"> 2 Hour Permission
</label>
</div>



</br>
</div>
</div>	<?php $i++; } ?>

        <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-primary  btn-lg btn-block" name="s11">Register</button>
    </div>
  </div>
													<div class="alert alert-warning">
							<?php
							if(isset($_POST['s11']))
							{
								extract($_POST);
								$insert=mysqli_query($conn, "INSERT INTO attt(date,std,as1,as2,as3,as4,as5,as6,as7,as8,as9,as10,as11,as12,as13) 
								VALUES ('$date', '$std', '$as1', '$as2', '$as3', '$as4', '$as5', '$as6', '$as7', '$as8', '$as9', '$as10', '$as11', '$as12', '$as13')");
								if($insert)
								{
									
									echo "Registered Successfully";
									
								}
								else
								{
									echo "Failure";
								}
							}		
							
						   
								
?>	
	  </div>
</form>
</div>
 
 
</div>
  	
                        </div>
                    </div>

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
     <!-- footer content --> 
        <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>