[Bio] / MGRAST / metagenomics.cgi Repository:
ViewVC logotype

View of /MGRAST/metagenomics.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (download) (annotate)
Tue May 3 18:16:40 2011 UTC (9 years, 1 month ago) by jared
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, mobedac_release_05302012, mgrast_dev_05262011, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_06072011, mgrast_dev_10262011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, HEAD
Changes since 1.10: +1 -1 lines
switched jquery back to 1.4.2 for feed compatibility

use strict;
use warnings;
no warnings 'once';

use WebApplication;
use WebMenu;
use WebLayout;
use WebConfig;

use FIG_Config;

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 {
    my $range = 2;
    my $random_number = int(rand($range));

    my $layout = WebLayout->new(TMPL_PATH.'MGRAST.tmpl');
    $layout->add_template(TMPL_PATH.'EmptyLayout.tmpl', ["Home2"]);
    $layout->add_template(TMPL_PATH.'MGRAST-frontpage.tmpl', ["Home"]);
    $layout->add_css("$FIG_Config::cgi_url/Html/mgrast.css");
    $layout->add_css("$FIG_Config::cgi_url/Html/formalize.css");
    $layout->add_javascript("$FIG_Config::cgi_url/Html/jquery-1.4.2.min.js");
    $layout->add_javascript("$FIG_Config::cgi_url/Html/jquery.formalize.min.js");
    $layout->add_javascript("$FIG_Config::cgi_url/Html/raphael-min.js");
    $layout->show_icon(1);
    $layout->icon_path("$FIG_Config::cgi_url/Html/favicon.ico");

    # build menu
    my $menu = WebMenu->new();
    $menu->style('horizontal');

    # initialize application
    my $WebApp = WebApplication->new( { id       => 'MGRAST',
					menu     => $menu,
					layout   => $layout,
					default  => 'Home',
				      } );
    $WebApp->strict_browser(1);
    $WebApp->page_title_prefix('MG-RAST - ');
    $WebApp->show_login_user_info(1);
    $WebApp->fancy_login(1);

    # run application
    $WebApp->run();

}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3