403Webshell
Server IP : 172.64.80.1  /  Your IP : 172.70.100.163
Web Server : Apache
System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64
User : federalpolyede.edu.ng_idh35skikv ( 10000)
PHP Version : 7.4.33
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/reQuery.php
<?php
ob_start();
session_start();
$matNo=$_SESSION['matNo'];
?>

		<?php
			
require 'remita_constants2.php';
$orderID = "";
if( isset( $_GET['id'] )) {
 $orderID = $_GET['id'];
 $ptype=$_GET['ptype'];
}
$response_code ="";
$rrr = "";
$response_message = "";
	
			//Verify Transaction
function remita_transaction_details($orderId){
		$mert =  MERCHANTID;
		$api_key =  APIKEY;
		$concatString = $orderId . $api_key . $mert;
		$hash = hash('sha512', $concatString);
		$url 	= trim(CHECKSTATUSURL . '/' . $mert  . '/' . $orderId . '/' . $hash . '/' . 'orderstatus.reg');
		//  Initiate curl
		
		$ch = curl_init();
		// Disable SSL verification
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
		// Will return the response, if false it print the response
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		// Set the url
		curl_setopt($ch, CURLOPT_URL,$url);
		// Execute
		$result=curl_exec($ch);
		// Closing
		curl_close($ch);
		 $result;
		$response = json_decode($result, true);
		return $response;
	}

	if($orderID !=null){

		 $response = remita_transaction_details($orderID);
		 $response_code = $response['status'];
		if (isset($response['RRR']))
			{
		 	$rrr = $response['RRR'];
			}
		  $response_message = $response['message'];


$transactiontime= $response['transactiontime'];
$RRR= $response['RRR'];
$status= $response['status'];
$message= $response['message'];
//echo $response['Approved'];

if (($status=='00') or ($status=='01')){
	$transA='True';
	
	
	
}else{
	$transA='False';
}
		
		require_once('../connect.php');
        $db=db_connect();
		require('../filetoU/logFile.php');
$logD='Requerying.  OrderID: '.$orderID.' RRR: '.$RRR;
logDetail($matNo,$logD);

$db->query("UPDATE `fedpoly`.`remitaorder` SET `remitaRRR` = '$RRR',`transDate` = '$transactiontime',`transStatus` = '$status',`transDetail` = '$message',`transApproved` = '$transA' WHERE `remitaorder`.`orderID` ='$orderID'");


//----------------------------------------------------------------------
        if ($ptype=='Acceptance Fee'){
            $k=$db->query("select * from remitaorder where regNo='$matNo'and paymentType='Acceptance Fee' and transApproved='True'")->rowCount();
            if ($k>0){
                $cardGet=$db->query("select * from admitted where formNo='$matNo'");
                $numGet=$cardGet->rowCount();
                $cardGet_fetch=$cardGet->fetch(PDO::FETCH_BOTH);

                if ($numGet>0){
                    $names=$cardGet_fetch['names'];
                    $names=str_replace("'","''",$names);
                    $course=$cardGet_fetch['course'];
                    $levelID=$cardGet_fetch['levelID'];
                    $address=$cardGet_fetch['address'];
                    $state=$cardGet_fetch['state'];
                    $lga=$cardGet_fetch['lga'];
                    $email=$cardGet_fetch['email'];
                    $gsm=$cardGet_fetch['gsm'];
                    $ausername=$cardGet_fetch['formNo'];
                    $apassword=$cardGet_fetch['formNo'];
                    $mode=$cardGet_fetch['mode'];
                    $dob=$cardGet_fetch['dob'];
                    $sex=$cardGet_fetch['sex'];

                    $db->query("INSERT INTO `fedpoly`.`realdata` (`sn`, `formNo`, `matNo`, `names`, `course`, `levelID`, `mode`, `state`, `lga`, `dob`, `gsm`, `sex`, `address`, `email`, `usernamea`, `passworda`, `fresher`) VALUES (NULL, '$matNo', '$matNo', '$names', '$course', '$levelID', '$mode', '$state', '$lga', '$dob', '$gsm', '$sex', '$address', '$email', '$matNo', '$matNo', '1')");
                }
            }
        }else{

            //repeater

            $pValue=$db->query("select * from remitaorder where regNo='$matNo' and transApproved='True' and paymenttype='School Fees'")->rowCount();
//	if (($transApproved=='True') and ($ptype=='School Fees')){
            if ($pValue>0){

                if (isset($_SESSION['repeater'])){
                    if ($db->query("select * from realdata where matNo='$matNo' and status='Repeater'")->rowCount()!=1){

                        if ($_SESSION['repeater']=='Repeater'){
                            $levelID=$levelID-1;
                            $db->query("update realdata set levelID='$levelID',status='Repeater' where matNo='$matNo'");
                        }
                    }
                }

                //Generate Matric Number-

                //$arrayN=array(54=>'MB201500054',253=>'AH201500253',97=>'ST201500097PT',92=>'201500092',99=>'PM201500099', 101=>'CS201500101',115='201500115');
//echo $matNo;

                $mSQL="select * from realdata where formNo='$matNo' and matNo='$matNo' and fresher=2";
                $mResult=$db->query($mSQL);
                $mNum=$mResult->rowCount();

                if ($mNum>0){
                    $matNoOld=$_SESSION['formNo'];
                    //generate prefix and sufix
                    $deptID=$_SESSION['deptID'] ;
                    $levelID=$_SESSION['levelID'] ;
                    //	echo $_SESSION['course'] ;
                    $prefixQ=$db->query("select * from dept where sn='$deptID'");
                    $prefixQ_fetch=$prefixQ->fetch(PDO::FETCH_BOTH);
                    $numPrefix=$prefixQ->rowCount();
                    $courseName=$prefixQ_fetch['dOption'];
                    if ($numPrefix>0){
                        if ($levelID=='1'){
                            $prefix=$prefixQ_fetch['nd'];
                            $sufix='';
                        }elseif($levelID=='3'){
                            $prefix=$prefixQ_fetch['hnd'];
                            $sufix='';
                        }elseif($levelID=='5'){
                            $prefix=$prefixQ_fetch['nd'];
                            $sufix='PT';
                        }elseif($levelID=='8'){
                            $prefix=$prefixQ_fetch['nd'];
                            $sufix='DPT';
                        }elseif($levelID=='10'){
                            echo $prefix=$prefixQ_fetch['nd'];
                            $sufix='';
                        }
                    }
                    //End of prefix and sufix
                    //generate serial Number
                    // echo $courseName;
                    //$matSQL="select * from realdata where fresher='20' and course='$courseName' and levelID='$levelID' ";
                    $matSQL="select * from realdata where fresher='20' ";
                    $matResult=$db->query($matSQL);
                    echo $matNum=$matResult->rowCount();
                    if ($matNum>0) {
                        $realNo = $matNum + 1;
                        if ($realNo < 10) {
                            $serialNo = '20160000' . $realNo;
                        } elseif ($realNo < 100) {
                            $serialNo = '2016000' . $realNo;
                        } elseif ($realNo < 1000) {
                            $serialNo = '201600' . $realNo;
                        } elseif ($realNo < 10000) {
                            $serialNo = '20160' . $realNo;
                        } else {
                            $serialNo = '2016' . $realNo;
                        }
                    }else{
                        $serialNo = '201600001';
                    }
                    $newMatNo=$prefix.$serialNo.$sufix;
                    $db->query("UPDATE `fedpoly`.`realdata` SET `matNo` = '$newMatNo',`usernamea` = '$newMatNo',`passworda` = '$newMatNo',`fresher` = '20' WHERE `realdata`.`formNo` ='$matNo'");
                    $db->query("UPDATE `fedpoly`.`remitaorder` SET `regNo` = '$newMatNo' WHERE `remitaorder`.`orderID` ='$orderID'");

                    $_SESSION['matNo']=$newMatNo;
                    //=====picture handling
                    // rename('image1.jpg', 'del/image1.jpg');
                    // rename($matNoOld.'.jpg','../passport/Reg'.$newMatNo.'.jpg');


                    /*      $src = opendir('../passportForm/');
                          $dest = opendir('../passport/');
                          $readFile=$matNoOld.'.jpg';
                          $readFile2=$newMatNo.'.jpg';
                          while($readFile = readdir($src)){
                              if($readFile != '.' && $readFile != '..'){
                                  if(!file_exists($readFile)){
                                      if(copy($src.$readFile, $dest.$readFile2)){
                                          echo "Copy file";
                                      }else{
                                          echo "Canot Copy file";
                                      }
                                  }
                              }
                          }*/
                    //=============End of picture handling
                   // echo '<font color="#FF0000"><h2><br> Note: Your Username and Password is now '.$newMatNo.'</h2></font>';
                }
            }
//

	
	
	header('location:'.'paymentHistory.php');
		}
	}
ob_end_flush();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit