<link href="<?php echo base_url()?>front_end_resource/css/screen.css" rel="stylesheet" media="screen" type="text/css"/>
<link href="<?php echo base_url()?>front_end_resource/css/print.css" rel="stylesheet" media="print" type="text/css"/>
<input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">

<div class="col-sm-12 pull-right">
    <a href="<?php echo base_url('print-certificate/'.$certificate_data->student_roll_number);?>" style="padding: 5px; font-size: 18px;" target="_blank">
        <i class="fa fa-print" aria-hidden="true"></i>
        <span style="margin-left: 5px;">Print</span>
    </a>
</div>

<div class="col-sm-10 col-sm-offset-1" style="margin-top: 20px;">
    <div class="row ">
        <div class="col-sm-12 " >
            <div class="col-sm-12 gray_ttc" style="border: 8px solid #8CC73F;">
                <div class="row">
                    <div class="col-sm-3" style="margin: 20px 0px; ">                        
                            <?php if (isset($certificate_data->certificate_logo)) { ?>                                    
                                <img src="<?php echo base_url($certificate_data->certificate_logo) ?>" title="logo" style="width: 50px">
                                <p>
                                    <?php 
                                        //echo $certificate_data->course_by 
                                        if(strlen($certificate_data->course_by) < 40){
                                            echo $certificate_data->course_by;
                                        } else{
                                            echo substr($certificate_data->course_by, 0, 40);
                                        }
                                    ?>
                                </p>
                            <?php } else { ?>
                                <img src="<?php echo base_url('images/logo-50.png') ?>" title="logo">
                                <p>Talha Training</p>
                            <?php } ?>                        
                    </div>
                    <div class="col-sm-12" style="text-align: right; border-bottom: 4px solid #8CC73F; margin-bottom: 20px;">                                
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-12 text-center" style="height: 100px">
                        <h1 class="certificate_h1_content" style="text-align: center !important;">Certificate of Completion</h1>
                    </div>
                    <div class="col-sm-12 text-center certificate_content" style="margin: 80px 0px;">
                        <p>This is to acknowledge that</p>
                        <p class="certificate_owner_name" style="margin: 30px"> 
                            <?php 
                                //echo $certificate_data->student_name; 
                                if(strlen($certificate_data->student_name) < 40){
                                    echo $certificate_data->student_name;
                                } else{
                                    echo substr($certificate_data->student_name, 0, 40);
                                }
                            ?>
                        </p>
                        <p>has Completed</p>
                        <p>A Training Course on : <?php echo $certificate_data->course_name; ?></p>
                        <p>With a Roll Number : <?php echo $certificate_data->student_roll_number; ?></p>
                        <p>Given this day of <?php echo $certificate_data->course_completion_date; ?></p>
                    </div>
                    <div class="col-sm-12">
                        <div class="col-sm-offset-6 col-sm-6">
                            <div class="col-sm-offset-6 text-center" style="margin-bottom: 10px;">
                                <p>
                                    <?php 
                                        //echo $certificate_data->course_resource_person; 
                                        if(strlen($certificate_data->course_resource_person) < 40){
                                            echo $certificate_data->course_resource_person;
                                        } else{
                                            echo substr($certificate_data->course_resource_person, 0, 40);
                                        }
                                    ?></p>
                                <p>Instructor</p>
                            </div>
                        </div>                        
                    </div>
                    <div class="col-sm-12 text-left">
                        <p class="text-left">Verification Link:&nbsp;&nbsp;<strong><?php echo base_url().'verifiy_certificate/'.$certificate_data->student_roll_number; ?></strong></p>
                    </div>
                </div>
            </div> 
        </div>
    </div>
</div>
<script src="<?php echo base_url()?>back_end_resource/quiz/admin_certificate.js" type="text/javascript"></script>