<?php if (!$session->is_logged_in()) {
    redirect_to("index.php");
}
?>
<?php require_once("includes/initialize.php");

$id = $session->user_id;
$user_data = Userdata::find_by_id($session->user_id);

$progtype = substr($user_data->formno,0,2);

if ((substr($user_data->formno,2,2)!=18) AND (substr($user_data->formno,2,2)!=19)) {
    
     Switch(substr($user_data->formno,2,2))
      {
          case '20':$table='form_data';
          break;
          
          case '21': $table='form_data21';
          break;
          
          case '22': $table='form_data22';
      }
      
      
       $biodata = Biodata2::find_by_id($table, $user_data->formno, $user_data->email);
       
      
        $new_dp = DEPARTMENTCLASS::new_admin_dept($biodata->formno);
        
          if (!isset($new_dp->department)){
           $biodata->courses ='Nil';   
          }else{
        $biodata->courses = $new_dp->department;
          }
       $biodata->programme = $biodata->level;
  
        // $pixf = substr($biodata->passport, 10);
       $dp = DEPARTMENTCLASS::department_authenticate($biodata->department);
       $pix = "http://admission.oscotechesaoke.edu.ng/passport22/".trim($biodata->passport);
    
     
    
       
  }else{

$biodata = Biodata::find_by_id($user_data->formno, $user_data->email);

 $level=$biodata->level;

}

if (substr($user_data->formno,2,2)=='19'){
    
    $biodata = Biodata::find_by_id($user_data->formno, $user_data->email);

    $level=$biodata->level;
    
    //echo $user_data->formno;
 // $new_dp = DEPARTMENTCLASS::new_admin_dept($user_data->formno);
  //  $biodata->courses = $new_dp->department;
//    $biodata->programme = $biodata->level; 
  
  // $dp = DEPARTMENTCLASS::department_authenticate($biodata->courses);
//    $pix = "../application_account/passport/".$pixf;
   
}else {

$dp = DEPARTMENTCLASS::department_authenticate($biodata->courses);
$display_course = COURSECLASS::fetch_all_course($biodata->courses, $biodata->programme, $session_class->semester);
$alldp = DEPARTMENTCLASS::find_all($dp->faculty);
//$pix = "../Oscotech-Wallet/passport/".$pixf;

}




//$pay_settings->HNDI;

//$transaction = Transaction::authenticate($biodata->formno, $biodata->email);


//echo "<br><br>Biodata of bursary: ".$biodata->programme;
 $level = strtoupper($biodata->programme);

if (empty($level)){
    $level=$biodata->level;
}

$transaction = Transaction::authenticate($biodata->formno, $biodata->email);


//$message =$transaction->responsecode;


?>

<div class="art-content-layout">
    <div class="art-content-layout-row">

        <div class="art-layout-cell layout-item-0" style="width: 100%">

            <marquee behavior="alternate" scrolldelay="200" onmouseover="this.setAttribute('scrollamount',0,0);"
                     onmouseout="this.setAttribute('scrollamount',6,0);">
                <div style="color:#F00; font-style:italic; font-weight:bolder;">NOTE: <span
                            style="color:#F00; font-style:italic;">If admission letter has been successfully printed, click Payment Module to pay your school fees</span>
                </div>
            </marquee>


        </div>
    </div>
</div>
<div class="art-content-layout">
    <div class="art-content-layout-row">

        <div class="art-layout-cell layout-item-0" style="width: 100%; ">


            <div style="text-transform:uppercase; color:#099;margin-top:20px; margin-bottom:10px; font-weight:bolder; border-bottom:inset #000 thin;">
                Admission letter
            </div>
            <!--<hr style="width:100%;">
            <br />-->
            <?php if ($message != 'Approved Successfully') {
                echo output_message($message);
            } elseif ($message == 'Approved Successfully') {
                echo "<script>window.open('../admission_letter_printout.php')</script>";
                echo "<span style=\"color:#060; font-weight:bolder \">{$message}</span>";
            } else {
                echo output_message($message);
                //echo "<br/>";
            }
            //$message =$transaction->responsecode;


            ?>


        </div>
    </div>
</div>


