<%args> $PubID => undef $Part => undef <%init> my $location; if ($Part==27) { $Part=3 } if ($Part==28) { $Part=3 } if ($Part==84) { $Part=4 } if ($Part==85) { $Part=4 } if ($Part==30) { $Part=4 } if ($Part==5) { $Part=4 } if ($Part==82) { $Part=4 } if ($Part==62) { $Part=4 } if ($Part==38) { $Part=37 } if ($Part==66) { $Part=31 } if ($Part==23) { $Part=16 } $request->{popup} = 2; if (my $article = $h->load('Article', {where => "id = 000".$PubID})) { $location = a_url($article); } elsif (my $section = $h->load('Section', {where => "id = 000".$Part})) { $location = s_url($section); } $m->clear_buffer; $r->method('GET'); $r->headers_in->unset('Content-length'); $r->content_type('text/html'); $r->header_out('Location' => $location); $m->abort(301);