<?php
	error_reporting(0);
	define('INCLUDE_CHECK',true);
	session_start();
	require ('classes/config.php');
	//print_r($_SESSION);

?>



            <div class="rightp">
            	<h1>TRANSACTION STATUS (Query Response)</h1>
                <div class="kontent">
 <?php
   if ($_SESSION['wayout'] =='Acceptance'){ ?>
           <h2> You can continue to Print your Admission Letter Now"</h2>
           <br>
           <a href="http://eportal.oscotechesaoke.edu.ng/admission_portal/main.php?tag=admission_letter_login" class="btn btn-primary">Continue</a>
  <?php } ?>
				
<?php
   if ($_SESSION['wayout'] =='School Fee'){ ?>
           <h2> Print Your Online Registration Login Pin</h2>
           <?php 
           if ($_SESSION['txn_ref'] !=''){
            $p1 = (substr(rand(1, 10000000000),0,5));
            $p2 = (substr(rand(1, 10000000000),0,5));
            $p3 = (substr(rand(1, 10000000000),0,5));
            $pf = $p1.$p2;
            $s = "SREG17".$p3;
            $tnx= $_SESSION['txn_ref'];

           
                   $sql = mysql_query("INSERT INTO epayment_pin(pin,serial_no,txn_ref,status,usedbyid,log_time) 
		   VALUES('$pf','$s','{$_SESSION['txn_ref']}','not-used','0','0000-00-00 00:00:00')") or die(mysql_error());
                  // unset($_SESSION['txn_ref']);
                   echo "<h2>TXN: ".$tnx."</h2>";
                   echo "<h2>PIN: ".$pf."</h2>";
                   echo "<h2>S/N: " .$s."</h2>";
            }else{
                  echo "<h2>PIN: ".$tnx."</h2>";
                  echo "<h2>PIN: ".$pf."</h2>";
                  echo "<h2>S/N: " .$s."</h2>";
            }
           ?>
           <a href="http://eportal.oscotechesaoke.edu.ng/oscotechereg/" class="btn btn-primary">Continue</a>
  <?php } ?>
				
<br><br>

                </div>
            </div>
        </div><!-- content -->    
        