6 use lib $ENV{'DOCUMENT_ROOT'} . "/../lib/gal/lib";
7 use lib $ENV{'DOCUMENT_ROOT'} . "/../lib/perl";
9 use UCW::CGI::ErrorHandler;
11 use UCW::Gallery::Web::HighSlide;
14 UCW::CGI::parse_args({
15 dir => { var => \$dir, check => '^\w+(/([A-Za-z0-9][A-Za-z0-9.-]*))*$' },
18 my $path = $ENV{'DOCUMENT_ROOT'} . "/../lib/photos/$dir";
19 if ($dir ne "" && -f "$path/gallery.cf") {
21 my $gal = UCW::Gallery->load_config();
22 UCW::Gallery::Web::HighSlide->run($gal);
24 print STDERR "Gallery not found: $path\n";
25 UCW::CGI::http_error("404 Gallery Not Found");