/usr/share/doc/dpuser-doc/searchend.html is in dpuser-doc 3.3+p1+dfsg-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | <!-- End list of Searchable items -->
function GetParam(name)
{
var start=location.search.indexOf("?"+name+"=");
if (start<0) start=location.search.indexOf("&"+name+"=");
if (start<0) return '';
start += name.length+2;
var end=location.search.indexOf("&",start)-1;
if (end<0) end=location.search.length;
var result=location.search.substring(start,end);
var result='';
for(var i=start;i<=end;i++) {
var c=location.search.charAt(i);
result=result+(c=='+'?' ':c);
}
return unescape(result);
}
// get the input from the input by the user and strip it into keywords //
var skeyword=GetParam("keywords");
//var skeyword=document.searchengine.keywords.value.toLowerCase();
var check=1;
var pos=0;
var i=0;
var j=0;
var itemp=0;
var config='';
while (true)
{
if (skeyword.indexOf("+") == -1 )
{
keywords[check]=skeyword;
break;
}
pos=skeyword.indexOf("+");
if (skeyword !="+")
{
keywords[check]=skeyword.substring(0,pos); check++;
}
else
{
check--;
break;
}
skeyword=skeyword.substring(pos+1, skeyword.length);
if (skeyword.length ==0)
{
check--;
break;
}
}
// the keywords have been put in keywords object.
keywords[0]=check;
//alert(check);
// matching and storing the matches in matched
for ( i=1; i<=keywords[0];i++)
{
for (j=1;j<=title[0];j++)
{
if (title[j].toLowerCase().indexOf(keywords[i]) > -1 )
{
matched[j]++;
}
}
}
// putting all the indexes of the matched records in found
for (i=1;i<=title[0];i++)
{
if (matched[i] > 0 )
{
found[0]++;
// increment the found
found[found[0]]=i;
}
}
//alert("found 0 " + found[0]);
// sort the list as per max percentage of matches
for (i=1;i<=found[0]-1;i++)
{
for(j=i+1;j<=found[0];j++)
{
if ( matched[found[i]]< matched[found[j]] )
{
temp= found[j];
found[j]=found[i];
found[i]=temp;
}
}
}
document.write(' The Keyword(s) you searched : '.big() );
for (i=1; i<=keywords[0]; i++)
{
document.write( keywords[i].bold() +" "); }
document.write('<br>');
if (found[0]==0)
{
document.write('<hr>');
document.write("<b>No matches resulted in this search </b> <br>");
//document.write("You may close the results and reduce the length/number of the keywords <br>");
}
else
{
document.write(" <hr> <b> The Results of the search are : </b> ");
document.write( found[0] +" Entries found ".italics());
document.write("<table border=0>");
for (i=1; i<=found[0];i++)
{
document.write("<tr><td valign=top>");
document.write("<b>" +i +"</b></td>"); document.write("<td valign=top>");
itemp=found[i];
//document.write(desc[itemp].bold() +"<br>" +links[itemp].link(links[itemp])+"<br>");
document.write("<a href=\"" + links[itemp] + "\"" + desc[itemp].bold() +"</a>");
//temp= (matched[itemp]/keywords[0])*100
//document.write("<i> Matched with keywords :: "+temp+" % </i>" );
document.write("</td></tr>");
matched[itemp]=0
}
found[0]=0;
document.write("</table>");
}
|