Ignore:
Timestamp:
07/27/10 17:06:18 (14 years ago)
Author:
Kris Deugau
Message:

/branches/htmlform

Remove printFooter from CommonWeb.pm
Add HTML::Template to main.cgi, admin.cgi, and search.cgi
Convert footer.inc to templates/footer.tmpl, and normalize
output for three scripts above
See #3.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/htmlform/cgi-bin/search.cgi

    r447 r449  
    1515use CGI::Carp qw(fatalsToBrowser);
    1616use CGI::Simple;
     17use HTML::Template;
    1718use DBI;
    1819use CommonWeb qw(:ALL);
     
    5354# Global variables
    5455my $RESULTS_PER_PAGE = 25;
     56##fixme - need to autofill this somehow
     57$ENV{HTML_TEMPLATE_ROOT} = '/home/kdeugau/dev/ipdb/trunk/templates';
    5558
    5659# Set up the CGI object...
     
    298301# Shut down and clean up.
    299302finish($ip_dbh);
    300 printFooter;
     303
     304# We print the footer here, so we don't have to do it elsewhere.
     305my $footer = HTML::Template->new(filename => "footer.tmpl");
     306# include the admin tools link in the output?
     307$footer->param(adminlink => ($IPDBacl{$authuser} =~ /A/));
     308
     309print $footer->output;
     310
    301311# We shouldn't need to directly execute any code below here;  it's all subroutines.
    302312exit 0;
Note: See TracChangeset for help on using the changeset viewer.