version 1.63, 2002/05/04 03:35:36
|
version 1.65, 2002/05/13 23:59:42
|
Line 645 sub PrintList {
|
Line 645 sub PrintList {
|
|
|
print "$nav".br."\n"; |
print "$nav".br."\n"; |
for (my $i = $first; $i <= $last; $i++) { |
for (my $i = $first; $i <= $last; $i++) { |
my $output = &PrintQuestion($dbh, $$Questions[$i-1], 1, $i, 1); |
my $output = &PrintQuestion($dbh, $$Questions[$i-1], 1, 0, 1); |
if (param('metod') eq 'rus' || param('metod') eq 'proxy') |
if (param('metod') eq 'rus' || param('metod') eq 'proxy') |
{ |
{ |
$output=~s/\b($shablon)\b/\<strong\>$1\<\/strong\>/gi; |
$output=~s/\b($shablon)\b/\<strong\>$1\<\/strong\>/gi; |
Line 1026 sub PrintQuestion {
|
Line 1026 sub PrintQuestion {
|
my ($dbh, $Id, $answer, $qnum, $title, $text) = @_; |
my ($dbh, $Id, $answer, $qnum, $title, $text) = @_; |
my ($output, $titles) = ('', ''); |
my ($output, $titles) = ('', ''); |
my (%Question) = &GetQuestion($dbh, $Id); |
my (%Question) = &GetQuestion($dbh, $Id); |
|
$qnum = $Question{'Number'} |
|
if ($qnum == 0); |
if (!$text) { |
if (!$text) { |
$output .= hr({width=>"50%"}); |
$output .= hr({width=>"50%"}); |
if ($title) { |
if ($title) { |
Line 1038 sub PrintQuestion {
|
Line 1040 sub PrintQuestion {
|
a({href=>url . "?tour=$fname"}, $Tournament{'Title'}, $Tournament{'PlayedAt'})); |
a({href=>url . "?tour=$fname"}, $Tournament{'Title'}, $Tournament{'PlayedAt'})); |
$titles .= |
$titles .= |
dl(dd(img({src=>"/icons/folder.open.gif"}) . " " . |
dl(dd(img({src=>"/icons/folder.open.gif"}) . " " . |
a({href=>url . "?tour=$fname.$Tour{Number}"}, $Tour{'Title'}))); |
a({href=>url . "?tour=$fname.$Tour{Number}#$qnum"}, $Tour{'Title'}))); |
} |
} |
$output .= dl(strong($titles)); |
$output .= dl(strong($titles)); |
} |
} |
|
|
$qnum = $Question{'Number'} |
|
if ($qnum == 0); |
$output.= "<a NAME=\"$qnum\">"; |
|
|
$output .= |
$output .= |
&PrintField("÷ÏÐÒÏÓ $qnum", $Question{'Question'}, $text); |
&PrintField("÷ÏÐÒÏÓ $qnum", $Question{'Question'}, $text); |
Line 1651 $sstr=~s/[^ÊÃÕËÅÎÇÛÝÚÈßÆÙ×ÁÐÒÏÌÄÖÜÑÞÓÍÉÔ
|
Line 1653 $sstr=~s/[^ÊÃÕËÅÎÇÛÝÚÈßÆÙ×ÁÐÒÏÌÄÖÜÑÞÓÍÉÔ
|
$tour = ($sth->fetchrow)[0]; |
$tour = ($sth->fetchrow)[0]; |
$sth->finish; |
$sth->finish; |
} |
} |
print &PrintTournament($dbh, $tour, param('answer')); |
my $QuestionNumber=0; |
|
if (my $qnum=param('qnumber')){ |
|
my ($sth) = $dbh->prepare("SELECT QuestionId FROM Questions |
|
WHERE ParentId=$tour AND Number=$qnum"); |
|
$sth->execute; |
|
$QuestionNumber=($sth->fetchrow)[0]||0; |
|
} |
|
if ($QuestionNumber) { |
|
|
|
print &PrintQuestion($dbh, $QuestionNumber, param('answer'), 0, 1); |
|
} else { |
|
print &PrintTournament($dbh, $tour, param('answer')); |
|
} |
} |
} |
if (!$text) { |
if (!$text) { |
print &Include_virtual("../dimrub/db/footer.html"); |
print &Include_virtual("../dimrub/db/footer.html"); |