yacy_search_server/htroot/Trails.html
suessthomas 5c5e6accdb Fixes for (X)HTML compatibility.
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6854 6c8d7289-2bf4-0310-a012-ef5d649a1542
2010-05-05 21:12:58 +00:00

67 lines
2.1 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CyTag Trails</title>
#%env/templates/metas.template%#
<script type="text/javascript">
function search() {
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', "api/trail_p.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 rsp = eval("("+str+")");
var trails = rsp.trails;
var html = "";
var item;
html += "<table class=\"networkTable\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">";
html += "<tr class=\"TableHeader\" valign=\"bottom\">";
html += "<td>time</td>";
html += "<td>trail</td>";
html += "<td>nick</td>";
html += "<td>tag</td>";
html += "<td>icon</td>";
html += "<td>ip</td>";
html += "<td>agent</td></tr>";
for (var i = 0; i < trails.length; i++) {
item = trails[i];
if (item.time == null) break;
html += "<tr class=\"TableCellLight\"><td>"+ item.time + "</td>";
html += "<td>" + item.trail + "</td>";
html += "<td>" + item.nick + "</td>";
html += "<td>" + item.tag + "</td>";
html += "<td>" + item.icon + "</td>";
html += "<td>" + item.ip + "</td>";
html += "<td>" + item.agent + "</td></tr>";
}
html += "</table>";
document.getElementById("trails").innerHTML = html;
}
</script>
</head>
<body>
#%env/templates/header.template%#
<script type="text/javascript">
search();
</script>
<div id="trails"></div>
#%env/templates/footer.template%#
</body>
</html>