# $Id: russian.cf,v 1.01 2002/11/15 by Andrei Malashevich # edited from german.cf,v 1.01 by Harald Weinreich # # Russian language modifications for modern.cf output definition file. # # A hash (#) in the first column denotes a comment and is not processed # even inside a definition. Hashes not in the first column are left as-is. # # Variable substitution occurs on these definitions. If you want # a dollar-sign ($) to occur in the output, escape it with backslash (\). # Other metacharacters (quotes, asterisks, etc) probably don't need to be # escaped. Printf-like special characters are allowed: \n \t \r etc. # # The ending newline is chopped off from each definiton. So # # # abcxyz # # # becomes "abcxyz". You may have blank lines in between the beginning # and ending tags, or use the newline character \n. # # # CGI defaults are set in modern.cf charset : koi8-r ############################################################################## # The output of '{nph-}search.cgi' consists of the following tags: # # ResultHeader - modified # CreateNavBars # ResultSetBegin # ( Errors from 'broker' ) # foreach object { # PrintObject # } # ResultSetEnd # EndBrokerResults # ( TruncateWarning ) # ResultTrailer # # ############################################################################## # First output for the HTML containing the results. Should probably include # tag and the user query. # <ResultHeader> <HEAD> <TITLE>Результат поиска для: $html_query

Результат поиска для: $html_query

$filterhint # Calculations to obtain $navigationBar # Original code by Javier Masa Marin # if ($totalPages > 0) { # elements before and after current page in navigation bar local($navPart) = 5; $prevPage = ""; $prevPage = "\n\n<= Пред ·" if ($page > 1); $nextPage = ""; $nextPage = "· След =>" if ($page < $totalPages); $pageList = ""; local($startP) = ($page <= $navPart) ? 1 : $page - $navPart; for ($i = $startP; $i < $page; $i++) { $pageList .= "$i\n"; } $pageList .= "$page\n"; local($endP) = ($page + $navPart >= $totalPages) ? $totalPages : $page + $navPart; for ($i = $page+1; $i <= $endP; $i++) { $pageList .= "\n$i\n"; } $navigationBar = "\n$prevPage\n $pageList\n $nextPage" if ($totalPages > 1); } # Output just before beginning the loop over objects returned by the broker. #
\n
$totnumber объектов найдено $navigationBar Страница: $page/$totalPages
# # # # # Новый поиск:
\n
# # # # # Поиск: $navigationBar Powered by Harvest
# PER-OBJECT DEFINITIONS # ====================== # # VARIABLES: # # $url Object url: http://www.cia.gov:3333/Spies/KGB/secret.html # $A URL Access: http # $H URL Host : www.cia.gov:3333 # $P URL Path : /Spies/KGB/secret.html # $D URL Dir : /Spies/KGB/ # $F URL File : secret.html # $cs_url URL to the SOIF object in the broker databse # $cs_[ahp] elements of $cs_url as above with $url # $desc Description attribute of the matched object # $opaque A matched line (or all matched lines in obj-at-a-time mode) # $usermsg A user message # $attributes Requested attributes # $objectType Type of object if not HTML # $objectSize Size of object # $objectDate Last modification date of object # # PerObjectFunction is eval'd before every object is printed out. # # init output variables $objectType=""; $objectSize=""; $objectUpdate=""; $objectWeight = ""; $opaquePerObjectCount = 1; $lastOpaqueObject = ""; # create description $description = "Datei:  $F"; $description = $desc if (length($desc) > 5); # highlight search words. for ($i=0; $i<=$#searchwords; $i++) { s/(\b$searchwords[$i]\b)/$1<\/b>/ig; } # Create the HTML code to print the weight balls if ($maxWeight > 0 && $weightflag) { $nWeight = int($weight * 5 / $maxWeight); for ($idxWeight = 1; $idxWeight <= $nWeight; $idxWeight++) { $objectWeight .= "\"*\""; } # $objectWeight = "".int($weight * 100 / $maxWeight)."%"; } # format matched lines if ($opaque ne '') { $opaque = "Совпадения: $opaque..." } # PerAttributeFunction is eval'd before the Attributes are printed out. # # Remove all empty lines $val =~ s/^(\s*)//mg; # Now prepare the object's type and size to display at the description. if ($att eq "type") { ## show file type $objectType = "[".$val."]" if !($val =~ /HTML|HTTP-Query/); $att=""; # avoid } elsif ($att eq "file-size") { ## calculate file size $val = int($val/1024); $objectSize = $val." KByte" if ($val > 150); # more than 150 KByte $val = int($val/10.24); $objectSize = ($val/100)." MByte" if ($val > 100); # more than one meg $att=""; } elsif ($att eq "last-modification-time") { ## calculate last modification date local(@date,@months,$month,$minute,$year); @date = localtime($val); @months = ('Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'D ez'); $month = $months[$date[4]]; $minute = $date[1]; $minute = "0$minute" if $minute < 10; $year = $date[5]+1900; $objectUpdate = "$date[3]. $month $year"; # $date[2]:$minute"; $att=""; } else { ## other attributes # insert commas to separate headings $val =~ s/\n(.)/, $1/mg; # If more than 120 Characters, display only the first 120 plus "..." $val =~ s/^((.|\n){120})(.|\n)*/$1.../; #highlight search words. for ($i=0; $i<=$#searchwords; $i++) { $val =~ s/(\b$searchwords[$i]\b)/$1<\/font>/ig; } $att =~ s/headings/Заголовки/; } # ====================================================================== # ERROR, STATUS and WARNING functions # ====================================================================== # A warning message printed only when the broker might have truncated # the result set. Only printed if the number of matched lines equals # the 'maxresultflag' or the number of returned objects equals the # 'maxobjflag' value of the query.html form. #

Внимание: Результаты поиска были урезаны до ДН $nopaquelines совпавших строк и $nreturned найденных объектов.

\n # A warning message printed only when the broker returned 0 results. #

По Вашему запросу $html_query не найдено ни одного документа.

Попробуйте использовать более мягкие условия.

Советы:

  • Убедитесь в правильности написания всех слов.
  • Попробуйте ввести другие или более общие ключевые слова.
  • Выберите "Поиск по частям слов".
  • Увеличьте "Количество допустимых ошибок на странице поиска.
Пожалуйста, обратитесь за помощью по составлению запросов.

\n # Error Message returned if there is no query string sent. #

Не введен запрос.

Пожалуйста, введите одно или несколько ключевых слов.

\n # Error message if broker is not available. # # #

Поисковая система временно не доступна.

Повторите попытку позже.

\n # Message returned if the broker sends back a # 111 - Broker is too heavily loaded # reply. #

Поисковый сервер перегружен

Извините, поисковый брокер на $host, port $port на данный момент перегружен, чтобы обработать ваш запрос.

Повторите попытку позже.

# Message returned if the broker sends back a # 111 - PARSE ERROR # reply. #

Ваш запрос $html_query неправильно сформулирован.

Пожалуйста, обратитесь за помощью по составлению запросов за деталями.

Обычно синтаксические ошибки следующие:

  • Не использованы кавычки во фразах и регулярных выражениях.
    Например:
    Поисковая система следует заменить на "Поисковая система". Заметьте, что одна точка (``.'') в ключевом слове требует кавычек (например, "3.0").
  • Пропущены знаки препинания.
    Для струтурированных запросов требуется двоеточие или скобки. Наприме, Type:PostScript or, (Type : PostScript)
\n