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 : 18.191.192.250


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

<?php

include ("database.php");

$fromdeg = $_POST['fromdeg'];
$degreefrom = explode('-', $fromdeg);
$todeg = $_POST['todeg'];
$degreeto = explode('-', $todeg);
$fromapp = $_POST['fromapp'];
$toapp = $_POST['toapp'];
$year = $_POST['year'];
$rtype = $_POST['rtype'];
$combcode = $_POST['combcode'];

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

if($year == 'A')
{	
	$get_app_query = "select fappno, fappno, fname, ffatname, FMOTNAME,FCASTE,
	concat(sa.fdegree,'-',dg.fdescpn) as degree,  
	sa.ftotfee, sa.fpaymenttype, ifnull(fpaymentstatus,'') as fpaymentstatus, 
	ifnull(sa.fapprusername,'') as fuser
	from studadm sa 
	inner join degree dg 
	on sa.fdegree = dg.fdegree 
	and sa.fexamno = dg.fexamno
	where sa.fdegree between '{$degreefrom[0]}' and '{$degreeto[0]}'
	and sa.fappno between '{$fromapp}' and '{$toapp}'
	and sa.fcombcode = '{$combcode}'
	and sa.fexamno = '{$year}' {$cnd}";
	// var_dump($get_app_query);

}else
{
	if($year == 'B')
		$year = 'C';
	else if($year == 'C')
		$year = 'E';	

	$get_app_query = "select fappno, fappno, s.fname, s.ffatname, concat(sa.fdegree,'-',dg.fdescpn) as degree, sa.fregfee as ftotfee, 
	sa.FPAYMENTYPE as fpaymenttype, ifnull(fpaymentstatus,'') as fapprstatus, ifnull(sa.fapprusername,'') as fuser 
	from regcandsum sa inner join degree dg on sa.fdegree = dg.fdegree and sa.fexamno = dg.fexamno inner join student s on sa.fregno = s.fregno 
	where sa.fdegree between '{$degreefrom[0]}' and '{$degreeto[0]}'
	and sa.fappno between '{$fromapp}' and '{$toapp}'
	and sa.fexamno = '{$year}'";
	
}	

$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);