[BACK]Return to cvsweb.cgi CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / cvsweb

Diff for /cvsweb/cvsweb.cgi between version 1.1 and 1.2

version 1.1, 1996/09/28 23:31:06 version 1.2, 1996/09/29 02:19:30
Line 28 
Line 28 
 require 'timelocal.pl';  require 'timelocal.pl';
 require 'ctime.pl';  require 'ctime.pl';
   
   $hsty_base = "";
   require 'cgi-style.pl';
   
 $cvsroot = '/home/ncvs';  $cvsroot = '/home/ncvs';
 $intro = "  $intro = "
 This is a WWW interface to the FreeBSD CVS tree.  This is a WWW interface to the FreeBSD CVS tree.
Line 72  if (-d $fullname) {
Line 75  if (-d $fullname) {
         opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!");          opendir(DIR, $fullname) || &fatal("404 Not Found","$where: $!");
         @dir = readdir(DIR);          @dir = readdir(DIR);
         closedir(DIR);          closedir(DIR);
         print "Content-type: text/html\n\n";  
         print "<HTML><HEAD><TITLE>FreeBSD CVS Tree: /$where</TITLE></HEAD>\n";  
         print "<BODY>\n";  
         print "<h1><img src=\"/gifs/biglogo.gif\" alt=\"\"> ";  
         print "FreeBSD CVS Tree</h1>\n<hr>\n";  
 #       print "<!-- I wish there was a \"halign=center\" for IMG... -->\n";  
 #       print "<center>\n";  
 #       print "<IMG SRC=\"/gifs/daemonbar.gif\" alt=\"\">\n";  
 #       print "</center>\n";  
 #       print "<H1 align=center>FreeBSD CVS Tree</H1>\n";  
         if ($where eq '') {          if ($where eq '') {
               print &html_header("FreeBSD CVS Repository");
             print $intro;              print $intro;
         } else {          } else {
               print &html_header("/$where");
             print $shortinstr;              print $shortinstr;
         }          }
         print "<p>Current directory: <b>/$where</b>\n";          print "<p>Current directory: <b>/$where</b>\n";
         print "<P><HR>\n";          print "<P><HR NOSHADE>\n";
         # Using <MENU> in this manner violates the HTML2.0 spec but          # Using <MENU> in this manner violates the HTML2.0 spec but
         # provides the results that I want in most browsers.  Another          # provides the results that I want in most browsers.  Another
         # case of layout spooging up HTML.          # case of layout spooging up HTML.
Line 111  if (-d $fullname) {
Line 106  if (-d $fullname) {
             }              }
         }          }
         print "</MENU>\n";          print "</MENU>\n";
 print "<hr>          print &html_footer;
 <a href=\"/\"><img src=\"/gifs/home.gif\" alt=\"FreeBSD Home  
   Page\" border=\"0\" align=\"right\"></a>  
 <address>  
   <a href=\"/mailto.html\">www@freebsd.org</a>  
 </address>\n";  
 #       print "<HR>\n";  
 #       print "<A HREF=\"/\"><IMG SRC=\"/gifs/home.gif\" ALT=\"FreeBSD Home Page\">\n";  
 #       print "</A>\n";  
         print "</BODY></HTML>\n";          print "</BODY></HTML>\n";
 } elsif (-f $fullname . ',v') {  } elsif (-f $fullname . ',v') {
         if ($_ = $ENV{'QUERY_STRING'}) {          if ($_ = $ENV{'QUERY_STRING'}) {
Line 364  print "<hr>
Line 351  print "<hr>
             $sel .= "<OPTION VALUE=\"${rev}:${_}\">$_\n";              $sel .= "<OPTION VALUE=\"${rev}:${_}\">$_\n";
         }          }
         print "Done associating revisions with branches\n" if ($verbose);          print "Done associating revisions with branches\n" if ($verbose);
         print "Content-type: text/html\n\n";          print &html_header("CVS log for $where");
         print "<HTML><HEAD><TITLE>CVS log for $where</TITLE></HEAD>\n";  
         print "<BODY>\n";  
         print "<H1 align=center>CVS log for $where</H1>\n";  
         ($upwhere = $where) =~ s|[^/]+$||;          ($upwhere = $where) =~ s|[^/]+$||;
         print "Up to ", &link($upwhere,$scriptname . "/" . $upwhere);          print "Up to ", &link($upwhere,$scriptname . "/" . $upwhere);
         print "<BR>\n";          print "<BR>\n";
         print "<A HREF=\"#diff\">Request diff between arbitrary revisions</A>\n";          print "<A HREF=\"#diff\">Request diff between arbitrary revisions</A>\n";
         print "<HR>\n";          print "<HR NOSHADE>\n";
 # The other possible U.I. I can see is to have each revision be hot  # The other possible U.I. I can see is to have each revision be hot
 # and have the first one you click do ?r1=foo  # and have the first one you click do ?r1=foo
 # and since there's no r2 it keeps going & the next one you click  # and since there's no r2 it keeps going & the next one you click
Line 445  print "<hr>
Line 429  print "<hr>
 #           print "Log message:<BR>\n";  #           print "Log message:<BR>\n";
             print "<PRE>\n";              print "<PRE>\n";
             print &htmlify($log{$_});              print &htmlify($log{$_});
             print "</PRE><HR>\n";              print "</PRE><HR NOSHADE>\n";
         }          }
         print "<A NAME=diff>\n";          print "<A NAME=diff>\n";
         print "This form allows you to request diff's between any two\n";          print "This form allows you to request diff's between any two\n";
Line 470  print "<hr>
Line 454  print "<hr>
         print "<INPUT TYPE=RADIO NAME=\"f\" VALUE=c>Context diff<br>\n";          print "<INPUT TYPE=RADIO NAME=\"f\" VALUE=c>Context diff<br>\n";
         print "<INPUT TYPE=SUBMIT VALUE=\"Get Diffs\">\n";          print "<INPUT TYPE=SUBMIT VALUE=\"Get Diffs\">\n";
         print "</FORM>\n";          print "</FORM>\n";
 print "<hr>          print &html_footer;
 <a href=\"/\"><img src=\"/gifs/home.gif\" alt=\"FreeBSD Home  
   Page\" border=\"0\" align=\"right\"></a>  
 <address>  
   <a href=\"/mailto.html\">www@freebsd.org</a>  
 </address>\n";  
 #       print "<HR>\n";  
 #       print "<A HREF=\"/\"><IMG SRC=\"/gifs/home.gif\" ALT=\"FreeBSD Home Page\">\n";  
 #       print "</A>\n";  
         print "</BODY></HTML>\n";          print "</BODY></HTML>\n";
 } else {  } else {
         &fatal("404 Not Found","$where: no such file or directory");          &fatal("404 Not Found","$where: no such file or directory");
Line 487  print "<hr>
Line 463  print "<hr>
 sub htmlify {  sub htmlify {
         local($string) = @_;          local($string) = @_;
   
           $string =~ s/&/&amp;/g;
         $string =~ s/</&lt;/g;          $string =~ s/</&lt;/g;
         $string =~ s/>/&gt;/g;          $string =~ s/>/&gt;/g;
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb