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

Diff of /FigWebServices/link.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Wed Oct 25 21:06:09 2006 UTC revision 1.4, Thu Mar 15 19:19:30 2007 UTC
# Line 25  Line 25 
25  use CGI;  use CGI;
26  use URI::Escape;  use URI::Escape;
27    
28    my $url;
29    
30  my $cgi = CGI->new();  my $cgi = CGI->new();
31  ETracing($cgi);  ETracing($cgi);
32  eval {  eval {
33        #check for SOP
34        my $sopID = $cgi->param('sop');
35        if ($sopID) {
36            if ($sopID =~ /SOP010/i) {
37                    $url = "http://www.theseed.org/w/images/2/23/Annotation_sop.pdf";
38                    print $cgi->redirect(-uri => $url);
39            } else {
40                    Confess("Invalid SOP number");
41            }
42    
43        } else {
44      # Get the protein ID.      # Get the protein ID.
45      my $pegID = $cgi->param('id');      my $pegID = $cgi->param('id');
46      if (! $pegID) {      if (! $pegID) {
# Line 35  Line 48 
48          Confess("No ID specified.");          Confess("No ID specified.");
49      } else {      } else {
50          # The code will compute a redirection URL and put it in the variable below.          # The code will compute a redirection URL and put it in the variable below.
         my $url;  
51          # Check for an NMPDR or SEED viewer ID.          # Check for an NMPDR or SEED viewer ID.
52          if ($pegID =~ /^nmpdr\|(.+)$/) {          if ($pegID =~ /^nmpdr\|(.+)$/) {
53              # Escape the PEG found.              # Escape the PEG found.
# Line 58  Line 70 
70          }          }
71          print $cgi->redirect(-uri => $url);          print $cgi->redirect(-uri => $url);
72      }      }
73        }
74  };  };
75  if ($@) {  if ($@) {
76      # Get the error message.      # Get the error message.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3