<?php 
$doc_id=$this->uri->segment('3');
$doc_table='student_bonafied_certificate';
$get_doc_data=$this->CertificateModel->get_item_data($doc_id,$doc_table);
if($get_doc_data){
    foreach($get_doc_data as $doc_data){
         $acedemic_session_table='academic_session_details';
        $year_long='';
        $y1='';
        $y2='';
        $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'];
                $y1=$ac_sess_data['y1'];
                $y2=$ac_sess_data['y2'];
            }
        }
?>
<!DOCTYPE html>
<html>
    <head>
        <title>Student Certificate</title>
        <style>
            /*<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=Inconsolata:wght@200;300;400;500;600;700&display=swap" rel="stylesheet">
            
            .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:60px;width:auto;}
            html{padding:0px;margin:0px;}
            body{padding:25px;margin:0px;font-size:13px;
            /*font-family: 'Exo 2', sans-serif !important;*/
                font-family: 'Inconsolata', monospace; 
            }
        </style>
    </head>
    <body>
    <div class="w-100" style="border:1px solid;">
        <!--<table style="width:100%;margin:0px;padding:0px;">-->
        <!--    <tr style="width:100% !important;">-->
        <!--        <th style="width:20%;text-align:center;">-->
        <!--            <img src="<?php echo school_logo_full; ?>" style="">-->
        <!--        </th>-->
        <!--        <th style="width:80%;height:80px;background:;margin:0px;text-align:center;padding:0px;">-->
                    
        <!--            <h1 style="padding:0px;margin:0px;font-size:24px !important;font-weight:900 !important;text-transform:uppercase;"><?php echo school_full_name; ?><br>-->
        <!--            </h1>-->
        <!--            <h2 style="font-size:14px;margin:0px; padding :0px;font-weight:500;">Awas Vikas, Hanspuram Naubasta, Kanpur</h2>-->
        <!--            <h2 style="padding:0px;margin:0px;font-size:14px !important;font-weight:500 !important;"><?php echo school_affiliation;?></h2>-->
        <!--            <h2 style="padding:0px;margin:0px;font-size:18px !important;font-weight:700 !important;">School Code - UP-230</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;">Session : <?php echo $y1; ?> to <?php echo $y2; ?></p>-->
        <!--        </th>-->
        <!--    </tr>    -->
            
        <!--</table>        -->
        <!--<hr>-->
        
        <div style="width:100%;text-align:center;margin:0px;padding:0px;height:130px;;display:block; border-bottom:1px solid;">
                <div style="width:20%;text-align:right;float:left;">
                    <img src="<?php echo school_logo_full; ?>" style="width:60px;margin-top:0px;padding-top:10px;">
                </div>
                <div style="width:80%;text-align:center;float:right;">
                    <h1 style="padding:0px;margin:0px;font-size:38px !important;font-weight:900 !important;text-transform:uppercase;display:flex;text-align:center;letter-spacing:2px;">
                            <?php echo school_full_name; ?><br>
                    </h1>
                    <h2 style="font-size:14px;margin:0px; padding :0px;font-weight:500;letter-spacing:2px;">Awas Vikas, Hanspuram Naubasta, Kanpur</h2>
                    <h2 style="padding:0px;margin:0px;font-size:14px !important;font-weight:500 !important;letter-spacing:2px;"><?php echo school_affiliation;?></h2>
                    <h2 style="padding:0px;margin:0px;font-size:18px !important;font-weight:700 !important;letter-spacing:2px;">School Code - UP-230</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;letter-spacing:2px;">Session : <?php echo $y1; ?> to <?php echo $y2; ?></p>
                </div>   
        </div>
        <br>
        <div style="width:100%;margin:0px;padding:0px; text-align:center;">
            <span style="padding:15px;font-size:22px;font-weight:700;"><u>TO WHOMSOEVER IT MAY CONCERN</u></span>
        </div>
        
        <div style="width:100%;height:177px;">
            
                <div style="width:70%;float:left;height:177px;padding-left:20px;">
                    <table style="margin-top:80px;padding:0px;width:100%;">
                    <tr style="width:100%;margin:0px;padding:0px;">
                        <th style="text-align:left;font-size:18px;">Sl. No. : <?php echo $doc_id;?></th>
                    </tr>
                    </table>
                </div>    
                <div style="width:20%;float:right;height:177px;padding-right:20px;">
                    <div style="width:138px !important;height:177px !important;border:1px solid !important;float:right;padding-top:auto;padding-bottom:auto;text-align:center;font-size:22px;"><br>Attested<br> Photo<br> of The<br> Student</div>
                </div>
            </div>  
        
        
        <div style="height:auto;width:100%;padding-left:20px;padding-right:20px;">
            <p style="font-size:18px;line-height:40px;font-weight:500;">This is to certify that <b style="text-transform:uppercase;"><?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 style="text-transform:uppercase;"><?php echo $doc_data['salutation']; echo " "; echo $doc_data['father_name'];?> & Mrs. <?php echo $doc_data['mother_name']; ?></b> is a student of class <b><?php echo $doc_data['course'];?></b> in this school in the session <b>April <?php echo $y1; ?></b> to <b>March <?php echo $y2; ?></b>.</p>
                    <p style="padding-bottom:15px;font-size:18px;line-height:40px;font-weight:500;"><?php if($doc_data['gender'] =='male'){ echo "His";}else if($doc_data['gender']=='female'){echo "Her";} ?> Date of Birth as per records provided by the parents is <b><?php echo date('d-m-Y',strtotime($doc_data['dob']));?></b>.<br> (In words) <b><?php echo $doc_data['dob_in_words'];?></b>.</p>
        </div>
        
        
        <div style="width:100%;padding:20px;">
            <br>
            <br>
            <br>
            <b>Principal</b>
        </div>
        
    </div>    
    </body>
</html>
    
<?php
    }
}
?>    