Diff for /db/prgsrc/db.cgi between versions 1.108 and 1.113

version 1.108, 2003/04/20 12:11:17 version 1.113, 2003/04/20 12:48:48
Line 11  use Getopt::Std; Line 11  use Getopt::Std;
 getopts('z');  getopts('z');
 open STDERR, ">/var/tmp/errors1";  open STDERR, ">/var/tmp/errors1";
 my $newsurl='http://news.chgk.info/';  my $newsurl='http://news.chgk.info/';
 my $HTMLDIR="";  my $reklama="../dimrub/db/reklama.html";
   $reklama="../reklama.html" if $opt_z;
   my $HTMLDIR="/znatoki/dimrub/db/baza/";
 my $realHTMLDIR;  my $realHTMLDIR;
 if ($^O =~ /win/i) {  if ($^O =~ /win/i) {
  $realHTMLDIR="/html/znatoki/baza/";   $realHTMLDIR="/html/znatoki/baza/";
Line 224  sub tourhref { Line 226  sub tourhref {
         $res=$t;          $res=$t;
         $res.=$a?"-a":"-q" unless $gr;          $res.=$a?"-a":"-q" unless $gr;
         $res.=".html";          $res.=".html";
           $res=~s/(\#\d+)(.*)$/$2$1/;
           $res="$HTMLDIR$res" unless $opt_z;
         return $res;          return $res;
    } else {     } else {
         $res=$url;          $res=$url;
Line 1414  sub Get12Random { Line 1418  sub Get12Random {
   
 sub Include_virtual {  sub Include_virtual {
         my ($fn, $output) = (@_, '');          my ($fn, $output) = (@_, '');
           return "<!--#include virtual=\"$fn\"-->" if ($opt_z);
         open F , $fn          open F , $fn
                 or return ""; #die "Can't open the file $fn: $!\n";                  or return ""; #die "Can't open the file $fn: $!\n";
   
Line 1811  MAIN: Line 1815  MAIN:
                 or do {                  or do {
                         print h1("Временные проблемы") . "База вопросов временно не                          print h1("Временные проблемы") . "База вопросов временно не
                         работает. Заходите попозже.";                          работает. Заходите попозже.";
                         print &Include_virtual("../dimrub/db/reklama.html") if $url!~/localhost/;                          print &Include_virtual("$reklama") if $url!~/localhost/;
                     print end_html;                      print end_html;
                         die "Can't connect to DB chgk\n";                          die "Can't connect to DB chgk\n";
                 };                  };
Line 1876  td {font-size: x-small; font-family : sa Line 1880  td {font-size: x-small; font-family : sa
 th      {font-size: x-small; font-family : sans-serif}  th      {font-size: x-small; font-family : sans-serif}
 </style>\n";  </style>\n";
   
                 $globaloutput.=&Include_virtual("../dimrub/db/reklama.html")||'';                  $globaloutput.=&Include_virtual("$reklama")||'';
         }          }
   
        if (length ($qs)<=255 && $qs !~ /(sstr)|(rand)|(comp)|(all=)/i) {         if (length ($qs)<=255 && $qs !~ /(sstr)|(rand)|(comp)|(all=)/i) {
Line 2055  my ($sth) = $dbh->prepare("SELECT t1.Id, Line 2059  my ($sth) = $dbh->prepare("SELECT t1.Id,
                      $fname=~s/\.txt$//;                       $fname=~s/\.txt$//;
                      if ($type=~/Т/ || $c<=1)                       if ($type=~/Т/ || $c<=1)
                      {                       {
                        open FF, ">$realHTMLDIR$fname-q.html" or die "ERROR! - $HTMLDIR$fname-q.html\n";                         open FF, ">$realHTMLDIR$fname-q.html" or die "ERROR! - $fname-q.html\n";
                        my $o=$globaloutput;                         my $o=$globaloutput;
                        $o.=&PrintTournament($dbh, $Id, 0);                         $o.=&PrintTournament($dbh, $Id, 0);
                        $o.=&Bottom;                         $o.=&Bottom;
Line 2069  my ($sth) = $dbh->prepare("SELECT t1.Id, Line 2073  my ($sth) = $dbh->prepare("SELECT t1.Id,
                        close FF;                         close FF;
                      }                       }
                      else {                       else {
                        open FF, ">$realHTMLDIR$fname.html" or die "ERROR! - $HTMLDIR$fname-q.html\n";                         open FF, ">$realHTMLDIR$fname.html" or die "ERROR! - $fname-q.html\n";
                        my $o=$globaloutput;                         my $o=$globaloutput;
                        $o.=&PrintTournament($dbh, $Id, 0);                         $o.=&PrintTournament($dbh, $Id, 0);
                        $o.=&Bottom;                         $o.=&Bottom;

Removed from v.1.108  
changed lines
  Added in v.1.113


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>