Leser: 1
|< 1 2 >| | 20 Einträge, 2 Seiten |
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
64
65
66
67
68
69
sub awardstart {
@awards = ();
}
sub awardrow($$$$) {
my ($award2, $level2, $when2, $first2) = @_;
my ($img2, $name2, $desc2);
my ($award1, $level1, $when1, $first1);
my ($img1, $name1, $desc1);
my $type;
if ($#awards == -1) {
push(@awards, $award2, $level2, $when2, $first2);
} else {
($award1, $level1, $when1, $first1) = @awards;
@awards = ();
$type = substr($award1, 0, 1);
if ($type eq "1") {
$img1 = "img/award_$award1" . "_$level1" . "_small.jpg";
$name1 = $awardname{$award1}[$level1];
$desc1 = $awarddesc{$award1}[$level1];
} elsif ($type eq "2") {
$img1 = "img/award_$award1" . "_small.jpg";
$name1 = "$level1 x $awardname{$award1}";
$desc1 = $awarddesc{$award1};
} else {
$img1 = "img/award_$award1" . "_small.jpg";
$name1 = $awardname{$award1};
$desc1 = $awarddesc{$award1};
}
$type = substr($award2, 0, 1);
if ($type eq "1") {
$img2 = "img/award_$award2" . "_$level2" . "_small.jpg";
$name2 = $awardname{$award2}[$level2];
$desc2 = $awarddesc{$award2}[$level2];
} elsif ($type eq "2") {
$img2 = "img/award_$award2" . "_small.jpg";
$name2 = "$level2 x $awardname{$award2}";
$desc2 = $awarddesc{$award2};
} else {
$img2 = "img/award_$award2" . "_small.jpg";
$name2 = $awardname{$award2};
$desc2 = $awarddesc{$award2};
}
$class = $rowclass[$tableline++ % 2];
print " <tr class=\"$class\">";
print "<td rowspan=\"2\"><img src=\"$img1\" alt=\"$name1\" /></td>";
print "<td>$name1</td>";
if ($award2 > 0) {
print "<td rowspan=\"2\"><img src=\"$img2\" alt=\"$name2\" /></td>";
} else {
print "<td rowspan=\"2\"> </td>";
}
print "<td>$name2</td></tr>\n";
print " <tr class=\"$class\">";
print "<td>$desc1</td>";
print "<td>$desc2</td></tr>\n";
}
}
sub awardend {
if ($#awards != -1) {
awardrow(0, 0, 0, 0);
}
}
1
2
3
4
5
6
7
8
9
divstart("awards");
tablestart(4, popuphelp($help_awards) . $lab_awards);
awardstart();
foreach $i (0..95) {
awardrow($p{"award"}[$i], $p{"level"}[$i], $p{"when"}[$i], $p{"first"}[$i])
}
awardend();
tableend();
divend();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
################################################################################
#
#
#
#
# AWARD TABLE NEW
#
$img2 = "img/award_$award2" . "_$level2" . "_small.jpg";
$name2 = $awardname{$award2}[$level2];
$desc2 = $awarddesc{$award2}[$level2];
print Content-type:"text/html\n\n";
my $tamplate = HTML::Template->new(filename->'./awardtmpl.tmpl');
my $AWARDTABLE = [{AWARD => '$img', NAME => '$name', DESC => '$desc'}]
$template->param(AWARDTABLE=$AWARDTABLE);
print $template->output();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<body>
<table width="200" border="1">
<!--TMPL_LOOP NAME=AWARDTABLE -->
<tr>
<td><!-- TMPL_VAR AWARD=AWARD --></td>
<td><!-- TMPL_VAR NAME=NAME --></td>
<td><!-- TMPL_VAR DESC=DESC --></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
1
2
3
my $tamplate = HTML::Template->new(filename->'./awardtmpl.tmpl');
my $AWARDTABLE = [{AWARD => '$img', NAME => '$name', DESC => '$desc'}]
$template->param(AWARDTABLE=$AWARDTABLE);
$tamplate = HTML::Template->new(filename->'./awardtmpl.tmpl');
my $template = HTML::Template->new(filename =>'./awardtmpl.tmpl');
QuoteCan't locate HTML/Template.pm in @INC (@INC contains: /usr/lib/perl5/5.8.7/i586-linux-thread-multi /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.7/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl .)
|< 1 2 >| | 20 Einträge, 2 Seiten |