3 # Redirect to another URL
5 BEGIN { push(@INC, ".."); };
8 %access = &get_module_acl();
9 $url = $access{'link'} || $config{'link'};
10 $host = $ENV{'HTTP_HOST'};
12 $url =~ s/\$\{REMOTE_USER\}/$remote_user/g ||
13 $url =~ s/\$REMOTE_USER/$remote_user/g;
14 $url =~ s/\$\{HTTP_HOST\}/$host/g ||
15 $url =~ s/\$HTTP_HOST/$host/g;
16 if (($url =~ /\$VIRTUALSERVER_/ || $url =~ /\$\{VIRTUALSERVER_/) &&
17 &foreign_check("virtual-server")) {
18 &foreign_require("virtual-server", "virtual-server-lib.pl");
19 $dom = &virtual_server::get_domain_by("user", $remote_user,
22 foreach $k (keys %$dom) {
23 $uck = "VIRTUALSERVER_".uc($k);
24 $url =~ s/\$\{$uck\}/$dom->{$k}/g ||
25 $url =~ s/\$$uck/$dom->{$k}/g;
29 &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
30 &error($text{'index_evirtualmin'});
33 if ($url && $config{'immediate'}) {
38 &ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
40 $desc = $access{'desc'} || $config{'desc'} ||
42 $target = $config{'window'} ? "target=$module_name" : "";
43 print "<font size=+1><a href='$url' $target>$desc</a></font><p>\n";
46 print &text('index_econfig', "../config.cgi?$module_name"),"<p>\n";
48 &ui_print_footer("/", $text{'index'});