$exp_list->finish(); echo '<p><a href="edit_exp.php?case=' . $case . '" class="create_new_lnk">' . _T('expense_button_new') . "</a></p>\n"; break; // // Case attachments // // // Case attachments // case 'attachments': echo '<fieldset class="info_box">'; show_page_subtitle(_T('case_subtitle_attachments'), 'tools_documents'); echo '<form enctype="multipart/form-data" action="attach_file.php" method="post">' . "\n"; echo '<input type="hidden" name="case" value="' . $case . '" />' . "\n"; // List of attached files show_attachments_list('case', $case); // Attach new file form if ($add) { show_attachments_upload('case', $case, $_SESSION['user_file']['name'], $_SESSION['user_file']['description']); } echo '<input type="submit" name="submit" value="' . _T('button_validate') . '" class="search_form_btn" />' . "\n"; echo "</form>\n"; echo "</fieldset>\n"; $_SESSION['user_file'] = array(); break; } } else { lcm_page_start(_T('title_error')); // [ML] Maybe not worth translating, since it should never happen. // TRAD echo "<p>" . _Ti('title_error') . 'The case no. "' . htmlspecialchars($case) . '" does not exist in the database.' . "</p>\n"; }
} break; // // Organisation attachments // // // Organisation attachments // case 'attachments': echo '<fieldset class="info_box">'; show_page_subtitle(_T('org_subtitle_attachments'), 'tools_documents'); echo "<p class=\"normal_text\">\n"; echo '<form enctype="multipart/form-data" action="attach_file.php" method="post">' . "\n"; echo '<input type="hidden" name="org" value="' . $org . '" />' . "\n"; // List of attached files show_attachments_list('org', $org); // Attach new file form if ($ac['w']) { show_attachments_upload('org', $org); echo '<input type="submit" name="submit" value="' . _T('button_validate') . '" class="search_form_btn" />' . "\n"; } echo "</form>\n"; echo "</p>\n"; echo '</fieldset>'; break; } // Show this in all tabs echo '<p>'; echo '<a href="edit_case.php?case=0&attach_org=' . $row['id_org'] . '" class="create_new_lnk">'; echo _T('case_button_new'); echo "</a>";
} break; // // Client attachments // // // Client attachments // case 'attachments': echo '<fieldset class="info_box">'; show_page_subtitle(_T('client_subtitle_attachments'), 'tools_documents'); echo "<p class=\"normal_text\">\n"; echo '<form enctype="multipart/form-data" action="attach_file.php" method="post">' . "\n"; echo '<input type="hidden" name="client" value="' . $client . '" />' . "\n"; // List of attached files show_attachments_list('client', $client); // Attach new file form if ($edit) { show_attachments_upload('client', $client); } echo '<input type="submit" name="submit" value="' . _T('button_validate') . '" class="search_form_btn" />' . "\n"; echo "</form>\n"; echo "</p>\n"; echo "</fieldset>\n"; break; } // Show this in all tabs echo '<p>'; echo '<a href="edit_case.php?case=0&attach_client=' . $row['id_client'] . '" class="create_new_lnk">'; echo _T('case_button_new'); echo "</a>";
function show_author_attachments($id_author) { // List attachments of every type // TODO: if meta for hide_org is active, don't show them foreach (array('case', 'client', 'org') as $type) { show_page_subtitle(_T('menu_main_' . $type . 's'), 'tools_documents'); show_attachments_list($type, 0, $id_author); } }