- fixed error pages and <label>s for index.html

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3226 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent 29aa7031d3
commit 7c40197e42

@ -42,9 +42,9 @@
<table> <table>
<tr> <tr>
<td>Max. number of results:</td> <td><label for="count">Max. number of results</label>:</td>
<td> <td>
<select name="count"> <select id="count" name="count">
<option #(count-10)#::selected="selected"#(/count-10)#>10</option> <option #(count-10)#::selected="selected"#(/count-10)#>10</option>
<option #(count-50)#::selected="selected"#(/count-50)#>50</option> <option #(count-50)#::selected="selected"#(/count-50)#>50</option>
<option #(count-100)#::selected="selected"#(/count-100)#>100</option> <option #(count-100)#::selected="selected"#(/count-100)#>100</option>
@ -53,18 +53,18 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Resource:</td> <td><label for="resource">Resource</label>:</td>
<td> <td>
<select name="resource"> <select id="resource" name="resource">
<option value="global" #(resource-global)#::selected="selected"#(/resource-global)#>global</option> <option value="global" #(resource-global)#::selected="selected"#(/resource-global)#>global</option>
<option value="local" #(resource-local)#::selected="selected"#(/resource-local)#>local</option> <option value="local" #(resource-local)#::selected="selected"#(/resource-local)#>local</option>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Max. search time (seconds):</td> <td><label for="time">Max. search time (seconds)</label>:</td>
<td> <td>
<select name="time"> <select id="time" name="time">
<option #(time-1)#::selected="selected"#(/time-1)#>1</option> <option #(time-1)#::selected="selected"#(/time-1)#>1</option>
<option #(time-3)#::selected="selected"#(/time-3)#>3</option> <option #(time-3)#::selected="selected"#(/time-3)#>3</option>
<option #(time-6)#::selected="selected"#(/time-6)#>6</option> <option #(time-6)#::selected="selected"#(/time-6)#>6</option>
@ -75,9 +75,9 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td>URL mask:</td> <td><label for="urlmaskfilter">URL mask</label>:</td>
<td>#(urlmaskoptions)# <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="yes" checked /> restrict on <input name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" />
<input type="radio" name="urlmask" value="no" /> show all <input type="radio" name="urlmask" value="no" /> show all
@ -86,11 +86,11 @@
</tr> </tr>
<tr> <tr>
<td> <td>
Prefer mask: <label for="prefermaskfilter">Prefer mask</label>:
</td> </td>
<td> <td>
#(prefermaskoptions)# #(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="yes" checked="checked" /> restrict on <input name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" />
<input type="radio" name="prefermask" value="no" /> show all <input type="radio" name="prefermask" value="no" /> show all

@ -1,7 +1,12 @@
Your Username/Password is wrong. <form action="/User.html" method="POST">
<form action="/User.html" method="POST"> <fieldset><legend><span class="error">Your Username/Password is wrong.</span></legend>
username: <input type="text" name="username"><br /> <dl>
password: <input type="password" name="password"><br /> <dt><label for="username">Username</label>:</dt>
<input type="hidden" name="returnto", value="#[returnto]#"><br /> <dd><input type="text" id="username" name="username" /></dd>
<input type="submit" value="login"> <dt><label for="password">Password</label>:</dt>
</form> <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>

@ -1,87 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>YaCy: Proxy Message</title> <title>YaCy: Proxy Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> #%env/templates/metas.template%#
<meta name="Content-Language" content="English, Englisch"> </head>
<meta name="keywords" content="yacy proxy message"> <body id="error">
<meta name="description" content="YaCy proxy message"> <div class="head">
<meta name="copyright" content="Michael Christen"> <h1 class="head">YaCy - Distributed Web Indexing - Administration</h1>
</div>
<base href="http://#[host]#:#[port]#/"> <div class="content">
<link rel="stylesheet" media="all" href="/env/style.css"> <h2>Problems with request: <span class="settingsValue">#[requestMethod]# #[requestURL]#</span></h2>
<p class="tt">#[httpStatus]#</p>
<!-- (C), Architecture and Realisation: Michael Peter Christen; Contact: mc <at> anomic.de --> #(errorMessageType)#
<!-- 0 --><p><strong>unspecified error</strong></p>
</head> ::<!-- 1 --><p><strong>not-yet-assigned error</strong></p>
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> ::<!-- 2 --><p><strong>You don't have an active internet connection. Please go online.</strong></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%"> ::<!-- 3 --><p><strong>Could not load resource. The file is not available.</strong></p>
<tr><td> ::<!-- 4 --><p><strong>#[detailedErrorMsg]#</strong></p>
<table class="Heading" border="0" cellspacing="0" cellpadding="0" width="100%"> ::<!-- 5 -->
<tr height="36"> #%[file]%#
<td width="240"> #(/errorMessageType)#
<a href="http://www.yacy.net">
<img width="52" height="33" border="0" src="/env/grafics/yacy.gif" align="top" alt="YaCy-Logo"> #(printStackTrace)#::
</a> <hr />
</td> <p class="tt error"><em>Exception occured</em>: <strong>#[exception]#</strong></p>
<td width="50%" align="center"> <pre class="tt error"><em>TRACE</em>:
<div class="Headline">#[peerName]#: Proxy message</div> #[stacktrace]#</pre>
</td> #(/printStackTrace)#
<td width="240" align="right">
</td> <hr />
</tr> <p>Generated #[date]# by #[peerName]#.yacy</p>
</table> </div>
</td></tr> </body>
</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>
</html> </html>

