OSSP CVS Repository

ossp - Check-in [2070]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2070
Date: 2002-Apr-16 10:51:02 (local)
2002-Apr-16 08:51:02 (UTC)
User:rse
Branch:
Comment: fix (unknown reasons)
Tickets:
Inspections:
Files:
ossp-pkg/tabea/tabea.cgi      1.3 -> 1.4     11 inserted, 31 deleted

ossp-pkg/tabea/tabea.cgi 1.3 -> 1.4

--- tabea.cgi    2002/04/16 08:37:21     1.3
+++ tabea.cgi    2002/04/16 08:51:02     1.4
@@ -1,6 +1,4 @@
-#!/bin/sh -- # -*- perl -*- -p
-eval 'exec perl -S $0 ${1+"$@"}'
-    if $running_under_some_shell;
+#!/cw/bin/perl -w
 ##
 ##  OSSP tabea - Web Configuration Editor
 ##  Copyright (c) 2001-2002 The OSSP Project <http://www.ossp.org/>
@@ -34,43 +32,25 @@
 use strict;
 use IO;
 use CGI;
-#use Averist;
+
+$|++;
 
 # establish my configuration
 my $MY = {};
 $MY->{PROGNAME} = ($0 =~ m|^.*?([^/]+?)(?:\.[^/.]+)?$|)[0];
-$MY->{HEADER} = '';
-open(FP, "<".$MY->{PROGNAME}.".head.html");
-$MY->{HEADER} .= $_ while (<FP>);
-close(FP);
-$MY->{FOOTER} = '';
-open(FP, "<".$MY->{PROGNAME}.".foot.html");
-$MY->{FOOTER} .= $_ while (<FP>);
-close(FP);
+$MY->{TEMPLATE} = '';
+my $fh = new IO::File ("<".$MY->{PROGNAME}.".html") || die;
+$MY->{TEMPLATE} .= $_ while (<$fh>);
+$fh->close();
 
 #   establish CGI query object
 my $Q = new CGI;
 
-#print header(),
-#       start_html('-title' => "Tabea Test",
-#                  '-bgcolor' => "white"),
-#       end_html();
-
 my $page = '';
-$page .= $Q->header (-expires => '+1s');
-$page .= $MY->{HEADER};
-
-$page .= $MY->{FOOTER};
-
-#$page .= "<table width=100% bgcolor=\"#000000\" cellspacing=0 cellpadding=0>\n";
-#$page .= "<tr>\n" .
-#      "<td align=center>\n" .
-#         "<p>Irgendein Text</p>" .
-#         "</td>\n" .
-#          "</tr>\n" .
-#          "<tr>\n" .
-#          "<td>\n";
+$page .= "fuck";
 
-print STDOUT $page;
+my $out = $MY->{TEMPLATE};
+$out =~ s|%%BODY%%|$page|s;
+print $Q->header(-expires => '+1s') . $out;
 
 exit (0);

CVSTrac 2.0.1