SQL '.$sql_list);
$resultList = @mysqli_query($conn,$sql_list);
$count = 1;
while ($row = mysqli_fetch_assoc($resultList)) {
$user_id_val = $row['user_id'];
$status_val = $row['status'];
if ($row['role_name'] == 'Application Admin') {
$view_link = "";
} else {
$view_link = "";
$edit_link = "";
$activate_link = "";
}
if ($_SESSION['RoleId'] != 1) {
// $activate_link=" ";
// $edit_link=" ";
}
if ($status_val == '1') {
$status = "Active";
} else {
$status = "Inactive";
}
$space = " ";
$links = $assign_link . $space . $view_link . $space . $edit_link . $space . $activate_link;
$ohc_type_names = getCommaSeperatedValuesForInClause("select ohc_type_name from ohc_type", "ohc_type_id", $row['ohc_type']);
$allowed_clients_name = getCommaSeperatedValuesForInClause("select client_name from client_master", "client_id", $row['allowed_clients']);
$role = getCommaSeperatedValuesForInClause("select role_name from role_master ", "role_id", $row['role_id']);
$data['rows'][] = array(
'id' => $row['user_id'],
'cell' => array(
$count ++,
// $user_id_val,
$row['staff_name'],
$row['user_name'],
// getTableFieldValue('staff_master','staff_name','staff_id',$row['staff_id'],'') ,
$role,
$ohc_type_names,
$status,
$links
)
);
}
// error_log('staff_data'.print_r($data,true));
echo json_encode($data);
?>