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


Current Path : /var/www/html/gcg/adm_useless/src/
Upload File :
Current File : //var/www/html/gcg/adm_useless/src/applicationStatus.php

<?php

function getApplicationDetails($aobj_context)
{
	//var_dump($aobj_context);
	$status = trim($aobj_context->mobj_data["status"]);
	$fromdate = trim($aobj_context->mobj_data["fromdate"]);
	$todate = trim($aobj_context->mobj_data["todate"]);
	$fromroll = trim($aobj_context->mobj_data["fromroll"]);
	$toroll = trim($aobj_context->mobj_data["toroll"]);
	$servcode = trim($aobj_context->mobj_data["servcode"]);
	$paystatus = trim($aobj_context->mobj_data["paystatus"]);

	$lstrserv = "and st.fservcode='$servcode'";
	if($servcode=="all")
	$lstrserv="";
	
	$lstrstatus = "and st.fverifystatus='$status'";
	if($status=="all")
	$lstrstatus="";
	
	$lstrpaystatus = "and st.fpaystatus='$paystatus'";
	if($paystatus == "all")
	$lstrpaystatus = "";

	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$query = "SELECT st.fappno,DATE_FORMAT(fappdate,'%d/%m/%Y') AS fappdate, st.fregno, st.fname, st.fcategory, st.ftotal, st.fpaystatus, 
	s.fservname, st.fverifystatus, DATE_FORMAT(st.fverifydate,'%d/%m/%Y') as fverifydate FROM servtran st INNER JOIN servtype s ON 
	s.fservcode =  st.fservcode
	WHERE st.fappdate BETWEEN DATE_FORMAT(str_to_date('{$fromdate}','%d/%m/%Y'),'%Y-%m-%d') 
	AND DATE_FORMAT(str_to_date('{$todate}','%d/%m/%Y'),'%Y-%m-%d') 
	AND st.fregno BETWEEN '$fromroll' AND '$toroll' {$lstrserv} {$lstrstatus} 
	{$lstrpaystatus} order by st.fappno, st.fregno";
	//var_dump($query);
	$result = $aobj_context->mobj_db->GetAll($query);
	$i=1;
	//$table .= "<tbody id="trecords">"; 	
	foreach($result as $key => $value)
	{
		$table.="<tr style='cursor:pointer;' id='tr$value[fappno]'>";
		
		$table.="<td>
				<span><center>{$i}</center></span>
				</td>";
		$table.="<td id='appno' onclick='loadStudDet($value[fappno])'>
				{$value['fappno']}
				</td>";
		$table.="<td id='appno' onclick='loadStudDet($value[fappno])'>
				{$value['fappdate']}
				</td>";
		$table.="<td onclick='loadStudDet($value[fappno])'>
				{$value['fregno']}
				</td>";
		$table.="<td onclick='loadStudDet($value[fappno])'>
				{$value['fname']}
				</td>";
		$table.="<td onclick='loadStudDet($value[fappno])'>
				{$value['fcategory']}
				</td>";

		$table.="<td onclick='loadStudDet($value[fappno])'>
				{$value['fservname']}
				</td>";
		$table.="<td onclick='loadStudDet($value[fappno])'>
				<span style='float : right;'>{$value['ftotal']}</span>
				</td>";
		$table.="<td id='$value[fappno]' onclick='loadStudDet($value[fappno])'>
				{$value['fverifystatus']}
				</td>";
		$table.="<td id='date$value[fappno]' onclick='loadStudDet($value[fappno])'>
				{$value['fverifydate']}
				</td>";
		$table.="<td>
				<span class='btn btn-primary waves-effect' onclick='printMailAdd($value[fappno])'>Cov. Lett.</span>
				</td>";
		$table.="</tr>";
		$i++;
	}
	//$table .= "</tbody>";

	if($result)
	{
		$arr['table'] = $table;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");	
		return; 
	}else
	{
		$arr = '';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failur");	
		return; 
	}

}