|
#!/usr/bin/perl
use vars qw/$DB $URL $NAME $CLASS %PAPERS/ ; use CGI 2.42 qw/:standard :html3 escape/ ; AceInit();
$NAME = param( 'name' );
$DB = OpenDatabase() || AceError( "Couldn't open database." );
AceHeader();
AceError( <<END) unless $NAME ;
Call this script with URL parameters of
<VAR>name</VAR> and <VAR>parms,</VAR> where
"name" is the name of a table definition in acedb
END
display_table( $NAME , " " );
exit 0;
sub display_table {
my ( $name , $parms ) = @_ ;
my $obj = $DB ->raw_query( "table -title -n $name $parms" ) || AceMissing( $name , $parms );
my ( $n , $c ) = (escape( $name ),escape( $parms ));
print
start_html( -Title => "$name: $parms" ,
-Style =>STYLE,
-Class => 'tree' ,
-Bgcolor =>BGCOLOR_TREE),
h1( "$name: $parms" ),
&show_table ( $obj ),
FOOTER,
end_html;
}
sub show_table {
my $obj = shift ;
my $dna = "$obj" ;
return (pre( $dna ),0);
}
|