$stage_info = get_kw_from_name('stage', $_SESSION['form_data']['case_stage']); $id_stage = $stage_info['id_keyword']; show_context_stage($case, $id_stage); } elseif (isset($old_stage) && $old_stage) { // setting new stage $stage_info = get_kw_from_name('stage', $old_stage); $id_stage = $stage_info['id_keyword']; show_context_stage($case, $id_stage); } else { // Normal follow-up $result = lcm_query("SELECT stage FROM lcm_case WHERE id_case = " . $case); $row = lcm_fetch_array($result); if ($row['stage']) { $stage_info = get_kw_from_name('stage', $row['stage']); $id_stage = $stage_info['id_keyword']; show_context_stage($case, $id_stage); } } show_context_end(); // Show the errors (if any) echo show_all_errors($_SESSION['errors']); // Disable inputs when edit is not allowed for the field $dis = $admin || $edit ? '' : 'disabled="disabled"'; echo '<form action="upd_fu.php" method="post">' . "\n"; $obj_fu = new LcmFollowupInfoUI($_SESSION['follow']); $obj_fu->printEdit(); echo '<button name="submit" type="submit" value="submit" class="simple_form_btn">' . _T('button_validate') . "</button>\n"; echo '<input type="hidden" name="id_followup" value="' . _session('id_followup') . '" />'; echo '<input type="hidden" name="id_case" value="' . _session('id_case') . '">'; echo '<input type="hidden" name="id_app" value="' . _session('id_app', 0) . '">'; echo '<input type="hidden" name="ref_edit_fu" value="' . _session('ref_edit_fu') . '">';
// Show child appointment, if any $q = "SELECT app.* \n\t\tFROM lcm_app_fu as af, lcm_app as app\n\t\tWHERE af.id_followup = {$followup} \n\t\t AND af.id_app = app.id_app \n\t\t AND af.relation = 'parent'"; $res_app = lcm_query($q); if ($app = lcm_fetch_array($res_app)) { echo '<li style="list-style-type: none;">' . _T('fu_input_child_appointment') . ' '; echo '<a class="content_link" href="app_det.php?app=' . $app['id_app'] . '">' . _Tkw('appointments', $app['type']) . ' (' . $app['title'] . ') from ' . format_date($app['start_time']) . "</a></li>\n"; // TRAD } // Show stage information if ($fu_data['case_stage']) { // if editing an existing followup.. if ($fu_data['case_stage']) { $stage_info = get_kw_from_name('stage', $fu_data['case_stage']); } $id_stage = $stage_info['id_keyword']; show_context_stage($fu_data['id_case'], $id_stage); } show_context_end(); if ($fu_data['hidden'] == 'Y') { echo '<p class="normal_text"><strong>' . _T('fu_info_is_deleted') . "</strong>"; if ($admin) { echo " " . _T('fu_info_is_deleted2'); } echo "</p>\n"; } $obj_fu = new LcmFollowupInfoUI($fu_data['id_followup']); $obj_fu->printGeneral(); echo "<br />"; // Edit button if ($case_allow_modif == 'yes' && $edit) { echo '<a href="edit_fu.php?followup=' . $fu_data['id_followup'] . '" class="edit_lnk">' . _T('fu_button_edit') . '</a>';