-print
- start_html(
- -title => $db->{name},
- -style => '../../style.css',
- ),
- h1( $db->{name} ),
- qq|<div id=description>|, $db->{description}, qq|</div>|,
+my $attr_labels = read_config_txt 'labels';
+my $attr_operators = read_config_txt 'operators';
+
+my @attr = @{ $attr_labels->{'-values'} } if $attr_labels;
+@attr = keys %{ $stats->{attr} } unless @attr;
+
+
+warn dump( $attr_labels, $attr_operators );
+
+my $only_input;
+my $inputs_available = 0;
+
+foreach ( @{ $db->{input} } ) {
+ my $input = $_->{name} || die "no name in ",dump( $_ );
+ next unless defined $stats->{input}->{$input}; # skip inputs without data
+ if ( ! $only_input->{'-labels'}->{$input} ) {
+ push @{ $only_input->{'-values'} }, $input;
+ $only_input->{'-labels'}->{$input} = $_->{description} || $input;
+ $inputs_available++;
+ }
+}
+
+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 );
+
+sub search_form {
+
+ my $form_html = "$dir/$path/$path-search.html";
+ if ( -e $form_html ) {
+ my $html = read_file( $form_html );
+ my $q = CGI->new();
+ my $h = HTML::FillInForm::Lite->new();
+ return $h->fill(\$html, $q);
+ }
+
+ qq|<a name="form"></a>|,