--- db/prgsrc/db.cgi 2000/10/20 04:06:54 1.6 +++ db/prgsrc/db.cgi 2000/10/21 04:25:22 1.8 @@ -9,7 +9,7 @@ use POSIX qw(locale_h); my ($PWD) = `pwd`; chomp $PWD; my ($SRCPATH) = "$PWD/../dimrub/src"; -my ($ZIP) = "/usr/bin/zip"; +my ($ZIP) = "/home/piataev/bin/zip"; my ($SENDMAIL) = "/usr/sbin/sendmail"; my ($TMSECS) = 30*24*60*60; my (%RevMonths) = @@ -480,7 +480,7 @@ sub Get12Random { WHERE QuestionId=$q"); $sth->execute; $t = ($sth->fetchrow)[0]; - } until !$chosen{$q} && $t =~ /$type/; + } until !$chosen{$q} && $type =~ /[$t]/; $chosen{$q} = 'y'; push @questions, $q; } @@ -603,16 +603,18 @@ MAIN: } if (param('rand')) { - my ($type, $qnum) = ('þ', 12); - $type = 'â' if (param('brain')); + my ($type, $qnum) = ('', 12); + $type .= 'â' if (param('brain')); + $type .= 'þ' if (param('chgk')); $qnum = param('qnum') if (param('qnum') =~ /^\d+$/); + $qnum = 0 if (!$type); if (param('email') && -x $SENDMAIL && open(F, "| $SENDMAIL -t -n")) { my ($Email) = param('email'); my ($mime_type) = $text ? "plain" : "html"; print F <