<?php 
$doc_id=$this->uri->segment('3');
$doc_table='student_transfer_certificate';
$get_doc_data=$this->CertificateModel->get_item_data($doc_id,$doc_table);
if($get_doc_data){
    foreach($get_doc_data as $doc_data){
        $sch_no=$doc_data['sch_no'];
?>
<!DOCTYPE html>
<html>
    <head>
        <title>Transfer Certificate</title>
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,500;1,400&display=swap" rel="stylesheet"> 
        <style>
            .w-100{width:100%;}
            .w-50-1{width:50%;float:left;height:100%;border-right:1px dotted red;}
            .w-50-2{width:50%;float:left;height:100%;}
            .w-2{width:0%;float:left;}
            img{height:80px;width:auto;}
            html{padding:0px;margin:0px;}
            body{padding:20px;margin:0px;font-size:13px;font-family: 'Exo 2', sans-serif !important;}
        </style>
    </head>
    <body>
        
    
        
    <div style="height:100%;width:100%;float:left;padding:0px;">
        <table style="width:100%;margin:0px;padding:0px;padding-top:15px;">
            <tr style="width:100% !important;">
                <th style="width:20%;background:;padding:0px;text-align:center;">
                    <img src="<?php echo school_logo_full; ?>" style="">
                </th>
                <th style="width:80%;height:92px;background:;margin:0px;text-align:center;padding:0px;">
                    
                    <h1 style="padding:0px;margin:0px;font-size:30px !important;font-weight:700 !important;"><?php echo school_full_name; ?></h1>
                    <h2 style="padding:0px;margin:0px;font-size:18px !important;font-weight:500 !important;"><?php echo school_affiliation;?></h2>
                    
                    <p style="padding:0px;margin:0px;font-size:13px;font-weight:500;"><?php echo school_address;?></p>
                    <p style="padding:0px;margin:0px;font-size:13px;font-weight:500;">Contact :<?php echo contact1;?>, <?php echo contact2;?></p>
                </th>
            </tr>    
            
        </table>        
        <hr>
        <table style="width:100%;margin:0px;padding:0px;">
            
            <tr style="width:100%;margin:0px;padding:0px;font-size:22px;font-weight:600;">
                <th style="text-align:left;padding-left:15px;">S.R.No. : <?php echo $sch_no;?></th>
                <th><span style="padding:20px;font-size:22px;font-weight:600;box-shadow: 0px 0px 5px silver;border-bottom:  5px solid silver !important;border-left:  2px solid !important;border-right:  2px solid !important;border-top:  1px solid !important;">Transfer Certificate</span></th>
                <th>Date : <?php echo date('d-m-Y',strtotime($doc_data['issuing_date']));?></th>
            </tr>
        </table>
        
    
        <?php
        $acedemic_session_table='academic_session_details';
        $year_long='';
        $get_ac_sess_data=$this->CertificateModel->get_item_data($doc_data['acedemic_session'],$acedemic_session_table);
        if($get_ac_sess_data){
            foreach($get_ac_sess_data as $ac_sess_data){
                $year_long=$ac_sess_data['year_long'];
            }
        }
        ?>
        <div style="width:100%;text-align:center;font-weight:600;font-size:22px;"><?php echo $year_long;?></div>
        
        <div style="width:100%;">
            <p style="padding:15px;font-size:18px;line-height:40px;text-align:justify;">Certified that <b><?php echo $doc_data['student_name'];?></b> <?php if($doc_data['gender'] =='male'){ echo "S/o";}else if($doc_data['gender']=='female'){echo "D/o";} ?>  <b><?php echo $doc_data['salutation']; echo " "; echo $doc_data['father_name'];?></b> was admitted into this school on <b><?php echo date('d-m-Y',strtotime($doc_data['admission_date']));?></b> on a transfer certificate from <b><?php echo $doc_data['previous_school']; ?></b> and left on <b><?php echo date('d-m-Y',strtotime($doc_data['school_leaving_date']));?></b> with a <?php echo $doc_data['charcter_info'];?> Character.<br>
            <?php if($doc_data['gender'] =='male'){ echo "He";}else if($doc_data['gender']=='female'){echo "She";} ?> was studying in the class <b><?php echo $doc_data['course']; if($doc_data['course'] == '1'){ echo "<sup>st</sup>"; }else if($doc_data['course'] == '2'){ echo "<sup>nd</sup>"; }if($doc_data['course'] == '3'){ echo "<sup>rd</sup>"; }else if($doc_data['course'] == '4' || $doc_data['course'] == '5' || $doc_data['course'] == '6' || $doc_data['course'] == '7' || $doc_data['course'] == '8' || $doc_data['course'] == '9' || $doc_data['course'] == '10' || $doc_data['course'] == '11' || $doc_data['course'] == '12'){ echo "<sup>th</sup>"; } ?> </b> of the <b><?php echo $doc_data['school_stream'];?></b> stream, the school year beginning from <b><?php echo $doc_data['ac_year_start'];?></b> to <b><?php echo $doc_data['ac_year_end'];?></b>.<br>
            All sums due to this school on <?php if($doc_data['gender'] =='male'){ echo "his";}else if($doc_data['gender']=='female'){echo "her";} ?> account have been remitted or satisfactorily arranged for.
            <?php if($doc_data['gender'] =='male'){ echo "His";}else if($doc_data['gender']=='female'){echo "Her";} ?>    Date of Birth according to the Admission Register is (in figure)<b><?php echo date('d-m-Y',strtotime($doc_data['dob']));?></b> (in words) <b><?php echo $doc_data['dob_in_words'];?></b>.<br>
            Promotion <b><?php echo $doc_data['promotion'];?> ..</b>
            </p>
        </div>
        
        <div style="width:100%;padding-top:20px;padding-left:15px;font-size:18px;font-weight:600;">
            <table class="table table-bordered" style="width:100%;">
                <tr style="width:100%;margin:0px;padding:0px;">
                    <th style="margin:0px;padding:0px;text-align:left">Date</th>
                    <th></th>
                </tr>
                <tr style="width:100%;margin:0px;padding:0px;">>
                    <th style="margin:0px;padding:0px;text-align:left;"><br>COUNTERSIGNED</th>
                    <th>Principal</th>
                </tr>
                
            </table>
            <!--Date : <br>-->
            <!--COUNTERSIGNED-->
        </div>
        
    </div>    
    </body>
</html>
    
<?php
    }
}
?>    