[Bio] / SeedViewer / seedviewer.cgi Repository:
ViewVC logotype

View of /SeedViewer/seedviewer.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (annotate)
Mon Oct 8 19:32:45 2007 UTC (12 years, 3 months ago) by paczian
Branch: MAIN
Changes since 1.2: +3 -12 lines
fixed things

use strict;
use warnings;

use DBMaster;
use WebApplication;
use WebMenu;
use WebLayout;

eval {
    &main;
};

if ($@)
{
    my $cgi = new CGI();

    print $cgi->header();
    print $cgi->start_html();
    
    # print out the error
    print '<pre>'.$@.'</pre>';

    print $cgi->end_html();

}

sub main {

    # initialize cgi
    my $cgi = new CGI();

    # initialize db-master
    my $dbmaster = DBMaster->new(-database => 'WebAppBackend');

    # initialize layout
    my $layout = WebLayout->new('./Html/SeedViewer.tmpl');
    $layout->add_css('./Html/seedviewer.css');

    # build menu
    my $menu = WebMenu->new();
    $menu->add_category('&raquo;Navigate', '?page=Home');
    $menu->add_entry('&raquo;Navigate', 'Search', '?page=Home');
    $menu->add_entry('&raquo;Navigate', 'Subsystems', '?page=SubsystemSelect');
    $menu->add_entry('&raquo;Navigate', 'Organisms', '?page=OrganismSelect');
    $menu->add_category('&raquo;Teacher', '?page=Teach', undef, ['edit', 'problem_list'], 96);
    #$menu->add_category('&raquo;Analysis', '?page=Analysis', undef, ['login'], 97);
    $menu->add_category('&raquo;Help', 'http://biofiler.mcs.anl.gov', 'help', undef, 98);
    $menu->add_entry('&raquo;Help', 'What is the SEED', 'http://www.theseed.org');
    $menu->add_entry('&raquo;Help', 'HowTo use the SEED Viewer', 'http://www.theseed.org');
    $menu->add_entry('&raquo;Help', 'Submitting Data to SEED', 'http://www.theseed.org');
    $menu->add_entry('&raquo;Help', 'Contact', 'http://www.theseed.org');
    $menu->add_entry('&raquo;Help', 'Register', '?page=Register');

    # initialize application
    my $WebApp = WebApplication->new( { id => 'SeedViewer',
					dbmaster => $dbmaster,
					menu     => $menu,
					layout   => $layout,
					default  => 'Home',
				      } );

    # run application
    $WebApp->run();

}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3