📄 rediris.cf
字号:
# $Id: modern.cf,v 1.1 2002/07/05 by Harald Weinreich <harald@weinreichs.de>## Definitions for '{nph-}search.cgi' configuration.## 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## <FooBar># abcxyz# </FooBar>## becomes "abcxyz". You may have blank lines in between the beginning# and ending tags, or use the newline character \n.### CGI defaults.## In this section you can give default values for any attribute that would# normally be passed in from the CGI query form. The following attributes# are currently available:## brokerqueryconfig : Name of a broker specific configuration file# lifetime : Maximum lifetime of a query (see also <Lifetime> section)# caseflag : Whether the query is casesensitive ["on" or "off"]# wordflag : Match on word boundaries ["on" or "off"]# opaqflag : Show matched lines ["on" or "off"]# descflag : Return object description ["on" or "off"]# noregexflag : Don't do regular expressions ["on" or "off"]# maxresultflag : Maximum number of results to return# maxobjflag : Maximum number of objects to return# maxlineflag : Maximum number of matched lines# errors : Number of spelling errors# broker : Name of broker# host : Name of broker host# attributes : Space sperated list of attributes to return# sort : Sort options ["by-rank"]# These defaults mimic the values on the provided query-glimpse-modern.html form.<Default>caseflag : onwordflag : onerrorflag : 0opaqueflag : ondescflag : onmaxobjflag : 500maxlineflag : 30maxresultflag : 3000perpageflag : 25sort : by-rank</Default># 'GLOBAL' VARIABLES: are defined globally within the {nph-}search.cgi program,# but not necessarily set at all times.## $query the user query string# $html_query the user query string, special HTML characters escaped# $bquery the query string sent to the broker# $host the broker hostname# $port the broker port# $hp_url the URL of the broker query (home) page# $maxresult the maximum number of matched lines the broker will return# $nobjects a running count of the number of objects returned# $nopaquelines a running count of the number of opaque (matched) lines## definitions here can be output in other definitions. Each definition# here is placed into the %CFG associative array. For example,# to print out the Timeout defined below, write $CFG{'Timeout'}.## The URL to the Harvest Project home page.#<HarvestUrl>http://harvest.sourceforge.net/</HarvestUrl># The amount of time to wait for the broker results.# Can use aritmetic # here also, eg: 5*60## We use a conservative 5 minutes here.#<Timeout>300</Timeout># InitFunction can be some perl code which gets eval'd before they# query is sent. Use this for any special hackings.#<InitFunction>$cs_urlX = $csumflag ? 'Y' : undef;</InitFunction># The MIME content type of the query results. Should be "text/html"# if we are going to return HTML tags.#<ContentType>text/html</ContentType>############################################################################### RESULT SECTION## The output of '{nph-}search.cgi' consists of the following tags:## ResultHeader# CreateNavBars# ResultSetBegin# ( Errors from 'broker' )# foreach object {# PrintObject# }# ResultSetEnd# EndBrokerResults# ( TruncateWarning )# ResultTrailer################################################################################# First output for the HTML containing the results. Should probably include# <TITLE> tag and the user query.#<ResultHeader><HEAD><TITLE>Search Results for: $html_query</TITLE><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style><!--.rNavBar { color: #6699cc; font-size: small; font-family: arial, helvetica, sans-serif;}.rMoreInfo { color: #6699cc; font-size: small; font-family: arial, helvetica, sans-serif; font-style: italic; text-decoration: none;}dt { margin-left:1px; }dd { margin-left:40px; }// --></style></HEAD><BODY bgcolor=white><H2>Search Results for: <font color="#800000">$html_query</font></H2><HR></ResultHeader># Final HTML section for the output. Should probably contain a pointer# to the broker home-page ($hp_url) and a pointer to the Harvest# home page.#<ResultTrailer>#----------------------------------------------------------------------# JMM - 20011020# We close the HTML page#---------------------------------------------------------------------,<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr align="center"> <td width="100%"> $rNavigationBar </td> <td><a href="$CFG{'HarvestUrl'}"><img alt="Powered by harvest" border="0" src="$rHarvestIcon"></a></td></tr></table></body></html>#---------------------------------------------------------------------'</ResultTrailer>#----------------------------------------------------------------------# JMM 20011020# Calculations to obtain $rResultsBar and $rNavigationBar# We use them in <ResultSetBegin>#---------------------------------------------------------------------,<CreateNavBars>if ($rTotHtmlFiles > 0){ $rCurrentPage = (!$current_page) ? 1 : $current_page; $rPrevPage = ""; if ($rCurrentPage > 1) { $rPrevPage = $rCurrentPage - 1 ; $rPrevPage = "\n\n<a class=\"rNavBar\" href=\"$tmp_www/$^T-${$}-$rPrevPage.html\"><< Prev</a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -