#!/usr/bin/perl -w -T

use CGI;
use DBI;
use strict;
require "./genquery.pl";
require "./genquery_site.pl";

	my $q=new CGI;
	print $q->header,$q->start_html(-title=>"PDP-8 Document Information");
	my $dbh = genquery::dbOpen();
	my $table=$q->param('table');
	my $id=$q->param('id');
	
        my $debug = $q->param('debug');
        if(!defined $debug) {$debug=0}
        my $pages = $q->param('pages');
        # Default for subset of pages for PDF conversion is 1-5
        if(!defined $pages || $pages eq '') {
            $pages = '1-5';
        }
	genquery::GenFullRecord($dbh, $table,$id,"PDP-8 Document Information",
            $pages, $q, $debug);
        genquery::footer();
	genquery::dbClose($dbh);
	
	exit;
