[Bio] / FigKernelPackages / HTML.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/HTML.pm

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

revision 1.24, Wed Nov 17 14:40:19 2004 UTC revision 1.25, Mon Dec 6 18:26:05 2004 UTC
# Line 1  Line 1 
1  package HTML;  package HTML;
2    
3    use FIG;
4  use Carp;  use Carp;
5  use Data::Dumper;  use Data::Dumper;
6  use LWP::UserAgent;  use LWP::UserAgent;
# Line 8  Line 9 
9  use HTTP::Request::Common;  use HTTP::Request::Common;
10  use POSIX;  use POSIX;
11    
12  sub show_page {  sub compute_html_header
13      my($cgi,$html,$no_home) = @_;  {
     my $i;  
   
     #  
     # Find the HTML header  
     #  
   
14      my $html_hdr_file = "./Html/html.hdr";      my $html_hdr_file = "./Html/html.hdr";
15      if (! -f $html_hdr_file)      if (! -f $html_hdr_file)
16      {      {
17          $html_hdr_file = "$FIG_Config::fig/CGI/Html/html.hdr";          $html_hdr_file = "$FIG_Config::fig/CGI/Html/html.hdr";
18      }      }
   
     my $html_tail_file = "./Html/html.tail";  
     if (! -f $html_tail_file)  
     {  
         $html_tail_file = "$FIG_Config::fig/CGI/Html/html.tail";  
     }  
   
19      my @html_hdr = &FIG::file_read($html_hdr_file);      my @html_hdr = &FIG::file_read($html_hdr_file);
     my $user = $cgi->param('user') || "";  
20      push( @html_hdr, "<br><a href=\"index.cgi?user=$user\">FIG search</a>\n" );      push( @html_hdr, "<br><a href=\"index.cgi?user=$user\">FIG search</a>\n" );
21    
22      if (@html_hdr)      if (@html_hdr)
# Line 57  Line 44 
44          }          }
45      }      }
46    
47        return @html_hdr;
48    }
49    
50    sub show_page {
51        my($cgi,$html,$no_home) = @_;
52        my $i;
53    
54        #
55        # Find the HTML header
56        #
57    
58        my $html_tail_file = "./Html/html.tail";
59        if (! -f $html_tail_file)
60        {
61            $html_tail_file = "$FIG_Config::fig/CGI/Html/html.tail";
62        }
63    
64        my @html_hdr = compute_html_header();
65    
66        my $user = $cgi->param('user') || "";
67    
68      print $cgi->header;      print $cgi->header;
69    

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3