Fix to get safely using wrapper sub 2/2
This commit is contained in:
parent
6566bd9c48
commit
f69fa81e59
@ -29,7 +29,7 @@ my $name = $self->get_name();
|
||||
my $directory = $self->get_directory();
|
||||
my $add = 0;
|
||||
my $chroot = $self->get_chroot();
|
||||
$rv .= "<input type=button name=${name}_button onClick='ifield = form.$name; chooser = window.open(\"$gconfig{'webprefix'}/chooser.cgi?add=$add&type=$directory&chroot=$chroot&file=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbar=no,width=400,height=300\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
$rv .= "<input type=button name=${name}_button onClick='ifield = form.$name; chooser = window.open(\"@{[&get_webprefix()]}/chooser.cgi?add=$add&type=$directory&chroot=$chroot&file=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbar=no,width=400,height=300\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return $rv;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ my $rv = WebminUI::Textbox::html($self);
|
||||
my $name = $self->get_name();
|
||||
my $multiple = $self->get_multiple();
|
||||
local $w = $multiple ? 500 : 300;
|
||||
$rv .= " <input type=button name=${name}_button onClick='ifield = form.$name; chooser = window.open(\"$gconfig{'webprefix'}/group_chooser.cgi?multi=$multiple&group=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=200\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
$rv .= " <input type=button name=${name}_button onClick='ifield = form.$name; chooser = window.open(\"@{[&get_webprefix()]}/group_chooser.cgi?multi=$multiple&group=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=200\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return $rv;
|
||||
}
|
||||
|
||||
|
@ -162,14 +162,14 @@ foreach my $h (@{$self->get_headings()}) {
|
||||
# Not sorting on this column .. show grey button
|
||||
my $url = $self->make_url($i, 0, undef, undef);
|
||||
$hh .= "<a href='$url'>".
|
||||
"<img src=$gconfig{'webprefix'}/images/nosort.gif border=0></a>";
|
||||
"<img src=@{[&get_webprefix()]}/images/nosort.gif border=0></a>";
|
||||
}
|
||||
else {
|
||||
# Sorting .. show button to switch mode
|
||||
my $notsort = !$sortdir;
|
||||
my $url = $self->make_url($i, $sortdir ? 0 : 1, undef, undef);
|
||||
$hh .= "<a href='$url'>".
|
||||
"<img src=$gconfig{'webprefix'}/images/sort.gif border=0></a>";
|
||||
"<img src=@{[&get_webprefix()]}/images/sort.gif border=0></a>";
|
||||
}
|
||||
$hh .= "</td></tr></table>";
|
||||
push(@sheadings, $hh);
|
||||
@ -218,27 +218,27 @@ if ($self->get_paging() && $origsize) {
|
||||
if ($page != 0) {
|
||||
# Add start and left arrows
|
||||
my $surl = $self->make_url(undef, undef, undef, 0);
|
||||
$rv .= "<a href='$surl'><img src=$gconfig{'webprefix'}/images/first.gif border=0 align=middle></a>\n";
|
||||
$rv .= "<a href='$surl'><img src=@{[&get_webprefix()]}/images/first.gif border=0 align=middle></a>\n";
|
||||
my $lurl = $self->make_url(undef, undef, undef, $page-1);
|
||||
$rv .= "<a href='$lurl'><img src=$gconfig{'webprefix'}/images/left.gif border=0 align=middle></a>\n";
|
||||
$rv .= "<a href='$lurl'><img src=@{[&get_webprefix()]}/images/left.gif border=0 align=middle></a>\n";
|
||||
}
|
||||
else {
|
||||
# Start and left are disabled
|
||||
$rv .= "<img src=$gconfig{'webprefix'}/images/first-grey.gif border=0 align=middle>\n";
|
||||
$rv .= "<img src=$gconfig{'webprefix'}/images/left-grey.gif border=0 align=middle>\n";
|
||||
$rv .= "<img src=@{[&get_webprefix()]}/images/first-grey.gif border=0 align=middle>\n";
|
||||
$rv .= "<img src=@{[&get_webprefix()]}/images/left-grey.gif border=0 align=middle>\n";
|
||||
}
|
||||
$rv .= &text('ui_paging', $start+1, $end+1, $origsize);
|
||||
if ($end < $origsize-1) {
|
||||
# Add right and end arrows
|
||||
my $rurl = $self->make_url(undef, undef, undef, $page+1);
|
||||
$rv .= "<a href='$rurl'><img src=$gconfig{'webprefix'}/images/right.gif border=0 align=middle></a>\n";
|
||||
$rv .= "<a href='$rurl'><img src=@{[&get_webprefix()]}/images/right.gif border=0 align=middle></a>\n";
|
||||
my $eurl = $self->make_url(undef, undef, undef, $lastpage);
|
||||
$rv .= "<a href='$eurl'><img src=$gconfig{'webprefix'}/images/last.gif border=0 align=middle></a>\n";
|
||||
$rv .= "<a href='$eurl'><img src=@{[&get_webprefix()]}/images/last.gif border=0 align=middle></a>\n";
|
||||
}
|
||||
else {
|
||||
# Right and end are disabled
|
||||
$rv .= "<img src=$gconfig{'webprefix'}/images/right-grey.gif border=0 align=middle>\n";
|
||||
$rv .= "<img src=$gconfig{'webprefix'}/images/last-grey.gif border=0 align=middle>\n";
|
||||
$rv .= "<img src=@{[&get_webprefix()]}/images/right-grey.gif border=0 align=middle>\n";
|
||||
$rv .= "<img src=@{[&get_webprefix()]}/images/last-grey.gif border=0 align=middle>\n";
|
||||
}
|
||||
$rv .= "</center>\n";
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ my $rv = WebminUI::Textbox::html($self);
|
||||
my $name = $self->get_name();
|
||||
my $multiple = $self->get_multiple();
|
||||
local $w = $multiple ? 500 : 300;
|
||||
$rv .= " <input type=button name=${name}_button onClick='ifield = form.$name; chooser = window.open(\"$gconfig{'webprefix'}/user_chooser.cgi?multi=$multiple&user=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=200\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
$rv .= " <input type=button name=${name}_button onClick='ifield = form.$name; chooser = window.open(\"@{[&get_webprefix()]}/user_chooser.cgi?multi=$multiple&user=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=200\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\">\n";
|
||||
return $rv;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ $vers = &get_pppoe_version(\$out);
|
||||
if (!$vers) {
|
||||
# Not installed
|
||||
print "<p>",&text('index_eadsl', "<tt>$config{'pppoe_cmd'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
elsif (!($conf = &get_config())) {
|
||||
# Missing config file
|
||||
@ -21,7 +21,7 @@ elsif (!($conf = &get_config())) {
|
||||
# Just give up
|
||||
print "<p>",
|
||||
&text('index_econfig', "<tt>$config{'pppoe_conf'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# On redhat systems, the file needs to be created by this
|
||||
@ -37,7 +37,7 @@ elsif (&find("TYPE", $conf) =~ /modem/i) {
|
||||
# For a modem on a redhat system
|
||||
$config{'pppoe_conf'} =~ /^(.*)\//;
|
||||
print "<p>",&text('index_emodem', "<tt>$1</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# Show configuration form
|
||||
|
@ -73,7 +73,7 @@ use warnings;
|
||||
|
||||
# Show the iframe
|
||||
print "<center>\n";
|
||||
print "<iframe src=$gconfig{'webprefix'}/$module_name/proxy.cgi/$port/ ",
|
||||
print "<iframe src=@{[&get_webprefix()]}/$module_name/proxy.cgi/$port/ ",
|
||||
"width=700 height=500 frameborder=0></iframe><br>\n";
|
||||
print "<input type=button onClick='window.open(\"proxy.cgi/$port/\", \"ajaxterm\", \"toolbar=no,menubar=no,scrollbars=no,resizable=yes,width=700,height=500\")' value='$text{'index_popup'}'><p>\n";
|
||||
print &text('index_credits', 'http://antony.lesuisse.org/software/ajaxterm/'),
|
||||
|
@ -10,7 +10,7 @@ require './apache-lib.pl';
|
||||
if (!($httpd = &find_httpd())) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print &text('index_eserver', "<tt>$config{'httpd_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link("apache", $text{'index_apache'},
|
||||
"../$module_name/", $text{'index_title'});
|
||||
@ -23,7 +23,7 @@ if (!($httpd = &find_httpd())) {
|
||||
if (!(-d $config{'httpd_dir'})) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print &text('index_eroot', "<tt>$config{'httpd_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -70,7 +70,7 @@ if (!$htconf) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print "<p>\n";
|
||||
print &text('index_econf', "<tt>$htconfchecked</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ else {
|
||||
($ver, $mods) = &httpd_info($httpd = &find_httpd());
|
||||
if (!$ver) {
|
||||
print &text('reconfig_ever', "<tt>$httpd</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -4210,8 +4210,8 @@ return undef if (!$en || $en !~ /yes/i);
|
||||
my $tkeys = &find("trusted-keys", $conf);
|
||||
return undef if (!$tkeys || !@{$tkeys->{'members'}});
|
||||
return &text('trusted_warning',
|
||||
$gconfig{'webprefix'}.'/bind8/conf_trusted.cgi')."<p>\n".
|
||||
&ui_form_start($gconfig{'webprefix'}.'/bind8/fix_trusted.cgi')."\n".
|
||||
&get_webprefix().'/bind8/conf_trusted.cgi')."<p>\n".
|
||||
&ui_form_start(&get_webprefix().'/bind8/fix_trusted.cgi')."\n".
|
||||
&ui_form_end([ [ undef, $text{'trusted_fix'} ] ]);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ if (!-x $config{'named_path'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("bind", "doc", "google"));
|
||||
print "<p>",&text('index_enamed', "<tt>$config{'named_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
my $lnk = &software::missing_install_link("bind", $text{'index_bind'},
|
||||
|
@ -18,19 +18,19 @@ else {
|
||||
|
||||
if ($profile->{'type'} == 2 && !&has_command($config{'mkisofs'})) {
|
||||
print "<p>",&text('edit_emkisofs', "<tt>$config{'mkisofs'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
exit;
|
||||
}
|
||||
if ($profile->{'type'} == 3 && !&has_command($config{'mpg123'})) {
|
||||
print "<p>",&text('edit_empg123', "<tt>$config{'mpg123'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
exit;
|
||||
}
|
||||
if ($profile->{'type'} == 4 && !&has_command($config{'cdrdao'})) {
|
||||
print "<p>",&text('edit_ecdrdao', "<tt>$config{'cdrdao'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
exit;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ require './burner-lib.pl';
|
||||
|
||||
if (!&has_command($config{'cdrecord'})) {
|
||||
print "<p>",&text('index_ecdrecord', "<tt>$config{'cdrecord'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{"index"});
|
||||
exit;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ foreach $m (@modules) {
|
||||
local $img = -r "$theme_root_directory/$m->{'dir'}/images/icon.gif" ?
|
||||
"/$m->{'dir'}/images/icon.gif" :
|
||||
"/template.gif";
|
||||
print "<TD width=1%><A TARGET=body HREF='$gconfig{'webprefix'}/$m->{'dir'}/$lnk'><IMG SRC='$gconfig{'webprefix'}$img' WIDTH=55 HEIGHT=24 BORDER=0></A></TD><TD WIDTH=32%><A TARGET=body HREF='$gconfig{'webprefix'}/$m->{'dir'}/$lnk' CLASS=bodyNav>$m->{'desc'}</A></TD>\n";
|
||||
print "<TD width=1%><A TARGET=body HREF='@{[&get_webprefix()]}/$m->{'dir'}/$lnk'><IMG SRC='@{[&get_webprefix()]}$img' WIDTH=55 HEIGHT=24 BORDER=0></A></TD><TD WIDTH=32%><A TARGET=body HREF='@{[&get_webprefix()]}/$m->{'dir'}/$lnk' CLASS=bodyNav>$m->{'desc'}</A></TD>\n";
|
||||
if ($pos++ % 3 == 2) { print "</tr>\n"; }
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ require './cfengine-lib.pl';
|
||||
|
||||
if (!&has_command($config{'cfd'})) {
|
||||
print &text('cfd_ecmd', "<tt>$config{'cfd'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ require './cfengine-lib.pl';
|
||||
|
||||
if (!&has_command($config{'cfrun'})) {
|
||||
print &text('push_ecmd', "<tt>$config{'cfrun'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ require './cfengine-lib.pl';
|
||||
if (!&has_command($config{'cfengine'})) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print &text('index_ecommand', "<tt>$config{'cfengine'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -38,7 +38,7 @@ if ($ver !~ /^1\./) {
|
||||
# Check if config file exists
|
||||
if (!-r $cfengine_conf || -d $config{'cfengine_conf'}) {
|
||||
print &text('index_econfig', "<tt>$cfengine_conf</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ foreach $h (@hosts) {
|
||||
next if (!$s);
|
||||
push(@titles, &server_name($s));
|
||||
push(@links, "edit_host.cgi?id=$h->{'id'}");
|
||||
push(@icons, "$gconfig{'webprefix'}/servers/images/$s->{'type'}.gif");
|
||||
push(@icons, "@{[&get_webprefix()]}/servers/images/$s->{'type'}.gif");
|
||||
$gothost{$h->{'id'}}++;
|
||||
}
|
||||
if (@links) {
|
||||
|
@ -123,10 +123,10 @@ if ($in{'frame'} == 0) {
|
||||
}
|
||||
print "<frameset rows='*,50'>\n";
|
||||
print "<frame marginwidth=5 marginheight=5 name=topframe ",
|
||||
"src=\"$gconfig{'webprefix'}/chooser.cgi?frame=1&file=".$ufile.
|
||||
"src=\"@{[&get_webprefix()]}/chooser.cgi?frame=1&file=".$ufile.
|
||||
"&chroot=".$uchroot."&type=".$utype."&add=$add\">\n";
|
||||
print "<frame marginwidth=0 marginheight=0 name=bottomframe ",
|
||||
"src=\"$gconfig{'webprefix'}/chooser.cgi?frame=2&file=".$ufile.
|
||||
"src=\"@{[&get_webprefix()]}/chooser.cgi?frame=2&file=".$ufile.
|
||||
"&chroot=".$uchroot."&type=".$utype."&add=$add\" scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
@ -199,7 +199,7 @@ EOF
|
||||
$link = "<a href=\"\" onClick='fileclick(\""."e_javascript("$dir$f")."\", $isdir); return false'>";
|
||||
}
|
||||
local @cols;
|
||||
push(@cols, "$link<img border=0 src=$gconfig{'webprefix'}/images/$icon></a>");
|
||||
push(@cols, "$link<img border=0 src=@{[&get_webprefix()]}/images/$icon></a>");
|
||||
push(@cols, "$link".&html_escape($f)."</a>");
|
||||
push(@cols, &nice_size($st[7]));
|
||||
@tm = localtime($st[9]);
|
||||
@ -212,7 +212,7 @@ EOF
|
||||
closedir(DIR);
|
||||
print &ui_columns_end();
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
|
@ -30,7 +30,7 @@ foreach $h (@hosts) {
|
||||
"$s->{'host'}:$s->{'port'}")."<br>".
|
||||
&text('index_count', $count));
|
||||
push(@links, "edit_host.cgi?id=$h->{'id'}");
|
||||
push(@icons, "$gconfig{'webprefix'}/servers/images/$s->{'type'}.gif");
|
||||
push(@icons, "@{[&get_webprefix()]}/servers/images/$s->{'type'}.gif");
|
||||
push(@installed, $count);
|
||||
$gothost{$h->{'id'}}++;
|
||||
}
|
||||
|
@ -93,8 +93,8 @@ foreach $h (@hosts) {
|
||||
local ($og) = grep { $_->{'group'} eq $in{'group'} } @{$h->{'groups'}};
|
||||
if ($og) {
|
||||
local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
|
||||
push(@icons, $gconfig{'webprefix'} ?
|
||||
($gconfig{'webprefix'}."/servers/images/".$s->{'type'}.".gif") :
|
||||
push(@icons, &get_webprefix() ?
|
||||
(&get_webprefix()."/servers/images/".$s->{'type'}.".gif") :
|
||||
("../servers/images/".$s->{'type'}.".gif"));
|
||||
push(@links, "edit_host.cgi?id=$h->{'id'}");
|
||||
push(@titles, $s->{'desc'} ? $s->{'desc'} : $s->{'host'});
|
||||
|
@ -408,8 +408,8 @@ foreach $h (@hosts) {
|
||||
local ($ou) = grep { $_->{'user'} eq $in{'user'} } @{$h->{'users'}};
|
||||
if ($ou) {
|
||||
local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
|
||||
push(@icons, $gconfig{'webprefix'} ?
|
||||
($gconfig{'webprefix'}."/servers/images/".$s->{'type'}.".gif") :
|
||||
push(@icons, &get_webprefix() ?
|
||||
(&get_webprefix()."/servers/images/".$s->{'type'}.".gif") :
|
||||
("../servers/images/".$s->{'type'}.".gif"));
|
||||
push(@links, "edit_host.cgi?id=$h->{'id'}");
|
||||
push(@titles, $s->{'desc'} ? $s->{'desc'} : $s->{'host'});
|
||||
|
@ -27,7 +27,7 @@ foreach $h (@hosts) {
|
||||
push(@titles, $s->{'desc'} ? $s->{'desc'}
|
||||
: "$s->{'host'}:$s->{'port'}");
|
||||
push(@links, $link);
|
||||
push(@icons, $gconfig{'webprefix'}."/servers/images/".
|
||||
push(@icons, &get_webprefix()."/servers/images/".
|
||||
$s->{'type'}.".gif");
|
||||
push(@installed, @{$h->{'packages'}});
|
||||
$gothost{$h->{'id'}}++;
|
||||
|
@ -25,7 +25,7 @@ foreach $h (@hosts) {
|
||||
push(@titles, &server_name($s)."<br>".
|
||||
&text('index_version', $h->{'version'}));
|
||||
push(@links, "edit_host.cgi?id=$h->{'id'}");
|
||||
push(@icons, "$gconfig{'webprefix'}/servers/images/$s->{'type'}.gif");
|
||||
push(@icons, "@{[&get_webprefix()]}/servers/images/$s->{'type'}.gif");
|
||||
$gothost{$h->{'id'}}++;
|
||||
}
|
||||
if (@links) {
|
||||
|
@ -27,7 +27,7 @@ foreach $h (@hosts) {
|
||||
push(@titles, &server_name($s)."<br>".
|
||||
&text('index_version', $h->{'version'}));
|
||||
push(@links, "edit_host.cgi?id=$h->{'id'}");
|
||||
push(@icons, "$gconfig{'webprefix'}/servers/images/$s->{'type'}.gif");
|
||||
push(@icons, "@{[&get_webprefix()]}/servers/images/$s->{'type'}.gif");
|
||||
$gothost{$h->{'id'}}++;
|
||||
}
|
||||
if (@links) {
|
||||
|
@ -35,7 +35,7 @@ if (!-x $config{'dhcpd_path'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("dhcpd", "man", "doc", "howto", "google"));
|
||||
print &text('index_dhcpdnotfound', $config{'dhcpd_path'},
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link("dhcpd", $text{'index_dhcpd'},
|
||||
|
@ -10,7 +10,7 @@ print &ui_hr();
|
||||
if (!-x $config{'named_pathname'}) {
|
||||
print "<p>The BIND 4 DNS server <i>$config{'named_pathname'}</i>\n";
|
||||
print "could not be found on your system. Maybe it is not installed,\n";
|
||||
print "or your <a href=\"$gconfig{'webprefix'}/config.cgi?$module_name\">BIND 4 module\n";
|
||||
print "or your <a href=\"@{[&get_webprefix()]}/config.cgi?$module_name\">BIND 4 module\n";
|
||||
print "configuration</a> is incorrect. <p>\n";
|
||||
print &ui_hr();
|
||||
&footer("/", "index");
|
||||
|
@ -225,7 +225,7 @@ return ($_[0]->{'active'} ? "" : "#").$_[0]->{'dir'}."\t".join(" ", @htxt);
|
||||
sub file_chooser_button2
|
||||
{
|
||||
my $disabled = ($_[3] == 1) ? "disabled" : "";
|
||||
return "<input type=button name=$_[2] onClick='ifield = document.forms[0].$_[0]; chooser = window.open(\"$gconfig{'webprefix'}/chooser.cgi?type=$_[1]&chroot=/&file=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbar=no,width=400,height=300\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\" $disabled>\n";
|
||||
return "<input type=button name=$_[2] onClick='ifield = document.forms[0].$_[0]; chooser = window.open(\"@{[&get_webprefix()]}/chooser.cgi?type=$_[1]&chroot=/&file=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbar=no,width=400,height=300\"); chooser.ifield = ifield; window.ifield = ifield' value=\"...\" $disabled>\n";
|
||||
}
|
||||
|
||||
#------------------------------------------------------
|
||||
|
@ -10,7 +10,7 @@ if (!&has_command($config{'fetchmail_path'})) {
|
||||
&help_search_link("fetchmail", "doc", "man", "google"));
|
||||
print "<p>",&text('index_efetchmail',
|
||||
"<tt>$config{'fetchmail_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ if ($in{'file'} ne '' && !&can_access($in{'file'})) {
|
||||
# Output HTMLarea init code
|
||||
print <<EOF;
|
||||
<script type="text/javascript">
|
||||
_editor_url = "$gconfig{'webprefix'}/$module_name/xinha/";
|
||||
_editor_url = "@{[&get_webprefix()]}/$module_name/xinha/";
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
<script type="text/javascript" src="xinha/XinhaCore.js"></script>
|
||||
|
@ -25,9 +25,9 @@ else {
|
||||
$w = 100;
|
||||
$h = 100;
|
||||
if (!$tconfig{'inframe'}) {
|
||||
$return = "<param name=return value=\"$gconfig{'webprefix'}/?cat=$module_info{'category'}\">";
|
||||
$return = "<param name=return value=\"@{[&get_webprefix()]}/?cat=$module_info{'category'}\">";
|
||||
$returnhtml = &text('index_index',
|
||||
"$gconfig{'webprefix'}/")."<p>";
|
||||
"@{[&get_webprefix()]}/")."<p>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ if ($main::session_id) {
|
||||
$session = "<param name=session value=\"sid=$main::session_id\">";
|
||||
}
|
||||
if (!$access{'noconfig'}) {
|
||||
$config = "<param name=config value=\"$gconfig{'webprefix'}/config.cgi?$module_name\">";
|
||||
$config = "<param name=config value=\"@{[&get_webprefix()]}/config.cgi?$module_name\">";
|
||||
}
|
||||
$iconsize = int($config{'iconsize'});
|
||||
$root = join(" ", @allowed_roots);
|
||||
|
@ -329,7 +329,7 @@
|
||||
<h4 class="warning">$text{'upload_files'}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id='upload-form' method='post' action='upload.cgi?path=$urlized_path&id=$upid' enctype='multipart/form-data' onsubmit='window.open("$gconfig{'webprefix'}/uptracker.cgi?id=$upid&uid=$uid", "uptracker", "toolbar=no, menubar=no, scrollbars=no, location=no, resizable=no, width=screen.width, height=screen.height")'>
|
||||
<form id='upload-form' method='post' action='upload.cgi?path=$urlized_path&id=$upid' enctype='multipart/form-data' onsubmit='window.open("@{[&get_webprefix()]}/uptracker.cgi?id=$upid&uid=$uid", "uptracker", "toolbar=no, menubar=no, scrollbars=no, location=no, resizable=no, width=screen.width, height=screen.height")'>
|
||||
<input type='file' id='upfiles' name='upfiles' multiple onchange='countUploads(this)'>
|
||||
<input type='hidden' name='path' value='$quote_escaped_path'>
|
||||
</form>
|
||||
|
@ -103,7 +103,7 @@
|
||||
</div>
|
||||
|
||||
<div id="readyForUploadDialog" class="modal">
|
||||
<form id='upload-form' method='post' action='upload.cgi?path=$urlized_path&id=$upid' enctype='multipart/form-data' onsubmit='window.open("$gconfig{'webprefix'}/uptracker.cgi?id=$upid&uid=$uid", "uptracker", "toolbar=no, menubar=no, scrollbars=no, location=no, resizable=no, width=screen.width, height=screen.height")'>
|
||||
<form id='upload-form' method='post' action='upload.cgi?path=$urlized_path&id=$upid' enctype='multipart/form-data' onsubmit='window.open("@{[&get_webprefix()]}/uptracker.cgi?id=$upid&uid=$uid", "uptracker", "toolbar=no, menubar=no, scrollbars=no, location=no, resizable=no, width=screen.width, height=screen.height")'>
|
||||
<input type='file' id='upfiles' name='upfiles' multiple onchange='countUploads(this)'>
|
||||
<input type='hidden' name='path' value='$quote_escaped_path'>
|
||||
</form>
|
||||
|
@ -526,7 +526,7 @@ else {
|
||||
sub external_firewall_message
|
||||
{
|
||||
local $fwname="";
|
||||
local $fwconfig="$gconfig{'webprefix'}/config.cgi?firewall";
|
||||
local $fwconfig="@{[&get_webprefix()]}/config.cgi?firewall";
|
||||
|
||||
# detect external firewalls
|
||||
local ($filter) = grep { $_->{'name'} eq 'filter' } @{$_[0]};
|
||||
@ -547,6 +547,6 @@ sub external_firewall_message
|
||||
}
|
||||
# alert about the detected firewall modules
|
||||
foreach my $word (split ' ', $fwname) {
|
||||
print ui_alert_box(&text("index_$word", "$gconfig{'webprefix'}/$word/", $fwconfig), 'warn');
|
||||
print ui_alert_box(&text("index_$word", "@{[&get_webprefix()]}/$word/", $fwconfig), 'warn');
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ push(@leftmenu, &list_modules_webmin_menu());
|
||||
# Show module/help search form
|
||||
if ($gaccess{'webminsearch'}) {
|
||||
push(@leftmenu, { 'type' => 'input',
|
||||
'cgi' => $gconfig{'webprefix'}.'/webmin_search.cgi',
|
||||
'cgi' => &get_webprefix().'/webmin_search.cgi',
|
||||
'name' => 'search',
|
||||
'desc' => $text{'left_search'},
|
||||
'size' => 15 });
|
||||
@ -228,6 +228,6 @@ foreach my $item (@$items) {
|
||||
sub add_webprefix
|
||||
{
|
||||
my ($link) = @_;
|
||||
return $link =~ /^\// ? $gconfig{'webprefix'}.$link : $link;
|
||||
return $link =~ /^\// ? &get_webprefix().$link : $link;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ my @links = grep { $_->{'type'} eq 'link' } @info;
|
||||
if (@links) {
|
||||
my @linkshtml = map {
|
||||
my $lnk = $_->{'link'};
|
||||
$lnk = $gconfig{'webprefix'}.$lnk if ($lnk =~ /^\//);
|
||||
$lnk = &get_webprefix().$lnk if ($lnk =~ /^\//);
|
||||
&ui_link($lnk, $_->{'desc'}, undef,
|
||||
!$_->{'target'} ? '' :
|
||||
$_->{'target'} eq 'new' ? 'target=_blank' :
|
||||
|
@ -105,7 +105,7 @@ local ($d, $action) = @_;
|
||||
print "<script>\n";
|
||||
if ($action eq 'create') {
|
||||
# Select the new domain
|
||||
print "top.left.location = '$gconfig{'webprefix'}/left.cgi?dom=$d->{'id'}';\n";
|
||||
print "top.left.location = '@{[&get_webprefix()]}/left.cgi?dom=$d->{'id'}';\n";
|
||||
}
|
||||
else {
|
||||
# Just refresh left
|
||||
@ -155,7 +155,7 @@ if (window.parent && window.parent.frames[0]) {
|
||||
// // Need to change value of selector
|
||||
// serversel.value = '$server->{'id'}';
|
||||
// }
|
||||
window.parent.frames[0].location = '$gconfig{'webprefix'}/left.cgi?mode=vm2&sid=$server->{'id'}';
|
||||
window.parent.frames[0].location = '@{[&get_webprefix()]}/left.cgi?mode=vm2&sid=$server->{'id'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -179,7 +179,7 @@ if (window.parent && window.parent.frames[0]) {
|
||||
if (domsel && domsel.value != '$d->{'id'}') {
|
||||
// Need to change value
|
||||
// domsel.value = '$d->{'id'}';
|
||||
window.parent.frames[0].location = '$gconfig{'webprefix'}/left.cgi?mode=virtualmin&dom=$d->{'id'}';
|
||||
window.parent.frames[0].location = '@{[&get_webprefix()]}/left.cgi?mode=virtualmin&dom=$d->{'id'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -232,8 +232,8 @@ sub theme_prebody
|
||||
{
|
||||
if ($script_name =~ /session_login.cgi/) {
|
||||
# Generate CSS link
|
||||
print "<link rel='stylesheet' type='text/css' href='$gconfig{'webprefix'}/unauthenticated/gray-reset-fonts-grids-base.css'>\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='$gconfig{'webprefix'}/unauthenticated/gray-virtual-server-style.css'>\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='@{[&get_webprefix()]}/unauthenticated/gray-reset-fonts-grids-base.css'>\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='@{[&get_webprefix()]}/unauthenticated/gray-virtual-server-style.css'>\n";
|
||||
print "<!--[if IE]>\n";
|
||||
print "<style type=\"text/css\">\n";
|
||||
print "table.formsection, table.ui_table, table.loginform { border-collapse: collapse; }\n";
|
||||
@ -244,8 +244,8 @@ if ($script_name =~ /session_login.cgi/) {
|
||||
|
||||
sub theme_prehead
|
||||
{
|
||||
print "<link rel='stylesheet' type='text/css' href='$gconfig{'webprefix'}/unauthenticated/gray-reset-fonts-grids-base.css'>\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='$gconfig{'webprefix'}/unauthenticated/gray-virtual-server-style.css' />\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='@{[&get_webprefix()]}/unauthenticated/gray-reset-fonts-grids-base.css'>\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='@{[&get_webprefix()]}/unauthenticated/gray-virtual-server-style.css' />\n";
|
||||
print "<!--[if IE]>\n";
|
||||
print "<style type=\"text/css\">\n";
|
||||
print "table.formsection, table.ui_table, table.loginform { border-collapse: collapse; }\n";
|
||||
@ -254,7 +254,7 @@ print "<![endif]-->\n";
|
||||
print "<script>\n";
|
||||
print "var rowsel = new Array();\n";
|
||||
print "</script>\n";
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/sorttable.js'></script>\n";
|
||||
print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/sorttable.js'></script>\n";
|
||||
if ($ENV{'HTTP_USER_AGENT'} =~ /Chrome/) {
|
||||
print "<style type=\"text/css\">\n";
|
||||
print "textarea,pre { font-size:120%; }\n";
|
||||
@ -391,7 +391,7 @@ $rv .= "document.${name}_tabtitles = $tabtitles;\n";
|
||||
$rv .= "</script>\n";
|
||||
|
||||
# Output the tabs
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "@{[&get_webprefix()]}/images";
|
||||
$rv .= &ui_hidden($name, $sel)."\n";
|
||||
$rv .= "<table border=0 cellpadding=0 cellspacing=0 class='ui_tabs'>\n";
|
||||
$rv .= "<tr><td bgcolor=#ffffff colspan=".(scalar(@$tabs)*2+1).">";
|
||||
@ -590,7 +590,7 @@ $rv .= "<table class='ui_table' $tabletags>\n";
|
||||
if (defined($heading) || defined($rightheading)) {
|
||||
$rv .= "<thead><tr>";
|
||||
if (defined($heading)) {
|
||||
$rv .= "<td><a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gconfig{'webprefix'}/images/$defimg'></a> <a href=\"javascript:hidden_opener('$divid', '$openerid')\" class='ui-hidden-table-title'><b>$heading</b></a></td>";
|
||||
$rv .= "<td><a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='@{[&get_webprefix()]}/images/$defimg'></a> <a href=\"javascript:hidden_opener('$divid', '$openerid')\" class='ui-hidden-table-title'><b>$heading</b></a></td>";
|
||||
}
|
||||
if (defined($rightheading)) {
|
||||
$rv .= "<td align=right>$rightheading</td>";
|
||||
@ -727,11 +727,11 @@ my ($direction, $url, $disabled) = @_;
|
||||
my $alt = $direction eq "left" ? '<-' : '->';
|
||||
if ($disabled) {
|
||||
return "<img alt=\"$alt\" align=\"middle\""
|
||||
. "src=\"$gconfig{'webprefix'}/images/$direction-grey.gif\">\n";
|
||||
. "src=\"@{[&get_webprefix()]}/images/$direction-grey.gif\">\n";
|
||||
}
|
||||
else {
|
||||
return "<a href=\"$url\"><img alt=\"$alt\" align=\"top\""
|
||||
. "src=\"$gconfig{'webprefix'}/images/$direction.gif\"></a>\n";
|
||||
. "src=\"@{[&get_webprefix()]}/images/$direction.gif\"></a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -755,7 +755,7 @@ for($i=0; $i+1<@_; $i+=2) {
|
||||
elsif ($url =~ /^\?/ && get_module_name()) {
|
||||
$url = "/".get_module_name()."/$url";
|
||||
}
|
||||
$url = "$gconfig{'webprefix'}$url" if ($url =~ /^\//);
|
||||
$url = "@{[&get_webprefix()]}$url" if ($url =~ /^\//);
|
||||
if ($count++ == 0) {
|
||||
print theme_ui_nav_link("left", $url);
|
||||
}
|
||||
@ -776,7 +776,7 @@ if (!$_[$i]) {
|
||||
sub theme_ui_hidden_javascript
|
||||
{
|
||||
my $rv;
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "@{[&get_webprefix()]}/images";
|
||||
|
||||
return <<EOF;
|
||||
<style>
|
||||
|
@ -51,10 +51,10 @@ if ($in{'multi'}) {
|
||||
print "</script>\n";
|
||||
print "<title>$text{'groups_title1'}</title>\n";
|
||||
print "<frameset cols='50%,50%'>\n";
|
||||
print "<frame src=\"$gconfig{'webprefix'}/group_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frame src=\"@{[&get_webprefix()]}/group_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frameset rows='*,50' frameborder=no>\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/group_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/group_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print " <frame src=\"@{[&get_webprefix()]}/group_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"@{[&get_webprefix()]}/group_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
@ -86,7 +86,7 @@ if ($in{'multi'}) {
|
||||
}
|
||||
print "</table>\n";
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
@ -178,7 +178,7 @@ else {
|
||||
}
|
||||
print "</table>\n";
|
||||
if ( $cnt >= 10 ) {
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/filter_match.js?28112013'></script>";
|
||||
print "<script type='text/javascript'>filter_match_box();</script>";
|
||||
}
|
||||
&popup_footer();
|
||||
|
@ -9,13 +9,13 @@ require './grub-lib.pl';
|
||||
# Check that GRUB is installed
|
||||
if (!-r $config{'menu_file'}) {
|
||||
print "<p>",&text('index_efile', "<tt>$config{'menu_file'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
if (!&has_command($config{'grub_path'})) {
|
||||
print "<p>",&text('index_epath', "<tt>$config{'grub_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ elsif (&foreign_check("software")) {
|
||||
# Check if heartbeat is installed
|
||||
if (!-d $config{'ha_dir'}) {
|
||||
print &text('index_edir', "<tt>$config{'ha_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -44,7 +44,7 @@ if (!-r $ha_cf && -r $config{'alt_ha_cf'}) {
|
||||
}
|
||||
if (!-r $ha_cf) {
|
||||
print &text('index_eha_cf', "<tt>$ha_cf</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -54,7 +54,7 @@ if (!-r $haresources && -r $config{'alt_haresources'}) {
|
||||
}
|
||||
if (!-r $haresources) {
|
||||
print &text('index_eharesources', "<tt>$haresources</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -64,13 +64,13 @@ if (!-r $authkeys && -r $config{'alt_authkeys'}) {
|
||||
}
|
||||
if (!-r $authkeys) {
|
||||
print &text('index_eauthkeys', "<tt>$authkeys</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
if (!-r $config{'req_resource_cmd'}) {
|
||||
print &text('index_ereq_resource_cmd', "<tt>$config{'req_resource_cmd'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ if (!@st) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("idmapd", "man"));
|
||||
print &text('index_eidmapd', "<tt>$config{'idmapd_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
10
index.cgi
10
index.cgi
@ -76,10 +76,10 @@ elsif ($gconfig{"notabs_${base_remote_user}"} == 2 ||
|
||||
if ($pos % $cols == 0) { print "<tr $cb>\n"; }
|
||||
print "<td valign=top align=center width=$per\%>\n";
|
||||
local $idx = $m->{'index_link'};
|
||||
print "<table border><tr><td><a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>",
|
||||
print "<table border><tr><td><a href=@{[&get_webprefix()]}/$m->{'dir'}/$idx>",
|
||||
"<img src=$m->{'dir'}/images/icon.gif border=0 ",
|
||||
"width=48 height=48></a></td></tr></table>\n";
|
||||
print "<a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
print "<a href=@{[&get_webprefix()]}/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
if ($pos % $cols == $cols - 1) { print "</tr>\n"; }
|
||||
$pos++;
|
||||
}
|
||||
@ -122,7 +122,7 @@ else {
|
||||
print "<td class='usercoll' valign=top $tb>", $usercol ? "<br>" :
|
||||
"<img src=images/lc1.gif alt=\"\">","</td>\n";
|
||||
print "<td class='usercolc' $tb> ",
|
||||
"<a href=$gconfig{'webprefix'}/?cat=$c><b>$t</b></a> </td>\n";
|
||||
"<a href=@{[&get_webprefix()]}/?cat=$c><b>$t</b></a> </td>\n";
|
||||
print "<td class='usercolr' valign=top $tb>", $usercol ? "<br>" :
|
||||
"<img src=images/rc1.gif alt=\"\">","</td>\n";
|
||||
}
|
||||
@ -142,10 +142,10 @@ else {
|
||||
if ($pos % $cols == 0) { print "<tr>\n"; }
|
||||
local $idx = $m->{'index_link'};
|
||||
print "<td valign=top align=center width=$per\%>\n";
|
||||
print "<table border bgcolor=#ffffff><tr><td><a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>",
|
||||
print "<table border bgcolor=#ffffff><tr><td><a href=@{[&get_webprefix()]}/$m->{'dir'}/$idx>",
|
||||
"<img src=$m->{'dir'}/images/icon.gif alt=\"\" border=0></a>",
|
||||
"</td></tr></table>\n";
|
||||
print "<a href=$gconfig{'webprefix'}/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
print "<a href=@{[&get_webprefix()]}/$m->{'dir'}/$idx>$m->{'desc'}</a></td>\n";
|
||||
if ($pos++ % $cols == $cols - 1) { print "</tr>\n"; }
|
||||
}
|
||||
while($pos++ % $cols) {
|
||||
|
@ -10,7 +10,7 @@ if (!&has_command($config{'ipsec'}) ||
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
|
||||
&help_search_link("freeswan", "doc", "google"));
|
||||
print "<p>",&text('index_eipsec', "<tt>$config{'ipsec'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
if ($out) {
|
||||
print &text('index_out',
|
||||
"<tt>$config{'ipsec'} --version</tt>"),"\n";
|
||||
@ -25,7 +25,7 @@ else {
|
||||
# Make sure the config file exists
|
||||
if (!-r $config{'file'}) {
|
||||
print "<p>",&text('index_econfig', "<tt>$config{'file'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# Check for the host secret
|
||||
@ -98,7 +98,7 @@ else {
|
||||
&icons_table(\@links, \@titles, \@icons, 4);
|
||||
if (!@policies && $got_policies) {
|
||||
print "<b>",&text('index_nopol',
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"</b><p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"</b><p>\n";
|
||||
}
|
||||
|
||||
print &ui_hr();
|
||||
|
@ -9,7 +9,7 @@ if (!-r $config{'jabber_config'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef,
|
||||
&help_search_link("jabber", "man", "doc", "google"));
|
||||
print &text('index_econfig', "<tt>$config{'jabber_config'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{"index"});
|
||||
exit;
|
||||
}
|
||||
@ -19,7 +19,7 @@ if (!-d $config{'jabber_dir'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef,
|
||||
&help_search_link("jabber", "man", "doc", "google"));
|
||||
print &text('index_edir', "<tt>$config{'jabber_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{"index"});
|
||||
exit;
|
||||
}
|
||||
@ -31,7 +31,7 @@ if (!-x $jabberd) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, undef,
|
||||
&help_search_link("jabber", "man", "doc", "google"));
|
||||
print &text('index_ejabberd', "<tt>$jabberd</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{"index"});
|
||||
exit;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ if (!$got_net_ldap) {
|
||||
$ldap = &ldap_connect(1);
|
||||
if (!ref($ldap)) {
|
||||
print &text('index_eldap', $ldap,
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -45,7 +45,7 @@ if (!$schema) {
|
||||
# Make sure the LDAP bases are set or available
|
||||
if (!&get_user_base() || !&get_group_base()) {
|
||||
print &text('index_ebase',
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -68,7 +68,7 @@ if ($config{'imap_host'}) {
|
||||
$imap = &imap_connect(1);
|
||||
if (!ref($imap)) {
|
||||
print &text('index_eimap', $imap,
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ if (defined(&check_print_system)) {
|
||||
if ($pserr) {
|
||||
print $pserr,"\n";
|
||||
print &text('index_esystem',
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ if ($html_edit) {
|
||||
# Output HTML editor textarea
|
||||
print <<EOF;
|
||||
<script type="text/javascript">
|
||||
_editor_url = "$gconfig{'webprefix'}/$module_name/xinha/";
|
||||
_editor_url = "@{[&get_webprefix()]}/$module_name/xinha/";
|
||||
_editor_lang = "en";
|
||||
</script>
|
||||
<script type="text/javascript" src="xinha/XinhaCore.js"></script>
|
||||
|
@ -309,7 +309,7 @@ if (!@sub) {
|
||||
if ($in{'idx'}) {
|
||||
print "<a href='view_mail.cgi?idx=",
|
||||
$in{'idx'}-1,"&folder=$in{'folder'}&user=$uuser'>",
|
||||
"<img src=$gconfig{'webprefix'}/images/left.gif border=0 ",
|
||||
"<img src=@{[&get_webprefix()]}/images/left.gif border=0 ",
|
||||
"align=middle></a>\n";
|
||||
}
|
||||
print "<font size=+1>",&text('view_desc', $in{'idx'}+1,
|
||||
@ -317,7 +317,7 @@ if (!@sub) {
|
||||
if ($in{'idx'} < @mail-1) {
|
||||
print "<a href='view_mail.cgi?idx=",
|
||||
$in{'idx'}+1,"&folder=$in{'folder'}&user=$uuser'>",
|
||||
"<img src=$gconfig{'webprefix'}/images/right.gif border=0 ",
|
||||
"<img src=@{[&get_webprefix()]}/images/right.gif border=0 ",
|
||||
"align=middle></a>\n";
|
||||
}
|
||||
}
|
||||
|
@ -37,13 +37,13 @@ print &ui_checked_columns_row(["<b>Autodetect aliases file from mailer</b>", ucf
|
||||
$res=$ok;
|
||||
$tocheck=$aliases;
|
||||
if (!-r $tocheck) { $res=$fail; $tocheck = &text('index_esendmail', 'Sendmail alias file', $tocheck,
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"); }
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"); }
|
||||
print &ui_checked_columns_row(["<b>Aliases file used for majordomo</b>", $tocheck, $res],
|
||||
\@tds,undef, undef, 0,1);
|
||||
$res=$ok;
|
||||
$tocheck=$config{'majordomo_cf'};
|
||||
if (!-r $tocheck) { $res=$fail; $tocheck = &text('index_econfig', "<tt>$tocheck</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"); }
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"); }
|
||||
print &ui_checked_columns_row(["<b>Majordomo configuration file</b>", $tocheck, $res],
|
||||
\@tds,undef, undef, 0,1);
|
||||
|
||||
@ -54,7 +54,7 @@ if ( $res eq $ok) {
|
||||
local $progdir, $progdirok;
|
||||
$tocheck= $progdir = $config{'program_dir'};
|
||||
if (!-d $tocheck ) { $res=$fail; $tocheck = &text('index_eprograms', "<tt>$tocheck</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"); }
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"); }
|
||||
print &ui_checked_columns_row(["<b>Majordomo programm dir</b>", $tocheck, $res],
|
||||
\@tds,undef, undef, 0,1);
|
||||
if ($res eq $ok) {
|
||||
|
@ -454,14 +454,14 @@ local $conf=$_[0];
|
||||
# Check for the majordomo config file
|
||||
if (!-r $config{'majordomo_cf'}) {
|
||||
print &text('index_econfig', "<tt>$config{'majordomo_cf'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
# Check for the programs dir
|
||||
if (!-d $config{'program_dir'}) {
|
||||
print &text('index_eprograms', "<tt>$config{'program_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -469,7 +469,7 @@ if (!-d $config{'program_dir'}) {
|
||||
if (!-r "$config{'program_dir'}/majordomo_version.pl") {
|
||||
print &text('index_eversion2', "majordomo_version.pl",
|
||||
$config{'program_dir'},
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -28,10 +28,10 @@ if ($in{'multi'}) {
|
||||
print "</script>\n";
|
||||
print "<title>$text{'modules_title1'}</title>\n";
|
||||
print "<frameset cols='50%,50%'>\n";
|
||||
print "<frame src=\"$gconfig{'webprefix'}/module_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frame src=\"@{[&get_webprefix()]}/module_chooser.cgi?frame=1&multi=1\">\n";
|
||||
print "<frameset rows='*,50' frameborder=no>\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/module_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"$gconfig{'webprefix'}/module_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print " <frame src=\"@{[&get_webprefix()]}/module_chooser.cgi?frame=2&multi=1\">\n";
|
||||
print " <frame src=\"@{[&get_webprefix()]}/module_chooser.cgi?frame=3&multi=1\" scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ require './mon-lib.pl';
|
||||
# Check if mon is installed
|
||||
if (!-r $mon_config_file) {
|
||||
print "<p>",&text('err_nomonconf', "<tt>$mon_config_file</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ if ($charset) {
|
||||
print "<meta http-equiv=\"Content-Type\" ",
|
||||
"content=\"text/html; Charset=$charset\">\n";
|
||||
}
|
||||
print "<link rel='icon' href='$gconfig{'webprefix'}/images/webmin_icon.png' type='image/png'>\n";
|
||||
print "<link rel='icon' href='@{[&get_webprefix()]}/images/webmin_icon.png' type='image/png'>\n";
|
||||
if (@_ > 0) {
|
||||
local $title = &get_html_title($_[0]);
|
||||
print "<title>$title</title>\n";
|
||||
@ -239,26 +239,26 @@ if ($remote_user && @_ > 1) {
|
||||
local $lowidth = $main::session_id ? 84 : 27;
|
||||
local $lotext = $main::session_id ? $text{'main_logout'}
|
||||
: $text{'main_switch'};
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="$gconfig{'webprefix'}/images/top_bar/bg.jpg" height="32">
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="@{[&get_webprefix()]}/images/top_bar/bg.jpg" height="32">
|
||||
<tr>
|
||||
<td width="4" nowrap><img src="$gconfig{'webprefix'}/images/top_bar/left.jpg" width="4" height="32"></td>
|
||||
<td width="100%" nowrap><a href="http://www.webmin.com"><img src="$gconfig{'webprefix'}/images/top_bar/webmin_logo.jpg" width="99" height="32" border="0" alt="Webmin home page"></a></td>~;
|
||||
<td width="4" nowrap><img src="@{[&get_webprefix()]}/images/top_bar/left.jpg" width="4" height="32"></td>
|
||||
<td width="100%" nowrap><a href="http://www.webmin.com"><img src="@{[&get_webprefix()]}/images/top_bar/webmin_logo.jpg" width="99" height="32" border="0" alt="Webmin home page"></a></td>~;
|
||||
if (!$ENV{'ANONYMOUS_USER'}) {
|
||||
if ($gconfig{'nofeedbackcc'} != 2 && $gaccess{'feedback'} &&
|
||||
(!$module_name || $module_info{'longdesc'} || $module_info{'feedback'})) {
|
||||
print qq~<td><a href='$gconfig{'webprefix'}/feedback_form.cgi?module=$module_name'><img src=$gconfig{'webprefix'}/images/top_bar/feedback.jpg width=97 height=32 alt="$text{'main_feedback'}" border=0></a></td>~;
|
||||
print qq~<td><a href='@{[&get_webprefix()]}/feedback_form.cgi?module=$module_name'><img src=@{[&get_webprefix()]}/images/top_bar/feedback.jpg width=97 height=32 alt="$text{'main_feedback'}" border=0></a></td>~;
|
||||
}
|
||||
if (!$ENV{'SSL_USER'} && !$ENV{'LOCAL_USER'} &&
|
||||
!$ENV{'HTTP_WEBMIN_SERVERS'}) {
|
||||
if ($gconfig{'nofeedbackcc'} != 2 &&
|
||||
$gaccess{'feedback'}) {
|
||||
print qq~<td><img src=$gconfig{'webprefix'}/images/top_bar/top_sep.jpg width=12 height=32></td>~;
|
||||
print qq~<td><img src=@{[&get_webprefix()]}/images/top_bar/top_sep.jpg width=12 height=32></td>~;
|
||||
}
|
||||
print qq~<td width="84" nowrap><a href='$gconfig{'webprefix'}$logout'><img src="$gconfig{'webprefix'}/images/top_bar/$loicon" height="31" width=$lowidth border="0" alt="$lotext"></a></td>~;
|
||||
print qq~<td width="84" nowrap><a href='@{[&get_webprefix()]}$logout'><img src="@{[&get_webprefix()]}/images/top_bar/$loicon" height="31" width=$lowidth border="0" alt="$lotext"></a></td>~;
|
||||
}
|
||||
}
|
||||
print qq~<td width="3" nowrap>
|
||||
<div align="right"><img src="$gconfig{'webprefix'}/images/top_bar/right.jpg" width="3" height="32"></div>
|
||||
<div align="right"><img src="@{[&get_webprefix()]}/images/top_bar/right.jpg" width="3" height="32"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>~;
|
||||
@ -271,7 +271,7 @@ if (@_ > 1 && !$one && $remote_user && !$notabs) {
|
||||
# Display module categories
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" height="7">
|
||||
<tr>
|
||||
<td background="$gconfig{'webprefix'}/images/top_bar/shadow_bg.jpg" nowrap><img src="$gconfig{'webprefix'}/images/top_bar/shadow.jpg" width="8" height="7"></td>
|
||||
<td background="@{[&get_webprefix()]}/images/top_bar/shadow_bg.jpg" nowrap><img src="@{[&get_webprefix()]}/images/top_bar/shadow.jpg" width="8" height="7"></td>
|
||||
</tr>
|
||||
</table>~;
|
||||
|
||||
@ -299,9 +299,9 @@ if (@_ > 1 && !$one && $remote_user && !$notabs) {
|
||||
}
|
||||
|
||||
#####Navigation Bar START#####
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" height="57" background="$gconfig{'webprefix'}/images/nav/bg.jpg">
|
||||
<tr background="$gconfig{'webprefix'}/images/nav/bg.jpg">
|
||||
<td width="6" nowrap><img src="$gconfig{'webprefix'}/images/nav/left.jpg" width="3" height="57"></td>~;
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" height="57" background="@{[&get_webprefix()]}/images/nav/bg.jpg">
|
||||
<tr background="@{[&get_webprefix()]}/images/nav/bg.jpg">
|
||||
<td width="6" nowrap><img src="@{[&get_webprefix()]}/images/nav/left.jpg" width="3" height="57"></td>~;
|
||||
|
||||
foreach $c (@cats) {
|
||||
local $t = $cats{$c};
|
||||
@ -316,64 +316,64 @@ if (@_ > 1 && !$one && $remote_user && !$notabs) {
|
||||
if ($inlist eq "true") {
|
||||
|
||||
if ($c eq "") {
|
||||
print qq~<td nowrap><center><img src="$gconfig{'webprefix'}/images/cats_over/others.jpg" width="43" height="44" title="$catdesc"><br>~;
|
||||
print qq~<td nowrap><center><img src="@{[&get_webprefix()]}/images/cats_over/others.jpg" width="43" height="44" title="$catdesc"><br>~;
|
||||
&chop_font;
|
||||
|
||||
print qq~</center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
} elsif ($c eq "webmin") {
|
||||
if (@_ > 1) {
|
||||
print qq~<td nowrap><center><a href=$gconfig{'webprefix'}/?cat=$c><img src="$gconfig{'webprefix'}/images/cats_over/$c.jpg" width="43" height="44" border=0 title="$catdesc"><br>~;
|
||||
print qq~<td nowrap><center><a href=@{[&get_webprefix()]}/?cat=$c><img src="@{[&get_webprefix()]}/images/cats_over/$c.jpg" width="43" height="44" border=0 title="$catdesc"><br>~;
|
||||
&chop_font;
|
||||
print qq~</a></center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
} else {
|
||||
print qq~<td nowrap><center><img src="$gconfig{'webprefix'}/images/cats_over/$c.jpg" width="43" height="44" border=0 title="$catdesc"><br>~; &chop_font;
|
||||
print qq~<td nowrap><center><img src="@{[&get_webprefix()]}/images/cats_over/$c.jpg" width="43" height="44" border=0 title="$catdesc"><br>~; &chop_font;
|
||||
print qq~</center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
}
|
||||
} else {
|
||||
print qq~<td nowrap><center><img src="$gconfig{'webprefix'}/images/cats_over/$c.jpg" width="43" height="44" title="$catdesc"><br>~;
|
||||
print qq~<td nowrap><center><img src="@{[&get_webprefix()]}/images/cats_over/$c.jpg" width="43" height="44" title="$catdesc"><br>~;
|
||||
|
||||
&chop_font;
|
||||
|
||||
print qq~</center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
}
|
||||
|
||||
} else {
|
||||
print qq~<td nowrap><center><img src="$gconfig{'webprefix'}/images/cats_over/unknown.jpg" width="43" height="44" title="$catdesc"><br>~;
|
||||
print qq~<td nowrap><center><img src="@{[&get_webprefix()]}/images/cats_over/unknown.jpg" width="43" height="44" title="$catdesc"><br>~;
|
||||
|
||||
&chop_font;
|
||||
|
||||
print qq~</center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($inlist eq "true") {
|
||||
if ($c eq "") {
|
||||
print qq~<td nowrap><center><a href=$gconfig{'webprefix'}/?cat=$c><img src="$gconfig{'webprefix'}/images/cats/others.jpg" width="43" height="44" border=0 alt="$t" title="$catdesc"><br>~;
|
||||
print qq~<td nowrap><center><a href=@{[&get_webprefix()]}/?cat=$c><img src="@{[&get_webprefix()]}/images/cats/others.jpg" width="43" height="44" border=0 alt="$t" title="$catdesc"><br>~;
|
||||
|
||||
&chop_font;
|
||||
|
||||
print qq~</a></center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
} else {
|
||||
print qq~<td nowrap><center><a href=$gconfig{'webprefix'}/?cat=$c><img src="$gconfig{'webprefix'}/images/cats/$c.jpg" width="43" height="44" border=0 alt="$t" title="$catdesc"><br>~;
|
||||
print qq~<td nowrap><center><a href=@{[&get_webprefix()]}/?cat=$c><img src="@{[&get_webprefix()]}/images/cats/$c.jpg" width="43" height="44" border=0 alt="$t" title="$catdesc"><br>~;
|
||||
|
||||
&chop_font;
|
||||
|
||||
print qq~</a></center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
}
|
||||
} else {
|
||||
print qq~<td nowrap><center><a href=$gconfig{'webprefix'}/?cat=$c><img src="$gconfig{'webprefix'}/images/cats/unknown.jpg" width="43" height="44" border=0 alt="$t" title="$catdesc"><br>~;
|
||||
print qq~<td nowrap><center><a href=@{[&get_webprefix()]}/?cat=$c><img src="@{[&get_webprefix()]}/images/cats/unknown.jpg" width="43" height="44" border=0 alt="$t" title="$catdesc"><br>~;
|
||||
|
||||
&chop_font;
|
||||
|
||||
print qq~</a></center></td>
|
||||
<td width="17" nowrap><img src="$gconfig{'webprefix'}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
<td width="17" nowrap><img src="@{[&get_webprefix()]}/images/nav/sep.jpg" width="17" height="57"></td>~;
|
||||
}
|
||||
|
||||
}
|
||||
@ -383,16 +383,16 @@ if (@_ > 1 && !$one && $remote_user && !$notabs) {
|
||||
<td nowrap> </td>
|
||||
</tr>
|
||||
</table>~;
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="$gconfig{'webprefix'}/images/nav/bottom_bg.jpg" height="4">
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="@{[&get_webprefix()]}/images/nav/bottom_bg.jpg" height="4">
|
||||
<tr>
|
||||
<td width="100%"><img src="$gconfig{'webprefix'}/images/nav/bottom_left.jpg" width="3" height="4"></td>
|
||||
<td width="100%"><img src="@{[&get_webprefix()]}/images/nav/bottom_left.jpg" width="3" height="4"></td>
|
||||
</tr>
|
||||
</table>~;
|
||||
}
|
||||
|
||||
if (@_ > 1 && (!$_[5] || $ENV{'HTTP_WEBMIN_SERVERS'})) {
|
||||
# Show tabs under module categories
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="$gconfig{'webprefix'}/images/nav/bottom_shadow2.jpg"> <tr background="$gconfig{'webprefix'}/images/nav/bottom_shadow2.jpg">~;
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="@{[&get_webprefix()]}/images/nav/bottom_shadow2.jpg"> <tr background="@{[&get_webprefix()]}/images/nav/bottom_shadow2.jpg">~;
|
||||
|
||||
if ($gconfig{'sysinfo'} == 2 && $remote_user) {
|
||||
&tab_start();
|
||||
@ -407,7 +407,7 @@ if (@_ > 1 && (!$_[5] || $ENV{'HTTP_WEBMIN_SERVERS'})) {
|
||||
}
|
||||
if ($notabs && !$_[5]) {
|
||||
&tab_start;
|
||||
print "<a href='$gconfig{'webprefix'}/?cat=$module_info{'category'}'>$text{'header_webmin'}</a><br>\n";
|
||||
print "<a href='@{[&get_webprefix()]}/?cat=$module_info{'category'}'>$text{'header_webmin'}</a><br>\n";
|
||||
&tab_end;
|
||||
}
|
||||
if (!$_[4]) {
|
||||
@ -415,7 +415,7 @@ if (@_ > 1 && (!$_[5] || $ENV{'HTTP_WEBMIN_SERVERS'})) {
|
||||
local $mi = $module_index_link ||
|
||||
$module_name ? "/$module_name/$idx" : "/";
|
||||
local $mt = $module_index_name || $text{'header_module'};
|
||||
&tab_start; print "<a href=\"$gconfig{'webprefix'}$mi\">",
|
||||
&tab_start; print "<a href=\"@{[&get_webprefix()]}$mi\">",
|
||||
"$mt</a>"; &tab_end;
|
||||
}
|
||||
if (ref($_[2]) eq "ARRAY" && !$ENV{'ANONYMOUS_USER'}) {
|
||||
@ -426,7 +426,7 @@ if (@_ > 1 && (!$_[5] || $ENV{'HTTP_WEBMIN_SERVERS'})) {
|
||||
}
|
||||
if ($_[3]) {
|
||||
if (!$access{'noconfig'}) {
|
||||
&tab_start; print "<a href=\"$gconfig{'webprefix'}/config.cgi?$module_name\">",
|
||||
&tab_start; print "<a href=\"@{[&get_webprefix()]}/config.cgi?$module_name\">",
|
||||
$text{'header_config'},"</a>"; &tab_end;
|
||||
}
|
||||
}
|
||||
@ -439,11 +439,11 @@ if (@_ > 1 && (!$_[5] || $ENV{'HTTP_WEBMIN_SERVERS'})) {
|
||||
}
|
||||
|
||||
print qq~
|
||||
<td nowrap width="100%" background="$gconfig{'webprefix'}/images/nav/bottom_shadow2.jpg" valign="top">
|
||||
<td nowrap width="100%" background="@{[&get_webprefix()]}/images/nav/bottom_shadow2.jpg" valign="top">
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="$gconfig{'webprefix'}/images/nav/bottom_shadow2.jpg">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="@{[&get_webprefix()]}/images/nav/bottom_shadow2.jpg">
|
||||
<tr>
|
||||
<td><img src="$gconfig{'webprefix'}/unauthenticated/nav/bottom_shadow.jpg" width="43" height="9"></td>
|
||||
<td><img src="@{[&get_webprefix()]}/unauthenticated/nav/bottom_shadow.jpg" width="43" height="9"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -457,20 +457,20 @@ print qq~
|
||||
local $title = $_[0];
|
||||
print "<p><table border=0 cellpadding=0 cellspacing=0 width=95% align=center><tr><td><table border=0 cellpadding=0 cellspacing=0 height=20><tr>\n";
|
||||
print "<td bgcolor=#bae3ff valign=top>",
|
||||
"<img src=$gconfig{'webprefix'}/images/tabs/blue_left.jpg width=13 height=22 ",
|
||||
"<img src=@{[&get_webprefix()]}/images/tabs/blue_left.jpg width=13 height=22 ",
|
||||
"alt=\"\">","</td>\n";
|
||||
print "<td bgcolor=#bae3ff> <b>$title</b> </td>\n";
|
||||
print "<td bgcolor=#bae3ff valign=top>",
|
||||
"<img src=$gconfig{'webprefix'}/images/tabs/blue_right.jpg width=19 height=22 ",
|
||||
"<img src=@{[&get_webprefix()]}/images/tabs/blue_right.jpg width=19 height=22 ",
|
||||
"alt=\"\">","</td>\n";
|
||||
if ($_[9]) {
|
||||
print "</tr></table></td> <td align=right><table border=0 cellpadding=0 cellspacing=0 height=20><tr>\n";
|
||||
print "<td bgcolor=#bae3ff>",
|
||||
"<img src=$gconfig{'webprefix'}/images/tabs/blue_left.jpg width=13 height=22 ",
|
||||
"<img src=@{[&get_webprefix()]}/images/tabs/blue_left.jpg width=13 height=22 ",
|
||||
"alt=\"\">","</td>\n";
|
||||
print "<td bgcolor=#bae3ff> <b>$_[9]</b> </td>\n";
|
||||
print "<td bgcolor=#bae3ff>",
|
||||
"<img src=$gconfig{'webprefix'}/images/tabs/blue_right.jpg width=19 height=22",
|
||||
"<img src=@{[&get_webprefix()]}/images/tabs/blue_right.jpg width=19 height=22",
|
||||
" alt=\"\">","</td>\n";
|
||||
}
|
||||
print "</tr></table></td></tr></table>";
|
||||
@ -478,9 +478,9 @@ print qq~
|
||||
&theme_prebody;
|
||||
}
|
||||
} elsif (@_ > 1) {
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="$gconfig{'webprefix'}/unauthenticated/nav/bottom_shadow.jpg">
|
||||
print qq~<table width="100%" border="0" cellspacing="0" cellpadding="0" background="@{[&get_webprefix()]}/unauthenticated/nav/bottom_shadow.jpg">
|
||||
<tr>
|
||||
<td width="100%" nowrap><img src="$gconfig{'webprefix'}/unauthenticated/nav/bottom_shadow.jpg" width="43" height="9"></td>
|
||||
<td width="100%" nowrap><img src="@{[&get_webprefix()]}/unauthenticated/nav/bottom_shadow.jpg" width="43" height="9"></td>
|
||||
</tr>
|
||||
</table><br>~;
|
||||
}
|
||||
@ -493,7 +493,7 @@ if ($theme_no_table) {
|
||||
print "<ul>\n";
|
||||
}
|
||||
else {
|
||||
#print "<table border=0 width=95% align=center cellspacing=0 cellpadding=0><tr><td background=$gconfig{'webprefix'}/images/msctile2.jpg>\n";
|
||||
#print "<table border=0 width=95% align=center cellspacing=0 cellpadding=0><tr><td background=@{[&get_webprefix()]}/images/msctile2.jpg>\n";
|
||||
print "<table border=0 width=95% align=center cellspacing=0 cellpadding=0><tr><td bgcolor=#ffffff>\n";
|
||||
print "<table border=0 width=95% align=center cellspacing=0 cellpadding=0><tr><td>\n";
|
||||
}
|
||||
@ -525,9 +525,9 @@ for($i=0; $i+1<@_; $i+=2) {
|
||||
elsif ($url =~ /^\?/ && $module_name) {
|
||||
$url = "/$module_name/$url";
|
||||
}
|
||||
$url = "$gconfig{'webprefix'}$url" if ($url =~ /^\//);
|
||||
$url = "@{[&get_webprefix()]}$url" if ($url =~ /^\//);
|
||||
if ($i == 0) {
|
||||
print " <a href=\"$url\"><img alt=\"<-\" align=middle border=0 src=$gconfig{'webprefix'}/images/arrow.jpg></a>\n";
|
||||
print " <a href=\"$url\"><img alt=\"<-\" align=middle border=0 src=@{[&get_webprefix()]}/images/arrow.jpg></a>\n";
|
||||
}
|
||||
else {
|
||||
print " |\n";
|
||||
@ -555,20 +555,20 @@ sub tab_start {
|
||||
print qq~ <td nowrap>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td background="$gconfig{'webprefix'}/images/tabs/bg.jpg"><img src="$gconfig{'webprefix'}/images/tabs/left.jpg" width="12" height="21" nowrap></td>
|
||||
<td background="$gconfig{'webprefix'}/images/tabs/bg.jpg" nowrap>
|
||||
<td background="@{[&get_webprefix()]}/images/tabs/bg.jpg"><img src="@{[&get_webprefix()]}/images/tabs/left.jpg" width="12" height="21" nowrap></td>
|
||||
<td background="@{[&get_webprefix()]}/images/tabs/bg.jpg" nowrap>
|
||||
~;
|
||||
}
|
||||
|
||||
|
||||
sub tab_end {
|
||||
print qq~</td>
|
||||
<td background="$gconfig{'webprefix'}/images/tabs/bg.jpg" nowrap><img src="$gconfig{'webprefix'}/images/tabs/right.jpg" width="15" height="21"></td>
|
||||
<td background="@{[&get_webprefix()]}/images/tabs/bg.jpg" nowrap><img src="@{[&get_webprefix()]}/images/tabs/right.jpg" width="15" height="21"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap><img src="$gconfig{'webprefix'}/images/tabs/right_bottom.jpg" width="12" height="4"></td>
|
||||
<td background="$gconfig{'webprefix'}/images/tabs/bottom.jpg" nowrap><img src="$gconfig{'webprefix'}/images/tabs/bottom.jpg" width="17" height="4"></td>
|
||||
<td nowrap><img src="$gconfig{'webprefix'}/images/tabs/left_bottom.jpg" width="15" height="4"></td> </tr>
|
||||
<td nowrap><img src="@{[&get_webprefix()]}/images/tabs/right_bottom.jpg" width="12" height="4"></td>
|
||||
<td background="@{[&get_webprefix()]}/images/tabs/bottom.jpg" nowrap><img src="@{[&get_webprefix()]}/images/tabs/bottom.jpg" width="17" height="4"></td>
|
||||
<td nowrap><img src="@{[&get_webprefix()]}/images/tabs/left_bottom.jpg" width="15" height="4"></td> </tr>
|
||||
</table>
|
||||
|
||||
</td>~;
|
||||
|
@ -572,13 +572,13 @@ if (@_ > 1 && (!$_[5] || $ENV{'HTTP_WEBMIN_SERVERS'})) {
|
||||
}
|
||||
if ($notabs && !$_[5]) {
|
||||
&tab_start;
|
||||
print "<a href='$gconfig{'webprefix'}/?cat=$module_info{'category'}'>$text{'header_webmin'}</a><br>\n";
|
||||
print "<a href='@{[&get_webprefix()]}/?cat=$module_info{'category'}'>$text{'header_webmin'}</a><br>\n";
|
||||
&tab_end;
|
||||
}
|
||||
if (!$_[4]) {
|
||||
local $mi = $module_index_link ||
|
||||
$module_name ? "/$module_name/" : "/";
|
||||
&tab_start; print "<a href=\"$gconfig{'webprefix'}$mi\">",
|
||||
&tab_start; print "<a href=\"@{[&get_webprefix()]}$mi\">",
|
||||
"$text{'header_module'}</a>"; &tab_end;
|
||||
}
|
||||
if (ref($_[2]) eq "ARRAY" && !$ENV{'ANONYMOUS_USER'}) {
|
||||
|
@ -72,7 +72,7 @@ if ($in{'dest'}) {
|
||||
&nice_size($st[7])),"<p>\n";
|
||||
|
||||
&ui_print_footer(
|
||||
"$gconfig{'webprefix'}/$module_name/edit_dbase.cgi?db=$in{'db'}",
|
||||
"@{[&get_webprefix()]}/$module_name/edit_dbase.cgi?db=$in{'db'}",
|
||||
$text{'dbase_return'},
|
||||
&get_databases_return_link($in{'db'}), $text{'index_return'});
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ foreach $p ( [ $config{'mysqladmin'}, 'index_eadmin', 'index_mysqladmin' ],
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
|
||||
&help_search_link("mysql", "man", "doc", "google"));
|
||||
print &text($p->[1], "<tt>$p->[0]</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link(
|
||||
|
@ -168,7 +168,7 @@ return &theme_interfaces_chooser_button(@_)
|
||||
if (defined(&theme_interfaces_chooser_button));
|
||||
local $form = @_ > 2 ? $_[2] : 0;
|
||||
local $w = $_[1] ? 500 : 300;
|
||||
return "<input type=button onClick='ifield = document.forms[$form].$_[0]; chooser = window.open(\"$gconfig{'webprefix'}/net/interface_chooser.cgi?multi=$_[1]&interface=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=200\"); chooser.ifield = ifield' value=\"...\">\n";
|
||||
return "<input type=button onClick='ifield = document.forms[$form].$_[0]; chooser = window.open(\"@{[&get_webprefix()]}/net/interface_chooser.cgi?multi=$_[1]&interface=\"+escape(ifield.value), \"chooser\", \"toolbar=no,menubar=no,scrollbars=yes,width=$w,height=200\"); chooser.ifield = ifield' value=\"...\">\n";
|
||||
}
|
||||
|
||||
# prefix_to_mask(prefix)
|
||||
|
@ -62,7 +62,7 @@ push(@leftmenu, &list_modules_webmin_menu());
|
||||
# Show module/help search form
|
||||
if ($gaccess{'webminsearch'}) {
|
||||
push(@leftmenu, { 'type' => 'input',
|
||||
'cgi' => $gconfig{'webprefix'}.'/webmin_search.cgi',
|
||||
'cgi' => &get_webprefix().'/webmin_search.cgi',
|
||||
'name' => 'search',
|
||||
'desc' => $text{'left_search'},
|
||||
'size' => 15 });
|
||||
@ -227,6 +227,6 @@ foreach my $item (@$items) {
|
||||
sub add_webprefix
|
||||
{
|
||||
my ($link) = @_;
|
||||
return $link =~ /^\// ? $gconfig{'webprefix'}.$link : $link;
|
||||
return $link =~ /^\// ? &get_webprefix().$link : $link;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ my @links = grep { $_->{'type'} eq 'link' } @info;
|
||||
if (@links) {
|
||||
my @linkshtml = map {
|
||||
my $lnk = $_->{'link'};
|
||||
$lnk = $gconfig{'webprefix'}.$lnk if ($lnk =~ /^\//);
|
||||
$lnk = &get_webprefix().$lnk if ($lnk =~ /^\//);
|
||||
&ui_link($lnk, $_->{'desc'}, undef,
|
||||
$_->{'target'} eq 'new' ? 'target=_blank' :
|
||||
$_->{'target'} eq 'window' ? 'target=_top' : '')
|
||||
|
@ -101,18 +101,18 @@ sub theme_prebody
|
||||
my $module_name = &get_module_name();
|
||||
if ($script_name =~ /session_login.cgi/) {
|
||||
# Generate CSS link
|
||||
print "<link rel='stylesheet' type='text/css' href='$gconfig{'webprefix'}/unauthenticated/style.css'>\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='@{[&get_webprefix()]}/unauthenticated/style.css'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub theme_prehead
|
||||
{
|
||||
print "<link rel='stylesheet' type='text/css' href='$gconfig{'webprefix'}/unauthenticated/style.css' />\n";
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/toggleview.js'></script>\n";
|
||||
print "<link rel='stylesheet' type='text/css' href='@{[&get_webprefix()]}/unauthenticated/style.css' />\n";
|
||||
print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/toggleview.js'></script>\n";
|
||||
print "<script>\n";
|
||||
print "var rowsel = new Array();\n";
|
||||
print "</script>\n";
|
||||
print "<script type='text/javascript' src='$gconfig{'webprefix'}/unauthenticated/sorttable.js'></script>\n";
|
||||
print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/sorttable.js'></script>\n";
|
||||
}
|
||||
|
||||
sub theme_popup_prehead
|
||||
@ -209,7 +209,7 @@ $rv .= "document.${name}_tabtitles = $tabtitles;\n";
|
||||
$rv .= "</script>\n";
|
||||
|
||||
# Output the tabs
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "@{[&get_webprefix()]}/images";
|
||||
$rv .= &ui_hidden($name, $sel)."\n";
|
||||
$rv .= "<table border=0 cellpadding=0 cellspacing=0 class='ui_tabs'>\n";
|
||||
$rv .= "<tr><td bgcolor=#ffffff colspan=".(scalar(@$tabs)*2+1).">";
|
||||
@ -407,7 +407,7 @@ $rv .= "<table class='ui_table' $tabletags>\n";
|
||||
if (defined($heading) || defined($rightheading)) {
|
||||
$rv .= "<thead><tr class='ui_table_head'>";
|
||||
if (defined($heading)) {
|
||||
$rv .= "<td><a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='$gconfig{'webprefix'}/images/$defimg'></a> <a href=\"javascript:hidden_opener('$divid', '$openerid')\"><b><font color=#ffffff>$heading</font></b></a></td>";
|
||||
$rv .= "<td><a href=\"javascript:hidden_opener('$divid', '$openerid')\" id='$openerid'><img border=0 src='@{[&get_webprefix()]}/images/$defimg'></a> <a href=\"javascript:hidden_opener('$divid', '$openerid')\"><b><font color=#ffffff>$heading</font></b></a></td>";
|
||||
}
|
||||
if (defined($rightheading)) {
|
||||
$rv .= "<td align=right>$rightheading</td>";
|
||||
@ -544,11 +544,11 @@ my ($direction, $url, $disabled) = @_;
|
||||
my $alt = $direction eq "left" ? '<-' : '->';
|
||||
if ($disabled) {
|
||||
return "<img alt=\"$alt\" align=\"middle\""
|
||||
. "src=\"$gconfig{'webprefix'}/images/$direction-grey.gif\">\n";
|
||||
. "src=\"@{[&get_webprefix()]}/images/$direction-grey.gif\">\n";
|
||||
}
|
||||
else {
|
||||
return "<a href=\"$url\"><img alt=\"$alt\" align=\"top\""
|
||||
. "src=\"$gconfig{'webprefix'}/images/$direction.gif\"></a>\n";
|
||||
. "src=\"@{[&get_webprefix()]}/images/$direction.gif\"></a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -572,7 +572,7 @@ for($i=0; $i+1<@_; $i+=2) {
|
||||
elsif ($url =~ /^\?/ && $module_name) {
|
||||
$url = "/$module_name/$url";
|
||||
}
|
||||
$url = "$gconfig{'webprefix'}$url" if ($url =~ /^\//);
|
||||
$url = "@{[&get_webprefix()]}$url" if ($url =~ /^\//);
|
||||
if ($count++ == 0) {
|
||||
print theme_ui_nav_link("left", $url);
|
||||
}
|
||||
@ -593,7 +593,7 @@ if (!$_[$i]) {
|
||||
sub theme_ui_hidden_javascript
|
||||
{
|
||||
my $rv;
|
||||
my $imgdir = "$gconfig{'webprefix'}/images";
|
||||
my $imgdir = "@{[&get_webprefix()]}/images";
|
||||
|
||||
return <<EOF;
|
||||
<style>
|
||||
|
@ -18,7 +18,7 @@ if (!-x $config{'slpd'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "english", 1, 1, 0,
|
||||
&help_search_link("openslp", "man", "doc", "google"));
|
||||
print &text('index_eslpd', "<tt>$config{'slpd'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -33,7 +33,7 @@ $out =~ /version:\s+(\S+)/i;
|
||||
# Check if the config file exists
|
||||
if (!-r $config{'slpd_conf'}) {
|
||||
print &text('index_econf', "<tt>$config{'slpd_conf'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ if (@_ > 1) {
|
||||
# Module index link
|
||||
local $idx = $module_info{'index_link'};
|
||||
local $mi = $module_index_link || "/$module_name/$idx";
|
||||
push(@right, "<a href=\"$gconfig{'webprefix'}$mi\">".
|
||||
push(@right, "<a href=\"@{[&get_webprefix()]}$mi\">".
|
||||
"$text{'header_module'}</a>");
|
||||
}
|
||||
if (ref($_[2]) eq "ARRAY" && !$ENV{'ANONYMOUS_USER'}) {
|
||||
@ -110,7 +110,7 @@ if (@_ > 1) {
|
||||
if (!$access{'noconfig'} && !$config{'noprefs'}) {
|
||||
local $cprog = $user_module_config_directory ?
|
||||
"uconfig.cgi" : "config.cgi";
|
||||
push(@right, "<a href=\"$gconfig{'webprefix'}/$cprog?$module_name\">$text{'header_config'}</a>");
|
||||
push(@right, "<a href=\"@{[&get_webprefix()]}/$cprog?$module_name\">$text{'header_config'}</a>");
|
||||
}
|
||||
}
|
||||
push(@right, split(/<br>/, $_[6]));
|
||||
|
@ -159,7 +159,7 @@ else {
|
||||
if (!$reboot_before && &check_reboot_required(1) &&
|
||||
&foreign_check("init")) {
|
||||
print &ui_form_start(
|
||||
"$gconfig{'webprefix'}/init/reboot.cgi");
|
||||
"@{[&get_webprefix()]}/init/reboot.cgi");
|
||||
print &ui_hidden("confirm", 1);
|
||||
print "<b>",$text{'update_rebootdesc'},"</b><p>\n";
|
||||
print &ui_form_end(
|
||||
|
@ -9,7 +9,7 @@ require './pam-lib.pl';
|
||||
@pams = sort { $a->{'name'} cmp $b->{'name'} } &get_pam_config();
|
||||
if (!@pams) {
|
||||
print "<p>",&text('index_none', "<tt>$config{'pam_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ elsif ($in{'timed_out'}) {
|
||||
|
||||
print "$text{'pam_prefix'}\n";
|
||||
|
||||
print &ui_form_start("$gconfig{'webprefix'}/pam_login.cgi", "post");
|
||||
print &ui_form_start("@{[&get_webprefix()]}/pam_login.cgi", "post");
|
||||
print &ui_hidden("cid", $in{'cid'});
|
||||
|
||||
print &ui_table_start($text{'pam_header'},
|
||||
|
@ -40,7 +40,7 @@ if (!$in{'file'}) {
|
||||
if (!-r $config{'login_config'}) {
|
||||
print "<p>",&text('options_elogin',
|
||||
"<tt>$config{'login_config'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ $access{'dialin'} || &error($text{'dialin_ecannot'});
|
||||
# Check for the mgetty login config file
|
||||
if (!-r $config{'login_config'}) {
|
||||
print "<p>",&text('dialin_efile', "<tt>$config{'dialin_config'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ else {
|
||||
|
||||
# Start of the form
|
||||
print "$text{'password_prefix'}\n";
|
||||
print &ui_form_start("$gconfig{'webprefix'}/password_change.cgi", "post");
|
||||
print &ui_form_start("@{[&get_webprefix()]}/password_change.cgi", "post");
|
||||
print &ui_hidden("user", $in{'user'});
|
||||
print &ui_hidden("pam", $in{'pam'});
|
||||
print &ui_hidden("expired", $in{'expired'});
|
||||
|
@ -956,7 +956,7 @@ sub generate_map_edit
|
||||
elsif ($config{'max_maps'} && @{$mappings} > $config{'max_maps'} &&
|
||||
!$in{'search'}) {
|
||||
# If there are too many, show a search form
|
||||
print &ui_form_start($gconfig{'webprefix'}.$ENV{'SCRIPT_NAME'});
|
||||
print &ui_form_start(&get_webprefix().$ENV{'SCRIPT_NAME'});
|
||||
foreach my $i (keys %in) {
|
||||
next if ($i eq 'search');
|
||||
print &ui_hidden($i, $in{$i});
|
||||
|
@ -10,7 +10,7 @@ if (!-x $config{'psql'} || -d $config{'psql'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
|
||||
&help_search_link("postgresql", "man", "doc", "google"));
|
||||
print &text('index_esql', "<tt>$config{'psql'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link(
|
||||
@ -49,7 +49,7 @@ if (!$hba_conf_file && &is_postgresql_local()) {
|
||||
else {
|
||||
# Config file wasn't found
|
||||
print &text('index_ehba', "<tt>$hba_conf_file</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
@ -117,7 +117,7 @@ elsif ($r == -2) {
|
||||
# Looks like a shared library problem
|
||||
&main_header(1);
|
||||
print &text('index_elibrary', "<tt>$config{'psql'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
print &text('index_ldpath', "<tt>$ENV{$gconfig{'ld_env'}}</tt>",
|
||||
"<tt>$config{'psql'}</tt>"),"<br>\n";
|
||||
print "<pre>",&html_escape($out),"</pre>\n";
|
||||
@ -128,7 +128,7 @@ else {
|
||||
$postgresql_version = &get_postgresql_version();
|
||||
if (!$postgresql_version) {
|
||||
&main_header(1);
|
||||
print &text('index_superuser',"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
print &text('index_superuser',"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ if (!&has_command($config{'wvdial'}) ||
|
||||
/WvDial\s+([^: \n\r]+)/i) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print "<p>",&text('index_ewvdial', "<tt>$config{'wvdial'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
if ($out) {
|
||||
print &text('index_ver', "$config{'wvdial'} --version"),"\n";
|
||||
print "<pre>$out</pre>\n";
|
||||
|
@ -18,7 +18,7 @@ if (!-r $config{'pptp_options'} && $config{'pptp_options'}) {
|
||||
if (!&has_command($config{'pptp'})) {
|
||||
# The PPTP command is not installed
|
||||
print "<p>",&text('index_epptp', "<tt>$config{'pptp'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
elsif (!$vers) {
|
||||
# The PPP daemon is not installed
|
||||
|
@ -9,7 +9,7 @@ if (!&has_command($config{'pptpd'}) ||
|
||||
!($vers = &get_pptpd_version(\$out))) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1);
|
||||
print "<p>",&text('index_epptpd', "<tt>$config{'pptpd'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
if ($out) {
|
||||
print &text('index_ver', "$config{'pptpd'} -v"),"\n";
|
||||
print "<pre>$out</pre>\n";
|
||||
@ -24,7 +24,7 @@ else {
|
||||
if (!-r $config{'file'}) {
|
||||
# Check for the config file
|
||||
print "<p>",&text('index_econfig', "<tt>$config{'file'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
elsif (!&has_command("pppd")) {
|
||||
# Check for PPPd
|
||||
|
@ -8,7 +8,7 @@ $access{'secrets'} || &error($text{'secrets_ecannot'});
|
||||
|
||||
if (!-r $config{'pap_file'}) {
|
||||
print "<p>", &text('secrets_enopfile', $config{'pap_file'},
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'secrets_return'});
|
||||
exit;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ if (!@st) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("proftpd", "man", "doc", "google"));
|
||||
print &text('index_eproftpd', "<tt>$config{'proftpd_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link("proftpd",$text{'index_proftpd'},
|
||||
@ -27,7 +27,7 @@ if (!@$conf) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("proftpd", "man", "doc", "google"));
|
||||
print &text('index_econf', "<tt>$config{'proftpd_conf'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -42,7 +42,7 @@ if ($site{'size'} != $st[7]) {
|
||||
&help_search_link("proftpd", "man", "doc", "google"));
|
||||
print &text('index_eproftpd2',
|
||||
"<tt>$config{'proftpd_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name",
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name",
|
||||
"<tt>$config{'proftpd_path'} -v</tt>",
|
||||
"<pre>$out</pre>"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
@ -54,7 +54,7 @@ if ($site{'size'} != $st[7]) {
|
||||
&help_search_link("proftpd", "man", "doc", "google"));
|
||||
print &text('index_eversion',
|
||||
"<tt>$config{'proftpd_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ require './pserver-lib.pl';
|
||||
if (!$cvs_path) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print "<p>",&text('index_ecvs', "<tt>$config{'cvs'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
@ -36,7 +36,7 @@ if (@avfeatures == 1 && !$access{'setup'}) {
|
||||
if (!-d "$config{'cvsroot'}/CVSROOT") {
|
||||
# No CVS root .. offer to setup
|
||||
print "<p>",&text('index_eroot',
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
if ($access{'init'}) {
|
||||
print &text('index_initdesc',
|
||||
|
@ -10,13 +10,13 @@ require './qmail-lib.pl';
|
||||
# Check if qmail is installed
|
||||
if (!-d $config{'qmail_dir'}) {
|
||||
print &text('index_edir', "<tt>$config{'qmail_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
if (!-d $qmail_alias_dir || !-d $qmail_bin_dir) {
|
||||
print &text('index_edir2', "<tt>$config{'qmail_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ require './samba-lib.pl';
|
||||
if (!-x $config{'samba_server'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("samba", "man", "doc", "google"));
|
||||
print &text('error_nosamba', $config{'samba_server'}, "$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
print &text('error_nosamba', $config{'samba_server'}, "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link("samba", $text{'index_samba'},
|
||||
@ -31,7 +31,7 @@ else {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1, 0,
|
||||
&help_search_link("samba", "man", "doc", "google"));
|
||||
print &text('error_version', $config{'samba_server'},
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
print "<pre>$out</pre>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
@ -47,7 +47,7 @@ if (!@empty && (-r $config{alt_smb_conf})) {
|
||||
system("cp $config{alt_smb_conf} $config{smb_conf} >/dev/null 2>&1");
|
||||
}
|
||||
if (!(-r $config{smb_conf})) {
|
||||
print &text('error_config', $config{'smb_conf'}, "$gconfig{'webprefix'}/config.cgi?$module_name");
|
||||
print &text('error_config', $config{'smb_conf'}, "@{[&get_webprefix()]}/config.cgi?$module_name");
|
||||
print "<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
|
@ -79,7 +79,7 @@ if ($ENV{'PATH_INFO'} =~ /\.(gif|jpg|jpeg|png)$/i) {
|
||||
}
|
||||
else {
|
||||
# An HTML page .. fix up links
|
||||
$url = "$gconfig{'webprefix'}/$module_name/swat.cgi";
|
||||
$url = "@{[&get_webprefix()]}/$module_name/swat.cgi";
|
||||
while(<OUTr>) {
|
||||
s/src="(\/[^"]*)"/src="$url$1"/gi;
|
||||
s/href="(\/[^"]*)"/href="$url$1"/gi;
|
||||
|
@ -20,7 +20,7 @@ else {
|
||||
&ui_print_header(undef, $text{'viewu_index'}, "");
|
||||
|
||||
if (!&has_command($config{samba_status_program})) {
|
||||
print &text('viewu_ecmd', $config{'samba_status_program'}, "$gconfig{'webprefix'}/config.cgi?$module_name");
|
||||
print &text('viewu_ecmd', $config{'samba_status_program'}, "@{[&get_webprefix()]}/config.cgi?$module_name");
|
||||
print "<p>\n";
|
||||
&ui_print_footer("", $text{'index_sharelist'});
|
||||
exit;
|
||||
|
@ -10,7 +10,7 @@ if (!-x $config{'sendmail_path'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
|
||||
&help_search_link("sendmail", "man", "doc", "google"));
|
||||
print &text('index_epath', "<tt>$config{'sendmail_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link(
|
||||
@ -30,7 +30,7 @@ if (!-s $config{'sendmail_cf'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
|
||||
&help_search_link("sendmail", "man", "doc", "google"));
|
||||
print &text('index_econfig', "<tt>$config{'sendmail_cf'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
$lnk = &software::missing_install_link(
|
||||
|
@ -20,7 +20,7 @@ if (!$adbm) {
|
||||
if (!-r $afile) {
|
||||
# Text file not found
|
||||
print "<b>",&text('access_efile', "<tt>$afile</tt>",
|
||||
"<tt>$adbm</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
"<tt>$adbm</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
print "<b>",&text('virtusers_createfile',
|
||||
'create_file.cgi?mode=access'),"</b><p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
@ -19,7 +19,7 @@ if (!$ddbm) {
|
||||
if (!-r $dfile) {
|
||||
# Text file not found
|
||||
print "<b>",&text('domains_efile', "<tt>$dfile</tt>",
|
||||
"<tt>$ddbm</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
"<tt>$ddbm</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
print "<b>",&text('virtusers_createfile',
|
||||
'create_file.cgi?mode=domains'),"</b><p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
@ -75,14 +75,14 @@ else {
|
||||
# Features file is not setup yet ..
|
||||
if (!$config{'sendmail_mc'} || !$config{'sendmail_features'}) {
|
||||
print "<p>",&text('features_econfig',
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
elsif (!-r $config{'sendmail_mc'}) {
|
||||
print "<p>",&text('features_emc', "$gconfig{'webprefix'}/config.cgi?$module_name",
|
||||
print "<p>",&text('features_emc', "@{[&get_webprefix()]}/config.cgi?$module_name",
|
||||
"<tt>$config{'sendmail_mc'}</tt>"),"<p>\n";
|
||||
}
|
||||
elsif (!-r "$config{'sendmail_features'}/feature") {
|
||||
print "<p>",&text('features_efeatures', "$gconfig{'webprefix'}/config.cgi?$module_name",
|
||||
print "<p>",&text('features_efeatures', "@{[&get_webprefix()]}/config.cgi?$module_name",
|
||||
"<tt>$config{'sendmail_features'}</tt>"),"<p>\n";
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ if (!$gdbm) {
|
||||
if (!-r $gfile) {
|
||||
# Text file not found
|
||||
print "<b>",&text('generics_efile', "<tt>$gfile</tt>",
|
||||
"<tt>$gdbm</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
"<tt>$gdbm</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
print "<b>",&text('virtusers_createfile',
|
||||
'create_file.cgi?mode=generics'),"</b><p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
@ -20,7 +20,7 @@ if (!$mdbm) {
|
||||
if (!-r $mfile) {
|
||||
# Text file not found
|
||||
print "<b>",&text('mailers_efile', "<tt>$mfile</tt>",
|
||||
"<tt>$mdbm</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
"<tt>$mdbm</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"</b> <p>\n";
|
||||
print "<b>",&text('virtusers_createfile',
|
||||
'create_file.cgi?mode=mailers'),"</b><p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
@ -20,7 +20,7 @@ if (!$vdbm) {
|
||||
if (!-r $vfile) {
|
||||
# Text file not found
|
||||
print "<b>",&text('virtusers_efile', "<tt>$vfile</tt>",
|
||||
"<tt>$vdbm</tt>", "$gconfig{'webprefix'}/config.cgi?$module_name"),"</b><p>\n";
|
||||
"<tt>$vdbm</tt>", "@{[&get_webprefix()]}/config.cgi?$module_name"),"</b><p>\n";
|
||||
print "<b>",&text('virtusers_createfile',
|
||||
'create_file.cgi?mode=virtusers'),"</b><p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
@ -9,7 +9,7 @@ require './sentry-lib.pl';
|
||||
if (!-r $config{'hostsentry'}) {
|
||||
print "<p>",&text('hostsentry_ecommand',
|
||||
"<tt>$config{'hostsentry'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ if (!-x $config{'logcheck'}) {
|
||||
&ui_print_header(undef, $text{'logcheck_title'}, "");
|
||||
print "<p>",&text('logcheck_ecommand',
|
||||
"<tt>$config{'logcheck'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ if (!$path) {
|
||||
&ui_print_header(undef, $text{'portsentry_title'}, "");
|
||||
print "<p>",&text('portsentry_ecommand',
|
||||
"<tt>$config{'portsentry'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
@ -27,7 +27,7 @@ if ($st[7] != $portsentry{'size'} || $st[9] != $portsentry{'mtime'}) {
|
||||
&ui_print_header(undef, $text{'portsentry_title'}, "");
|
||||
print "<p>",&text('portsentry_eversion',
|
||||
"<tt>$config{'portsentry'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ if (!&has_command($config{'portsentry'}) &&
|
||||
"<tt>$config{'portsentry'}</tt>",
|
||||
"<tt>$config{'hostsentry'}</tt>",
|
||||
"<tt>$config{'logcheck'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# Show icons
|
||||
|
@ -25,7 +25,7 @@ elsif (@ARGV) {
|
||||
my $s = &get_server($id);
|
||||
&can_use_server($s) || &error($text{'link_ecannot'});
|
||||
$access{'links'} || &error($text{'link_ecannot'});
|
||||
my $url = "$gconfig{'webprefix'}/$module_name/link.cgi/$s->{'id'}";
|
||||
my $url = "@{[&get_webprefix()]}/$module_name/link.cgi/$s->{'id'}";
|
||||
$| = 1;
|
||||
my $meth = $ENV{'REQUEST_METHOD'};
|
||||
my %miniserv;
|
||||
@ -45,7 +45,7 @@ if ($s->{'autouser'}) {
|
||||
print &text('login_desc', "<tt>$s->{'host'}</tt>"),"<p>\n";
|
||||
|
||||
print &ui_form_start(
|
||||
"$gconfig{'webprefix'}/$module_name/login.cgi", "post");
|
||||
"@{[&get_webprefix()]}/$module_name/login.cgi", "post");
|
||||
print &ui_hidden("id", $id);
|
||||
|
||||
print &ui_table_start($text{'login_header'}, undef, 2);
|
||||
@ -106,12 +106,12 @@ my $http_prot = $ENV{'HTTPS'} eq "ON" ? "https" : "http";
|
||||
&write_http_connection($con, sprintf(
|
||||
"Webmin-servers: %s://%s:%d%s/%s\n",
|
||||
$http_prot, $http_host, $http_port,
|
||||
$gconfig{'webprefix'},
|
||||
@{[&get_webprefix()]},
|
||||
$tconfig{'inframe'} ? "" : "$module_name/"));
|
||||
&write_http_connection($con, sprintf(
|
||||
"Webmin-path: %s://%s:%d%s/%s/link.cgi%s\n",
|
||||
$http_prot, $http_host, $http_port,
|
||||
$gconfig{'webprefix'}, $module_name,
|
||||
@{[&get_webprefix()]}, $module_name,
|
||||
$ENV{'PATH_INFO'}));
|
||||
if ($ENV{'HTTP_WEBMIN_PATH'}) {
|
||||
&write_http_connection($con, sprintf(
|
||||
@ -122,7 +122,7 @@ else {
|
||||
&write_http_connection($con, sprintf(
|
||||
"Complete-webmin-path: %s://%s:%d%s/%s/link.cgi%s\n",
|
||||
$http_prot, $http_host, $http_port,
|
||||
$gconfig{'webprefix'}, $module_name,
|
||||
@{[&get_webprefix()]}, $module_name,
|
||||
$ENV{'PATH_INFO'}));
|
||||
}
|
||||
my $cl = $ENV{'CONTENT_LENGTH'};
|
||||
@ -171,7 +171,7 @@ elsif ($header{'www-authenticate'}) {
|
||||
if ($s->{'autouser'}) {
|
||||
print "Set-Cookie: $id=; path=/\n";
|
||||
&error(&text('link_eautologin', $s->{'host'},
|
||||
"$gconfig{'webprefix'}/$module_name/link.cgi/$id/"));
|
||||
"@{[&get_webprefix()]}/$module_name/link.cgi/$id/"));
|
||||
}
|
||||
else {
|
||||
&error(&text('link_elogin', $s->{'host'}, $user));
|
||||
|
@ -64,7 +64,7 @@ elsif ($in{'timed_out'}) {
|
||||
}
|
||||
print "$text{'session_prefix'}\n";
|
||||
|
||||
print &ui_form_start("$gconfig{'webprefix'}/session_login.cgi", "post");
|
||||
print &ui_form_start("@{[&get_webprefix()]}/session_login.cgi", "post");
|
||||
print &ui_hidden("page", $in{'page'});
|
||||
print &ui_table_start($text{'session_header'},
|
||||
"width=40% class='loginform'", 2);
|
||||
|
@ -7,7 +7,7 @@ require './shorewall-lib.pl';
|
||||
if (!&has_command($config{'shorewall'})) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print "<p>",&text('index_ecmd', "<tt>$config{'shorewall'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# Get the version
|
||||
@ -24,7 +24,7 @@ else {
|
||||
# Config dir not found!
|
||||
print "<p>",&text('index_edir',
|
||||
"<tt>$config{'config_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# Just show the file icons
|
||||
|
@ -7,7 +7,7 @@ require './shorewall6-lib.pl';
|
||||
if (!&has_command($config{'shorewall6'})) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
print "<p>",&text('index_ecmd', "<tt>$config{'shorewall6'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# Get the version
|
||||
@ -24,7 +24,7 @@ else {
|
||||
# Config dir not found!
|
||||
print "<p>",&text('index_edir',
|
||||
"<tt>$config{'config_dir'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
}
|
||||
else {
|
||||
# Just show the file icons
|
||||
|
@ -49,9 +49,9 @@ if ($in{'frame'} == 0) {
|
||||
|
||||
print "<frameset rows='*,50'>\n";
|
||||
print "<frame marginwidth=10 marginheight=10 name=topframe ",
|
||||
"src=\"$gconfig{'webprefix'}/svc_chooser.cgi?frame=1&fmri=$fmri&add=$add&type=$type\">\n";
|
||||
"src=\"@{[&get_webprefix()]}/svc_chooser.cgi?frame=1&fmri=$fmri&add=$add&type=$type\">\n";
|
||||
print "<frame marginwidth=10 marginheight=10 name=bottomframe ",
|
||||
"src=\"$gconfig{'webprefix'}/svc_chooser.cgi?frame=2&add=$add&fmri=$fmri&type=$type\" ",
|
||||
"src=\"@{[&get_webprefix()]}/svc_chooser.cgi?frame=2&add=$add&fmri=$fmri&type=$type\" ",
|
||||
"scrolling=no>\n";
|
||||
print "</frameset>\n";
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ local $pkg = &update_system_resolve($name);
|
||||
return undef if (!$pkg);
|
||||
local ($cpkg) = caller();
|
||||
local $caller = eval '$'.$cpkg.'::module_name';
|
||||
return &ui_form_start("$gconfig{'webprefix'}/$module_name/install_pack.cgi", "get").
|
||||
return &ui_form_start("@{[&get_webprefix()]}/$module_name/install_pack.cgi", "get").
|
||||
&text('missing_msg', $desc, $text{$update_system."_name"})."\n".
|
||||
&ui_hidden("source", 3).
|
||||
&ui_hidden("update", $pkg).
|
||||
|
@ -20,7 +20,7 @@ if (!&has_command($config{'spamassassin'}) ||
|
||||
}
|
||||
else {
|
||||
print &text('index_ecmd', "<tt>$config{'spamassassin'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
|
||||
# Offer to install package
|
||||
&foreign_require("software", "software-lib.pl");
|
||||
|
@ -12,7 +12,7 @@ $access{'calamaris'} || &error($text{'calamaris_ecannot'});
|
||||
# is calamaris installed?
|
||||
if (!&has_command($config{'calamaris'})) {
|
||||
print &text('calamaris_eprog', "<tt>$config{'calamaris'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
@ -57,7 +57,7 @@ while(my $f = readdir($fh)) {
|
||||
closedir($fh);
|
||||
if (!@files) {
|
||||
print &text('calamaris_elogs', "<tt>$ld</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
exit;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ require './sshd-lib.pl';
|
||||
if (!-r $config{'sshd_config'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1);
|
||||
print &text('index_econfig', "<tt>$config{'sshd_config'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{"index"});
|
||||
exit;
|
||||
}
|
||||
@ -17,7 +17,7 @@ if (!-r $config{'sshd_config'}) {
|
||||
if (!&has_command($config{'sshd_path'})) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1);
|
||||
print &text('index_esshd', "<tt>$config{'sshd_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{"index"});
|
||||
exit;
|
||||
}
|
||||
@ -28,7 +28,7 @@ if (!%version) {
|
||||
# Unknown version
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1);
|
||||
print &text('index_eversion', "<tt>$config{'sshd_path'}</tt>",
|
||||
"$gconfig{'webprefix'}/config.cgi?$module_name",
|
||||
"@{[&get_webprefix()]}/config.cgi?$module_name",
|
||||
"<tt>$config{'sshd_path'} -h</tt>",
|
||||
"<pre>$out</pre>"),"<p>\n";
|
||||
&ui_print_footer("/", $text{"index"});
|
||||
|
@ -637,7 +637,7 @@ if ($first && $first->{'time'} < $cutoff-(24*60*60)) {
|
||||
sub get_status_icon
|
||||
{
|
||||
my ($up) = @_;
|
||||
return $gconfig{'webprefix'}.
|
||||
return &get_webprefix().
|
||||
"/".$module_name."/images/".($up == 1 ? "up.gif" :
|
||||
$up == -1 ? "not.gif" :
|
||||
$up == -2 ? "webmin.gif" :
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user