mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
*Replace links with &ui_link call
This commit is contained in:
@@ -11,7 +11,7 @@ if (@clients) {
|
||||
print &ui_form_start("delete_clients.cgi", "post");
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_client.cgi?new=1'>$text{'clients_add'}</a>" );
|
||||
&ui_link("edit_client.cgi?new=1",$text{'clients_add'}) );
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5", "width=30%", "width=40%", "width=30%" );
|
||||
print &ui_columns_start([ "", $text{'clients_name'},
|
||||
|
||||
@@ -11,7 +11,7 @@ if (@devices) {
|
||||
print &ui_form_start("delete_devices.cgi", "post");
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_device.cgi?new=1'>$text{'devices_add'}</a>" );
|
||||
&ui_link("edit_device.cgi?new=1",$text{'devices_add'}) );
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5", "width=30%", "width=40%", "width=30%" );
|
||||
print &ui_columns_start([ "", $text{'devices_name'},
|
||||
|
||||
@@ -11,7 +11,7 @@ if (@filesets) {
|
||||
print &ui_form_start("delete_filesets.cgi", "post");
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_fileset.cgi?new=1'>$text{'filesets_add'}</a>",
|
||||
&ui_link("edit_fileset.cgi?new=1",$text{'filesets_add'}),
|
||||
);
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5", "width=20%", "width=80%" );
|
||||
|
||||
@@ -11,7 +11,7 @@ if (@jobs) {
|
||||
print &ui_form_start("delete_gjobs.cgi", "post");
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_gjob.cgi?new=1'>$text{'gjobs_add'}</a>" );
|
||||
&ui_link("edit_gjob.cgi?new=1",$text{'gjobs_add'}) );
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5", "width=40%", "width=20%", "width=20%",
|
||||
"width=20%" );
|
||||
|
||||
@@ -12,7 +12,7 @@ if (@jobs) {
|
||||
print &ui_form_start("delete_jobs.cgi", "post");
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_job.cgi?new=1'>$text{'jobs_add'}</a>" );
|
||||
&ui_link("edit_job.cgi?new=1",$text{'jobs_add'}) );
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5", "width=30%", "width=10%", "width=20%", "width=20%",
|
||||
"width=20%" );
|
||||
|
||||
@@ -11,7 +11,7 @@ if (@pools) {
|
||||
print &ui_form_start("delete_pools.cgi", "post");
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_pool.cgi?new=1'>$text{'pools_add'}</a>" );
|
||||
&ui_link("edit_pool.cgi?new=1",$text{'pools_add'}) );
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5", "width=30%", "width=40%", "width=30%" );
|
||||
print &ui_columns_start([ "", $text{'pools_name'},
|
||||
|
||||
@@ -11,7 +11,7 @@ if (@storages) {
|
||||
print &ui_form_start("delete_storages.cgi", "post");
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_storage.cgi?new=1'>$text{'storages_add'}</a>",
|
||||
&ui_link("edit_storage.cgi?new=1",$text{'storages_add'}),
|
||||
);
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5", "width=30%", "width=20%", "width=30%", "width=20%" );
|
||||
|
||||
@@ -6,7 +6,7 @@ require './cluster-copy-lib.pl';
|
||||
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit.cgi?new=1'>$text{'index_add'}</a>" );
|
||||
&ui_link("edit.cgi?new=1",$text{'index_add'}) );
|
||||
|
||||
# Get and sort jobs
|
||||
@jobs = &list_copies();
|
||||
|
||||
@@ -7,7 +7,7 @@ require './cluster-cron-lib.pl';
|
||||
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit.cgi?new=1'>$text{'index_add'}</a>" );
|
||||
&ui_link("edit.cgi?new=1",$text{'index_add'}) );
|
||||
|
||||
@jobs = &list_cluster_jobs();
|
||||
if (@jobs) {
|
||||
|
||||
@@ -11,9 +11,9 @@ require './custom-lib.pl';
|
||||
# Build links
|
||||
@links = ( );
|
||||
if ($access{'edit'}) {
|
||||
push(@links,"<a href='edit_cmd.cgi?new=1'>$text{'index_create'}</a>");
|
||||
push(@links,"<a href='edit_file.cgi?new=1'>$text{'index_ecreate'}</a>");
|
||||
push(@links,"<a href='edit_sql.cgi?new=1'>$text{'index_screate'}</a>");
|
||||
push(@links,&ui_link("edit_cmd.cgi?new=1",$text{'index_create'}));
|
||||
push(@links,&ui_link("edit_file.cgi?new=1",$text{'index_ecreate'}));
|
||||
push(@links,&ui_link("edit_sql.cgi?new=1",$text{'index_screate'}));
|
||||
}
|
||||
|
||||
if (!@cust) {
|
||||
|
||||
@@ -48,14 +48,14 @@ if (&no_user_procmailrc()) {
|
||||
if (@filters) {
|
||||
push(@links, &select_all_link("d"), &select_invert_link("d"));
|
||||
}
|
||||
push(@links, "<a href='edit.cgi?new=1'>$text{'index_add'}</a>");
|
||||
push(@links, &ui_link("edit.cgi?new=1",$text{'index_add'}));
|
||||
($auto) = grep { $_->{'actionreply'} } @filters;
|
||||
if (&can_simple_autoreply() && !$auto) {
|
||||
push(@links, "<a href='edit_auto.cgi'>$text{'index_addauto'}</a>");
|
||||
push(@links, &ui_link("edit_auto.cgi",$text{'index_addauto'}));
|
||||
}
|
||||
($fwd) = grep { $_->{'actiontype'} eq '!' } @filters;
|
||||
if (&can_simple_forward() && !$fwd) {
|
||||
push(@links, "<a href='edit_forward.cgi'>$text{'index_addfwd'}</a>");
|
||||
push(@links, &ui_link("edit_forward.cgi",$text{'index_addfwd'}));
|
||||
}
|
||||
|
||||
@folders = &mailbox::list_folders();
|
||||
|
||||
@@ -21,7 +21,7 @@ if (!&has_command($config{'grub_path'})) {
|
||||
}
|
||||
|
||||
# List the boot options
|
||||
@crlinks = ( "<a href='edit_title.cgi?new=1'>$text{'index_add'}</a>" );
|
||||
@crlinks = ( &ui_link("edit_title.cgi?new=1",$text{'index_add'}) );
|
||||
$conf = &get_menu_config();
|
||||
$def = &find_value("default", $conf);
|
||||
@t = &find("title", $conf);
|
||||
|
||||
@@ -43,7 +43,7 @@ if ($config{'digest'} && !$htdigest_command) {
|
||||
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_dir.cgi?new=1'>$text{'index_add'}</a>" );
|
||||
&ui_link("edit_dir.cgi?new=1",$text{'index_add'}) );
|
||||
|
||||
@dirs = &list_directories();
|
||||
@dirs = grep { &can_access_dir($_->[0]) } @dirs;
|
||||
|
||||
@@ -66,10 +66,10 @@ else {
|
||||
else {
|
||||
print "<b>$text{'index_none'}</b><p>\n";
|
||||
}
|
||||
print "<a href='edit.cgi?new=1'>$text{'index_add'}</a>";
|
||||
print &ui_link("edit.cgi?new=1",$text{'index_add'});
|
||||
if (!$has_default) {
|
||||
print " " x 3;
|
||||
print "<a href='edit.cgi?new=2'>$text{'index_adddef'}</a>";
|
||||
print &ui_link("edit.cgi?new=2",$text{'index_adddef'});
|
||||
}
|
||||
print " " x 3;
|
||||
print "<a href=import_form.cgi>$text{'index_import'}</a>";
|
||||
|
||||
@@ -10,7 +10,7 @@ my $conf = &get_iscsi_config();
|
||||
&ui_print_header(undef, $text{'devices_title'}, "");
|
||||
|
||||
my @devices = &find($conf, "device");
|
||||
my @links = ( "<a href='edit_device.cgi?new=1'>$text{'devices_add'}</a>" );
|
||||
my @links = ( &ui_link("edit_device.cgi?new=1",$text{'devices_add'}) );
|
||||
if (@devices) {
|
||||
unshift(@links, &select_all_link("d"), &select_invert_link("d"));
|
||||
print &ui_form_start("delete_devices.cgi");
|
||||
|
||||
@@ -10,7 +10,7 @@ my $conf = &get_iscsi_config();
|
||||
&ui_print_header(undef, $text{'extents_title'}, "");
|
||||
|
||||
my @extents = &find($conf, "extent");
|
||||
my @links = ( "<a href='edit_extent.cgi?new=1'>$text{'extents_add'}</a>" );
|
||||
my @links = ( &ui_link("edit_extent.cgi?new=1",$text{'extents_add'}) );
|
||||
if (@extents) {
|
||||
unshift(@links, &select_all_link("d"), &select_invert_link("d"));
|
||||
print &ui_form_start("delete_extents.cgi");
|
||||
|
||||
@@ -10,7 +10,7 @@ my $conf = &get_iscsi_config();
|
||||
&ui_print_header(undef, $text{'targets_title'}, "");
|
||||
|
||||
my @targets = &find($conf, "target");
|
||||
my @links = ( "<a href='edit_target.cgi?new=1'>$text{'targets_add'}</a>" );
|
||||
my @links = ( &ui_link("edit_target.cgi?new=1",$text{'targets_add'}) );
|
||||
if (@targets) {
|
||||
unshift(@links, &select_all_link("d"), &select_invert_link("d"));
|
||||
print &ui_form_start("delete_targets.cgi");
|
||||
|
||||
@@ -9,7 +9,7 @@ my @users = &list_iscsi_users();
|
||||
|
||||
&ui_print_header(undef, $text{'users_title'}, "");
|
||||
|
||||
my @links = ( "<a href='edit_user.cgi?new=1'>$text{'users_add'}</a>" );
|
||||
my @links = ( &ui_link("edit_user.cgi?new=1",$text{'users_add'}) );
|
||||
if (@users) {
|
||||
unshift(@links, &select_all_link("d"), &select_invert_link("d"));
|
||||
print &ui_form_start("delete_users.cgi");
|
||||
|
||||
@@ -18,7 +18,7 @@ if ($err) {
|
||||
# Find and show targets
|
||||
my $conf = &get_iscsi_config();
|
||||
my @targets = &find($conf, "Target");
|
||||
my @crlinks = ( "<a href='edit_target.cgi?new=1'>$text{'index_add'}</a>" );
|
||||
my @crlinks = ( &ui_link("edit_target.cgi?new=1",$text{'index_add'}) );
|
||||
if (@targets) {
|
||||
unshift(@crlinks, &select_all_link("d"), &select_invert_link("d"));
|
||||
print &ui_form_start("delete_targets.cgi");
|
||||
|
||||
@@ -750,7 +750,7 @@ unlink($active_interfaces);
|
||||
sub apply_button
|
||||
{
|
||||
if (&can_edit("apply")) {
|
||||
return "<a href='apply.cgi?return=1'>$text{'apply_button'}</a>";
|
||||
return &ui_link("apply.cgi?return=1",$text{'apply_button'});
|
||||
}
|
||||
else {
|
||||
return undef;
|
||||
|
||||
@@ -23,7 +23,7 @@ else {
|
||||
$hasorder = 1;
|
||||
}
|
||||
|
||||
@crlinks = ( "<a href='acl_form.cgi?new=1'>$text{'acl_add'}</a>" );
|
||||
@crlinks = ( &ui_link("acl_form.cgi?new=1",$text{'acl_add'}) );
|
||||
if (@access) {
|
||||
# Show table of ACLs
|
||||
print &ui_form_start("delete_acls.cgi", "post");
|
||||
|
||||
@@ -143,7 +143,7 @@ if ($can_users) {
|
||||
@links = ( );
|
||||
if ($access{'ucreate'}) {
|
||||
push(@links,
|
||||
"<a href='edit_user.cgi?new=1'>$text{'index_uadd'}</a>");
|
||||
&ui_link("edit_user.cgi?new=1",$text{'index_uadd'}));
|
||||
}
|
||||
if ($access{'batch'}) {
|
||||
push(@links,
|
||||
@@ -204,7 +204,7 @@ if ($can_groups) {
|
||||
# Create group links
|
||||
@links = ( );
|
||||
if ($access{'gcreate'}) {
|
||||
push(@links, "<a href='edit_group.cgi?new=1'>$text{'index_gadd'}</a>");
|
||||
push(@links, &ui_link("edit_group.cgi?new=1",$text{'index_gadd'}));
|
||||
}
|
||||
|
||||
if ($gcount > $mconfig{'display_max'}) {
|
||||
|
||||
@@ -46,7 +46,7 @@ if (@vgs) {
|
||||
print &ui_tabs_start_tab("mode", "vgs");
|
||||
print $text{'index_vgsdesc'},"<p>\n";
|
||||
@vgs = sort { $a->{'number'} <=> $b->{'number'} } @vgs;
|
||||
@links = ( "<a href='edit_vg.cgi'>$text{'index_add'}</a>" );
|
||||
@links = ( &ui_link("edit_vg.cgi",$text{'index_add'}) );
|
||||
if ($config{'show_table'}) {
|
||||
# As table
|
||||
print &ui_links_row(\@links);
|
||||
@@ -231,7 +231,7 @@ else {
|
||||
print &text('index_init', "init.cgi"),"<p>\n";
|
||||
}
|
||||
print &ui_links_row([
|
||||
"<a href='edit_vg.cgi'>$text{'index_add'}</a>" ]);
|
||||
&ui_link("edit_vg.cgi",$text{'index_add'}) ]);
|
||||
}
|
||||
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
|
||||
@@ -118,9 +118,9 @@ foreach $l (grep { $lcan{$_} || $lcan{"*"} } @lists) {
|
||||
push(@icons, "images/list.gif");
|
||||
}
|
||||
if (@links) {
|
||||
@crlinks = ( "<a href='create_form.cgi'>$text{'index_add'}</a>" );
|
||||
@crlinks = ( &ui_link("create_form.cgi",$text{'index_add'}) );
|
||||
if (@links) {
|
||||
push(@crlinks, "<a href='digest_form.cgi'>$text{'index_digest'}</a>");
|
||||
push(@crlinks, &ui_link("digest_form.cgi",$text{'index_digest'}));
|
||||
}
|
||||
if ($access{'create'}) {
|
||||
print &ui_links_row(\@crlinks);
|
||||
|
||||
@@ -12,7 +12,7 @@ my @worlds = &list_worlds();
|
||||
my $conf = &get_minecraft_config();
|
||||
my $def = &find_value("level-name", $conf);
|
||||
|
||||
my @links = ( "<a href='edit_world.cgi?new=1'>$text{'worlds_new'}</a>" );
|
||||
my @links = ( &ui_link("edit_world.cgi?new=1",$text{'worlds_new'}) );
|
||||
if (@worlds) {
|
||||
my @tds = ( "width=5%" );
|
||||
print &ui_form_start("change_world.cgi");
|
||||
|
||||
@@ -6,7 +6,7 @@ require './mysql-lib.pl';
|
||||
$access{'perms'} || &error($text{'perms_ecannot'});
|
||||
&ui_print_header(undef, $text{'dbs_title'}, "", "dbs");
|
||||
|
||||
@rowlinks = ( "<a href='edit_db.cgi?new=1'>$text{'dbs_add'}</a>" );
|
||||
@rowlinks = ( &ui_link("edit_db.cgi?new=1",$text{'dbs_add'}) );
|
||||
$d = &execute_sql_safe($master_db, "select * from db order by db");
|
||||
if (@{$d->{'data'}}) {
|
||||
print &ui_form_start("delete_dbs.cgi");
|
||||
|
||||
@@ -7,7 +7,7 @@ $access{'perms'} || &error($text{'perms_ecannot'});
|
||||
&ui_print_header(undef, $text{'hosts_title'}, "");
|
||||
|
||||
$d = &execute_sql_safe($master_db, "select * from host order by host");
|
||||
@rowlinks = ( "<a href='edit_host.cgi?new=1'>$text{'hosts_add'}</a>" );
|
||||
@rowlinks = ( &ui_link("edit_host.cgi?new=1",$text{'hosts_add'}) );
|
||||
if (@{$d->{'data'}}) {
|
||||
print &ui_form_start("delete_hosts.cgi");
|
||||
unshift(@rowlinks, &select_all_link("d", 0),
|
||||
|
||||
@@ -9,7 +9,7 @@ $access{'perms'} == 1 || &error($text{'perms_ecannot'});
|
||||
print &ui_form_start("delete_users.cgi");
|
||||
@rowlinks = ( &select_all_link("d", 0),
|
||||
&select_invert_link("d", 0),
|
||||
"<a href='edit_user.cgi?new=1'>$text{'users_add'}</a>" );
|
||||
&ui_link("edit_user.cgi?new=1",$text{'users_add'}) );
|
||||
print &ui_links_row(\@rowlinks);
|
||||
@tds = ( "width=5" );
|
||||
print &ui_columns_start([ "",
|
||||
|
||||
@@ -37,7 +37,7 @@ if (!$access{'bootonly'}) {
|
||||
push(@tds, "width=5% valign=top");
|
||||
if ($allow_add) {
|
||||
push(@links,
|
||||
"<a href='edit_aifc.cgi?new=1'>$text{'ifcs_add'}</a>");
|
||||
&ui_link("edit_aifc.cgi?new=1",$text{'ifcs_add'}));
|
||||
}
|
||||
print &ui_links_row(\@links);
|
||||
print &ui_columns_start([ $access{'ifcs'} >= 2 ? ( "" ) : ( ),
|
||||
@@ -115,7 +115,7 @@ print &ui_form_start("delete_bifcs.cgi", "post");
|
||||
@links = ( &select_all_link("b", 1),
|
||||
&select_invert_link("b", 1) );
|
||||
if ($allow_add) {
|
||||
push(@links, "<a href='edit_bifc.cgi?new=1'>$text{'ifcs_add'}</a>");
|
||||
push(@links, &ui_link("edit_bifc.cgi?new=1",$text{'ifcs_add'}));
|
||||
if (defined(&supports_bonding) && &supports_bonding()) {
|
||||
push(@links, "<a href='edit_bifc.cgi?new=1&bond=1'>".
|
||||
"$text{'bonding_add'}</a>");
|
||||
@@ -130,7 +130,7 @@ if ($allow_add && defined(&supports_bridges) && &supports_bridges()) {
|
||||
"$text{'ifcs_badd'}</a>");
|
||||
}
|
||||
if ($allow_add && defined(&supports_ranges) && &supports_ranges()) {
|
||||
push(@links, "<a href='edit_range.cgi?new=1'>$text{'ifcs_radd'}</a>");
|
||||
push(@links, &ui_link("edit_range.cgi?new=1",$text{'ifcs_radd'}));
|
||||
}
|
||||
print &ui_links_row(\@links);
|
||||
@tds = ( "width=5 valign=top", "width=20% valign=top", "width=20% valign=top",
|
||||
|
||||
@@ -52,7 +52,7 @@ for($mid=0; $mid<@aliases && $aline[$mid] < $midline; $mid++) { }
|
||||
print &ui_form_start("delete_aliases.cgi", "post");
|
||||
@links = ( &select_all_link("d", 1),
|
||||
&select_invert_link("d", 1),
|
||||
"<a href='edit_alias.cgi?new=1'>$text{'new_alias'}</a>",
|
||||
&ui_link("edit_alias.cgi?new=1",$text{'new_alias'}),
|
||||
);
|
||||
print &ui_links_row(\@links);
|
||||
if ($config{'columns'} == 2) {
|
||||
|
||||
@@ -12,7 +12,7 @@ foreach $u (@{$s->{'data'}}) {
|
||||
}
|
||||
|
||||
$s = &execute_sql_safe($config{'basedb'}, "select * from pg_group");
|
||||
@rowlinks = ( "<a href='edit_group.cgi?new=1'>$text{'group_add'}</a>" );
|
||||
@rowlinks = ( &ui_link("edit_group.cgi?new=1",$text{'group_add'}) );
|
||||
if (@{$s->{'data'}}) {
|
||||
print &ui_form_start("delete_groups.cgi", "post");
|
||||
unshift(@rowlinks, &select_all_link("d", 0),
|
||||
|
||||
@@ -13,7 +13,7 @@ $v = &get_postgresql_version();
|
||||
print &ui_form_start("delete_hosts.cgi", "post");
|
||||
@rowlinks = ( &select_all_link("d", 0),
|
||||
&select_invert_link("d", 0),
|
||||
"<a href='edit_host.cgi?new=1'>$text{'host_add'}</a>" );
|
||||
&ui_link("edit_host.cgi?new=1",$text{'host_add'}) );
|
||||
print &ui_links_row(\@rowlinks);
|
||||
if ($v >= 7.3) {
|
||||
@tds = ( "width=5", "width=25%", "width=25%", "width=25%",
|
||||
|
||||
@@ -10,7 +10,7 @@ $s = &execute_sql_safe($config{'basedb'}, "select $pg_shadow_cols from pg_shadow
|
||||
print &ui_form_start("delete_users.cgi", "post");
|
||||
@rowlinks = ( &select_all_link("d", 0),
|
||||
&select_invert_link("d", 0),
|
||||
"<a href='edit_user.cgi?new=1'>$text{'user_add'}</a>" );
|
||||
&ui_link("edit_user.cgi?new=1",$text{'user_add'}) );
|
||||
print &ui_links_row(\@rowlinks);
|
||||
print &ui_columns_start([ "", $text{'user_name'},
|
||||
$text{'user_pass'},
|
||||
|
||||
@@ -40,10 +40,10 @@ else {
|
||||
}
|
||||
|
||||
# Build links for adding things
|
||||
@links = ( "<a href='edit_recipe.cgi?new=1'>$text{'index_add'}</a>",
|
||||
@links = ( &ui_link("edit_recipe.cgi?new=1",$text{'index_add'}),
|
||||
"<a href='edit_recipe.cgi?new=1&block=1'>$text{'index_badd'}</a>",
|
||||
"<a href='edit_env.cgi?new=1'>$text{'index_eadd'}</a>" );
|
||||
push(@links, "<a href='edit_inc.cgi?new=1'>$text{'index_iadd'}</a>")
|
||||
&ui_link("edit_env.cgi?new=1",$text{'index_eadd'}) );
|
||||
push(@links, &ui_link("edit_inc.cgi?new=1",$text{'index_iadd'}))
|
||||
if (!$includes);
|
||||
|
||||
@conf = &get_procmailrc();
|
||||
|
||||
@@ -8,7 +8,7 @@ $access{'passwd'} || &error($text{'passwd_ecannot'});
|
||||
|
||||
print "$text{'passwd_desc'}<p>\n";
|
||||
@passwd = &list_passwords();
|
||||
@links = ( "<a href='edit_passwd.cgi?new=1'>$text{'passwd_add'}</a>" );
|
||||
@links = ( &ui_link("edit_passwd.cgi?new=1",$text{'passwd_add'}) );
|
||||
if (@passwd) {
|
||||
print &ui_links_row(\@links);
|
||||
print "<table border width=100%>\n";
|
||||
|
||||
@@ -10,7 +10,7 @@ $access{'maint_groups'} || &error($text{'groups_ecannot'});
|
||||
&check_group_enabled($text{'groups_cannot'});
|
||||
|
||||
@groups = &list_groups();
|
||||
@links = ( "<a href='edit_group.cgi?new=1'>$text{'groups_add'}</a>" );
|
||||
@links = ( &ui_link("edit_group.cgi?new=1",$text{'groups_add'}) );
|
||||
if (@groups) {
|
||||
@groups = sort { lc($a->{'name'}) cmp lc($b->{'name'}) } @groups
|
||||
if ($config{'sort_mode'});
|
||||
|
||||
@@ -15,7 +15,7 @@ foreach $h (@$hconf) {
|
||||
$i++;
|
||||
}
|
||||
$addlink = &ui_links_row(
|
||||
[ "<a href='edit_host.cgi?new=1'>$text{'hosts_add'}</a>" ]);
|
||||
[ &ui_link("edit_host.cgi?new=1",$text{'hosts_add'}) ]);
|
||||
if (@links) {
|
||||
print $addlink;
|
||||
&icons_table(\@links, \@titles, \@icons);
|
||||
|
||||
@@ -6,7 +6,7 @@ $access{'edit'} || &error($text{'tmpls_ecannot'});
|
||||
&ui_print_header(undef, $text{'tmpls_title'}, "");
|
||||
|
||||
@tmpls = &list_templates();
|
||||
@links = ( "<a href='edit_tmpl.cgi?new=1'>$text{'tmpls_add'}</a>" );
|
||||
@links = ( &ui_link("edit_tmpl.cgi?new=1",$text{'tmpls_add'}) );
|
||||
if (@tmpls) {
|
||||
unshift(@links, &select_all_link("d"), &select_invert_link("d"));
|
||||
print &ui_form_start("delete_tmpls.cgi", "post");
|
||||
|
||||
@@ -38,7 +38,7 @@ $hasconfig = 1;
|
||||
@tunnels = &list_stunnels();
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_stunnel.cgi?new=1'>$text{'index_add'}</a>" );
|
||||
&ui_link("edit_stunnel.cgi?new=1",$text{'index_add'}) );
|
||||
if (@tunnels) {
|
||||
print &ui_form_start("delete_tunnels.cgi", "post");
|
||||
@tds = ( "width=5" );
|
||||
|
||||
@@ -8,7 +8,7 @@ $conf = &get_config();
|
||||
@dests = &find("destination", $conf);
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_destination.cgi?new=1'>$text{'destinations_add'}</a>",
|
||||
&ui_link("edit_destination.cgi?new=1",$text{'destinations_add'}),
|
||||
);
|
||||
if (@dests) {
|
||||
@tds = ( "width=5" );
|
||||
|
||||
@@ -8,7 +8,7 @@ $conf = &get_config();
|
||||
@filters = &find("filter", $conf);
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_filter.cgi?new=1'>$text{'filters_add'}</a>" );
|
||||
&ui_link("edit_filter.cgi?new=1",$text{'filters_add'}) );
|
||||
if (@filters) {
|
||||
@tds = ( "width=5" );
|
||||
print &ui_form_start("delete_filters.cgi", "post");
|
||||
|
||||
@@ -8,7 +8,7 @@ $conf = &get_config();
|
||||
@logs = &find("log", $conf);
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_log.cgi?new=1'>$text{'logs_add'}</a>" );
|
||||
&ui_link("edit_log.cgi?new=1",$text{'logs_add'}) );
|
||||
if (@logs) {
|
||||
@tds = ( "width=5" );
|
||||
print &ui_form_start("delete_logs.cgi", "post");
|
||||
|
||||
@@ -8,7 +8,7 @@ $conf = &get_config();
|
||||
@sources = &find("source", $conf);
|
||||
@links = ( &select_all_link("d"),
|
||||
&select_invert_link("d"),
|
||||
"<a href='edit_source.cgi?new=1'>$text{'sources_add'}</a>" );
|
||||
&ui_link("edit_source.cgi?new=1",$text{'sources_add'}) );
|
||||
if (@sources) {
|
||||
@tds = ( "width=5" );
|
||||
print &ui_form_start("delete_sources.cgi", "post");
|
||||
|
||||
@@ -27,7 +27,7 @@ foreach $m (@{$defs->{'members'}}) {
|
||||
}
|
||||
@svcs = grep { $_->{'name'} eq 'service' } @conf;
|
||||
|
||||
@links = ( "<a href='edit_serv.cgi?new=1'>$text{'index_add_inet'}</a>" );
|
||||
@links = ( &ui_link("edit_serv.cgi?new=1",$text{'index_add_inet'}) );
|
||||
if (@svcs) {
|
||||
# Show table header
|
||||
print &ui_form_start("mass_enable.cgi", "post");
|
||||
|
||||
Reference in New Issue
Block a user