[Bio] / FigWebServices / serv_role.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/serv_role.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (view) (download)

1 : disz 1.2 #!/usr/bin/env/perl -w
2 : overbeek 1.1 use SAPserver;
3 :     use ServRole;
4 :    
5 :     #
6 :     # This file is part of an application created with create-new-page.
7 : disz 1.2 # The implementation module is FigKernelPackages/ServRole.pm.
8 :     # The SeedViewer page module is SeedViewer/WebPage/SV_ServRole.pm.
9 : overbeek 1.1 # The CGI script is FigWebServices/serv_role.cgi.
10 :     #
11 : disz 1.2 # The SeedViewer url is http://yourseed/seedviewer.cgi?page=SV_ServRole
12 : overbeek 1.1 # The CGI url is http://yourseed/serv_role.cgi
13 :     #
14 :    
15 :    
16 :     use strict;
17 :     use FIG;
18 :     use CGI;
19 : disz 1.2 use Data::Dumper;
20 :     use Carp;
21 :     use FIG_Config;
22 :    
23 : overbeek 1.1
24 :     my $cgi = CGI->new;
25 :     my $fig = FIG->new;
26 : disz 1.3 my $my_url = "serv_role.cgi";
27 :    
28 : disz 1.4 #my $sapdb = Sapling->new(dbName => 'pubseed_sapling_08', dbhost => 'oak.mcs.anl.gov');
29 :     #my $sap = SAPserver->new(sapDB => $sapdb, url => 'localhost');
30 :    
31 :     my $sap = SAPserver->new();
32 :     my $sapdb;
33 : overbeek 1.1
34 :     my $user_name = $cgi->param("user");
35 :    
36 : disz 1.3 my $env = {fig => $fig,
37 :     cgi => $cgi,
38 :     sap => $sap,
39 :     sapdb => $sapdb,
40 :     user => $user_name,
41 :     url => $my_url,
42 :     hidden_form_variable => "",
43 :     seedviewer_page_obj => ""
44 :     };
45 :    
46 : overbeek 1.5 if ($cgi->param('kb'))
47 :     {
48 :     require Bio::KBase::CDMI::CDMIClient;
49 :     my $kbO = Bio::KBase::CDMI::CDMIClient->new_for_script();
50 :     $env->{kbase} = $kbO;
51 :     }
52 : disz 1.3
53 :     my($html, $title) = ServRole::run($env);
54 :    
55 : overbeek 1.1
56 : disz 1.3 #my($html, $title) = ServRole::run($fig, $cgi, $sap, $user_name, $my_url, '', undef);
57 : overbeek 1.1
58 :     print $cgi->header;
59 :     print "<title>$title</title>";
60 :     print $html;
61 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3