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/mainAPIOLD.php
<?php
    function utf8_string_array_encode(&$array){
        $func = function(&$value,&$key){
            if(is_string($value)){
                $value = utf8_encode($value);
            }
            if(is_string($key)){
                $key = utf8_encode($key);
            }
            if(is_array($value)){
                utf8_string_array_encode($value);
            }
        };
        array_walk($array,$func);
        return $array;
    }
    //
	function recordSetToJson($mysql_result,$jsonencode=false,$marker="") {
		$return_arr = array();
		while($datarow = $mysql_result->fetch(PDO::FETCH_ASSOC)){
			$return_arr[] = $datarow;
		}
		//
		$return_arr = utf8_string_array_encode($return_arr);
		//   		
		if (!$jsonencode)	
			return $return_arr;
		else{
			if ($marker != "")
				return json_encode(array($marker =>$return_arr));			
			else
				return json_encode($return_arr);
		}
	}
	//
	require('connect.php');
	$pdo = db_connect();
 $opID = $_REQUEST['opID'];


	if ($opID == "CHECK_SCHOOL_FEES"){

        $deptID = $_REQUEST['deptID'];
        $asession = $_REQUEST['asession'];
        $levelID = $_REQUEST['levelID'];
        $status = $_REQUEST['status'];
         $Query="select amount from schoolfee where dept= ? and level= ? and status= ? and asession= ?" ;
//         $Query="select * from schoolfee where dept=$deptID and level=$levelID and status=$status and asession=$asession" ;
//		 $Query = "SELECT a.matNo, a.names, a.sex, a.course, a.levelID, a.mode, a.gsm,a.state,a.lga FROM realdata a WHERE graduated<>'Yes' and a.matNo = ?";
		$stmt = $pdo->prepare($Query);
		$stmt->execute([$deptID,$levelID,$status,$asession]);
		if ($stmt->rowCount() == 0)
			echo "NOT_FOUND";
		else
			echo recordSetToJson($stmt,true,"che_sch_fee");
		//

	}else if ($opID == "STUDENT_RECORD"){
        $usernamea= $_REQUEST['usernamea'];
        $passworda=$_REQUEST['passworda'];
		  $Query = "SELECT a.matNo, a.names, a.sex, a.course, a.levelID,a.state,a.lga, a.mode, a.gsm, a.email,a.usernamea,a.passworda FROM realdata a WHERE a.usernamea =? AND passworda =? ";
		$stmt = $pdo->prepare($Query);
//        echo $usernamea;
		$stmt->execute([$usernamea,$passworda]);
		if ($stmt->rowCount() == 0)
			echo "NOT_FOUND";
		else
			echo recordSetToJson($stmt,true,"std_rec");
		//
	
	}else if ($opID == "STUDENT_RECORD_ALL"){
//		echo $Query = "SELECT remitaRRR,a.matNo, a.names, a.sex, a.course, a.levelID, a.state,a.lga,a.mode, a.gsm, a.email,a.usernamea,a.passworda 	FROM realdata a, remitaorder b WHERE a.matNo =b.regNo AND b.transApproved='$isApproved' AND b.paymentType= '$paymentType' and b.pay_session= '$session' ";
        $Query = "SELECT a.matNo, a.names, a.sex, a.course, a.levelID, a.state,a.lga,a.mode, a.gsm, a.email FROM realdata a where matNo in (select regNo from remitaorder)";
		$stmt = $pdo->prepare($Query);
		$stmt->execute();
		if ($stmt->rowCount() == 0)
			echo "NOT_FOUND";
		else
//            echo "am here";
			echo recordSetToJson($stmt,true,"Biodata");
	}
	$pdo=null;
?>

Youez - 2016 - github.com/yon3zu
LinuXploit