<?php

error_reporting(E_ALL);
ini_set('display_errors',1);
 require_once("includes/initialize.php");
if (isset($_POST['submit'])){
 if (isset($_POST['formno'])){
//  echo "<br>Form No";  
 $formno=$_POST['formno'];
  $student = Biodata::fetchdetails($formno);
 
  if (isset($student->surname)){
     
     $a = (substr(rand(1, 10000000000), 0, 10));
                $txt_ref = strtoupper($a . (substr($student->surname, 0, 2)));
                $amount=5500;

                $txt_fee=300;
                $_SESSION['Amt']=$amount; 
                $ftype=$student->formno;
                $id=$student->acc_id;
                $_SESSION['txn_ref']=$txt_ref;
    echo  $student->acc_id.$amount.$txt_fee.$txt_ref.$ftype;
     
       $submit =Online::submit_stu_data($id,$amount,$txt_fee,$txt_ref,$ftype);
       $_SESSION['stdid']=$id;
     if (isset($submit)){
        redirect_to('online-payment.php');
        }
     }
     
}else{
    echo "Invalid Post"; 
}

}else{
   
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <!-- basic -->
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <!-- mobile metas -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1">
  <!-- site metas -->
  <title>OSCOTECH::ONLINE SCREENING PAYMENT</title>
  <meta name="keywords" content="">
  <meta name="description" content="">
  <meta name="author" content="">
  <!-- fevicon -->
  <link rel="icon" href="images/fevicon.png" type="image/gif" />
  <!-- bootstrap css -->
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <!-- style css -->
  <link rel="stylesheet" href="css/style.css">
  <!-- Responsive-->
  <link rel="stylesheet" href="css/responsive.css">  
  <!-- Scrollbar Custom CSS -->
  <link rel="stylesheet" href="css/jquery.mCustomScrollbar.min.css">
  <!-- Tweaks for older IEs-->
  <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css" media="screen">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
</head>
<!-- body -->

<body class="main-layout">
  <!-- loader  -->
  <div class="loader_bg">
    <div class="loader"><img src="images/loading.gif" alt="#" /></div>
  </div>
  <!-- end loader -->
  <!-- header -->
  <header>
    <!-- header inner -->
    <div class="header-top">
      <div class="header">
        <div class="container-fluid">
          <div class="row">
            <div class="col-xl-2 col-lg-4 col-md-4 col-sm-3 col logo_section">
              <div class="full">
                <div class="center-desk">
                  <div class="logo">
                    <a href="index.php"><img src="images/img2.jpg" alt="#" /></a>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-xl-10 col-lg-8 col-md-8 col-sm-9">
              <div class="header_information">
               <div class="menu-area">
                <div class="limit-box">
                  <nav class="main-menu ">
                    <ul class="menu-area-main">
                      <li class="active"> <a href="index.php">Home</a> </li>
                      <li> <a href="#courses">Screening Guides </a> </li>
                       
                     
                     </ul>
                   </nav>
                 </div>
               </div> 
               <div class="mean-last">
                       <a href="#courses"><img src="images/search_icon.png" alt="#" /></a> <a href="#courses">login</a></div>              
             </div>
           </div>
         </div>
       </div>
     </div>
     <!-- end header inner -->

     <!-- end header -->
     <section class="slider_section">
      <div id="myCarousel" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
          <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
          <li data-target="#myCarousel" data-slide-to="1"></li>
          <li data-target="#myCarousel" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner">
          <div class="carousel-item active">

            <div class="container-fluid padding_dd">
              <div class="carousel-caption">
                <div class="row">
                  <div class="col-xl-5 col-lg-5 col-md-5 col-sm-12">
                    <div class="text-bg">
                      <h1>Pay for your Online Screening <a href="#courses">here</a></h1>
                      <p>Pay through your Master Card ATM</p>
                      <!--<a href="#">Read more</a> <a href="#">get a qoute</a>-->
                    </div>
                  </div>
                  <div class="col-xl-7 col-lg-7 col-md-7 col-sm-12">
                    <div class="images_box">
                      <figure><img src="images/OIP.png" style="width:50%; height:50%"></figure>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="carousel-item">

            <div class="container-fluid padding_dd">
              <div class="carousel-caption">

                <div class="row">
                  <div class="col-xl-5 col-lg-5 col-md-5 col-sm-12">
                    <div class="text-bg">
                      <h1>Pay for your Online Screening <a href="#courses">here</a></h1>
                      <p>Pay through your Master Card ATM</p>
                      <!--<a href="#">Read more</a><a href="#">get a qoute</a>-->
                    </div>
                  </div>

                  <div class="col-xl-7 col-lg-7 col-md-7 col-sm-12">
                    <div class="images_box">
                        <figure><img src="images/OIP.png" style="width:50%; height:50%"></figure>
                    </div>
                  </div>
                </div>
              </div>
            </div>

          </div>


          <div class="carousel-item">

            <div class="container-fluid padding_dd">
              <div class="carousel-caption ">
                <div class="row">
                  <div class="col-xl-5 col-lg-5 col-md-5 col-sm-12">
                    <div class="text-bg">
                      <h1>Pay for your Online Screening <a href="#courses">here</a></h1>
                      <p>Pay through your Master Card ATM</p>
                      <!--<a href="#">Read more</a> <a href="#">get a qoute</a>-->
                    </div>
                  </div>
                  <div class="col-xl-7 col-lg-7 col-md-7 col-sm-12">
                    <div class="images_box">
                        <figure><img src="images/OIP.png" style="width:50%; height:50%"></figure>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
      <span class="carousel-control-prev-icon" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>

</section>
</div>
</header>



<!-- end our -->
<!-- Courses -->
<div id="courses" class="Courses">
  <div class="container-fluid padding_left3">
    <div class="row">
      <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12">
        <div class="box_bg">
          <div class="box_bg_img">
            <div class="row" style="color:#000;">
              <h2 style=" margin:20px 0px 10px 5px">Guidelines to the Usage</h2>
             <ol style="list-style-type:upper-roman; line-height:30px; font-size:18px">
                 
                 <li>1. Enter your Form Number in the space provided at the right hand side of the page.</li>
                 <li>2. If your details is found, the system will redirect you to payment page, else an appropriate error message will be displayed</li>
                 <li>3. Payment is made only through ATM card</li>
                 <li>4. If payment was successful, an online receipt will be generated, print out the payment confirmation receipt</li>
                <li>5. If there is network breach during payment, you will be redirected to payment resolution page</li>
                <li>6. Click on requery button at the right hand side of the transaction history</li>
                <li>7. if payment is successful, click on print button to printout the generated receipt</li>
             </ol>



            </div>
          </div>
        </div>
      </div>
      <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 border_right">
        <div class="box_text" style="border: 0px inset green">
          <div class="titlepage">
            <h2>Login <strong class="yellow"> here</strong></h2>
          
          <form method="post" action="" style="width: 100%; float:right; margin:0; padding:0px">
           
                <div class="col-md-12" style="width:100%; margin-bottom:10px; padding:0px">
                  <input placeholder="Form Number" type="text" name="formno" style="width:60%;font-size:15px; border-bottom:1px inset black; margin:20px 20px 20px 0px;padding:0px">
                </div>
                        
                  <center><input type="submit" name="submit" value="View Details" class="send btn btn-success btn-sm" style="float:right; font-size:15px; padding:10px">
              
             
            </form>
          </div>
          
          
        </div>
      </div> 
    </div>
  </div>
</div>
<!-- end Courses -->


    <!--  footer -->
    <footr>
      <div class="footer ">
        <div class="container">
          <div class="row">

            <div class="col-md-12">
           
              <div class="copyright">
                <div class="container">
                  <p>Copyright © <?php echo date("Y")?> ICLSTS ESA-OKE </p>
                </div>
              </div>
            </div>
          </footr>
          <!-- end footer -->
          <!-- Javascript files-->
          <script src="js/jquery.min.js"></script>
          <script src="js/popper.min.js"></script>
          <script src="js/bootstrap.bundle.min.js"></script>
          <script src="js/jquery-3.0.0.min.js"></script>
          <script src="js/plugin.js"></script>
          <!-- sidebar -->
          <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
          <script src="js/custom.js"></script>
          <script src="https:cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js"></script>


          <script>
// This example adds a marker to indicate the position of Bondi Beach in Sydney,
// Australia.
function initMap() {
  var map = new google.maps.Map(document.getElementById('map'), {
    zoom: 11,
    center: {
      lat: 40.645037,
      lng: -73.880224
    },
  });

  var image = 'images/maps-and-flags.png';
  var beachMarker = new google.maps.Marker({
    position: {
      lat: 40.645037,
      lng: -73.880224
    },
    map: map,
    icon: image
  });
}
</script>
<!-- google map js -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA8eaHt9Dh5H57Zh0xVTqxVdBFCvFMqFjQ&callback=initMap"></script>
<!-- end google map js -->



</body>

</html>