' . getTableFieldValue('communication', 'com_item', 'communication_id', $row_details['communication_id']) . '::' . $row_details['details'] . '
'; // error_log("dettttttttttttttails" . $communication_info); // } // if (isset($row_details['remarks']) && $row_details['remarks'] != '') { // $remarks_info .= '' . getTableFieldValue('communication', 'com_item', 'communication_id', $row_details['communication_id']) . '::' . $row_details['remarks'] . '
'; // error_log("remarks:::" . $remarks_info); // } $comm_date = date_format(date_create($row['comm_date']), "Y-m-d"); $query_data = "select start_date_time, end_date_time,shift_id from shift_status_details where shift_details_id='".$shift_details_id."' and ohc_location_id = '".$_SESSION['current_ohcttype']."' and date(end_date_time) = '".$comm_date."' "; $result_data = mysqli_query($conn,$query_data); $row_data = mysqli_fetch_assoc($result_data); $shift_id = $row_data['shift_id']; $start_date_time = $row_data['start_date_time']; $end_date_time = $row_data['end_date_time']; $shift_name = getFieldFromTable('status_name', 'shift_status', 'shift_status_id', $shift_id); error_log("shift details ==>" .$shift_id. " ".$start_date_time." ".$end_date_time. " ".$shift_name); } //echo $; $view_link = ""; $edit_link = ""; $delete_link = ""; $links = ""; $current_date = date("Y-m-d H:i:s"); error_log("current date" . $current_date); $timestamp1 = strtotime($current_date); error_log("time 1 date" . $timestamp1); error_log("comm_date " . $comm_date); $timestamp2 = strtotime($comm_date); error_log("time 2 date" . $timestamp2); $tim_diff = round(($timestamp1 - $timestamp2) / 3600, 1); error_log("Actusal hhhhhhhhhhhhhhhh" . $tim_diff); // error_log("modified by:::::" . $row['modified_by']); if ($hasReadAccess) { //echo ""; // $view_link = ""; } if ($hasWriteAccess) { //if ($tim_diff <= 24) { // $edit_link = ""; //} } if ($hasExecuteAccess) { //if ($tim_diff <= 24) { // $delete_link = ""; //} } // $pdf_link = $space . ""; $space = "   "; $links = $assign_link . $space . $view_link . $space . $edit_link . $space . $delete_link . $space . $pdf_link; $data['rows'][] = array( 'id' => $row['com_id'], 'cell' => array( $links, $count++, $shift_name, $start_date_time, $end_date_time, date_format(date_create($row['comm_date']), "d-M-Y"), // getTableFieldValue('patient_master', 'patient_name', 'id', $row['emp_id']), $communication_info, // $remarks_info, ) ); } // error_log(print_r($data, true)); echo json_encode($data); ?>