<%args> $id

<& SELF:title &>

<%perl> use URI::Escape; my @regs = ( 'regionen.mtxt', 'krf_staedte.mtxt', 'landkreise.mtxt'); my @tabTitle = ( 'Planungsregionen', 'Kreisfreie Städte', 'Landkreise'); print "\n\n"; print "\n

\n"; print "\n"; print "\n"; for (my $j=1;$j<3;$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; 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)) { print " \n"; } else { print " \n"; } } print " \n"; } print "
" . $name . " 
\n"; print "

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