<?php include('parent/callMe.php');?>

<?php include('Sessioncheck.php');?>

<?php 



//getting branch details 

//echo $_SESSION['branch'];

  $m->where("branch_id", $_SESSION['branch']);

  $branch_details2 = $m->get("edu_branch_config");



//print_r($branch_details2);

$branch=getBranch($m);



$class_id=$_REQUEST['class_id'];

$brID=$_SESSION['branch'];



$sql = " select std.student_id, std.first_name, std.last_name, std.candidate_roll_no, std.section_id, std.ref_no, std.class_id, std.dob, std.section_id, std.session_id, std.cell_no from  edu_student_details as std, edu_class_config as cls where std.class_id=cls.class_id and std.class_id='$class_id' AND std.status='0' AND std.branch_id='$brID' order by cls.orderno, std.section_id, std.ref_no asc "; 

$WorkAssignListings = $m->query($sql);



  $sql1 = " select * from  edu_class_config  where class_id='$class_id'";

  $className = $m->query($sql1);



  $sql2 = " select * from  edu_adm_section_detail  where section_id='$section'";

  $sectionName = $m->query($sql2);



$total_fee;

?>

 <!DOCTYPE HTML>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Favicons-->

<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />

<title>Print Voucher</title>

<!-- Favicons-->

<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />

<script type="text/javascript">

// window.print();

</script>

<style> 



.section{width:95%; height:auto;float:left;border-right: 2px solid black;border-right-style:dotted;padding-right:2.5%;margin-left:2%;margin-top: 0px;}

.box{

  width:32%;float:left;height:1.25in;padding:4px;line-height: 16px;margin-top: 0px;

}  

   

tr th {background-color:gray; text-align:center;font-size:14px;border:1px solid gray;}

tr td {border-bottom:1px solid gray;border-left:1px solid gray;padding:.7%;}







.tdalign{text-align:center;border:1px solid black;}

  



body {

 /* background: rgb(204,204,204);*/

  font-weight:bold; 

}

page {

  

  display: block;

  margin: 0 auto;

  margin-bottom: 0.5cm;

  border:1px solid black;

  /*box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);*/

  /*padding:1%;*/

  height: 20cm; 

  width: 29.7cm;

  margin-top: 0px;

}



page[size="A4"][layout="landscape"] {

  width: 29.7cm;

  height: 20cm;  

  margin-top: 0px;

}





@media print {

  body, page {

    margin: 0;

    box-shadow: none;

    border:none;

  }

}



    

  </style>



</head>

<body>



<?php 

$WorkAssignValue=$WorkAssignListings;



$divission =count($WorkAssignValue);



 $DivideByFour=$divission/18;



$counter=0;



$fee_fine=0;



// loop just printing the number of pages 



for($k=0;$k<$DivideByFour;$k++){





?>



<page size="A4">





  <?php 

  for ($i=1; $i<=18 ; $i++) {





   



   ?>





<div class="box" >





<div style="padding: 2%;

height: 1in;

width: 3.25in;

/*border: 1px solid black;*/

margin-left: 2%;

font-size: 14px;

margin-top: 0px;

">







<div width="60%" style="float: left;"> Class/Sec: <?php echo getClassName($m,$WorkAssignListings[$counter]['class_id']) ." / ". getSectionName($m,$WorkAssignListings[$counter]['section_id']);?>  </div>

<div width="40%" style="float: left; text-align: right;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adm no: <?php echo $WorkAssignListings[$counter]['ref_no'];?></div>    

<br><br>



<div width="100%" style="float: left;"> Student Name:  &nbsp;&nbsp; <?php echo $WorkAssignListings[$counter]['first_name'];?> </div>

   

<br><br>



<div width="100%" style="float: left;"> Father Name: &nbsp;&nbsp; <?php echo $WorkAssignListings[$counter]['last_name'];?>  </div>



</div>

 

<!-- ending section  -->



  </div>  <!-- ending box  -->



 <?php 



 $counter++;

 

   } ?>



</page>



<?php } ?>



</body>

</html>

