76 |
} |
} |
77 |
|
|
78 |
my $path = $ENV{PATH_INFO} || 'ecas'; |
my $path = $ENV{PATH_INFO} || 'ecas'; |
79 |
|
$path =~ s{^/+}{}; |
80 |
|
$path =~ s{/+$}{}; |
81 |
my $dir = $0; |
my $dir = $0; |
82 |
$dir =~ s{/[^/]+.cgi}{}; |
$dir =~ s{/[^/]+.cgi}{}; |
83 |
|
|
84 |
|
dump_yaml( 'dir', $dir ); |
85 |
|
|
86 |
my $config = YAML::LoadFile( "$dir/$path/config.yml" ); |
my $config = YAML::LoadFile( "$dir/$path/config.yml" ); |
87 |
|
|
88 |
my $database = (keys %{ $config->{databases} })[0]; |
my $database = (keys %{ $config->{databases} })[0]; |
137 |
|
|
138 |
warn "## only_input = ", dump( $only_input ); |
warn "## only_input = ", dump( $only_input ); |
139 |
|
|
140 |
|
my @style = ( '../../style.css' ); |
141 |
|
push @style, "../../$path/$path.css" if -e "$dir/$path/$path.css"; |
142 |
|
dump_yaml( 'style', \@style ); |
143 |
|
|
144 |
print |
print |
145 |
start_html( |
start_html( |
146 |
-title => $db->{name}, |
-title => $db->{name}, |
147 |
-style => '../../style.css', |
-style => [ @style ], |
148 |
), |
), |
149 |
h1( $db->{name} ), |
h1( $db->{name} ), |
150 |
qq|<div id=description>|, $db->{description}, qq|</div>|, |
qq|<div id=description>|, $db->{description}, qq|</div>|, |