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

Annotation of /SeedViewer/seedviewer.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (view) (download)

1 : paczian 1.1 use strict;
2 :     use warnings;
3 :    
4 :     use DBMaster;
5 :     use WebApplication;
6 :     use WebMenu;
7 :     use WebLayout;
8 : paczian 1.5 use FIG_Config;
9 : paczian 1.1
10 :     eval {
11 :     &main;
12 :     };
13 :    
14 :     if ($@)
15 :     {
16 :     my $cgi = new CGI();
17 :    
18 :     print $cgi->header();
19 :     print $cgi->start_html();
20 :    
21 :     # print out the error
22 :     print '<pre>'.$@.'</pre>';
23 :    
24 :     print $cgi->end_html();
25 :    
26 :     }
27 :    
28 :     sub main {
29 :    
30 :     # initialize cgi
31 :     my $cgi = new CGI();
32 :    
33 :     # initialize db-master
34 : paczian 1.5 #my $dbmaster = DBMaster->new(-database => 'WebAppBackend');
35 : paczian 1.1
36 :     # initialize layout
37 :     my $layout = WebLayout->new('./Html/SeedViewer.tmpl');
38 : paczian 1.4 $layout->add_css('./Html/default.css');
39 : paczian 1.1 $layout->add_css('./Html/seedviewer.css');
40 :    
41 :     # build menu
42 :     my $menu = WebMenu->new();
43 : paczian 1.2 $menu->add_category('&raquo;Navigate', '?page=Home');
44 : paczian 1.5 $menu->add_entry('&raquo;Navigate', 'Startpage', '?page=Home');
45 :     $menu->add_entry('&raquo;Navigate', 'Organisms', '?page=OrganismSelect');
46 : paczian 1.3 $menu->add_entry('&raquo;Navigate', 'Subsystems', '?page=SubsystemSelect');
47 : paczian 1.5 $menu->add_entry('&raquo;Navigate', 'Blast', '?page=BlastRun');
48 :     $menu->add_entry('&raquo;Navigate', "<form style='margin: 0px 0px 0px 6px;'>ID&nbsp;&nbsp;<input type='text' name='pattern' style='border: 1px solid #5da668; width: 120px; height: 17px; margin-top: 2px; font-size: 11px;'><input type='hidden' name='page' value='SearchResult'><input type='hidden' name='action' value='check_search'><input type='submit' style='display:none;'></form>");
49 :    
50 :     if (defined($FIG_Config::teacher_db)) {
51 :     $menu->add_category('&raquo;Teacher', '?page=Teach', undef, ['edit', 'problem_list'], 96);
52 :     $menu->add_entry('&raquo;Teacher', 'Class Performance', '?page=Teach');
53 :     $menu->add_entry('&raquo;Teacher', 'Class Management', '?page=ManageClass');
54 :     $menu->add_entry('&raquo;Teacher', 'Problem Sets', '?page=ManageProblemSets');
55 :     }
56 : paczian 1.4 $menu->add_category('&raquo;Admin', '?page=Admin', undef, ['edit', 'scope', '*'], 99);
57 :     $menu->add_category('&raquo;Help', 'http://www.theseed.org', 'help', undef, 98);
58 :     $menu->add_entry('&raquo;Help', 'What is the SEED', 'http://www.theseed.org/wiki/Home_of_the_SEED');
59 :     $menu->add_entry('&raquo;Help', 'HowTo use the SEED Viewer', 'http://www.theseed.org/wiki/SEED_Viewer_Tutorial');
60 :     $menu->add_entry('&raquo;Help', 'Submitting Data to SEED', 'http://www.theseed.org/wiki/RAST_Tutorial');
61 :     $menu->add_entry('&raquo;Help', 'Contact', 'http://www.theseed.org/wiki/Contact');
62 : paczian 1.2 $menu->add_entry('&raquo;Help', 'Register', '?page=Register');
63 : paczian 1.1
64 :     # initialize application
65 :     my $WebApp = WebApplication->new( { id => 'SeedViewer',
66 : paczian 1.5 #dbmaster => $dbmaster,
67 : paczian 1.1 menu => $menu,
68 :     layout => $layout,
69 :     default => 'Home',
70 :     } );
71 : paczian 1.5 $WebApp->show_login_user_info(1);
72 : paczian 1.1
73 :     # run application
74 :     $WebApp->run();
75 :    
76 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3