|
|
|
@ -1,6 +1,59 @@
|
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
|
|
|
|
<!-- This page is only XHTML 1.0 Transitional and not Strict because iframes are in use -->
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
//<![CDATA[
|
|
|
|
|
function xmlhttpPost() {
|
|
|
|
|
var searchform = document.getElementById('searchform');
|
|
|
|
|
search(searchform.url.value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function search(query) {
|
|
|
|
|
var xmlHttpReq = false;
|
|
|
|
|
var self = this;
|
|
|
|
|
if (window.XMLHttpRequest) { // Mozilla/Safari
|
|
|
|
|
self.xmlHttpReq = new XMLHttpRequest();
|
|
|
|
|
}
|
|
|
|
|
else if (window.ActiveXObject) { // IE
|
|
|
|
|
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
|
|
}
|
|
|
|
|
self.xmlHttpReq.open('GET', "/solr/select?q=sku:\"" + query + "\" OR host_s:\"" + query + "\" OR host_dnc_s:\"" + query + "\" OR host_organization_s:\"" + query + "\" OR host_organizationdnc_s:\"" + query + "\" OR host_subdomain_s:\"" + query + "\"&start=0&rows=100&wt=json", true);
|
|
|
|
|
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
|
self.xmlHttpReq.onreadystatechange = function() {
|
|
|
|
|
if (self.xmlHttpReq.readyState == 4) {
|
|
|
|
|
updatepage(self.xmlHttpReq.responseText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
self.xmlHttpReq.send(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updatepage(str) {
|
|
|
|
|
var raw = document.getElementById("raw");
|
|
|
|
|
if (raw != null) raw.innerHTML = str;
|
|
|
|
|
var rsp = eval("("+str+")");
|
|
|
|
|
var firstChannel = rsp.channels[0];
|
|
|
|
|
var totalResults = firstChannel.totalResults.replace(/[,.]/,"");
|
|
|
|
|
var startIndex = firstChannel.startIndex;
|
|
|
|
|
var itemsPerPage = firstChannel.itemsPerPage;
|
|
|
|
|
var navigation = firstChannel.navigation;
|
|
|
|
|
|
|
|
|
|
var html = "";
|
|
|
|
|
|
|
|
|
|
if (totalResults > 0 && firstChannel.items.length > 0) {
|
|
|
|
|
var item;
|
|
|
|
|
html += "<table class=\"networkTable\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"99%\">";
|
|
|
|
|
html += "<tr class=\"TableHeader\" valign=\"bottom\">";
|
|
|
|
|
html += "<td>URL from index (total results = " + totalResults + ")<\/td>";
|
|
|
|
|
for (var i = 0; i < firstChannel.items.length; i++) {
|
|
|
|
|
item = firstChannel.items[i];
|
|
|
|
|
html += "<tr class=\"TableCellLight\"><td align=\"left\"><a href=\"HostBrowser.html?urlstringsearch=&urlstring=" + item.link + "\">" + item.link + "<\/a><\/td>";
|
|
|
|
|
}
|
|
|
|
|
html += "<\/table>";
|
|
|
|
|
}
|
|
|
|
|
document.getElementById("searchresults").innerHTML = html;
|
|
|
|
|
}
|
|
|
|
|
//]]>
|
|
|
|
|
</script>
|
|
|
|
|
<head>
|
|
|
|
|
<title>YaCy '#[clientname]#': View URL Content</title>
|
|
|
|
|
#%env/templates/metas.template%#
|
|
|
|
@ -22,11 +75,15 @@
|
|
|
|
|
|
|
|
|
|
<h2>View URL Content</h2>
|
|
|
|
|
|
|
|
|
|
<form method="get" action="ViewFile.html" accept-charset="ascii">
|
|
|
|
|
<form method="get" action="ViewFile.html" id="searchform" accept-charset="ascii" onkeyup="xmlhttpPost(); return false;">
|
|
|
|
|
<fieldset><legend>Get URL Viewer</legend>
|
|
|
|
|
<dl>
|
|
|
|
|
<dt>URL:</dt><dd><input type="text" size="60" name="url" value="#[url]#" /> <input type="submit" name="show" value="Show" /></dd>
|
|
|
|
|
<dd> </dd>
|
|
|
|
|
<dt>URL:</dt>
|
|
|
|
|
<dd>
|
|
|
|
|
<input type="text" size="60" name="url" value="#[url]#" />
|
|
|
|
|
<input type="submit" name="show" value="Show" />
|
|
|
|
|
<div id="searchresults"></div>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</form>
|
|
|
|
|