37 lines
1005 B
PHP
37 lines
1005 B
PHP
|
|
<?php
|
|
include('includes/config/config.php');
|
|
//header('Content-Type: application/json');
|
|
|
|
$Id = $_REQUEST['indent_id'];
|
|
$query = "select * from indent_doc where indent_id = '".$Id."' order by last_modified_by desc ";
|
|
error_log(' get doc data '.$query);
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
$data = array();
|
|
$data_arr = array();
|
|
|
|
if(mysqli_num_rows($result) > 0) {
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
//extract($row);
|
|
//$data = $row;
|
|
|
|
$data['indent_doc']=base64_encode($row['indent_doc']);
|
|
$data['indent_doc_des']=$row['indent_doc_des'];
|
|
$data['indent_doc_type']=$row['indent_doc_type'];
|
|
$data['id']=$row['indent_doc_id'];
|
|
//$data['doj']=date_format(date_create($row['doj']),"d-M-Y ");
|
|
array_push($data_arr,$data);
|
|
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$data['status'] = 200;
|
|
$data['message'] = "Data not found!";
|
|
}
|
|
// echo $data;
|
|
echo json_encode($data_arr);
|
|
?>
|