<?php 
            if(!empty($details)){
            foreach($details as $row){}
            if($row['transStatus']=='PAID'){
            ?>
<div id="printArea">
<!--div style="background: no-repeat  url('<?php echo base_url("images/bgm30-banner.jpg");?>'); height:400px !important; width:400px !important;"-->
<div style="height:300px !important; width:100% !important;">
   <img src="https://niqs.org.ng/event/bgm30/images/bgm30-bannerbadge.jpg" width="100%" />
    <div style='background: #ffffff; padding: 10px'><h2 align='center'><?php echo strtoupper($row['confName']); ?></h2></div>
    
    <div style='background: #ffffff; padding: 5px'><h3 align='center'>
    <?php 
        //use no to get chapter
        
        if($row['memberNo']<>""){
            //reconnect db
            $con3 = mysqli_connect("localhost","niqsorgn_portal","@Xchange69!") or die("Could not Connect My Sql2");
            mysqli_select_db($con3,"niqsorgn_pota1969")  or die("Could connect to Database - Contact Admin");

            $q1 = "select memberSurname, memberState from members where memberNo='".$row['memberNo']."' LIMIT 1";
            $r1 = mysqli_query($con3, $q1);
            
            if($r1){
                $x1 = mysqli_num_rows($r1);

                if($x1 == 1){ 
                    $myrow = mysqli_fetch_array($r1);
                    $stateChapter = $myrow["memberState"];
                }
            }

            echo strtoupper($stateChapter);
        } 
    ?>
    </h3></div>
    <center><img src="<?php echo base_url(); ?>welcome/set_barcode/<?php echo $row['transRef'];?>" width="30%"></center>
</div>

</div>

<!-- <button onclick="printDiv('printArea');" class="btn btn-primary">Print Badge</button> -->
            <?php }else{ echo "Invalid Application No"; }}else{ echo "No Records Found..";} ?>


<script>
window.print();
</script>

