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.119.19.206
Current Path : /kop/ |
| Current File : //kop/onload.php |
<?php
$dbhost = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
$dbuser = "admin";
$dbpass = "T0g3th3r@all";
$db = "logisys3_nub";
$conn = new mysqli($dbhost, $dbuser, $dbpass,$db) or die("Connect failed: %s\n". $conn -> error);
$query="SELECT IFNULL(FTYPE,'') AS FTYPE,
IFNULL(FTITLE,'') AS FTITLE,
IFNULL(DATE_FORMAT(FFROMDATE,'%d/%m/%Y'),'') AS FFROMDATE,
IFNULL(DATE_FORMAT(FTODATE,'%d/%m/%Y'),'') AS FTODATE,
IFNULL(FPATH,'') AS FPATH,
IFNULL(DATE_FORMAT(FCREATE,'%d/%m/%Y'),'') AS FCREATE
FROM upload_notify
WHERE CURDATE() BETWEEN FFROMDATE AND FTODATE
ORDER BY date_format(FCREATE,'%Y-%m-%d') desc";
$dateResult = mysqli_query($conn,$query);
// var_dump($query);
// die();
$count = mysqli_num_rows($dateResult);
if($count>0)
{
$i = 0;
while($row = mysqli_fetch_assoc($dateResult)){
$info[$i]['FTYPE'] = $row['FTYPE'];
$info[$i]['FTITLE'] = $row['FTITLE'];
$info[$i]['FFROMDATE'] = $row['FFROMDATE'];
$info[$i]['FTODATE'] = $row['FTODATE'];
$info[$i]['FPATH'] = $row['FPATH'];
$info[$i]['FCREATE'] = $row['FCREATE'];
$i++;
}
}
// $app['data'] = $info;
// var_dump($app);
if($info){
$arr['err_code'] = 0;
$arr['status'] = 'success';
$arr['data'] = $info;
echo json_encode($arr);
return;
}else {
$arr['err_code'] = -1;
$arr['status'] = 'Failure';
$arr['msg'] = 'Failed To update';
echo json_encode($arr);
return;
}
?>
|