7 my $width = 100/($#dirs+1);
9 print "<center><table border=0 cellpadding=2 cellspacing=10 width=90%><tr>";
10 foreach $rubrik (@dirs) {
11 if ("<get-var WML_SRC_DIRNAME>" =~ /src\/$rubrik/) {
12 $color="<menu-bgcolorsel>";
13 if ("<get-var WML_SRC_BASENAME>" eq "index") {
14 printf "<th align=center width=%d%% bgcolor=#%s>", $width, $color;
15 print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font>"
16 if ($rubrik ne $dirs[0]);
17 printf "<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\">%s</font></th>\n", $rubrik;
19 printf "<th align=center width=%d%% bgcolor=#%s>", $width, $color;
20 print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font>"
21 if ($rubrik ne $dirs[0]);
22 printf "<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\"><a href=%s%s/>%s</a></font></th>\n",
23 $root_prefix, $rubrik, $rubrik;
26 $color="<menu-bgcolor>";
27 printf "<th align=center width=%d%% bgcolor=#%s>", $width, $color;
28 print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font>"
29 if ($rubrik ne $dirs[0]);
30 printf "<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\"><a href=%s%s/>%s</a></font></th>\n",
31 $root_prefix, $rubrik, $rubrik;
34 print "</tr></table></center>\n";
37 # @_ ist ein Array, dessen *letztes* Element die Anzahl
38 # der Elemente enthaelt
40 sub web_calc_table_width
48 foreach $i (@widths) {
49 $tabwidth = $i if ((($count) % $i) == 0);
52 foreach $i (@widths) {
53 $tabwidth = $i if ((($count) % $i) > $mod);
72 $tabwidth = &web_calc_table_width(6,5,4,3,$#keys+1);
73 $width = 100/$tabwidth;
75 print "<center><table border=0 cellpadding=2 cellspacing=10 width=90%><tr>";
77 while ($i <= $#keys) {
78 print "<tr>" if (! ($i % $tabwidth));
80 $foo = sprintf ("<font face=\"Helvetica,Arial\" color=\"#<menu-fgcolor>\"><a href=\"%s\">%s</a></font>"
81 , $keys[$i], $elems{$keys[$i]});
82 printf "<td align=center width=%d%% bgcolor=#<menu-bgcolor>>%s\n",
86 if (! ($i % $tabwidth)) {
87 print "</td></tr><p>\n";
89 print "<font size-=5 color=\"#<menu-bgcolor>\"> · </font></td>";
94 print "<td bgcolor=#<menu-bgcolor>> </td>";
96 print "</tr><p>" if (! ($i % $tabwidth));
97 } until (!($i % $tabwidth));
99 print "</table></center>\n";