<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.icardbg {
  background-image:url('../uploads/content/ic3.png');
  background-repeat:no-repeat;
  opacity:0.8;
  z-index:-1;
  font-family:arial;
 
}
.icardbg img{
  display:block;
  margin:auto;
}
</style>

<script>
window.print();
window.onfocus=function(){ window.close();}
</script>

<?php
$aryForms=$db->getRows("SELECT * FROM student WHERE class='".$_GET["class"]."' and  school_id='".$_SESSION["admin"]["school_id"]."' and  session='".$_SESSION["admin"]["session"]."'  and status='1'  ");
//print_r($_SESSION);
//echo "SELECT * FROM student WHERE class='".$_GET["class"]."' and  school_id='".$_SESSION["admin"]["school_id"]."' and  session='".$_SESSION["admin"]["session"]."' and status='1' ";
//echo "<pre>";print_r($aryForm); 
if(is_array($aryForms) && count($aryForms)>0){
	foreach($aryForms as $aryForm){
	    $barcode=$aryForm['admissionno'];
?>
      <div class="icardbg" style="border:solid 1px #999;border-radius:10px;padding:10px;width:250px;display:inline-block;margin:10px;">
      
          <table><tr>
              <td><img src="<?php echo $LinksDetails['logo'] ?>" style="width:50px;height:50px;margin-top:-20px;" /></td>
              <td style="text-align:right;color:navy;"><h5 style="font-weight:bold;padding-left:10;"><?php echo ucfirst($LinksDetails["site_name"]) ?></h5>
                <h5 style="text-align:center;margin-top:-20px;">Usha Colony</h5>
                <h5 style="text-align:center;margin-top:-20px;">Bhind, Madhya Pradesh</h5>
              </td>
              </tr>
          </table>

      <div style="margin-top:-15px;">
      <img src="<?php echo URL_ROOT ?>media/photo/<?php echo $aryForm["photo"] ?>" style="height:100px;width:100px;marin-top:-10px;border-radius:50px;" class="mx-auto d-block"/></div>
      
      <h4 style="color:red;font-weight:bold;text-align:center;margin-top:0px;"><?php echo $aryForm["name"] ?></h4>
      <div style="font-weight:bold;text-align:center;color:#444444;margin-top:-20px;">
        <h6 style="margin-top:-2px;">Class : <?php echo $aryForm["class"] ?> - <?php echo $aryForm["section"] ?></h6>
        <h6 style="margin-top:-20px;">D.O.B. : <?php $dob=date_create($aryForm['dob']); echo date_format($dob, "d-m-Y");  ?></h6>
        <h6 style="color:purple;text-align:left;margin-top:-20px;"> FATHER'S NAME: <?php echo $aryForm["fname"]; ?></h6>
        <h6 style="color:purple;text-align:left;margin-top:-23px;">ADD : <?php echo $aryForm["address"]; ?></h6>
        <h6 style="color:purple;margin-top:-23px;">CONTACT: <?php echo $aryForm["mobile"]; ?> </h6>

        <table style="margin-top:-20px;">
            <tr>
                <td style="color:black;font-size:12px;">
                    <!--<span> <img src="../uploads/content/principal-signature.png" style="height:30px;margin-left:0px;" /> </span>-->
                    <span style="height:30px;margin-left:0px;" > </span>
                    <span style="margin-top:-10px">Principal</span><br>
                    <span><i class="fa fa-mobile-phone"></i> 8458811324</span><br>
                    <span><i class="fa fa-globe"></i> www.savarnacloudtech.com</span><br>
                    <span style="font-size:10px;">DATE OF ISSUE: 1 APRIL 2019</span><br>
                    <span style="font-size:10px;">VALID TILL: 31 MARCH 2020</span>
                    <div>
                    <?php echo "<img alt='testing' src='barcode.php?codetype=Code39&size=30&text=".$barcode."&print=true' style='float:left;'/>"; ?></div>
                </td>
            </tr>
        </table>

      </div>

      </div>
      </div>

<?php
	}
}
?>