<?php $this->load->view('common/header');?>
         <div class="content-box">
                <div class="form_components">
                    <h3 class="hr"><?php echo $title;?>
                       <a class="btn btn-success pull-right" href="javascript:void(0)" onclick="printDiv('printableArea')"  ><span>Print</span></a>
                    </h3>
                    <div class="form_detail">

                      <div id="printableArea">
                      <?php if($results) {
                        

                      foreach ($results as $key => $result) {

                       
                                     if($result->profile_image){
                                              if (strpos($result->profile_image, 'http') !== false) {
                                                $profile   = $result->profile_image;
                                              }
                                              else{
                                                $profile = base_url('assets/images/student/'.$result->profile_image);
                                              }
                                          }
                                          else{
                                              $profile = base_url('assets/images/student/user.png');
                                          }

                              

                          
                        ?>
                        <div  style="width:336px;height:192px; border:1px solid #000;float:left;margin-right:10px;margin-bottom:10px;">
                          <div  style="width: 50%;float: left;">
                            <img src="<?php echo base_url($this->config->item('company_logo'));?>" width="100" height="50">
                            <p class="text-right" style="padding: 10px;"><?php echo $result->name;?><br>
                            <?php echo $result->mobile;?><br>
                            <img src="<?php echo base_url('assets/images/student/qrcode/'.$result->barcode) ;?>" width="60"></p>
                          </div>
                          <div  style="width: 50%;float: left;position: relative;height: 100%;">
                              <img src="<?php echo  $profile;?>"  width="100" height="100" style="position: absolute; margin-top:25%;right:20%;border-radius: 50%;border: 3px solid #FFF;">
                               <div  style="width: 50%;float: left;background: #FFF;height: 100%;">
                              </div>
                               <div  style="width: 50%;float: left;background: #000;height: 100%;">
                              </div>

                              
                          </div>
                        </div>
                    
                      <?php } } ?> 
                    </div>
                       
                    </div>
                </div>
            </div>
      
<?php $this->load->view('common/script');?>
<script type="text/javascript">
   function printDiv(divName) {
    
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;
     document.body.innerHTML = printContents;
     window.print();
     document.body.innerHTML = originalContents;
}
</script>

<?php $this->load->view('common/footer');?>