-
Notifications
You must be signed in to change notification settings - Fork 3
/
edit_war.cgi
57 lines (41 loc) · 1.59 KB
/
edit_war.cgi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/perl
require './tomcat-lib.pl';
&ReadParse();
&ui_print_header(undef, $text{'wars_title'}, "", "apps", 0, 0);
# Show tabs
@tabs = ( [ "install", $text{'wars_tabinstall'}, "edit_wars.cgi?mode=install" ],
[ "delete", $text{'wars_tabdelete'}, "edit_wars.cgi?mode=delete" ]
);
print &ui_tabs_start(\@tabs, "mode", $in{'mode'} || "install", 1);
# Display installation form
print &ui_tabs_start_tab("mode", "install");
print "$text{'wars_desc1'}<p>\n";
print &ui_form_start("install_war.cgi", "form-data");
print &ui_table_start($text{'war_install'}, undef, 2);
print &ui_table_row($text{'war_installsource'},
&ui_radio_table("source", 0,
[ [ 0, $text{'source_local'}, &ui_textbox("file", undef, 40)." ". &file_chooser_button("file", 0) ],
[ 1, $text{'source_uploaded'}, &ui_upload("upload", 40) ],
[ 2, $text{'source_ftp'},&ui_textbox("url", undef, 40) ]
]));
print &ui_table_end();
print &ui_form_end([ [ "", $text{'war_installok'} ] ]);
print &ui_tabs_end_tab();
# Display deletion form
print &ui_tabs_start_tab("mode", "delete");
print "$text{'wars_desc2'}<p>\n";
print &ui_form_start("delete_war.cgi", "post");
print &ui_table_start($text{'wars_delete'}, undef, 2);
@wlist = &get_all_war_infos();
@opts = ( );
foreach $d (@wlist) {
push(@opts, [ $d, $d ]);
}
print &ui_table_row($text{'wars_installed'},
&ui_select("mod", undef, \@opts, 10, 1)."<br>\n".
&ui_checkbox("rmwar", 1, $text{'wars_rmwar'}, 0), 2);
print &ui_table_end();
print &ui_form_end([ [ "", $text{'wars_deleteok'} ] ]);
print &ui_tabs_end_tab();
print &ui_tabs_end(1);
&ui_print_footer("", $text{'index_return'});