Diff for /db/prgsrc/db.cgi between versions 1.78 and 1.79

version 1.78, 2002/11/10 16:10:53 version 1.79, 2002/11/26 05:34:39
Line 1041  sub PrintField { Line 1041  sub PrintField {
             $value =~ s/^\s+/<br>&nbsp;&nbsp;&nbsp;&nbsp;/mg;              $value =~ s/^\s+/<br>&nbsp;&nbsp;&nbsp;&nbsp;/mg;
             $value =~ s/^\|([^\n]*)/<pre>$1<\/pre>/mg;              $value =~ s/^\|([^\n]*)/<pre>$1<\/pre>/mg;
             $value =~ s/\s+-+\s+/&nbsp;&#0150; /mg;              $value =~ s/\s+-+\s+/&nbsp;&#0150; /mg;
               $value =~ s/(http:\/\/\S+[^\s\)\(\,\.])/<a href="$1">$1<\/a>/g if $header !~ /^Авто/;
   #           $value =~ s/(http:\/\/(?:\w+.)+[\w\\\~]+(\?[^\s.]+)?)/<a href="$1">$1<\/a>/g if $header !~ /^Авто/;
 #           $value =~ s/(\s)"/$1&#147;/mg;  #           $value =~ s/(\s)"/$1&#147;/mg;
 #           $value =~ s/^"/&#147;/mg;  #           $value =~ s/^"/&#147;/mg;
 #           $value =~ s/"/&#148;/mg;  #           $value =~ s/"/&#148;/mg;
Line 1078  return "" if $fname=~/mgp0203/; Line 1080  return "" if $fname=~/mgp0203/;
         }          }
   
   
         $output.= "<a NAME=\"$qnum\">";          $output.= "<a NAME=\"$qnum\">" unless $text;
   
         $output .=          $output .=
                 &PrintField("Вопрос $qnum", $Question{'Question'}, $text);                  &PrintField("Вопрос $qnum", $Question{'Question'}, $text);
Line 1087  return "" if $fname=~/mgp0203/; Line 1089  return "" if $fname=~/mgp0203/;
                 $output .=                  $output .=
                         &PrintField("Ответ", $Question{'Answer'}, $text);                          &PrintField("Ответ", $Question{'Answer'}, $text);
   
                 if ($Question{'Authors'}) {                  if ($Question{'Authors'} ) {
                       my $q=$Question{'Authors'};                        my $q=$Question{'Authors'};
 ###АВТОРА!!  ###АВТОРА!!
                       my $sth=$dbh->prepare("select Authors.Id,Name, Surname, Nicks from Authors, A2Q                        my $sth=$dbh->prepare("select Authors.Id,Name, Surname, Nicks from Authors, A2Q
                                   where Authors.Id=Author And Question=$Id");                                    where Authors.Id=Author And Question=$Id");
                        $sth->execute;                         $sth->execute;
                        my ($AuthorId,$Name, $Surname,$other,$Nicks);                         my ($AuthorId,$Name, $Surname,$other,$Nicks);
                         if (!$text) {
                        while ((($AuthorId,$Name, $Surname,$Nicks)=$sth->fetchrow),$AuthorId)                         while ((($AuthorId,$Name, $Surname,$Nicks)=$sth->fetchrow),$AuthorId)
                        {                         {
                          my ($firstletter)=$Name=~m/^./g;                           my ($firstletter)=$Name=~m/^./g;
Line 1115  return "" if $fname=~/mgp0203/; Line 1117  return "" if $fname=~/mgp0203/;
                            }                             }
                            $q=~s/($sha)/a({href=>url."?qofauthor=$AuthorId"},$1)/ei;                             $q=~s/($sha)/a({href=>url."?qofauthor=$AuthorId"},$1)/ei;
                        }                         }
                          }
                         $output .= &PrintField("Автор(ы)", $q, $text);                          $output .= &PrintField("Автор(ы)", $q, $text);
   
                 }                  }
Line 1161  $output.="</span>" Line 1163  $output.="</span>"
   
         }          }
         $output.=br.a({href=> url."?metod=proxy&qid=$Id"}, 'Близкие вопросы').p          $output.=br.a({href=> url."?metod=proxy&qid=$Id"}, 'Близкие вопросы').p
              if $answer;               if $answer && !$text;
         return $output;          return $output;
 }  }
   

Removed from v.1.78  
changed lines
  Added in v.1.79


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>