"; }else{ $view_link=""; }} if(isAccessible($_SESSION['RoleId'],'','W')) { if(isset($row_history['fitness_status']) && $row_history['fitness_status']!=""){ $edit_link=""; }else{ $edit_link=""; } } $sickness = $sickness = getCommaSeperatedValuesForInClause('select ailment_sys_name from ailment_system', 'ailment_sys_id', $row_history['sickness_name']); $space="   "; $links = $view_link.$space.$edit_link; $data['rows'][] = array( 'id' => $row_history['sickness_id'], 'cell' => array($count++,date_format(date_create($row_history['sickness_date']),"d-M-Y H:i A"),$row_history['ticket_no'],date_format(date_create($row_history['from_date']),"d-M-Y "),date_format(date_create($row_history['to_date']),"d-M-Y "), date_format(date_create($row_history['date_absent']),"d-M-Y "), date_format(date_create($row_history['date_return']),"d-M-Y "),$row_history['agency'], $sickness ,$row_history['fitness_status'],$links) ); } // error_log("data: ".print_r($data, true)); echo json_encode($data); ?>