3 # Lists all installed packages
5 require './software-lib.pl';
6 &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
7 &help_search_link(defined(&package_help) ? ( &package_help() ) : ( ),
10 # Validate the package and update systems
11 $err = &check_package_system();
13 &ui_print_endpage(&text('index_epackagecheck', $err,
14 "../config.cgi?$module_name"));
16 $err = &check_update_system();
18 &ui_print_endpage(&text('index_eupdatecheck', $err,
19 "../config.cgi?$module_name"));
22 # Show package search and list forms
23 print &ui_subheading($text{'index_installed'});
24 print "<table width=100%><tr>\n";
25 print &ui_form_start("search.cgi");
26 print "<td>",&ui_submit($text{'index_search'}),"\n";
27 print &ui_textbox("search", undef, 40),"</td>\n";
28 print &ui_hidden("goto", 1),&ui_form_end();
30 print &ui_form_start("tree.cgi");
31 print "<td align=right>",&ui_submit($text{'index_tree'}),"</td>\n";
33 print "</tr></table>\n";
35 # Show form to install a new package
37 print &ui_subheading($text{'index_install'});
38 print &text('index_installmsg', &package_system()),"<p>\n";
41 print &ui_form_start("install_pack.cgi?id=$upid", "form-data", undef,
42 &read_parse_mime_javascript($upid, [ "upload" ])),"\n";
44 push(@opts, [ 0, $text{'index_local'},
45 &ui_textbox("local", undef, 50)."\n".
46 &file_chooser_button("local", 0, 2) ]);
47 push(@opts, [ 1, $text{'index_uploaded'},
48 &ui_upload("upload", 50) ]);
49 push(@opts, [ 2, $text{'index_ftp'},
50 &ui_textbox("url", undef, 50)."\n".
51 ($has_search_system ? &capture_function_output(
52 \&search_system_input) : "") ]);
53 if ($has_update_system) {
54 push(@opts, [ 3, $text{$update_system.'_input'},
55 &ui_textbox("update", undef, 30)."\n".
56 &update_system_button("update", $text{$update_system.'_find'}).
57 (defined(&show_update_system_opts) &&
58 ($opts = &show_update_system_opts()) ? "<br>".$opts : "") ]);
60 print &ui_radio_table("source", 0, \@opts);
61 print &ui_submit($text{'index_installok'}),"\n";
64 # Show search form by file, if supported by package system
65 if (!$no_package_filesearch) {
67 print &ui_subheading($text{'index_ident'});
68 print &text('index_identmsg', &package_system()),"<p>\n";
69 print &ui_form_start("file_info.cgi");
70 print &ui_submit($text{'index_identok'}),"\n";
71 print &ui_textbox("file", undef, 50),"\n",
72 &file_chooser_button("file", 0, 3);
76 if ($has_update_system && defined(&update_system_form)) {
78 &update_system_form();
81 &ui_print_footer("/", $text{'index'});