@ -1,19 +1,13 @@
<STYLE type="text/css"> <style type="text/css"><!--
<!-- .hostPort {
.hostPort { color: green;
color: green; font-weight: bold;
font-weight: bold; }
} --></style>
-->
</STYLE> <hr />
<hr> <p>The server <b>#[hostName]#</b> could not be found.</p>
<p>The server <b>#[hostName]#</b> could not be found.</p> <p>Did you mean:</p>
Did you mean: <ul class="tagList">#{list}#
<table> <li><a class="hostPort" href="http://#[hostName]#:#[hostPort]##[hostPath]##[hostArgs]#">#[hostName]#</a></li>#{/list}#
#{list}# </ul>
<tr>
<td><a class="hostPort" href="http://#[hostName]#:#[hostPort]##[hostPath]##[hostArgs]#">#[hostName]#</a></td>
</tr>
#{/list}#
</table>

@ -1149,16 +1149,16 @@ public final class httpd implements serverHandler {
switch (errorcase) { switch (errorcase) {
case ERRORCASE_MESSAGE: case ERRORCASE_MESSAGE:
tp.put("errorMessageType_detailedErrorMsg",(detailedErrorMsgText==null)?"":detailedErrorMsgText.replaceAll("\n","<br>")); tp.putASIS("errorMessageType_detailedErrorMsg", (detailedErrorMsgText == null) ? "" : detailedErrorMsgText.replaceAll("\n", "<br />"));
break; break;
case ERRORCASE_FILE: case ERRORCASE_FILE:
tp.put("errorMessageType_file",(detailedErrorMsgFile==null)?"":detailedErrorMsgFile); tp.put("errorMessageType_file", (detailedErrorMsgFile == null) ? "" : detailedErrorMsgFile);
if ((detailedErrorMsgValues != null)&&(detailedErrorMsgValues.size()>0)) { if ((detailedErrorMsgValues != null) && (detailedErrorMsgValues.size() > 0)) {
// rewriting the value-names and add the proper name prefix: // rewriting the value-names and add the proper name prefix:
Iterator nameIter = detailedErrorMsgValues.keySet().iterator(); Iterator nameIter = detailedErrorMsgValues.keySet().iterator();
while (nameIter.hasNext()) { while (nameIter.hasNext()) {
String name = (String) nameIter.next(); String name = (String) nameIter.next();
tp.put("errorMessageType_" + name,detailedErrorMsgValues.get(name)); tp.put("errorMessageType_" + name, detailedErrorMsgValues.get(name));
} }
} }
break; break;
@ -1169,24 +1169,18 @@ public final class httpd implements serverHandler {
// building the stacktrace // building the stacktrace
if (stackTrace != null) { if (stackTrace != null) {
tp.put("printStackTrace",1); tp.put("printStackTrace",1);
serverByteBuffer errorMsg = new serverByteBuffer(100); serverByteBuffer errorMsg = new serverByteBuffer(100);
errorMsg.append("<i>Exception occurred:</i>&nbsp;<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)); stackTrace.printStackTrace(new PrintStream(errorMsg));
errorMsg.append("\r\n".getBytes("UTF-8")); tp.put("printStackTrace_exception", stackTrace.toString());
tp.put("printStackTrace_stacktrace", new String(errorMsg.getBytes(),"UTF-8"));
tp.put("printStackTrace_stacktrace",(new String(errorMsg.getBytes(),"UTF-8")).replaceAll("\n","<br>"));
} else { } 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) // Generated Tue, 23 Aug 2005 11:19:14 GMT by brain.wg (squid/2.5.STABLE3)
// adding some system information // adding some system information
String systemDate = httpc.dateString(httpc.nowDate()); String systemDate = httpc.dateString(httpc.nowDate());
tp.put("date",systemDate); tp.put("date", systemDate);
// rewrite the file // rewrite the file
File htRootPath = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath","htroot")); File htRootPath = new File(switchboard.getRootPath(), switchboard.getConfig("htRootPath","htroot"));

Loading…
Cancel
Save