<html>
    <head>
        <title><?php echo $b_header['title']; ?></h3></title>
        <style>
            @media print
            {
                * {-webkit-print-color-adjust:exact;}
                @page {margin:0in 0.10in 0in 0in; }
                .super_container
                {
                    page-break-after: always;
                    margin-top:0.25in;
                    position:relative;
                    width:100vw;
                    height:710px;
                }
            }
            body {margin: 0.25in 0.25in 0.63in 0.25in; box-sizing:border-box;width:100vw; height:100vh;padding-bottom:0.63in;}
            *{margin:0;padding:0;font-family:calibri;}
            .clear:after{content:"";clear:both;display:block;}
            .left{float:left;}
            .right{float:right;}
            .wd-10{width:10%;}
            .wd-20{width:20%;}
            .wd-30{width:30%;}
            .wd-40{width:40%;}
            .wd-50{width:50%;}
            .wd-60{width:60%;}
            .wd-70{width:70%;}
            .wd-80{width:80%;}
            .wd-90{width:90%;}
            .wd-100{width:100%;}
            .wd-15{width:15%;}
            .wd-25{width:25%;}
            .wd-35{width:35%;}
            .wd-45{width:45%;}
            .wd-55{width:55%;}
            .wd-65{width:65%;}
            .wd-75{width:75%;}
            .wd-85{width:85%;}
            .wd-95{width:95%;}
            .wd-100{width:100%;}
            .title{font-size:35px;}
            .super_container
            {
                margin-bottom:200px;
                position:relative;
                width:100vw;
                height:710px;
            }
            .wrapper{
                border:4px transparent #18a05e;
              
                outline-offset: 5px;
                box-sizing: border-box;
                padding:5px;
            }
            .super_wrapper
            {
                position:absolute;
                top:0;
                left:0;
                width:100%;
                z-index:120;
                margin:0;
                padding:0;
            }
            /*.watermark*/
            /*{*/
            /*    height:200px;*/
            /*    width:300px;*/
            /*    margin:auto;*/
            /*    padding-top:50px;*/
            /*    padding-left:100px;*/
            /*    opacity:0.1;*/
            /*    background:url("<?php echo base_url().$b_header['logo1']; ?>");*/
            /*    background-size:100% 100%;*/
            /*}*/
            /*.watermark_wrapper*/
            /*{*/
            /*    height:470px;*/
            /*    width:100%;*/
            /*    margin-top:50px;*/
            /*    display:inline-flex;*/
            /*    display:-webkit-inline-flex;*/
            /* }*/
            .wrapper.left2{
                width: calc(90vw);
                margin-right: 20px;
                margin-left: 20px;
            }
            h1,h2,h3{
                color:#5A7BC1;
                font-family:calibri;
                text-align:center;
            }
            .boxed{color:#000000;width:80%;margin:0 auto;}
            .header{
                width:100%;
                border-bottom:4px solid #5A7BC1;            
            }
            .body{
                padding:10px;
            }
            .row{
                width:100%;
                margin: 0px auto;  
            }
            .text-center{text-align:center;}
            .bold{font-weight:bold;}
            .b-u-l{
                border-bottom: 1px solid #000;
                height:inherit;
            }
            .x-small{
                font-size: 12px;
            }
            .x-x-small{
                font-size: 9px;
            }
            .page_break{
                width: 100vw;
                height: 100vh;
                padding: 10px 0px;
                box-sizing: border-box;
            }
            .tbl1
            {
                border: 1px solid #000;
                text-align:center;
                width:100%;
                min-height:20px;
            }
            th{
                border: 1px solid #000;
                  border-right: 0px;
                border-bottom: 0px; 
                background-color:#ccccb3; 
                padding: 3px !important;
            }
            td{
                /*border: 1px solid #000;*/
                text-align: left;
                  border-right: 0px;
                border-bottom: 0px; 
                padding: 2px !important;
            }
            .normal{
                font-weight: normal !important;
            }
            .text-right{
                text-align: right !important;
            }
            .text-left{
                text-align: left !important;
            }
            .margin-a{margin: 30px auto 0px auto;}
        </style>
    </head>
    <body class="clear">
<?php 
date_default_timezone_set("Asia/Karachi");

?>
 <div class="super_container">
    <div class="page_break clear">
     <div class="watermark_wrapper">
        <div class="watermark"></div>
        </div>
        <div class="super_wrapper">
        <div class="wrapper left2 left">
            <div class="header">
                 <div class="wd-100 clear">
                    <div class=" text-left left ">
                        <img src="<?php echo base_url().$b_header['logo1']; ?>" style="width:70px;height:70px;">
                    </div>
                    <div class=" text-left right ">
                        <img src="<?php echo base_url().$b_header['logo2']; ?>" style="width:70px;height:70px;">
                    </div>
                   
                    <div style="">
                    
                        <center><h2><?php echo $b_header['title']; ?></h2></center>
                        <center><h4><i><?php echo $b_header['tagline']." ".$b_header['short_address']; ?></i></h4></center>
                        <h3 class="boxed" style="margin-top:10px !important;font-size:23px;">Seat Tag</h3>
                    </div>
                </div>

            </div>
            
            <div class="body">
                                    <div class="clear">
<div class="left wd-80">
    <div class="clear wd-100">
        <div class="left wd-50">
            <table class="table-info">
                <tr>
                    <td><b class="color-g">Branch:</b></td><td><b><?php echo $b_header['name'];?> </b></td>
                </tr>
                <tr>
                    <td><b class="color-g">Exam:</b></td><td><b><?php echo $exam['name'] ;?></b></td>
                </tr>
                <tr>
                    <td><b class="color-g">S.ID:</b></td><td><b><?php echo $student['sid']; ?></td>
                </tr>
                <tr>
                    <td><b class="color-g">Class:</b></td><td><b><?php echo $student['class_name']." / ".$student['section_name']; ?></td>
                </tr>
            </table>
        </div>
        
        <div class="left wd-50">
            <table class="table-info">
                <tr>
                    <td><b class="color-g">Name :</b></td><td><b><?php echo $student['student_name']; ?></b></td>
                </tr>
                <tr>
                
                    <td><b class="color-g">Father Name :</b></td><td><b><?php echo $student['father_name']; ?></b></td>
                </tr>
              
                <tr>
                    <td><b class="color-g">Seat No :</b></td><td><b>
                       <?php
                      $fetch_std_id=@$this->db->select('id')
                                            ->from('student')
                                            ->where('sid',$student['sid'])
                                            ->where('branch',$student['branch'])
                                            ->get()->row()->id;
                                            
                               $mystudent['mydata']=$fetch_std_id;
                        if($class_order<=5)
                         {
                             $fetch_table=$this->db->where('student_id',$mystudent['mydata'])
                                                     ->where('is_delete',0)
                                                     ->order_by('id','DESC')
                                                     ->get('seating_plan')->result();
                               if(!empty($fetch_table))
                               {

                                 $fetch_seat_no=$this->db->select('seat_no')
                                            ->from('seating_plan')
                                            ->where('student_id',$mystudent['mydata'])
                                            ->where('is_delete',0)
                                            ->order_by('id','DESC')
                                            ->get()->row()->seat_no; 
                                            echo $fetch_seat_no;
                               }else{
                                   echo "";
                               }
                             
                         }else{
                             
                              $examss = $this->db->select('*')->where('id',$exams)
                                                     ->where('is_delete',0) 
                                                     ->get('exam')->row()->id;
                              $fetch_tables=$this->db->where('student_id',$mystudent['mydata'])->where('exam',$examss)
                                                     ->where('class_id',$classs)->where('is_delete',0) 
                                                     ->get('seating_plans')->result();
                               if(!empty($fetch_tables))
                                    {
                                             
                                          $fetch_seat_no=$this->db->select('seat_no')
                                                        ->from('seating_plans')
                                                        ->where('student_id',$mystudent['mydata'])
                                                        ->where('class_id',$classs)->where('is_delete',0)
                                                        ->where('exam',$examss)
                                                        ->order_by('seating_plans.id','DESC')
                                                        ->get()->row()->seat_no;
                                            $blockname=$this->db->select('block.name')
                                                        ->from('seating_plans')
                                                        ->join('block', 'block.id = seating_plans.block')
                                                        ->where('student_id',$mystudent['mydata'])
                                                        ->where('class_id',$classs)->where('seating_plans.is_delete',0)
                                                        ->where('exam',$examss)
                                                        ->get()->row()->name;             
                                                        echo @$fetch_seat_no.' ('.$blockname.')';
                                    }else{
                                            echo " ";
                                        }                         
                         }
                     
                   
                    ?>
                       </b></td>
                </tr>
                <tr>    
                    <td><b class="color-g">Date Of Birth :</b></td><td><b><?php echo date("d-m-Y",strtotime($student['dob'])); ?></b></td>
                </tr>
            </table>
        </div>
    </div>                                    
</div>
<div class="right">
    <img src="<?php echo base_url().$student['img']; ?>" alt="" width="70" height='70'>
</div>


										</div>
                
                  
                                   
            
              
        </div>
       
        
           
    </div>
</div>
</div>
</div>
    </body>
    <script>
        //window.print();
    </script>
</html>













