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.225.72.181
<?php
require('includes/dbconnect.php'); //include database connection
if(!isset($_GET['appno']))
{
$statusCode = 0;
$statusMessage = "Application number can not be empty. Please try again";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
}
if(!isset($_GET['amount']))
{
$statusCode = 0;
$statusMessage = "Amount can not be empty /zero. please try again";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
}
$appno = stripslashes($_GET['appno']);
$famount = stripslashes($_GET['amount']);
$studQuery = "SELECT fregno, fcollcode,ftotalfee, funivcode,appno,if(now()>fapplastdate = true,'T','F') as lastdate FROM appcandsum, control
where APPNO='{$appno}'";
$studResult = $conn->query($studQuery);
if(mysqli_num_rows($studResult) != 1)
{
$statusCode = 0;
$statusMessage = "Invalid Challan Number.";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
}
else
{
$row1 = mysqli_fetch_array($studResult,MYSQLI_ASSOC);
if($row1['ftotalfee'] != $famount)
{
$statusCode = 0;
$statusMessage = "Amount Not Matching.";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
return;
}
if($row1['lastdate'] == 'T')
{
$statusCode = 0;
$statusMessage = "Challan Expired";
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => $statusMessage);
$returnString = json_encode($jsonLoginArray);
print $returnString;
exit;
return;
}
$statusCode = 1;
$returnArray = array(
"regno" => $row1['fregno'],
"collcode" => $row1['fcollcode'],
"amount" => $row1['ftotalfee'],
"univcode" => $row1['funivcode'],
"appno" => $row1['appno']
);
$jsonLoginArray = array("statusCode" => $statusCode, "statusMessage" => "Success", "appDet" => $returnArray);
$returnString = json_encode($jsonLoginArray);
print $returnString;
}
?>
|