Diff for /db/prgsrc/db.cgi between versions 1.6 and 1.8

version 1.6, 2000/10/20 04:06:54 version 1.8, 2000/10/21 04:25:22
Line 9  use POSIX qw(locale_h); Line 9  use POSIX qw(locale_h);
 my ($PWD) = `pwd`;  my ($PWD) = `pwd`;
 chomp $PWD;  chomp $PWD;
 my ($SRCPATH) = "$PWD/../dimrub/src";  my ($SRCPATH) = "$PWD/../dimrub/src";
 my ($ZIP) = "/usr/bin/zip";  my ($ZIP) = "/home/piataev/bin/zip";
 my ($SENDMAIL) = "/usr/sbin/sendmail";  my ($SENDMAIL) = "/usr/sbin/sendmail";
 my ($TMSECS) = 30*24*60*60;  my ($TMSECS) = 30*24*60*60;
 my (%RevMonths) =   my (%RevMonths) = 
Line 480  sub Get12Random { Line 480  sub Get12Random {
                                 WHERE QuestionId=$q");                                  WHERE QuestionId=$q");
                         $sth->execute;                          $sth->execute;
                         $t = ($sth->fetchrow)[0];                          $t = ($sth->fetchrow)[0];
                 } until !$chosen{$q} && $t =~ /$type/;                  } until !$chosen{$q} && $type =~ /[$t]/;
                 $chosen{$q} = 'y';                  $chosen{$q} = 'y';
                 push @questions, $q;                  push @questions, $q;
         }          }
Line 603  MAIN: Line 603  MAIN:
         }          }
   
         if (param('rand')) {          if (param('rand')) {
                 my ($type, $qnum) = ('þ', 12);                  my ($type, $qnum) = ('', 12);
                 $type = 'â' if (param('brain'));                  $type .= 'â' if (param('brain'));
                   $type .= 'þ' if (param('chgk'));
                 $qnum = param('qnum') if (param('qnum') =~ /^\d+$/);                      $qnum = param('qnum') if (param('qnum') =~ /^\d+$/);    
                   $qnum = 0 if (!$type);
                 if (param('email') && -x $SENDMAIL &&                   if (param('email') && -x $SENDMAIL && 
                 open(F, "| $SENDMAIL -t -n")) {                  open(F, "| $SENDMAIL -t -n")) {
                         my ($Email) = param('email');                          my ($Email) = param('email');
                         my ($mime_type) = $text ? "plain" : "html";                          my ($mime_type) = $text ? "plain" : "html";
                         print F <<EOT;                          print F <<EOT;
 To: $Email  To: $Email
 From: dimrub\@icomverse.com  From: olegstemanov\@mail.ru
 Subject: Sluchajnij Paket Voprosov "Chto? Gde? Kogda?"  Subject: Sluchajnij Paket Voprosov "Chto? Gde? Kogda?"
 MIME-Version: 1.0  MIME-Version: 1.0
 Content-type: text/$mime_type; charset="koi8-r"  Content-type: text/$mime_type; charset="koi8-r"

Removed from v.1.6  
changed lines
  Added in v.1.8


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