<div class="art-content-layout">
    <div class="art-content-layout-row">
        <div class="art-layout-cell layout-item-0" style="width: 30%; background-color:#FFF; margin:0; padding:0;">
            <div>
                <div style="border-bottom:inset thin #0FC; width:100%; margin:0;background-color:#096 "><a
                            href="javascript:void(0)"
                            style="color:#FFF; font-size:17px;  text-decoration:none; display:block ">Admission
                        letter</a></div>

                <div style="border-bottom:inset thin #0FC;background-color:#096 "><a href="javascript:void(0)"
                                                                                     style="color:#FFF; font-size:17px; text-decoration:none;display:block ">Complaint</a>
                </div>

                <!--<div style="border-bottom:inset thin #0FC;background-color:#096 "><a href="javascript:void(0)" style="color:#FFF; font-size:17px; text-decoration:none; display:block">Re-generate pin</a></div>
                <div  style="border-bottom:inset thin #0FC;background-color:#096 "><a href="?type=acceptance_create_ticket" style="color:#FFF; font-size:17px; text-decoration:none; display:block">Create ticket</a></div>
                <div style="margin-bottom:0; padding:0; background-color:#FFF; margin:0" ></div>-->
            </div>

            <img src="images/infooter.PNG" width="231" height="70"
                 style="margin-top:0px; padding:0; margin-left:0px; margin-right:0px; margin-bottom:0; background-color:#FFF; "/>
        </div>


        <div class="art-layout-cell layout-item-0" style="width: 70%">


            <div style=" font-size:16px; font-weight:bolder;"><label
                        style="font-size:16px; margin-right:105px;"></label><?php //echo $pay_settings->amount;
                ?></div>

            <div style=" font-size:16px; font-weight:bolder;"><label
                        style="font-size:16px; margin-right:108px; margin-top:120px"> </label><?php // echo $pay_settings->charge_interswitch + $pay_settings->charge_omoluabi.".00";
                ?></div>
            <?php //echo $user_data->formno.''.$level; ?>
            <?php if (($level == 'ND') OR ($level == 'ND I') and ($progtype=='PT')) { ?>
                <a href="pages/admission_letter_new_pt.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF; font-weight:bolder; border-radius:5px;padding:5px; margin-top 50px;; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>
              
              <?php } elseif ((($level == 'HND') OR ($level == 'HND I')) and ($progtype=='PT')) { ?>  

                  
                <a href="pages/admission_letter_new_hnd_pt.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF;margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>
              
                    
            <?php } elseif (($level == 'ND I') and (substr($user_data->formno,2,2)!=18)) { ?>
                <a href="pages/admission_letter_new_nd33333.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF;margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>        
                    
              <?php } elseif (($level == 'ND I') and (substr($user_data->formno,2,2) == 18))  { ?>
                <a href="pages/admission_letter_nd.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF;margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>        
             
               
                  
            <?php } elseif ($level == 'HND') { ?>
                <a href="pages/admission_letter_new_hnd.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF;margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>
                    
            <?php } elseif (($level =='HND I') and (substr($user_data->formno,2,2)==21)) { ?>
                <a href="pages/admission_letter_new_hnd.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF;margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>   
            
              
                    
            <?php } elseif ($level =='HND I') { ?>
                <a href="pages/admission_letter_hnd.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF;margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>        
                    
            <?php } elseif ($level == 'PGD') { ?>
                <a href="pages/admission_letter_pgd.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF;margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>
            <?php } elseif ($level == 'ADV. CERT.') { ?>
                <a href="pages/admission_letter_AdvCert.php" target="_blank" id="accept"
                   style="background-color:#030; color:#FFF; margin-top:40px; font-weight:bolder; border-radius:5px;padding:5px; margin-top:5; text-decoration:none; font-size:17px; font-stretch:extra-expanded">
                    Print Admission Letter</a>
            <?php } ?>
            <!--<input type="submit" name="submit" style="background-color:#069; color:#FFF; font-weight:bolder; border-radius:5px;padding:5px; margin-top:35" value="Bank branch payment">
            -->
            </form>
        </div>
    </div>
</div>
</div>


</article></div>
<style>
    #accept:hover {
        text-decoration: none;
        font-style: italic;
    }
</style>