<?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);

$student_id=$_REQUEST['student_id'];

$sql = " select * from  edu_student_details  where student_id='$student_id' AND status='0' AND branch_id=".$_SESSION['branch'];
 
$WorkAssignListings = $m->query($sql);

$class_id=$WorkAssignListings[0]['class_id'];
$section=$WorkAssignListings[0]['section_id'];

  $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 Students Cards</title>
<!-- Favicons-->
<link rel="icon" type="image/png" href="img/favicon.png" sizes="32x32" />

<link href='https://fonts.googleapis.com/css?family=Libre Barcode 39' rel='stylesheet'>
<script type="text/javascript">
 //window.print();
</script>
<style> 

.section{width:95%; height:auto;float:left;padding-right:2.5%;margin-left:2%;}

.box{

    width: 48%;
    float: left;
    height: 7cm;
    padding: 7.7px;
}   
   
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:lightgray;
  /*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;

 

$counter=0;

$fee_fine=0;

// loop just printing the number of pages 

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


?>

<page size="A4">


  <?php 
  for ($i=1; $i<=8 ; $i++) {



   ?>


<div class="box" >


<div style="padding: 2%;
    height: 6.5cm;
    border-radius: 18px;
    border: 1px solid <?php echo $_SESSION['color'];?>;
    margin-left: 2%;
    padding-left: 0%;">

    <div style="background-color: <?php echo $_SESSION['color'];?>;width: 101%;height: 22px;border: 2px solid <?php echo $_SESSION['color'];?>;border-top-right-radius: 15px;border-top-left-radius: 15px;margin-top: -8px;"></div>

    <div style="width: 100%;text-align: center;">

      <?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:50px;margin-top: 3px;"   /> 

       <?php }else { ?>   

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


       <?php } ?>

     </div>

    
    <div style="width: 100%;font-size: 11px; padding: 3px;margin-top: -7px;"> 

      <div style="text-align: center; color: <?php echo $_SESSION['color'];?>"><?php echo $branch_details[0]['Branch_Location']; ?>

           
        </div>

    </div>
    <br>
    <div>
    <div style="width: 15%;float: left;color: white;">.</div>
    <div style="color: <?php echo $_SESSION['color'];?>;font-size: 11px;margin-top: -10px; text-align: center;">
          Contact No:  <?php echo $branch_details[0]['branch_contact']; ?>
    </div>
    <div style="width: 15%;float: left;"></div>
    </div>


    <div style="width: 67%;text-align: justify;margin-bottom: 34px; margin-left: 15%">
          <p style="text-align: center; color: black;font-size: 13px;margin-bottom: 0px;">In the case of loss this card kindly return it to the school address.</p>
          <p style="text-align: center; color: black;font-size: 13px;margin-top: 0px;">Valid till: &nbsp;&nbsp;<?php echo date("d-M-Y",strtotime($_REQUEST['valid']));?></p>
    </div>

    

<div style="width:100%; float: left;margin-top: -32px;">

 
  <img src="<?php echo DOMAIN.AgentDirectory;?>images/barcode1.PNG" id="preview" class="img-thumbnail align-items-center" style="width:130px;height: 29px;margin-top: 4px; margin-left: 113px;"   />
   

 </div>  <!-- row -->


<div style="font-size: 14px;
    float: right;
    margin-right: 7%;
    margin-top: 4%;"></div>


</div>

<div style="background-color: <?php echo $_SESSION['color'];?>;width: 97%;height: 22px;border: 2px solid <?php echo $_SESSION['color'];?>;border-bottom-right-radius: 15px;border-bottom-left-radius: 15px;margin-top: -27px;margin-left: 8px;"><p style="font-size: 11px;
    float: right;
    margin-right: 7%;
    margin-top: 1%;color: white;">Issuing Authority</p></div>

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



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



 <?php 

 $counter++;
 
   } ?>

<br><br>
</page>

<?php } //usset($_SESSION['color']); ?>

</body>
</html>
