<?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"> -->
        
        <!--<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=Kanit:wght@200;400&family=Source+Sans+Pro&display=swap" rel="stylesheet">-->
        
        <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=Inconsolata:wght@200;300;400;500;600;700&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:50px;margin:0px;font-size:15px;
            /*font-family: 'Kanit', sans-serif;font-family: 'Source Sans Pro', sans-serif;*/
                font-family: 'Inconsolata', monospace; 
            }
            .bdtd{border-bottom:2px dotted !important;}
            
            .doc-sec{
                background-image: url("<?php echo school_logo_full; ?>");
                opacity: 0.1;
                background-repeat: no-repeat;
                background-size: 40% auto;
                background-position: center;
                z-index: -1;
               
            }
            .main-data{z-index:999999; 
                opacity: 1.0;}
            .main-data .div-data{ opacity:1.0;padding:15px;font-size:16px;line-height:25px;text-align:justify;}
        </style>
    </head>
    <body>
        
    
        
    <div style="height:90%;width:100%;padding:10px;border:2px solid black;" class="doc-sec">
        <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:22px !important;font-weight:900 !important;text-transform:uppercase;"><?php echo school_full_name; ?></h1>
                    
                    
                    <h2 style="padding:0px;margin:0px;font-size:18px;font-weight:600;"><?php echo school_address;?></h2>
                    
                    <h2 style="padding:0px;margin:0px;font-size:12px !important;font-weight:700 !important;">
                    <?php
                    // echo school_affiliation;
                    ?>
                    (Affiliated to the Council for the Indian School Certificate Examination, New Delhi) 
                    </h2>
                    <h3 style="padding:0px;margin:0px;font-size:18px;font-weight:600;text-align:center;">E.Mail: <?php echo email; ?></h3>
                </th>
            </tr>    
            
        </table>        
        <hr>
        
        <table style="width:100%;margin:0px;padding:0px;">
            <tr>
                <th colspan="3"><p style="text-align:center;"><span style="padding:25px !important;font-size:22px;font-weight:600;border: 2px solid !important;padding-left:50px;padding-right:50px;text-transform:uppercase;">Transfer Certificate</span></p></th>
            </tr>
            <tr style="width:100%;margin:0px;padding:0px;font-size:16px;font-weight:600;">
                <th style="text-align:left;">TC.No. : <?php echo $doc_id;?></th>
                <th></th>
                <th style="text-align:right;">School Code : <?php echo school_code; ?></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>-->
        
        <table>
            <tr>
                <th style="font-weight:450;">
                    <div style="width:100%;text-align:justify;" class="main-data">
            <div class="div-data" style="">This is to certify that <b><span class="bdtd" style="text-transform:uppercase;">&nbsp;&nbsp;<?php echo $doc_data['student_name'];?>&nbsp;&nbsp;</span></b> <?php if($doc_data['gender'] =='male'){ echo "S/o";}else if($doc_data['gender']=='female'){echo "D/o";} ?>  <b><span class="bdtd" style="text-transform:uppercase;">&nbsp;&nbsp;<?php echo $doc_data['salutation']; echo " "; echo $doc_data['father_name']; ?></span></b> & <b><span class='bdtd' style="text-transform:uppercase;"> <?php echo $doc_data['mother_name_salutation']." ".$doc_data['mother_name']; ?>&nbsp;&nbsp;</span></b> was admitted into this school on <b> <span class="bdtd">&nbsp;&nbsp;<?php echo date('d-m-Y',strtotime($doc_data['admission_date']));?>&nbsp;&nbsp;</span></b> In Standard- '<b><?php echo $doc_data['admission_class']; ?></b>' on a transfer certificate from <b><span class="bdtd">&nbsp;&nbsp;<?php echo $doc_data['previous_school']; ?>&nbsp;&nbsp;</span></b> and left on <b><span class="bdtd">&nbsp;&nbsp;<?php echo date('d-m-Y',strtotime($doc_data['school_leaving_date'])); ?>&nbsp;&nbsp;</span></b> with a <span class="bdtd">&nbsp;&nbsp;<?php echo $doc_data['charcter_info'];?>&nbsp;&nbsp;</span> Character.<br><br>
            <?php if($doc_data['gender'] =='male'){ echo "He";}else if($doc_data['gender']=='female'){echo "She";} ?> was then studying in the <b><span class="bdtd">&nbsp;&nbsp;<?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>"; } ?>&nbsp;&nbsp;</span></b> class of the <b><?php echo $doc_data['school_stream'];?></b> stream. The school year beginning from <b><span class="bdtd">&nbsp;&nbsp;<?php echo $doc_data['ac_year_start']; ?>&nbsp;&nbsp;</span></b> to <b> <span class="bdtd">&nbsp;&nbsp;<?php echo $doc_data['ac_year_end'];?>&nbsp;&nbsp;</span></b>.<br><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 paid, remitted or satisfactorily arranged for.
                According to our Admission Register, <?php if($doc_data['gender'] =='male'){ echo "His";}else if($doc_data['gender']=='female'){echo "Her";} ?> Admission Number is <b><span class="bdtd">&nbsp;&nbsp;<?php echo $sch_no; ?>&nbsp;&nbsp;</span></b> and Date of Birth  (in figure) is <b><span class="bdtd">&nbsp;&nbsp;<?php echo date('d-m-Y',strtotime($doc_data['dob']));?>&nbsp;&nbsp;</span></b> In words <b><span class="bdtd">&nbsp;&nbsp;<?php echo $doc_data['dob_in_words'];?>&nbsp;&nbsp;</span></b>.<br><br>
                Promotion has been <b><span class="bdtd">&nbsp;&nbsp;<?php echo $doc_data['promotion'];?>.&nbsp;&nbsp; </span></b>
            </div>
        </div>
                </th>
            </tr>
        </table>
        <br>
        <div style="width:100%;padding-left:15px;font-size:15px;font-weight:550;">
            <table class="table table-bordered" style="width:100%;">
                <tr>
                    <th style="margin:0px;padding:0px;text-align:left">
                        Date : <b><span class="bdtd">&nbsp;&nbsp;<?php echo date('d-m-Y',strtotime($doc_data['issuing_date'])); ?>&nbsp;&nbsp;</span></b>
                    </th>
                    <td></td>
                </tr>
                <tr>
                    <th style="margin:0px;padding:0px;text-align:left">
                     &nbsp;
                    </th>
                    <td></td>
                </tr>
                <tr style="width:100%;margin:0px;padding:0px;">
                    <!--<th style="margin:0px;padding:0px;text-align:left">Parent's Signature</th>-->
                    <th style="text-align:right;margin:0px;padding:0px;" > Principal's Signature</th>
                </tr>
              
                <tr style="width:100%;margin:0px;padding:0px;">>
                    <!--<th style="margin:0px;padding:0px;text-align:left;"><br><br>...................</th>-->
                    <th style="margin:0px;padding:0px;text-align:right;"><br><br>...................</th>
                </tr>
                
            </table>
        </div>
        
    </div>    
    </body>
</html>
    
<?php
    }
}
?>    