function calculate_page_content() { $specmanagement_database_api = new specmanagement_database_api(); $specmanagement_print_api = new specmanagement_print_api(); $types = array(); $types_rows = $specmanagement_database_api->get_full_types(); foreach ($types_rows as $types_row) { $types[] = $types_row[1]; } html_page_top1(plugin_lang_get('select_doc_title')); echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">'; html_page_top2(); // if ( plugin_is_installed( 'WhiteboardMenu' ) && file_exists ( config_get_global ( 'plugin_path' ) . 'WhiteboardMenu' ) ) // { // require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php'; // $whiteboard_print_api = new whiteboard_print_api(); // $whiteboard_print_api->printWhiteboardMenu(); // } if (project_includes_user(helper_get_current_project(), auth_get_current_user_id()) || helper_get_current_project() == 0 || user_is_administrator(auth_get_current_user_id())) { echo '<div align="center">'; echo '<hr size="1" width="50%" />'; $specmanagement_print_api->printTableTop('50'); $specmanagement_print_api->printFormTitle(2, 'menu_title'); $specmanagement_print_api->printCategoryField(1, 1, 'select_type'); echo '<td>'; echo '<form method="post" name="form_set_source" action="' . plugin_page('editor') . '">'; print_document_selection($types); $specmanagement_print_api->printRow(); echo '<td class="center" colspan="2">'; echo '<input type="submit" name="formSubmit" class="button" value="' . plugin_lang_get('select_confirm') . '"/>'; echo '</td>'; echo '</tr>'; echo '</form>'; echo '</td>'; $specmanagement_print_api->printTableFoot(); } else { echo '<table class="width60"><tr><td class="center">' . lang_get('access_denied') . '</td></tr></table>'; } html_page_bottom1(); }
/** * @param $edit_page */ function print_types($edit_page) { $specmanagement_database_api = new specmanagement_database_api(); $specmanagement_print_api = new specmanagement_print_api(); $types = $specmanagement_database_api->get_full_types(); for ($type_index = 0; $type_index < count($types); $type_index++) { $type = $types[$type_index]; $type_id = $type[0]; $type_string = $type[1]; $type_options_set = $type[2]; $type_options = explode(';', $type_options_set); $option_show_duration = $type_options[0]; $option_show_expenses_overview = $type_options[1]; $option_show_directory = $type_options[2]; $specmanagement_print_api->printRow(); echo '<input type="hidden" name="type_ids[]" value="' . $type_id . '"/>'; print_name($type_string); print_duration($edit_page, $type_index, $option_show_duration); print_expoverview($edit_page, $type_index, $option_show_expenses_overview); print_dictionary($edit_page, $type_index, $option_show_directory); echo '</tr>'; } }
function print_type($edit_page, $current_type, $version) { $specmanagement_database_api = new specmanagement_database_api(); echo '<td>'; if ($edit_page) { $types = array(); $types_rows = $specmanagement_database_api->get_full_types(); foreach ($types_rows as $types_row) { $types[] = $types_row[1]; } echo '<span class="select">'; echo '<select ' . helper_get_tab_index() . ' id="proj-version-type" name="type[]">'; echo '<option value=""></option>'; foreach ($types as $type) { echo '<option value="' . $type . '"'; check_selected(string_attribute($current_type), $type); echo '>' . $type . '</option>'; } echo '</select>'; } else { $type_id = $specmanagement_database_api->get_type_by_version($version['id']); $type_string = $specmanagement_database_api->get_type_string($type_id); echo string_display($type_string); } echo '</td>'; }
$specmanagement_print_api->printRadioButton(1, 'ShowInFooter'); echo '</tr>'; $specmanagement_print_api->printSpacer(2); $specmanagement_print_api->printFormTitle(2, 'config_document'); $specmanagement_print_api->printRow(); $specmanagement_print_api->printCategoryField(1, 1, 'config_typeadd'); $type = gpc_get_string('type', ''); echo '<td colspan="1">'; echo '<input type="text" id="type" name="type" size="15" maxlength="128" value="', $type, '"> '; echo '<input type="submit" name="addtype" class="button" value="' . plugin_lang_get('config_add') . '">'; echo '</td>'; echo '</tr>'; $specmanagement_print_api->printRow(); $specmanagement_print_api->printCategoryField(1, 1, 'config_types'); echo '<td colspan="1">'; $types_rows = $specmanagement_database_api->get_full_types(); foreach ($types_rows as $types_row) { $types[] = $types_row[1]; } echo '<span class="select">'; echo '<select ' . helper_get_tab_index() . ' id="types" name="types">'; if (!is_null($types)) { foreach ($types as $type) { echo '<option value="' . $type . '">' . $type . '</option>'; } } echo '</select> '; $new_type = gpc_get_string('newtype', ''); echo '<input type="submit" name="deletetype" class="button" value="' . plugin_lang_get('config_del') . '"> '; echo '<input type="text" id="newtype" name="newtype" size="15" maxlength="128" value="', $new_type, '"> '; echo '<input type="submit" name="changetype" class="button" value="' . plugin_lang_get('config_change') . '">';