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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs/externalCall/ace_idCard.php
<?php
include("ace_SpreadsheetAPI_pdoLib.php");
function recordSetToJson($mysql_result,$jsonencode=false,$marker="") {
    $return_arr = array();
    while($datarow = mysql_fetch_assoc($mysql_result)){
        $return_arr[] = $datarow;
    }
    if (!$jsonencode)
        return $return_arr;
    else{
        if ($marker != "")
            return json_encode(array($marker =>$return_arr));
        else
            return json_encode($return_arr);
    }
}
//
$filename = "studentInfo.xls";
    require('../connect.php');
    $db=db_connect();

        //  $Query = "SELECT * from vwAllPayments order by paymentType";



//$Query="select * from vwBursary";


    if (isset($_REQUEST['JSON'])){
        $result = $db->query($Query);
        if ($result->rowCount() == 0)
            echo "NOT_FOUND";
        else

            echo recordSetToJson($results,true);
    }else {
        //$result=$result1->fetchAll(PDO::FETCH_BOTH);
        // $result=mysql_query($Query,$db);
        //echo 'here';
        // $result = $db->query($Query);

        xlsProcess($filename);
       // exit;
    }

if (file_exists('ace_tempF')){
    Delete("ace_tempF");
}
if (file_exists('ace_tempF2')){
    Delete("ace_tempF2");
}
mkdir("ace_tempF");
mkdir("ace_tempF2");
$Query1 = $db->query("SELECT matNo, names , sex, course, levelID,mode,gsm,email FROM ace_realdata INNER JOIN ace_remitaorder ro ON matNo =ro.regNo AND ro.transApproved = 'True' AND ro.paymentType = 'School Fees' and pay_session='2018/2019'");
while ($row=$Query1->fetch(PDO::FETCH_BOTH)){
   echo $matNo=$row['matNo'];
    if (file_exists('../passport/Reg'.$matNo.'.jpg')){
        copy('../passport/Reg'.$matNo.'.jpg','ace_tempF/Reg'.$matNo.'.jpg');
    }
    if (file_exists('../signature/Reg'.$matNo.'.jpg')){
        copy('../signature/Reg'.$matNo.'.jpg','ace_tempF2/Reg'.$matNo.'.jpg');
    }

}

if (file_exists('pictures.zip')){
    unlink('pictures.zip');
}
if (file_exists('signatures.zip')){
    unlink('signatures.zip');
}
createZipFromDir('ace_tempF','pictures.zip');
createZipFromDir('ace_tempF2','signatures.zip');




function Delete($path)
{
    if (is_dir($path) === true)
    {
        $files = array_diff(scandir($path), array('.', '..'));

        foreach ($files as $file)
        {
            Delete(realpath($path) . '/' . $file);
        }

        return rmdir($path);
    }

    else if (is_file($path) === true)
    {
        return unlink($path);
    }

    return false;
}

function createZipFromDir($dir, $zip_file) {
    $zip = new ZipArchive;
    if (true !== $zip->open($zip_file, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)) {
        return false;
    }
    zipDir($dir, $zip);
    return $zip;
}

function zipDir($dir, $zip, $relative_path = DIRECTORY_SEPARATOR) {
    $dir = rtrim($dir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
    if ($handle = opendir($dir)) {
        while (false !== ($file = readdir($handle))) {
            if ($file === '.' || $file === '..') {
                continue;
            }
            if (is_file($dir . $file)) {
                $zip->addFile($dir . $file, $file);
            } elseif (is_dir($dir . $file)) {
                zipDir($dir . $file, $zip, $relative_path . $file);
            }
        }
    }
    closedir($handle);
}
?>


Youez - 2016 - github.com/yon3zu
LinuXploit