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

//getting branch details 

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


$branch=getBranch($m);

$class_id=$_REQUEST['class_id'];
$section=$_REQUEST['section'];
$sql = " select * from  edu_student_details  where class_id='$class_id' AND section_id='$section' AND status='0' AND branch_id=".$_SESSION['branch'];
 
$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: #042954;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: 13px;"><?php echo $branch_details[0]['Branch_Name']; ?></div><br>
     <span style="margin-left: 80px;font-size: 13px;"><b>Student Id Card<b></span>

     </div>
     


     <div>
   <br><br> 
      <div style="width:75%;float:left;margin-top: -13px;">


        <div style="text-align: center;font-size: 20px;">&nbsp;&nbsp; <b><?php echo $WorkAssignValue[$counter]['first_name'];?></b></div>
        

        <div style="border: 1px solid #042954;border-radius: 5px;width: 263px;font-size: 13px;"><span style="background:#042954;padding-bottom:1px ;padding-top:1px ;color: white;padding-left: 5px;border-top-right-radius: 15px;border-top-left-radius: 6px;border-bottom-right-radius: 15px;border-bottom-left-radius: 6px;">F.Name:&nbsp;&nbsp;&nbsp;</span> <?php echo $WorkAssignValue[$counter]['last_name'];?></div>

        <div style="width:48%;font-size: 13px;float:left;border: 1px solid black;border-radius: 5px;margin-top: 5px;"><span style="background:#042954;color: white;padding-left: 5px;padding-bottom:1px;border-top-right-radius: 15px;border-top-left-radius: 6px;border-bottom-right-radius: 15px;border-bottom-left-radius: 6px;">Class:&nbsp;&nbsp;&nbsp;</span><?php echo $className[0]['Class_Name'];?></div>

        <div style="width:48%;font-size: 13px;float:left;border: 1px solid black;border-radius: 5px;margin-left: 5px;margin-top: 5px;"><span style="background:#042954;color: white;padding-left: 5px;padding-bottom:1px;border-top-right-radius: 15px;border-top-left-radius: 6px;border-bottom-right-radius: 15px;border-bottom-left-radius: 6px;">Issued:&nbsp;</span><span style="font-size: 12px;">&nbsp;<?php echo date("d-M-Y");?></span></div>

        <div style="width:48%;font-size: 13px;float:left;border: 1px solid black;border-radius: 5px;margin-top: 5px;"><span style="background:#042954;color: white;padding-left: 5px;padding-bottom:1px;border-top-right-radius: 15px;border-top-left-radius: 6px;border-bottom-right-radius: 15px;border-bottom-left-radius: 6px;">DOB:&nbsp;&nbsp;</span><span style="font-size: 12px;">&nbsp;<?php echo date("d-M-Y",strtotime($WorkAssignValue[$counter]['dob']));?></span></div>


        <div style="width:48%;font-size: 13px;float:left;border: 1px solid black;border-radius: 5px;margin-left: 5px;margin-top: 5px;"><span style="background:#042954;color: white;padding-left: 5px;padding-bottom:1px;border-top-right-radius: 15px;border-top-left-radius: 6px;border-bottom-right-radius: 15px;border-bottom-left-radius: 6px;">Adm/Roll:&nbsp;&nbsp;</span><span>&nbsp;<?php echo $WorkAssignValue[$counter]['ref_no']."/".$WorkAssignValue[$counter]['candidate_roll_no'];?></span></div>

        <div style="width:263px;font-size: 13px;float:left;border: 1px solid black;border-radius: 5px;margin-top: 5px;"><span style="background:#042954;color: white;padding-left: 5px;padding-bottom:1px;border-top-right-radius: 15px;border-top-left-radius: 6px;border-bottom-right-radius: 15px;border-bottom-left-radius: 6px;">Address:&nbsp;&nbsp;</span><span><?php echo $WorkAssignValue[$counter]['address1'];?></span></div>

        
      </div>


      <div style="width:25%;float:left">

        <?php if($WorkAssignValue[$counter]['image']!=NULL){ ?>

            <img src="<?php echo DOMAIN;?>Production/students_pics/<?php echo $WorkAssignValue[$counter]['image'];?>" id="preview" class="img-thumbnail" style="width: 82px;height: 115px;border: 2px solid black;margin-left: 5px;margin-top: -22px;border-radius: 5px;"   />

         <?php }else { ?>   

             <img src="<?php echo DOMAIN;?>Production/images/studenticon.png" id="preview"  class="img-thumbnail" style="width: 82px;height: 115px;border: 2px solid black;margin-left: 5px;margin-top: -22px;border-radius: 5px;" />


         <?php } ?>


      </div>
        <div style="font-size:11px;margin: 126px 0px 0px 291px;">Principal</div>
        <div style="width:100%;float:left;margin-top: 5px;background:#042954;color:white;text-align: center;margin-top: 0px;border-radius: 5px;padding: 1px;font-size: 12px;padding: 2px;"><?php echo $brid[0]['Branch_Location']." # ".$brid[0]['branch_contact'];?>


      </div>
        

      </div>
     
    

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



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



 <?php 

 $counter++;
 
 


   } ?>

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

</body>
</html>
