5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
my $fehlernummer = $ENV{'QUERY_STRING'};
my $tmpl = parsen($fehlernummer);
my %var = (
referer => $ENV{'HTTP_REFERER'},
request => $ENV{'REQUEST_URI'},
appname => $ENV{'HTTP_USER_AGENT'},
ip => $ENV{'REMOTE_HOST'},
furahid => $cgi->cookie('furahiD')
);
$tmpl = variablen($tmpl,%var);
print $cgi->header;
print $tmpl;
exit();
sub parsen {
my $tmp;
open (TEMP, '<./template/'.$_[0].'.html');
$tmp = join("",<TEMP>);
close(TEMP);
return($tmp);
}
sub variablen {
my $tmp = $_[0];
my %hash = $_[1];
my ($k,$v);
while (($k, $v) = each(%hash)) {
$tmp =~ s/\<\*$k\*\>/$v/g;
}
return($tmp);
}
1 2 3 4 5 6 7 8 9 10
sub variablen { my ($tmp,%hash) = @_; my ($k,$v); while (($k, $v) = each(%hash)) { $tmp =~ s/\<\*$k\*\>/$v/g; } return($tmp); }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use HTML::Template::Compiled;
my $fehlernummer = $ENV{'QUERY_STRING'};
my $htc = HTML::Template::Compiled->new(
filename => "template/$fehlernummer.html",
tagstyle => [qw(-classic -comment)],
);
my %var = (
referer => $ENV{'HTTP_REFERER'},
request => $ENV{'REQUEST_URI'},
appname => $ENV{'HTTP_USER_AGENT'},
ip => $ENV{'REMOTE_HOST'},
furahid => $cgi->cookie('furahiD')
);
$htc->param(%var);
print $cgi->header;
print $htc->output;
exit();
1
2
3
4
5
Du kommst von: <%= referer %>
Du wolltest sehen: <%= request %>
Dein Browser: <%= appname %>
Deine IP: <%= ip %>
Deine furahiD: <%= furahid %>
5 Einträge, 1 Seite |