Diff for /db/prgsrc/db.cgi between versions 1.107 and 1.112

version 1.107, 2003/04/20 12:04:25 version 1.112, 2003/04/20 12:45:30
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 35  $outputkvo=100 if $outputkvo>100; Line 37  $outputkvo=100 if $outputkvo>100;
   
 if (param('debug')) {$debug=1; $printqueries=1}  if (param('debug')) {$debug=1; $printqueries=1}
 *STDERR=*STDOUT if $debug;  *STDERR=*STDOUT if $debug;
 if ($url !~ /db\.chgk\.info/ && $url !~ /localhost/ ) {  if ($url !~ /db\.chgk\.info/ && $url !~ /localhost/ && $url !~ /bilbo/) {
    my $u="http://db.chgk.info/cgi-bin/db.cgi?$qs";     my $u="http://db.chgk.info/cgi-bin/db.cgi?$qs";
    Redirect ($u);     Redirect ($u);
    exit;     exit;
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 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.107  
changed lines
  Added in v.1.112


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