--- db/prgsrc/db.cgi 2003/04/14 20:06:59 1.97 +++ db/prgsrc/db.cgi 2003/04/19 22:50:06 1.99 @@ -23,7 +23,7 @@ $outputkvo=100 if $outputkvo>100; if (param('debug')) {$debug=1; $printqueries=1} *STDERR=*STDOUT if $debug; -if ($url !~ /db\.chgk\.info/ && $url !~ /localhost/ ) { +if ($url !~ /db\.chgk\.info/ && $url !~ /(localhost)||(bilbo)/ ) { my $u="http://db.chgk.info/cgi-bin/db.cgi?$qs"; Redirect ($u); exit; @@ -142,11 +142,13 @@ sub fetchquestion { my ($sth,$q,$WithTour)=@_; if ($WithTour) { ($$q{'Question'},$$q{'Answer'},$$q{'Comments'},$$q{'Authors'}, + $$q{'Sources'}, $$q{'Number'}, $$q{'Title'}, $$q{'TourTitle'}, $$q{'FileName'},$$q{'PlayedAt'},$$q{'TourNumber'}) = $sth->fetchrow; } else { ($$q{'Question'},$$q{'Answer'},$$q{'Comments'},$$q{'Authors'}, + $$q{'Sources'}, $$q{'Number'})= $sth->fetchrow; } @@ -165,13 +167,13 @@ sub SelectQuestions { my $query; if ($WithTour) { - $query="SELECT Questions.Question, Answer, Comments, Authors, + $query="SELECT Questions.Question, Answer, Comments, Authors, Sources, Questions.Number , t2.Title, t1.Title, t2.FileName, t2.PlayedAt,t1.Number from Questions,Tournaments as t1, Tournaments as t2 WHERE $where"; } else { - $query="SELECT Questions.Question, Answer, Comments, Authors, + $query="SELECT Questions.Question, Answer, Comments, Authors,Sources, Questions.Number from Questions WHERE $where"; } @@ -182,7 +184,6 @@ sub SelectQuestions { return $sth; } - # Reads one question from the DB. Gets DB handler and Question ID. sub GetQuestion { my ($dbh, $QuestionId) = @_;