![]() |
![]() |
6 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!C:/Perl/bin/perl.exe
use strict;
use HTML::Template;
use CGI;
my $cgi = new CGI;
my $the_file = $cgi->param('param1');
my @reportdata = ();
my $id=0;
my $template = HTML::Template->new(filename => '..\\htdocs\\dropui\\showfile.tmpl');
if (open(THE_FILE, "$the_file"))
{
while (<THE_FILE>)
{
my %row_data; # get a fresh hash for the row data
my %test_row;
# fill in this row
@fields = split(/\*\*/,$_);
if ($id == 0){
$test_row{FID} = $id++;
$test_row{FTYPE} = shift @fields;
$test_row{FHEADER} = shift @fields;
$test_row{FLINK} = shift @fields;
$test_row{FSYSTEM} = shift @fields;
$test_row{FBLA} = shift @fields;
}
else{
$row_data{ID} = $id++;
$row_data{TYPE} = shift @fields;
$row_data{HEADER} = shift @fields;
$row_data{LINK} = shift @fields;
$row_data{SYSTEM} = shift @fields;
$row_data{BLA} = shift @fields;
}
push(@reportdata, \%row_data, \%test_row);
}
close(THE_FILE);
}
# finally, assign the loop data to the loop param, again with a
# reference:
$template->param(THIS_LOOP => \@reportdata);
# send the obligatory Content-Type
print "Content-Type: text/html\n\n";
# print the template
print $template->output;
exit(0);
Quote<TABLE BORDER=1 width="100%">
<TMPL_LOOP NAME="THIS_LOOP">
<tr>
<TD><b><TMPL_VAR NAME="FID"></b></TD>
<TD><b><TMPL_VAR NAME="FTYPE"></b></TD>
<TD><b><TMPL_VAR NAME="FHEADER"></b></TD>
<TD><b><TMPL_VAR NAME="FLINK"></b></TD>
<TD><b><TMPL_VAR NAME="FSYSTEM"></b></TD>
<TD><b><TMPL_VAR NAME="FBLA"></b></TD>
</tr>
<tr>
<TD><TMPL_VAR NAME="ID"></TD>
<TD><TMPL_VAR NAME="TYPE"></TD>
<TD><TMPL_VAR NAME="HEADER"></TD>
<TD><TMPL_VAR NAME="LINK"></TD>
<TD><TMPL_VAR NAME="SYSTEM"></TD>
<TD><TMPL_VAR NAME="BLA"></TD>
</tr>
</TMPL_LOOP>
</TABLE>
1
2
3
4
5
6
<td>
<a href="\cgi-bin\editfile.cgi?param=<TMPL_VAR NAME="THIS_LOOP">">
<img src="../dropui/images/icons/edit.gif" alt="" border="0">
edit config file
</a>
</td>
1
2
3
4
5
6
<a href="\cgi-bin\editfile.cgi?<TMPL_LOOP NAME="THIS_LOOP">
fid=<TMPL_VAR NAME="FID">;ftype=<TMPL_VAR NAME="FTYPE">...
</TMPL_LOOP>">
<img src="../dropui/images/icons/edit.gif" alt="" border="0">
edit config file
</a>
1
2
3
4
5
6
<a href="\cgi-bin\editfile.cgi?<TMPL_LOOP NAME="THIS_LOOP">
fid=<TMPL_VAR NAME="FID">;ftype=<TMPL_VAR NAME="FTYPE">...
</TMPL_LOOP>">
<img src="../dropui/images/icons/edit.gif" alt="" border="0">
edit config file
</a>
![]() |
![]() |
6 Einträge, 1 Seite |