diff options
Diffstat (limited to 'xapian/cp-query')
-rw-r--r-- | xapian/cp-query | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/xapian/cp-query b/xapian/cp-query new file mode 100644 index 0000000000..f96fb4cb7d --- /dev/null +++ b/xapian/cp-query @@ -0,0 +1,141 @@ +$httpheader{Content-Type,text/html; charset=utf-8} +<!DOCTYPE html> +<html> +$set{flag_spelling,$ne{$cgi{SPELL},0}} +$set{thousand,$.}$set{decimal,.}$setmap{BN,,Any Country,uk,England,fr,France} +${ +$def{PREV, +$if{$ne{$topdoc,0},<INPUT TYPE=image NAME="<" ALT="<" +SRC="/images/xapian-omega/prev.png" BORDER=0 HEIGHT=30 WIDTH=30>, +<IMG ALT="" SRC="/images/xapian-omega/prevoff.png" HEIGHT=30 WIDTH=30>} +} + +$def{NEXT, +$if{$ne{$last,$msize},<INPUT TYPE=image NAME=">" ALT=">" +SRC="/images/xapian-omega/next.png" BORDER=0 HEIGHT=30 WIDTH=30>, +<IMG ALT="" SRC="/images/xapian-omega/nextoff.png" HEIGHT=30 WIDTH=30>} +} + +$def{P,<INPUT TYPE=image NAME="$1" VALUE="$1" SRC="/images/xapian-omega/page-$2.png" BORDER=0$opt{a} ALT="$1">} +$def{PAGE,$if{$gt{$1,9},$if{$gt{$1,99},$P{$1,$div{$1,100}}}$P{$1,$mod{$div{$1,10},10}}}$P{$1,$mod{$1,10}}} + +$def{S,<IMG SRC="/images/xapian-omega/page-$2s.png"$opt{a} ALT=$1>} +$def{SPAGE,$if{$gt{$1,9},$if{$gt{$1,99},$S{$1,$div{$1,100}}}$S{$1,$mod{$div{$1,10},10}}}$S{$1,$mod{$1,10}}} +} + +$def{PREV,$if{$ne{$topdoc,0},<INPUT TYPE=submit class="xapian-omega-search-button" NAME="<" VALUE="<<">}} + +$def{PAGE,<INPUT TYPE=submit class="xapian-omega-search-button" NAME="[" VALUE="$1">} + +$def{SPAGE,<INPUT TYPE=submit class="xapian-omega-search-button" NAME="[" VALUE="$1" DISABLED=disabled>} + +$def{NEXT,$if{$ne{$last,$msize},<INPUT TYPE=submit class="xapian-omega-search-button" NAME=">" VALUE=">>">}} + +<head> +<title>$if{$query,Search results: $html{$query},Search results}</title> +$if{$opt{topterms},$include{inc/toptermsjs}} +<link rel="shortcut icon" href="/6.2/media/navigation/favicon.ico"> +<link type="text/css" href="/6.2/normalize.css" rel="Stylesheet"> +<link type="text/css" href="/6.2/default.css" rel="Stylesheet"> +<meta name="viewport" content="width=device-width,initial-scale=1"> +<script type="text/javascript" language="javascript"><!-- +function f2(n) {return (n>9?"":"0")+n;} +function write_date(time_t) { +var d=new Date();d.setTime(time_t*1000); +var D=d.getFullYear()+"-"+f2(d.getMonth()+1)+"-"+f2(d.getDate()); +var T=f2(d.getHours())+":"+f2(d.getMinutes())+":"+f2(d.getSeconds()); +document.write("<span title=\""+D+" "+T+"\">Modified:<br><b>"+D+"</b></span>"); +} +// --> +</script> +</head> +<body bgcolor="#ffffff"> +<div class="header-extrawurst"> +<header><div class="logo-container"><a class="logo" href="/"><div class="symbol"></div> +<p>Collabora Office Help</p></a></div></header> +</div> +<div id="DisplayArea" itemprop="articleBody"> +<FORM NAME=P METHOD=GET +ACTION="$html{$or{$env{SCRIPT_NAME},omega}}" TARGET="_top"> +<center> +<INPUT id="omega-autofocus" type=search NAME=P VALUE="$html{$query}" SIZE=65 autofocus> +<script> +if (!("autofocus" in document.createElement("input"))) + document.getElementById("omega-autofocus").focus(); +</script> +<INPUT TYPE=SUBMIT class="xapian-omega-search-button" VALUE="🔍"> +<hr> +$if{,$include{inc/anyalldropbox},$include{inc/anyallradio}} +$if{$opt{topterms}, + <div title="Suggested terms to add to your query" + style="text-align:left;background:#cfc;border:1px solid green;padding:2px;font:11px verdana$. arial$. helvetica$. sans-serif;"> + $map{$topterms,<span style="white-space:nowrap"><INPUT TYPE=checkbox NAME=X VALUE="$html{$prettyterm{$_}}" onClick="C(this)">$html{$prettyterm{$_}}</span> } + <BR><NOSCRIPT><INPUT TYPE=hidden NAME=ADD VALUE=1></NOSCRIPT> + </div> +} +<br> +$if{$suggestion,Did you mean: <a href="$html{$or{$env{SCRIPT_NAME},omega}?DB=$url{$dbname}&P=$url{$suggestion}$if{$ne{$hitsperpage,10},&HITSPERPAGE=$hitsperpage}$if{$fmt,&FMT=$url{$fmt}}$if{$cgi{COLLAPSE},&COLLAPSE=$url{$cgi{COLLAPSE}}}$map{$relevants,&R=$_}$if{$cgi{THRESHOLD},&THRESHOLD=$url{$cgi{THRESHOLD}}"}$map{$cgilist{B},&B=$url{$_}}&SPELL=0}">$html{$suggestion}</a><br>} +$or{$html{$error}, +$if{$eq{$msize,0}, +$if{$query,No documents match your query, +<hr>Searching $nice{$dbsize} documents +}, +$if{$not{$msizeexact}, + $nice{$add{$topdoc,1}}-$nice{$last} of about $nice{$msize} matches, + $if{$and{$eq{$last,$msize},$eq{$topdoc,0}}, + All $nice{$msize} matches, + $nice{$add{$topdoc,1}}$if{$ne{$add{$topdoc,1},$last},-$nice{$last}} of exactly $nice{$msize} matches} +} +<hr> +</center> +$list{$map{$queryterms,$list{$html{$uniq{$unstem{$_}}},<b>,</b>/<b>,</b>}: $nice{$freq{$_}}},Term frequencies: ,$. ,} +<br><small>Search took $time seconds</small> +<table> +$hitlist{<tr><td><B><A HREF="$html{$field{url}}">$html{$or{$field{caption},$field{title},$prettyurl{$field{url}},Untitled}}</A></B><BR> +<small>$highlight{$field{sample},$terms}$if{$field{sample},...}</small><br> +<A HREF="$html{$field{url}}">$html{$field{url}}</A><br> +<small> +matching: +<i>$list{$map{$terms,$html{$prettyterm{$_}}},$. ,</i> and <i>}</i></small>${for lynx:}<p></td></tr>} +</table> + +<br><center> + +${suppress next, prev, and page links if there's only one page} +$if{$ne{$lastpage,1}, +$set{a,$if{$opt{pagelink_height}, HEIGHT=$opt{pagelink_height}}$if{$opt{pagelink_width}, WIDTH=$opt{pagelink_width}}} + +${1-W ... X-(this)-Y ...} +$set{w,$min{3,$add{$thispage,-1}}} +$set{x,$max{$add{$opt{w},1},$add{$thispage,-3}}} +$set{y,$min{$lastpage,$add{$thispage,8}}} +$PREV +$map{$range{1,$opt{w}},$PAGE{$_}} +$if{$ne{$add{$opt{w},1},$opt{x}},...} +$map{$range{$opt{x},$add{$thispage,-1}},$PAGE{$_}} +$SPAGE{$thispage} +$map{$range{$add{$thispage,1},$opt{y}},$PAGE{$_}} +$if{$ne{$opt{y},$lastpage},...} +$NEXT +} +}} +</center><br> +$if{$dbname,<INPUT TYPE=hidden NAME=DB VALUE="$html{$dbname}">} +$if{$ne{$topdoc,0},<INPUT TYPE=hidden NAME=TOPDOC VALUE=$topdoc>} +$if{$ne{$hitsperpage,10},<INPUT TYPE=hidden NAME=HITSPERPAGE VALUE=$hitsperpage>} +$if{$fmt,<INPUT TYPE=hidden NAME=FMT VALUE="$html{$fmt}">} +$if{$cgi{COLLAPSE},<INPUT TYPE=hidden NAME=COLLAPSE VALUE="$html{$cgi{COLLAPSE}}">} +$if{$queryterms,<INPUT TYPE=hidden NAME=xP VALUE="$html{$queryterms}">} +<INPUT TYPE=hidden NAME=xDB VALUE="$html{$dbname}"> +<INPUT TYPE=hidden NAME=xFILTERS VALUE="$html{$filters}"> +$list{$relevants,<INPUT TYPE=hidden NAME=R VALUE=",.,">} +$if{$cgi{THRESHOLD},<INPUT TYPE=hidden NAME=THRESHOLD VALUE="$html{$cgi{THRESHOLD}}">} +${Preserve any B filters used - this needs modifying if you modify this template + to have B on radio buttons, SELECT, etc} +$map{$cgilist{B},<INPUT TYPE=hidden NAME=B VALUE="$html{$_}">} +</FORM> +</div> +</body> +</html> +$log{cp-query.log} + |