<%args> $id

<& SELF:title &>

<%perl> use URI::Escape; my @regs = ( 'regionen.txt', 'krf_staedte.txt', 'landkreise.txt', 'VfrGemeinden.txt', 'Verbandsgemeinden.txt'); my @tabTitle = ( 'Planungsregionen', 'Kreisfreie Städte', 'Landkreise', 'Verbandsfreie Gemeinden', 'Verbandsgemeinden' ); my %pdfs = (); if (opendir(DIR, $web_path . getDir() . "/tabellen/regionalergebnisse/")) { my @contents = readdir DIR; my $content = ""; foreach $content (@contents) { if ($content =~ /^(\d{3})(.*\.pdf)$/) { $pdfs{$1} = $1 . $2; } } close(DIR); } print "\n\n"; print "\n

\n"; print "\n"; print "\n"; for (my $j=0;$j<5;$j++) { if ($j == $id) { print " \n"; } else { print " \n"; } print " \n"; } print " \n"; print "\n"; print "
". $tabTitle[$j] ."". $tabTitle[$j] ."  
\n"; print "\n"; print "\n"; print " \n"; print "\n"; print "

\n"; print " \n"; my $cols = 2; if ($id==0) { $cols=2 }; if ($id==3) { $cols=4 }; if ($id==4) { $cols=3 }; open(DATEI, $web_path . getDir() . "/" . $regs[$id] ); my @links = ; my $refPerCols = int(($#links+1)/$cols); if ((($#links+1) % $cols) > 0) { $refPerCols++ } my $lineStyle = ""; my $line = 0; my $cw = int(80 / $cols); my $rw = 80 % $cols; print " \n"; for (my $i=0; $i<$cols; $i++) { my $w = $cw; if (($i+1)==$cols) {$w += $rw}; print " \n"; } print " \n"; for (my $i = 0;$i<$refPerCols;$i++) { $line += 1; if (($line % 2) != 0) { $lineStyle = "tabContent1"; } else { $lineStyle = "tabContent2"; } print " \n"; for (my $n=0;$n<$cols;$n++) { my $k = $n*$refPerCols+$i; (my $name, my $key, my $rid, my $region) = split(/;/, $links[$k]); if ($k <= ($#links)) { if ($id < 2) { print " \n"; } else { print " \n"; } } else { print " \n"; } } print " \n"; } print "
" . $name . "" . $name . " 
\n"; print "

\n"; print "\n\n"; close(DATEI);