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

//getting branch details 
//echo $_SESSION['branch'];
  $m->where("branch_id", $_SESSION['branch']);
  $branch_details = $m->get("edu_branch_config");

//print_r($branch_details2);
$branch=getBranch($m);

$class_id=$_REQUEST['class_id'];
$brID=$_SESSION['branch'];

$sql = " select * from  edu_student_details as std, eduportal_parents_access as acs  where std.class_id='$class_id' AND std.status='0' and std.cell_no=acs.parents_cellno AND std.branch_id='$brID' group by std.cell_no";
 
$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%;}
.box{
  width:48%;float:left;height:7cm;padding:0.5%;
}  
   
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 {
  background: white;
  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: 21cm; 
}
page[size="A4"] {  
  width: 21cm;
  height: 29.7cm; 
}
page[size="A4"][layout="landscape"] {
  width: 29.7cm;
  height: 21cm;  
}
page[size="A3"] {
  width: 29.7cm;
  height: 42cm;
}
page[size="A3"][layout="landscape"] {
  width: 42cm;
  height: 29.7cm;  
}
page[size="A5"] {
  width: 14.8cm;
  height: 21cm;
}
page[size="A5"][layout="landscape"] {
  width: 21cm;
  height: 14.8cm;  
}
@media print {
  body, page {
    margin: 0;
    box-shadow: none;
    border:none;
  }
}

    
  </style>

</head>
<body>

<?php 
$WorkAssignValue=$WorkAssignListings;

$divission =count($WorkAssignValue);

 $DivideByFour=$divission/8;

$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<=8 ; $i++) {


   

   ?>


<div class="box" >


<div style="padding: 2%;
height: 235px;
border-radius: 5px;
border: 1px solid black;
margin-left: 2%;">


<div style="background: black;color: white;height: 50px;border-radius: 10px;">

<div style="width:17%;float: left; background: white;margin-top: 15px;margin-left: 15px;">

<?php if($brid[0]['logo']!=NULL){ ?>

<img src="<?php echo DOMAIN.AgentDirectory;?>img/<?php echo $brid[0]['logo'];?>" id="preview" class="img-thumbnail" style="width:60px;height:60px;"   />

<?php }else { ?>   

<img src="http://cdn.onlinewebfonts.com/svg/img_234957.png" id="preview" style="width:60px;height:60px;" class="img-thumbnail" />


<?php } ?>

</div>


<div style="width:78%;float: left;text-align: center;padding-top: 15px;font-size: 14px;"><b><?php echo $branch_details[0]['Branch_Name']; ?></b></div>

</div>

<p style="text-align: center; font-size:18px; font-weight: bold;">Parent Login Id Password</p>

<div width="40%" style="float: left;"> Parent Name:   </div>
<div width="60%" style="float: left; text-align: center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <?php echo $WorkAssignListings[$counter]['parents_name'];?></div>    
<br><br>
<div width="40%" style="float: left;"> Adm / Roll No:   </div>
<div width="60%" style="float: left; text-align: center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <?php echo $WorkAssignListings[$counter]['ref_no']." / ".$WorkAssignListings[$counter]['candidate_roll_no'];?></div>
<br><br>
<div width="40%" style="float: left;"> ID/Cell:   </div>
<div width="60%" style="float: left; text-align: center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <?php echo $WorkAssignListings[$counter]['parents_cellno'];?></div>
<br>
<div width="40%" style="float: left;"> Password:   </div>
<div width="60%" style="float: left; text-align: center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <?php echo $WorkAssignListings[$counter]['password'];?></div>


</div>
 
<!-- ending section  -->

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

 <?php 

 $counter++;
 
   } ?>

</page>
<br><br>
<?php } ?>

</body>
</html>
