#!/usr/bin/perl

our $VERSION = '0.02';

# $Id: display_locality_info,v 1.7.2.2 2007/06/14 19:04:09 kclark Exp $

use warnings;
use strict;

use FindBin::Real qw(Bin);
use HTML::SearchPage;
use HTML::SearchPage::Param;
use Panzea::FormModifier;
use Panzea::FormConfig;

my $config_file = '/usr/local/gramene-25/conf//html-searchpage.conf'; # MKFILE:Q:CONF_FILE

my $config = Panzea::FormConfig->new($config_file);

# Search page object
my $sp = HTML::SearchPage->new(
    page_title      => 'Locality Information',
    header          => $config->cfg('form_header'),
    css             => $config->cfg('form_css'),
    temp_dir        => $config->cfg('temp_dir'),
    temp_dir_eq     => $config->cfg('temp_dir_eq'),
    footer          => $config->cfg('form_footer'),
    base_sql_table  => qq[div_locality],
    base_sql_fields => [
        'locality_name',
        'city',
        'state_province',
        'country',
        'latitude',
        'longitude',
        'elevation',
    ],
    base_output_headers => [
        'Locality Name',
        'City',
        'State/Province',
        'Country',
        'Latitude',
        'Longitude',
        'Elevation',
    ],
    base_identifier  => 'locality_name',
    method           => $config->cfg('form_method'),
    page_size        => $config->cfg('form_page_size'),
    db_access_params => $config->cfg('db_access_params'),
    debug_level      => $config->cfg('form_debug_level'),
    modifier         => Panzea::FormModifier->new(),
);    # Displays error page if fails

# Call display method
$sp->display_info;

=head1 NAME

display_locality_info

=head1 DESCRIPTION

Panzea web display script.

Please refer to documentation of HTML::SearchPage and
HTML::SearchPage::Param for information on script structure.

=head1 AUTHOR

Payan Canaran <canaran@cshl.edu>

=head1 BUGS

=head1 VERSION

Version 0.02

=head1 ACKNOWLEDGEMENTS

=head1 COPYRIGHT & LICENSE

Copyright (c) 2005-2007 Cold Spring Harbor Laboratory

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself. See DISCLAIMER.txt for
disclaimers of warranty.

=cut

