-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.cgi
44 lines (32 loc) · 1016 Bytes
/
index.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
#!/usr/bin/perl
use warnings;
use strict;
our %text;
require './jailkit-lib.pl';
my $jk_init_ini = get_jk_init_ini();
my @sections = $jk_init_ini->Sections();
ui_print_header(undef, $text{'index_title'}, "", "index", 1, 1, 0, undef,
undef, undef, undef);
my @table;
foreach my $jail (@sections) {
push(
@table,
[
{'type' => 'checkbox', 'name' => 'd', 'value' => $jail},
"<a href=\"edit_jail.cgi?jail=$jail\">" . &html_escape($jail) . "</a>",
$jk_init_ini->val("$jail", 'comment') || ""
]
);
}
my @buttons;
push(@buttons, [["delete", $text{'index_delete_jail'}]]);
my @actions;
push(@actions, [["edit_jail.cgi?new=1", $text{'index_create_jail'}]]);
#use Data::Dumper;
#print "<!-- " . Dumper(@table) . " -->\n";
print ui_form_columns_table(
'delete_jail.cgi', @buttons, 1, @actions, undef,
[$text{'index_delete'}, $text{'index_jail_id'}, $text{'index_comment'}],
undef, \@table, undef, 1, $text{'index_jail_list'}, $text{'index_no_jails'}
);
ui_print_footer("");