<?php error_reporting(0); 

$imagePath = base_url().$student->user_photo;

// Read the image file
$imageData = file_get_contents($imagePath);

// Encode the image data as base64
$base64Image = base64_encode($imageData);

// Create a data URI for use in HTML or CSS
$dataImg = 'data:image/jpeg;base64,' . $base64Image;

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <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=Dancing+Script:wght@700&family=Roboto&display=swap" rel="stylesheet">
    <title>Hall Ticket</title>
</head>
<style type="text/css">
    body
    {
        font-family: 'arial';
font-family: 'arial', sans-serif;
    }
</style>
<body>
    <table width="100%" border="2" style="border-collapse: collapse;">
      <tbody id="inst_stud_det">
         <tr style="border: 2px solid #000;">
            <td colspan=3>
               <h1 id="center" class="text-center text-primary"><center><?php echo strtoupper(atp_details()->user_business_name); ?></center></h1>
               <div class="text-center">
                <span class="text-center"><b><center> Hall Ticket For <?php echo $student->title; ?></center></b></span>
               </div>
               <hr/>
            </td>
         </tr>
         <tr style="">
            <td width="30%" style="padding-left: 10px;">Registration No:</td>
            <td width="60%"><b><?php echo $student->user_reg_id; ?></b></td>
            <td rowspan="2" class="text-center" style="text-align: center;"><img id="photo" width="100" height="100" src="<?php echo $dataImg; ?>"></td>
          </tr>
          <tr>
            <td style="padding-left: 10px;">Candidates Name:</td>
            <td ><b><?php echo $student->user_name; ?></b></td>
          </tr>
          <tr>
            <td style="padding-left: 10px;vertical-align: top; padding-top: 20px;">ATC & Exam Center:</td>
            <td colspan="2" style="padding-top: 20px;">
                <div style="line-height: 1.5"><b><?=strtoupper(atp_details()->user_business_name);?> </b></div>
                <div style="line-height: 1.5"><?=strtoupper(atp_details()->user_village);?> , <?=strtoupper(atp_details()->user_taluka);?> ,<?=strtoupper(atp_details()->user_dist);?>, <?=strtoupper(atp_details()->user_state);?> - <?=strtoupper(atp_details()->user_pin_code);?>
            </div>
            </td>
          </tr>
         <tr>
            <td style="height: 150px;padding-left: 20px;">Exam Date : <br/><span  id="examdate"><b><?php echo date('d-m-Y', strtotime($student->st_student_exam_date)); ?> <br/><?php echo date('h:i A', strtotime($student->st_student_exam_time)); ?></b></span></td>
            <td  width="30%" style="vertical-align: bottom;"><center style="bottom: 0;">Candidate's Signature</center> </td>
            
            <td  style="vertical-align: bottom;text-align: center;">Director : <br/><span id="centre"><b style="font-size: 12px"><?=strtoupper(atp_details()->user_business_name);?></b></span></td>
         </tr>
         <tr>
             <td colspan="3">
                 <hr/>
             </td>
         </tr>
         <tr>
            <td colspan=3 style="text-align: center; height: 50px;">
                <b style="text-align: center; ">Instructions</b>
            </td>
        </tr>
        <tr>
            <td colspan="3" style="text-align: left;">
                <ul style="list-style-type: none;">
                    <?php $i=1; foreach (json_decode($app_setting->online_exam_inst) as $key => $online_exam_inst):?>
                        <li><?php echo $i; ?>. <?php echo $online_exam_inst; ?></li>
                    <?php $i++; endforeach; ?>
                </ul>
            </td>
        </tr>
      </tbody>
   </table>

</body>
</html>
<style type="text/css">
    td, th
    {
        border: 0!important;
    }
</style>