169 |
} |
} |
170 |
} # regenerate_htpasswd_and_htgroup |
} # regenerate_htpasswd_and_htgroup |
171 |
|
|
172 |
sub print_error ($$) { |
sub print_error ($$;$) { |
173 |
my ($code, $text) = @_; |
my ($code, $text, $text_arg) = @_; |
174 |
|
our $Lang; |
175 |
binmode STDOUT, ':encoding(utf-8)'; |
binmode STDOUT, ':encoding(utf-8)'; |
176 |
print qq[Status: $code $text |
my $_text = $text; |
177 |
|
$_text =~ s/%s/$text_arg/g; |
178 |
|
print qq[Status: $code $_text |
179 |
Content-Type: text/html; charset=utf-8 |
Content-Type: text/html; charset=utf-8 |
180 |
|
|
181 |
<!DOCTYPE HTML> |
<!DOCTYPE HTML> |
182 |
<html lang=en> |
<html lang="$Lang"> |
183 |
<title>$code @{[htescape ($text)]}</title> |
<title lang=en>$code @{[htescape ($_text)]}</title> |
184 |
<link rel=stylesheet href="/www/style/html/xhtml"> |
<link rel=stylesheet href="/www/style/html/xhtml"> |
185 |
<h1>Error</h1> |
<h1>]; |
186 |
<p>@{[htescape ($text)]}.<!--]; |
print_text ('Error'); |
187 |
|
print q[</h1><p>]; |
188 |
|
print_text ($text, sub { print '', htescape ($text_arg) }); |
189 |
|
print_text ('.'); |
190 |
|
print q[<!--]; |
191 |
print 0 for 0..511; # for WinIE |
print 0 for 0..511; # for WinIE |
192 |
print q[-->]; |
print q[-->]; |
193 |
} # print_error |
} # print_error |