Debian Codegraph @

test/html/subtab.htm

raw
1
2 <html>
3 <head>
4 <title>Embperl Test - Subs and Tables</title>
5 </head>
6
7 <body>
8
9
10 [###############################################################################################]
11
12 [$ sub Kurslink $]<a href="epl_ober.htm?id=[+ $rec->{id} +]&bereich_id=[+ $fdat{bereich_id} +]" onMouseOut='hidePopup()'>[$endsub$]
13
14 [###############################################################################################]
15
16 [$ sub cell $]
17 [$if !$rec -> {id} $]
18
19 <td bgcolor="[+ $bgcol +]" align=center>[- Neulink -]<img border=0 src="/images/leer.gif"><img border=0 src="/images/leer.gif"><img border=0 src="/images/leer.gif"></td>
20
21 [$ elsif $fdat{bereich_id} eq 'f' || !$kurs -> {-gebucht} || $xkurs $]
22
23 [$if $xkurs $]
24 <td bgcolor="[+ $bgcol +]" align="[+ $fdat{bereich_id} eq 'f'?'center':'left' +]">&nbsp;[- Kurslink -]<img border=0 src="[+ $mainrec?"/images/leer2_gelb.gif":($xkurs -> {-gebucht}?"/images/leer_rot.gif":"/images/leer_gelb.gif") +]"></td>
25 [$else$]
26 <td bgcolor="[+ $bgcol +]" align="[+ $fdat{bereich_id} eq 'f'?'center':'left' +]">&nbsp;[- Kurslink -]<img border=0 src="[+ $kurs -> {-gebucht}?"/images/belegt_rot$gifext.gif":"/images/reserv_gelb$gifext.gif" +]"></td>
27 [$endif$]
28
29 [$ elsif $fdat{bereich_id} eq 'b' $]
30
31 [- $n = 2 -]
32 <td bgcolor="[+ $bgcol +]" align=left> <table> <tr>
33 <td>[- Kurslink -]<img border=0 src="[+ $kurs -> {-gebucht}?"/images/belegt_rot$gifext.gif":"/images/reserv_gelb$gifext.gif" +]"></td>
34 [$ while ($n--) $]
35 [-
36 $banzahl = 1 ;
37 $sanzahl = 5 ;
38 -]
39 [$ if $banzahl > 0 $]
40 <td bgcolor="[+ $subbgcol = $sanzahl == 0?'#ff0000':($sanzahl < $banzahl?'#ffff00':'#00ff00') +]">[- Kurslink (($sanzahl || 0) . "/$banzahl") -]<small><strong><font face="[+ $fontface +]" color="[+ $xkurs?$subbgcol:($subbgcol eq '#ff0000'?'#ffffff':'#000000') +]">&nbsp;[+ $brec -> {bereichkurz} +]&nbsp;</td>
41 [$endif$]
42 [$endwhile$]
43 </tr> </table> </td>
44
45 [$ endif $]
46 [$endsub $]
47
48 [###############################################################################################]
49
50 [-
51
52 $rec = { id => 1 } ;
53 $kurs = { -gebucht => 1 } ;
54 $brec = { id => 2, bereichkurz => 'bu' } ;
55
56 $fdat{bereich_id} = 'b' ;
57 $bgcol = '#1' ;
58 $gifext = 'xxx' ;
59 $l = 2 ;
60
61 -]
62
63 <table>
64 <tr>
65
66 [$ while ($l-- > 0) $]
67 [- cell -]
68 [$endwhile$]
69
70 </tr>
71 </table>
72
73
74
75 </body>
76 </html>