--- db/prgsrc/db.cgi 2004/11/21 13:37:29 1.138 +++ db/prgsrc/db.cgi 2005/12/10 00:03:55 1.142 @@ -433,9 +433,9 @@ action="/znatoki/cgi-bin/db.cgi"> -
Если при попытке поиска выдаётся сообщение об ошибке,
+
EOT
@@ -904,7 +904,7 @@ sub PrintList {
for (my $i = $first; $i <= $last; $i++) {
my $q=$q{$$Questions[$i-1]};
my $output;
- $output = &PrintQuestion($dbh, $q, 1, 0, 1,0,1 );
+ $output = &PrintQuestion($dbh, $q, 1, 0, 1,$text,1 );
# if (param('metod') && (param('metod') eq 'rus' || param('metod') eq 'proxy'))
{
$output=~s/\b($shablon)\b/\$1\<\/strong\>/gi;
@@ -1278,7 +1278,7 @@ sub PrintTour {
my $sth=SelectQuestions($dbh,\@Questions,0);
for ($q = 0; $q <= $#Questions; $q++) {
fetchquestion($sth,\%q,0);
- $output .= &PrintQuestion($dbh, \%q, $answer, 0,0,0,1);
+ $output .= &PrintQuestion($dbh, \%q, $answer, 0,0,$text,1);
}
$sth->finish;
$output .= hr({-'align'=>'center', -'width'=>'80%'});
@@ -1499,6 +1499,9 @@ $output.=""
}
$output=~s/\(pic: ([^\)]*)\)/ /g unless $text;
+ $output=~s/⌡/\ï/g;
+ $output=~s/⌠/\Ï/g;
+
$paramtour||=param("tour");
$fname=$fname.".$Question{'TourNumber'}" if $fname && $Question{'TourNumber'};
$fname||=param('tour');
@@ -1979,7 +1982,7 @@ MAIN:
my $texttour=$tour;
my ($sth,$dbh);
my($dsn) = "DBI:mysql:database=$dbname;host=$dbhost";
- $dbh = DBI->connect($dsn, $dbuser, $dbpass)
+ $dbh = DBI->connect($dsn, $dbuser, $dbpass)
# $dbh = DBI->connect("DBI:mysql:$dbname", $username, $dbpass)
or do {
print header.h1("Временные проблемы") . "База вопросов временно не
@@ -1991,7 +1994,7 @@ MAIN:
if (param('qid') && (param('qid')=~/^\d+$/) || $tour && $tour=~/^\d+$/) {
- my $destination='http://chgk.zaba.ru/search.html';
+# my $destination='http://chgk.zaba.ru/search.html';
# print header (-'Content-Type' => 'text/html',
# -'Location:'=> 'http:\\db.chgk.info');
Redirect($destination);
@@ -2229,7 +2232,7 @@ EOT
$QuestionNumber=($sth->fetchrow)[0]||0;
}
if ($QuestionNumber) {
- $globaloutput.= &PrintQuestion($dbh, $QuestionNumber, $withanswers||0, $qnum, 1,0,0);
+ $globaloutput.= &PrintQuestion($dbh, $QuestionNumber, $withanswers||0, $qnum, 1,$text,0);
# $dbh, $Id, $answer, $qnum, $title, $text
} else {
$globaloutput.=&PrintTournament($dbh, $tour, $withanswers);