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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/federalpolyede.edu.ng/httpdocs_backup/admin_student/new-receipt-page_old.php
<?php
ob_start();
if(session_id() == '') {
    session_start();
    $ptype=$_SESSION['ptype'];
}
 $matNo=$_SESSION['formNo'];
//require 'remita_constants2.php';
require 'remita_constants2.php';
$orderID = "";
if( isset( $_GET['orderID'] )) {
    $orderID = $_GET["orderID"];
}
$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);
    if ($result === false) $result = curl_error($ch);
   // echo stripslashes($result);
    curl_close($ch);
    // Closing
    curl_close($ch);
    $response = json_decode($result, true);
    return $response;
}
if($orderID !=null){
    //echo 'Here';
     $response = remita_transaction_details($orderID);
    $response_code = $response['status'];
    if (isset($response['RRR']))
    {
        $rrr = $response['RRR'];
    }
    $response_message = $response['message'];
}
?>
<html>
<head>
    <title></title>
</head>
<body>
<table width="50%" align="center" cellpadding="3" cellspacing="5">
    <tr>
        <td align="center"><img src="../images/edebanner2.png" width="731" height="95"></td>
    </tr>
    <tr>
        <td><fieldset><legend>Payment Detail</legend>
                <div style="text-align: center;">

                    <?php  //echo $response_code;
                    if($response_code == '01' || $response_code == '00') { ?>
                    <h2>Transaction Successful</h2>

                    <p><b>Remita Retrieval Reference: </b><?php echo $rrr; ?><p>
                    <p><b>Transaction ID: </b><?php echo $orderID; ?><p>
                        <?php
                        if ($ptype=='Acceptance Fee'){
                            echo '<a href="print/acceptancePrint.php" target="_blank">Click Here to Print Acceptance Receipt</a>';
                            echo '<br><a href="print/admissionLetter.php" target="_blank">Print Admission Letter</a>';
                            //echo '<br><a href="../entranceForm/adminStatus_process.php" target="_blank">Proceed to School Fees</a>';

                        }else if ($ptype=='Admission Slip') {
                            echo'   <a href="print/admissionSlip.php" target="_blank">Click Here to Print Admission Slip</a>';
                        }else if ($ptype=='School Fees') {

                            echo'   <a href="print/schoolFeePrint.php" target="_blank">Click Here to Print School Receipt</a>';
                            //echo 'here';
                        }

                        ?>
                        <?php
                        $transApproved='True';
                        $remitaRRR=$rrr;
                        $transDate=date('y/m/d h:i:s a');
                        $transStatus=$response_code;
                        $transDetail=$response_message;
                        }else if($response_code == '021') { ?>
                    <h2>RRR Generated Successfully</h2>
                    <p><b>Remita Retrieval Reference: </b><?php echo $rrr; ?><p>
                        <?php
                        $transApproved='False';
                        $remitaRRR=$rrr;
                        $transDate=date('y/m/d h:i:s a');
                        $transStatus=$response_code;
                        $transDetail=$response_message;
                        }else{ ?>
                    <h2>Your Transaction was not Successful</h2>
                    <?php
                    $transApproved='False';
                    $remitaRRR=$rrr;
                    $transDate=date('y/m/d h:i:s a');
                    $transStatus=$response_code;
                    $transDetail=$response_message;
                    if ($rrr !=null){ ?>
                    <p>Your Remita Retrieval Reference is <span><b><?php echo $rrr; ?></b></span><br />
                        <?php } ?>
                    <p><b>Reason: </b><?php echo $response_message; ?><p>
                        <br><h3 style="color: red">Note: Kindly wait for 2 hours before re-try the Payment, to avoid double deduction.</h3>
                        <?php }
                        require_once('../connect.php');
                        $db=db_connect();
                        require('../filetoU/logFile.php');
                        $logD='Payment. OrderID: '.$orderID.' PaymentType: '.$ptype;
                        logDetail($matNo,$logD);
                        $db->query("UPDATE `fedpoly`.`remitaorder` SET `remitaRRR` = '$remitaRRR',`transDate` = '$transDate',`transStatus` = '$transStatus',`transDetail` = '$transDetail',`transApproved` ='$transApproved' WHERE `remitaorder`.`orderID` ='$orderID'");

                        //inserting data to realdata table
                    if ($ptype=='Admission Slip'){

                    }
                        else 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', '3')");
                                }
                            }
                        }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='30' ";
                                    $matResult=$db->query($matSQL);
                                    echo $matNum=$matResult->rowCount();
                                    if ($matNum>0) {
                                        $realNo = $matNum + 1;
                                        if ($realNo < 10) {
                                            $serialNo = '20170000' . $realNo;
                                        } elseif ($realNo < 100) {
                                            $serialNo = '2017000' . $realNo;
                                        } elseif ($realNo < 1000) {
                                            $serialNo = '201700' . $realNo;
                                        } elseif ($realNo < 10000) {
                                            $serialNo = '20170' . $realNo;
                                        } else {
                                            $serialNo = '2017' . $realNo;
                                        }
                                    }else{
                                        $serialNo = '201700001';
                                        }
                                        $newMatNo=$prefix.$serialNo.$sufix;
                                        $db->query("UPDATE `fedpoly`.`realdata` SET `matNo` = '$newMatNo',`usernamea` = '$newMatNo',`passworda` = '$newMatNo',`fresher` = '30' 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
                                    copy('../passportForm/'.$matNo.'.jpg','passport/Reg'.$newMatNo.'.jpg');
                                        echo '<font color="#FF0000"><h2><br> Note: Your Username and Password is now '.$newMatNo.'</h2></font>';
                                    }
                                }
//
                        }
                       // echo $matNoOld.'.jpg';
                       // echo '<br>';
                      //  echo '../passport/Reg'.$newMatNo.'.jpg';
                       // rename($matNoOld.'.jpg','../passport/Reg'.$newMatNo.'.jpg');
                        ob_end_flush();
                        ?>
                        <br><a href="../index.php" target="_blank">Back to Home Page</a>
                </div>
            </fieldset>
        </td>
    </tr>
</table>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit