Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- fixed error pages and <label>s for index.html
karlchenofhell7c40197e4258
diff --git a/htroot/index.html b/htroot/index.htmlindex 522c2cf56..847eef2bd 100644--- a/htroot/index.html+++ b/htroot/index.html@@ -42,9 +42,9 @@<table><tr>- <td>Max. number of results:</td>+ <td><label for="count">Max. number of results</label>:</td><td>- <select name="count">+ <select id="count" name="count"><option #(count-10)#::selected="selected"#(/count-10)#>10</option><option #(count-50)#::selected="selected"#(/count-50)#>50</option><option #(count-100)#::selected="selected"#(/count-100)#>100</option>@@ -53,18 +53,18 @@</td></tr><tr>- <td>Resource:</td>+ <td><label for="resource">Resource</label>:</td><td>- <select name="resource">+ <select id="resource" name="resource"><option value="global" #(resource-global)#::selected="selected"#(/resource-global)#>global</option><option value="local" #(resource-local)#::selected="selected"#(/resource-local)#>local</option></select></td></tr><tr>- <td>Max. search time (seconds):</td>+ <td><label for="time">Max. search time (seconds)</label>:</td><td>- <select name="time">+ <select id="time" name="time"><option #(time-1)#::selected="selected"#(/time-1)#>1</option><option #(time-3)#::selected="selected"#(/time-3)#>3</option><option #(time-6)#::selected="selected"#(/time-6)#>6</option>@@ -75,9 +75,9 @@</td></tr><tr>- <td>URL mask:</td>+ <td><label for="urlmaskfilter">URL mask</label>:</td><td>#(urlmaskoptions)#- <input name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" />+ <input id="urlmaskfilter" name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" />::<input type="radio" name="urlmask" value="yes" checked /> restrict on <input name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" /><input type="radio" name="urlmask" value="no" /> show all@@ -86,11 +86,11 @@</tr><tr><td>- Prefer mask:+ <label for="prefermaskfilter">Prefer mask</label>:</td><td>#(prefermaskoptions)#- <input name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" />+ <input id="prefermaskfilter" name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" />::<input type="radio" name="prefermask" value="yes" checked="checked" /> restrict on <input name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" /><input type="radio" name="prefermask" value="no" /> show alldiff --git a/htroot/proxymsg/authfail.inc b/htroot/proxymsg/authfail.incindex 1416b31da..187ddd5d7 100644--- a/htroot/proxymsg/authfail.inc+++ b/htroot/proxymsg/authfail.inc@@ -1,7 +1,12 @@-Your Username/Password is wrong.-<form action="/User.html" method="POST">-username: <input type="text" name="username"><br />-password: <input type="password" name="password"><br />-<input type="hidden" name="returnto", value="#[returnto]#"><br />-<input type="submit" value="login">-</form>+ <form action="/User.html" method="POST">+ <fieldset><legend><span class="error">Your Username/Password is wrong.</span></legend>+ <dl>+ <dt><label for="username">Username</label>:</dt>+ <dd><input type="text" id="username" name="username" /></dd>+ <dt><label for="password">Password</label>:</dt>+ <dd><input type="password" id="password" name="password" /></dd>+ <dt><input type="submit" value="login" /></dt>+ </dl>+ <input type="hidden" name="returnto", value="#[returnto]#" />+ </fieldset>+ </form>diff --git a/htroot/proxymsg/error.html b/htroot/proxymsg/error.htmlindex ff3595274..1520e6875 100644--- a/htroot/proxymsg/error.html+++ b/htroot/proxymsg/error.html@@ -1,87 +1,35 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">-<html>-<head>-<title>YaCy: Proxy Message</title>-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">-<meta name="Content-Language" content="English, Englisch">-<meta name="keywords" content="yacy proxy message">-<meta name="description" content="YaCy proxy message">-<meta name="copyright" content="Michael Christen">--<base href="http://#[host]#:#[port]#/">-<link rel="stylesheet" media="all" href="/env/style.css">--<!-- (C), Architecture and Realisation: Michael Peter Christen; Contact: mc <at> anomic.de -->--</head>-<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">-<table border="0" cellspacing="0" cellpadding="0" width="100%">-<tr><td>- <table class="Heading" border="0" cellspacing="0" cellpadding="0" width="100%">- <tr height="36">- <td width="240">- <a href="http://www.yacy.net">- <img width="52" height="33" border="0" src="/env/grafics/yacy.gif" align="top" alt="YaCy-Logo">- </a>- </td>- <td width="50%" align="center">- <div class="Headline">#[peerName]#: Proxy message</div>- </td>- <td width="240" align="right">- </td>- </tr>- </table>-</td></tr>-</table>-<br><br>--<table align="center" style="margin-left: auto; margin-right: auto; margin-top: 5em;">-<tr>- <td>- <p>- <h2>Problems with request: <font color="#556699">#[requestMethod]# #[requestURL]#</font></h2>- <br>- <br>- <tt>#[httpStatus]#</tt>- <p>- #(errorMessageType)#<!-- 0 -->- <b>unspecified error</b>- ::<!-- 1 -->- <b>not-yet-assigned error</b>- ::<!-- 2 -->- <b>You don't have an active internet connection. Please go online.</b>- ::<!-- 3 -->- <b>Could not load resource. The file is not available.</b>- ::<!-- 4 -->- <b>#[detailedErrorMsg]#</b>- ::<!-- 5 -->- #%[file]%#- #(/errorMessageType)#- </p>- </p>- </td>-</tr>-#(printStackTrace)#-<!---<tr><td><hr></td></tr>-<tr>- <td>No stacktrace available</td>-</tr>--->-::-<tr><td><hr></td></tr>-<tr>- <td>- <font color="red"><code>#[stacktrace]#</code></font>- </td>-</tr>-#(/printStackTrace)#-<tr><td><hr></td></tr>-<tr>- <td>Generated #[date]# by #[peerName]#.yacy- </td>-</tr>-</table>--</body>+<!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>YaCy: Proxy Message</title>+ #%env/templates/metas.template%#+ </head>+ <body id="error">+ <div class="head">+ <h1 class="head">YaCy - Distributed Web Indexing - Administration</h1>+ </div>+ <div class="content">+ <h2>Problems with request: <span class="settingsValue">#[requestMethod]# #[requestURL]#</span></h2>+ <p class="tt">#[httpStatus]#</p>+ #(errorMessageType)#+ <!-- 0 --><p><strong>unspecified error</strong></p>+ ::<!-- 1 --><p><strong>not-yet-assigned error</strong></p>+ ::<!-- 2 --><p><strong>You don't have an active internet connection. Please go online.</strong></p>+ ::<!-- 3 --><p><strong>Could not load resource. The file is not available.</strong></p>+ ::<!-- 4 --><p><strong>#[detailedErrorMsg]#</strong></p>+ ::<!-- 5 -->+ #%[file]%#+ #(/errorMessageType)#++ #(printStackTrace)#::+ <hr />+ <p class="tt error"><em>Exception occured</em>: <strong>#[exception]#</strong></p>+ <pre class="tt error"><em>TRACE</em>:+#[stacktrace]#</pre>+ #(/printStackTrace)#++ <hr />+ <p>Generated #[date]# by #[peerName]#.yacy</p>+ </div>+ </body></html>diff --git a/htroot/proxymsg/unknownHost.inc b/htroot/proxymsg/unknownHost.incindex 0676b7f82..d77fbcf23 100644--- a/htroot/proxymsg/unknownHost.inc+++ b/htroot/proxymsg/unknownHost.inc@@ -1,19 +1,13 @@-<STYLE type="text/css">-<!---.hostPort {- color: green;- font-weight: bold;-}--->-</STYLE>-<hr>-<p>The server <b>#[hostName]#</b> could not be found.</p>-Did you mean:-<table>- #{list}#- <tr>- <td><a class="hostPort" href="http://#[hostName]#:#[hostPort]##[hostPath]##[hostArgs]#">#[hostName]#</a></td>- </tr>- #{/list}#-</table>-+ <style type="text/css"><!--+ .hostPort {+ color: green;+ font-weight: bold;+ }+ --></style>++ <hr />+ <p>The server <b>#[hostName]#</b> could not be found.</p>+ <p>Did you mean:</p>+ <ul class="tagList">#{list}#+ <li><a class="hostPort" href="http://#[hostName]#:#[hostPort]##[hostPath]##[hostArgs]#">#[hostName]#</a></li>#{/list}#+ </ul>diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.javaindex b2306227e..eb2aa04b4 100644--- a/source/de/anomic/http/httpd.java+++ b/source/de/anomic/http/httpd.java@@ -1149,16 +1149,16 @@ public final class httpd implements serverHandler {switch (errorcase) {case ERRORCASE_MESSAGE:- tp.put("errorMessageType_detailedErrorMsg",(detailedErrorMsgText==null)?"":detailedErrorMsgText.replaceAll("\n","<br>"));+ tp.putASIS("errorMessageType_detailedErrorMsg", (detailedErrorMsgText == null) ? "" : detailedErrorMsgText.replaceAll("\n", "<br />"));break;case ERRORCASE_FILE:- tp.put("errorMessageType_file",(detailedErrorMsgFile==null)?"":detailedErrorMsgFile);- if ((detailedErrorMsgValues != null)&&(detailedErrorMsgValues.size()>0)) {+ tp.put("errorMessageType_file", (detailedErrorMsgFile == null) ? "" : detailedErrorMsgFile);+ if ((detailedErrorMsgValues != null) && (detailedErrorMsgValues.size() > 0)) {// rewriting the value-names and add the proper name prefix:Iterator nameIter = detailedErrorMsgValues.keySet().iterator();while (nameIter.hasNext()) {String name = (String) nameIter.next();- tp.put("errorMessageType_" + name,detailedErrorMsgValues.get(name));+ tp.put("errorMessageType_" + name, detailedErrorMsgValues.get(name));}}break;@@ -1169,24 +1169,18 @@ public final class httpd implements serverHandler {// building the stacktraceif (stackTrace != null) {tp.put("printStackTrace",1);-serverByteBuffer errorMsg = new serverByteBuffer(100);- errorMsg.append("<i>Exception occurred:</i> <b>".getBytes("UTF-8"))- .append(stackTrace.toString().getBytes("UTF-8"))- .append("</b>\r\n\r\n".getBytes("UTF-8"))- .append("</i>TRACE:</i>\r\n".getBytes("UTF-8"));stackTrace.printStackTrace(new PrintStream(errorMsg));- errorMsg.append("\r\n".getBytes("UTF-8"));-- tp.put("printStackTrace_stacktrace",(new String(errorMsg.getBytes(),"UTF-8")).replaceAll("\n","<br>"));+ tp.put("printStackTrace_exception", stackTrace.toString());+ tp.put("printStackTrace_stacktrace", new String(errorMsg.getBytes(),"UTF-8"));} else {- tp.put("printStackTrace",0);+ tp.put("printStackTrace", 0);}// Generated Tue, 23 Aug 2005 11:19:14 GMT by brain.wg (squid/2.5.STABLE3)// adding some system informationString systemDate = httpc.dateString(httpc.nowDate());- tp.put("date",systemDate);+ tp.put("date", systemDate);// rewrite the fileFile htRootPath = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath","htroot"));