Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jan 15, 2014
1 parent 849425c commit ecc7b35
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions servers/index.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,34 @@ if (@servers && $config{'display_mode'}) {
$text{'index_os'} ], 100);
foreach my $s (@servers) {
my @cols;
my $table =
"<table cellpadding=0 cellspacing=0 width=100%><tr>\n";
my $table = "<table cellpadding=0 cellspacing=0 width=100%><tr>\n";
if (!$access{'links'} || !$s->{'port'}) {
$table .= "<td>\n";
$table .= ($s->{'realhost'} || $s->{'host'});
$table .= ":$s->{'port'}" if ($s->{'port'});
$table .= "</td>\n";
}
else {
my $link = "";
my $link = "";
if ($s->{'user'} || $s->{'autouser'}) {
$link = "link.cgi/".$s->{'id'};
$link = "link.cgi/".$s->{'id'}."/";
}
else {
$link = &make_url($s);
$link = &make_url($s);
}
$table .= "<td>\n";
$table .= &ui_link($link, ($s->{'realhost'} || $s->{'host'} ).":".$s->{'port'}, undef, "target=_top");
$table .= "</td>\n";
$table .= "<td>\n";
$table .= &ui_link($link, ($s->{'realhost'} || $s->{'host'} ).
":".$s->{'port'}, undef, "target=_top");
$table .= "</td>\n";
}
$table .= "<td align=right>";
if ($s->{'autouser'} && &logged_in($s)) {
$table .= &ui_link("logout.cgi?id=".$s->{'id'}, "(".$text{'index_logout'}.")");
$table .= &ui_link("logout.cgi?id=".$s->{'id'},
"(".$text{'index_logout'}.")");
}
if ($access{'edit'}) {
$table .= &ui_link("edit_serv.cgi?id=".$s->{'id'}, "(".$text{'index_edit'}.")");
$table .= &ui_link("edit_serv.cgi?id=".$s->{'id'},
"(".$text{'index_edit'}.")");
}
$table .= "</td></tr></table>\n";
push(@cols, $table);
Expand Down

0 comments on commit ecc7b35

Please sign in to comment.