--- trunk/vhost/webpac2.cgi 2009/04/25 22:13:41 1172 +++ trunk/vhost/webpac2.cgi 2009/04/25 22:26:29 1173 @@ -76,9 +76,13 @@ } my $path = $ENV{PATH_INFO} || 'ecas'; +$path =~ s{^/+}{}; +$path =~ s{/+$}{}; my $dir = $0; $dir =~ s{/[^/]+.cgi}{}; +dump_yaml( 'dir', $dir ); + my $config = YAML::LoadFile( "$dir/$path/config.yml" ); my $database = (keys %{ $config->{databases} })[0]; @@ -133,10 +137,14 @@ warn "## only_input = ", dump( $only_input ); +my @style = ( '../../style.css' ); +push @style, "../../$path/$path.css" if -e "$dir/$path/$path.css"; +dump_yaml( 'style', \@style ); + print start_html( -title => $db->{name}, - -style => '../../style.css', + -style => [ @style ], ), h1( $db->{name} ), qq|
|, $db->{description}, qq|
|,