<?php
      //include_once '../includes/functions.php';

        //starting session if not already started
   
   
    //
     $p =  $_SESSION['p'];
     $mat_num = get_user_mat_no($p);
     
     $img = '';
     //$ppimg = 'uploads/'.strtoupper(get_user_image($p));
     //echo $ppimg;
     $fname =  strtoupper(get_user_fullname($p));
     $sch = strtoupper(get_school_title(get_user_school_id($p)));
     $pr = strtoupper(get_programme_code(get_user_programme_id($p)));
     $lv = get_user_level($p);
    $pty = get_user_programme_type($p);
     if ($pty == 1) {
        $path = '../prence/uploads/';
        $qi =   $path.'signature/'.get_user_sign($p);
        $ppimg =  $path.get_user_image($p);
        $img = 'images/front_pre.png';
    //when NCE
     }else{
        $path = '../nce/uploads/';
        $qi =   $path.'signature/'.get_user_sign($p);
        $ppimg =  $path.get_user_image($p);

        if ($lv == 'I') {
            $img = 'images/front_100.png';
        }else if($lv == 'II'){
            $img = 'images/front_200.png';
        }else if($lv == 'III'){
            $img = 'images/front_300.png';
        }


        
     }

     //echo $qi;
     $phn = get_user_phone_no($p);
     //$yr = 'FEB, 2020';
     
     if($lv == 'III'){$yr = "DEC,2020";}else if($lv == 'II'){$yr = "DEC,2021"; }else if($lv == 'I'){$yr = "Jan, 2021 to Dec, 2021";}else if($lv == 'PRE'){$yr = "Jan, 2021 to Dec, 2021";}else{"DEC, 2020";}
     
     
    //initializing data
    //$data1  = "<img  class=' img img-responsive setImgSize' src='images/coding.jpg'>";
    $pptimg  = "<img  class=' img img-responsive setImgPos' src=$ppimg >";
    $img1  = "<img  class=' img img-responsive setImgSize' src=$img >";
    $img2  = '<img id="idcard" class=" img img-responsive setImgSize"  src="images/back.png">';
    $name =  "<p class='setName'>$fname</p>" ;
    $regno =  "<p class='setRegNo'>$mat_num </p>" ;
    $sch = "<p class='setSch'>$sch</p>" ;
    $prog = "<p class='setProg'>$pr</p>" ;
    $lev = "<p class='setLev'>$lv</p>" ;
    $qr_img ="<img  class='setQr' src=$qi>";
    $yr = "<p class='setVYr'> $yr</p>" ;
    $phn = "<p class='setVPhn'> $phn</p>" ;

    

//
//Passing values for usage
    $data =<<<EOD
    $pptimg $qr_img  $name $sch $regno  
    $prog $lev $yr $phn $img1
    $img2 
EOD;


//for printing sake
  ob_start();
?>
<!DOCTYPE html>
<html>
<head>
      
    <link rel="stylesheet" href="css/style.css" type="text/css">
    
</head>
<body>
    <div class="container-fluid">
           <?php echo $data; //exit(); ?>
     </div>
          
</body>
</html>