version 1.121, 2003/06/23 02:09:35
|
version 1.123, 2003/07/17 07:59:14
|
Line 176 sub GetTournament {
|
Line 176 sub GetTournament {
|
sub fetchquestion { |
sub fetchquestion { |
my ($sth,$q,$WithTour)=@_; |
my ($sth,$q,$WithTour)=@_; |
if ($WithTour) { |
if ($WithTour) { |
($$q{'QuestionId'}, $$q{'Question'},$$q{'Answer'},$$q{'Comments'},$$q{'Authors'}, |
($$q{'QuestionId'}, $$q{'Question'},$$q{'Answer'},$$q{'Comments'},$$q{'Authors'},$$q{'Sources'}, |
$$q{'Number'}, |
$$q{'Number'}, |
$$q{'Title'}, $$q{'TourTitle'}, $$q{'FileName'},$$q{'PlayedAt'},$$q{'TourNumber'}) = |
$$q{'Title'}, $$q{'TourTitle'}, $$q{'FileName'},$$q{'PlayedAt'},$$q{'TourNumber'}) = |
$sth->fetchrow; |
$sth->fetchrow; |
} else { |
} else { |
($$q{'QuestionId'}, $$q{'Question'},$$q{'Answer'},$$q{'Comments'},$$q{'Authors'}, |
($$q{'QuestionId'}, $$q{'Question'},$$q{'Answer'},$$q{'Comments'},$$q{'Authors'},$$q{'Sources'}, |
$$q{'Number'})= |
$$q{'Number'})= |
$sth->fetchrow; |
$sth->fetchrow; |
} |
} |
Line 203 sub SelectQuestions {
|
Line 203 sub SelectQuestions {
|
|
|
my $query; |
my $query; |
if ($WithTour) { |
if ($WithTour) { |
$query="SELECT QuestionId, Questions.Question, Answer, Comments, Authors, |
$query="SELECT QuestionId, Questions.Question, Answer, Comments, Authors, Sources, |
Questions.Number |
Questions.Number |
, t2.Title, t1.Title, t2.FileName, t2.PlayedAt,t1.Number |
, t2.Title, t1.Title, t2.FileName, t2.PlayedAt,t1.Number |
from Questions,Tournaments as t1, Tournaments as t2 |
from Questions,Tournaments as t1, Tournaments as t2 |
WHERE $where"; |
WHERE $where"; |
} else { |
} else { |
$query="SELECT QuestionId, Questions.Question, Answer, Comments, Authors, |
$query="SELECT QuestionId, Questions.Question, Answer, Comments, Authors, Sources, |
Questions.Number from Questions |
Questions.Number from Questions |
WHERE $where"; |
WHERE $where"; |
} |
} |
Line 250 sub tourhref {
|
Line 250 sub tourhref {
|
$res.=$a?"-a":"-q" unless $gr; |
$res.=$a?"-a":"-q" unless $gr; |
$res.=".html"; |
$res.=".html"; |
$res=~s/(\#\d+)(.*)$/$2$1/; |
$res=~s/(\#\d+)(.*)$/$2$1/; |
|
my $t=$res; |
|
$t=~s/\#.*$//; |
|
$res=~s/\.1// unless -e "$realHTMLDIR$t"; |
|
$t=$res; |
|
$t=~s/\#.*$//; |
|
$res=~s/\.html/-q\.html/ unless -e "$realHTMLDIR$t"; |
$res="$HTMLDIR$res" unless $opt_z; |
$res="$HTMLDIR$res" unless $opt_z; |
return $res; |
return $res; |
} else { |
} else { |
Line 1548 sub PrintDates {
|
Line 1554 sub PrintDates {
|
next |
next |
if (!$array[0]); |
if (!$array[0]); |
%Tournament = &GetTournament($dbh, $array[0]); |
%Tournament = &GetTournament($dbh, $array[0]); |
|
my $textid; |
|
if ($textid=$Tournament{'FileName'}) |
|
{ |
|
$textid=~s/\.txt//; |
|
} |
|
elsif ($textid=$Tournament{'Number'}) |
|
{ |
|
$fname=~s/\.txt//; |
|
$textid="$fname.$textid"; |
|
} |
|
else {$textid=$Tournament{'Id'}}; |
$list .= dd(img({src=>"/icons/folder.gif", alt=>"[*]"}) . |
$list .= dd(img({src=>"/icons/folder.gif", alt=>"[*]"}) . |
" " . a({href=>tourhref($Tournament{'FileName'},0,1)}, |
" " . a({href=>tourhref($textid,0,1)}, |
$Tournament{'Title'}, $Tournament{'PlayedAt'}||'')); |
$Tournament{'Title'}, $Tournament{'PlayedAt'}||'')); |
} |
} |
$sth->finish; |
$sth->finish; |