forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head 0f4af64e64536c467b623286bce659dd2dfe9342)
to branch 'i2p.i2p.zzz.homepage' (head dde6a3d7db54894a2ac30a2af6cbb04cbb92296a)
This commit is contained in:
84
apps/routerconsole/jsp/confighome.jsp
Normal file
84
apps/routerconsole/jsp/confighome.jsp
Normal file
@@ -0,0 +1,84 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html><head>
|
||||
<%@include file="css.jsi" %>
|
||||
<%=intl.title("config home")%>
|
||||
<style type='text/css'>
|
||||
input.default {
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
</head><body>
|
||||
|
||||
<%@include file="summary.jsi" %>
|
||||
<h1><%=intl._("I2P Home Page Configuration")%></h1>
|
||||
<div class="main" id="main">
|
||||
<%@include file="confignav.jsi" %>
|
||||
|
||||
<jsp:useBean class="net.i2p.router.web.ConfigHomeHandler" id="formhandler" scope="request" />
|
||||
<% formhandler.storeMethod(request.getMethod()); %>
|
||||
<jsp:setProperty name="formhandler" property="*" />
|
||||
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
|
||||
<jsp:getProperty name="formhandler" property="allMessages" />
|
||||
<%
|
||||
String pageNonce = formhandler.getNewNonce();
|
||||
%>
|
||||
<jsp:useBean class="net.i2p.router.web.HomeHelper" id="homehelper" scope="request" />
|
||||
<jsp:setProperty name="homehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
|
||||
<h3><%=intl._("Default Home Page")%></h3>
|
||||
<form action="" method="POST">
|
||||
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
|
||||
<input type="hidden" name="group" value="0">
|
||||
<input type="checkbox" name="oldHome" <jsp:getProperty name="homehelper" property="configHome" /> >
|
||||
<%=intl._("Use old home page")%>
|
||||
<input type="submit" name="action" class="accept" value="<%=intl._("Save")%>" >
|
||||
</form>
|
||||
|
||||
<h3><%=intl._("Search Engines")%></h3>
|
||||
<form action="" method="POST">
|
||||
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
|
||||
<input type="hidden" name="group" value="3">
|
||||
<jsp:getProperty name="homehelper" property="configSearch" />
|
||||
<div class="formaction">
|
||||
<input type="submit" name="action" class="default" value="<%=intl._("Add item")%>" >
|
||||
<input type="submit" name="action" class="delete" value="<%=intl._("Delete selected")%>" >
|
||||
<input type="reset" class="cancel" value="<%=intl._("Cancel")%>" >
|
||||
<input type="submit" name="action" class="reload" value="<%=intl._("Restore defaults")%>" >
|
||||
<input type="submit" name="action" class="add" value="<%=intl._("Add item")%>" >
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h3><%=intl._("Recommended Eepsites")%></h3>
|
||||
<form action="" method="POST">
|
||||
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
|
||||
<input type="hidden" name="group" value="1">
|
||||
<jsp:getProperty name="homehelper" property="configFavorites" />
|
||||
<div class="formaction">
|
||||
<input type="submit" name="action" class="default" value="<%=intl._("Add item")%>" >
|
||||
<input type="submit" name="action" class="delete" value="<%=intl._("Delete selected")%>" >
|
||||
<input type="reset" class="cancel" value="<%=intl._("Cancel")%>" >
|
||||
<input type="submit" name="action" class="reload" value="<%=intl._("Restore defaults")%>" >
|
||||
<input type="submit" name="action" class="add" value="<%=intl._("Add item")%>" >
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h3><%=intl._("Local Services")%></h3>
|
||||
<form action="" method="POST">
|
||||
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
|
||||
<input type="hidden" name="group" value="2">
|
||||
<jsp:getProperty name="homehelper" property="configServices" />
|
||||
<div class="formaction">
|
||||
<input type="submit" name="action" class="default" value="<%=intl._("Add item")%>" >
|
||||
<input type="submit" name="action" class="delete" value="<%=intl._("Delete selected")%>" >
|
||||
<input type="reset" class="cancel" value="<%=intl._("Cancel")%>" >
|
||||
<input type="submit" name="action" class="reload" value="<%=intl._("Restore defaults")%>" >
|
||||
<input type="submit" name="action" class="add" value="<%=intl._("Add item")%>" >
|
||||
</div>
|
||||
</form>
|
||||
</div></div></body></html>
|
65
apps/routerconsole/jsp/console.jsp
Normal file
65
apps/routerconsole/jsp/console.jsp
Normal file
@@ -0,0 +1,65 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html><head>
|
||||
<%@include file="css.jsi" %>
|
||||
<%=intl.title("home")%>
|
||||
</head><body>
|
||||
<%
|
||||
String consoleNonce = System.getProperty("router.consoleNonce");
|
||||
if (consoleNonce == null) {
|
||||
consoleNonce = Long.toString(new java.util.Random().nextLong());
|
||||
System.setProperty("router.consoleNonce", consoleNonce);
|
||||
}
|
||||
%>
|
||||
|
||||
<%@include file="summary.jsi" %><h1><%=intl._("I2P Router Console")%></h1>
|
||||
<div class="news" id="news">
|
||||
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
||||
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<%
|
||||
if (newshelper.shouldShowNews()) {
|
||||
java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
||||
%>
|
||||
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||
<jsp:getProperty name="newshelper" property="content" />
|
||||
<hr>
|
||||
<%
|
||||
} // shouldShowNews()
|
||||
%>
|
||||
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
||||
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<jsp:getProperty name="updatehelper" property="newsStatus" /><br>
|
||||
</div><div class="main" id="main">
|
||||
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
|
||||
<div class="welcome">
|
||||
<div class="langbox">
|
||||
<a href="/?lang=en&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=us" title="English" alt="English"></a>
|
||||
<a href="/?lang=ar&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=lang_ar" title="عربية" alt="عربية"></a>
|
||||
<a href="/?lang=zh&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=cn" title="中文" alt="中文"></a>
|
||||
<a href="/?lang=da&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=dk" title="Danish" alt="Danish"></a>
|
||||
<a href="/?lang=de&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=de" title="Deutsch" alt="Deutsch"></a>
|
||||
<a href="/?lang=ee&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ee" title="Eesti" alt="Eesti"></a>
|
||||
<a href="/?lang=es&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=es" title="Español" alt="Español"></a>
|
||||
<a href="/?lang=fi&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fi" title="Suomi" alt="Suomi"></a>
|
||||
<a href="/?lang=fr&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fr" title="Français" alt="Français"></a><br>
|
||||
<a href="/?lang=it&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=it" title="Italiano" alt="Italiano"></a>
|
||||
<a href="/?lang=nl&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=nl" title="Nederlands" alt="Nederlands"></a>
|
||||
<a href="/?lang=pl&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=pl" title="Polski" alt="Polski"></a>
|
||||
<a href="/?lang=pt&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=pt" title="Português" alt="Português"></a>
|
||||
<a href="/?lang=ru&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ru" title="Русский" alt="Русский"></a>
|
||||
<a href="/?lang=sv&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=se" title="Svenska" alt="Svenska"></a>
|
||||
<a href="/?lang=uk&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ua" title="Ukrainian" alt="Ukrainian"></a>
|
||||
<a href="/?lang=vi&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=vn" title="Tiếng Việt" alt="Tiếng Việt"></a>
|
||||
</div>
|
||||
<a name="top"></a>
|
||||
<h2><%=intl._("Welcome to I2P")%></h2>
|
||||
</div>
|
||||
<% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/readme.html"); %>
|
||||
<jsp:setProperty name="contenthelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="contenthelper" property="maxLines" value="300" />
|
||||
<jsp:setProperty name="contenthelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<jsp:getProperty name="contenthelper" property="content" />
|
||||
</div></body></html>
|
149
apps/routerconsole/jsp/home.jsp
Normal file
149
apps/routerconsole/jsp/home.jsp
Normal file
@@ -0,0 +1,149 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html><head>
|
||||
<%@include file="css.jsi" %>
|
||||
<%=intl.title("home")%>
|
||||
|
||||
<script type="text/javascript">
|
||||
var page = "home";
|
||||
function ajax(url,target) {
|
||||
// native XMLHttpRequest object
|
||||
if (window.XMLHttpRequest) {
|
||||
req = new XMLHttpRequest();
|
||||
req.onreadystatechange = function() {ajaxDone(target);};
|
||||
req.open("GET", url, true);
|
||||
req.send(null);
|
||||
// IE/Windows ActiveX version
|
||||
} else if (window.ActiveXObject) {
|
||||
req = new ActiveXObject("Microsoft.XMLDOM");
|
||||
if (req) {
|
||||
req.onreadystatechange = function() {ajaxDone(target);};
|
||||
req.open("GET", url, true);
|
||||
req.send(null);
|
||||
}
|
||||
}
|
||||
//setTimeout("ajax(page,'scriptoutput')", 5000);
|
||||
}
|
||||
|
||||
function ajaxDone(target) {
|
||||
// only if req is "loaded"
|
||||
if (req.readyState == 4) {
|
||||
// only if "OK"
|
||||
if (req.status == 200) {
|
||||
results = req.responseText;
|
||||
document.getElementById(target).innerHTML = results;
|
||||
document.getElementById("langbox").style.display="block";
|
||||
document.getElementById("home").style.display="block";
|
||||
} else {
|
||||
document.getElementById(target).innerHTML="<b><%=intl._("Router is down")%></b>";
|
||||
document.getElementById("home").style.display="none";
|
||||
document.getElementById("langbox").style.display="none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function requestAjax1() { ajax("/xhr1.jsp", "xhr"); }
|
||||
function initAjax() { setInterval(requestAjax1, 15000); }
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</head><body onload="initAjax()">
|
||||
|
||||
|
||||
<%
|
||||
String consoleNonce = System.getProperty("router.consoleNonce");
|
||||
if (consoleNonce == null) {
|
||||
consoleNonce = Long.toString(new java.util.Random().nextLong());
|
||||
System.setProperty("router.consoleNonce", consoleNonce);
|
||||
}
|
||||
%>
|
||||
|
||||
<div class="routersummaryouter" id="appsummary">
|
||||
<div class="routersummary">
|
||||
<div style="height: 36px;">
|
||||
<!-- fixme theme, translation -->
|
||||
<a href="/console"><img src="/themes/console/light/images/i2plogo.png" alt="I2P Router Console" title="I2P Router Console"></a>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="xhr">
|
||||
<!-- for non-script -->
|
||||
<%@include file="xhr1.jsi" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="welcome">
|
||||
<div class="langbox" id="langbox">
|
||||
<a href="/home?lang=en&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=us" title="English" alt="English"></a>
|
||||
<a href="/home?lang=ar&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=lang_ar" title="عربية" alt="عربية"></a>
|
||||
<a href="/home?lang=zh&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=cn" title="中文" alt="中文"></a>
|
||||
<a href="/home?lang=da&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=dk" title="Danish" alt="Danish"></a>
|
||||
<a href="/home?lang=de&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=de" title="Deutsch" alt="Deutsch"></a>
|
||||
<a href="/home?lang=ee&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ee" title="Eesti" alt="Eesti"></a>
|
||||
<a href="/home?lang=es&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=es" title="Español" alt="Español"></a>
|
||||
<a href="/home?lang=fi&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fi" title="Suomi" alt="Suomi"></a>
|
||||
<a href="/home?lang=fr&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fr" title="Français" alt="Français"></a><br>
|
||||
<a href="/home?lang=it&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=it" title="Italiano" alt="Italiano"></a>
|
||||
<a href="/home?lang=nl&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=nl" title="Nederlands" alt="Nederlands"></a>
|
||||
<a href="/home?lang=pl&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=pl" title="Polski" alt="Polski"></a>
|
||||
<a href="/home?lang=pt&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=pt" title="Português" alt="Português"></a>
|
||||
<a href="/home?lang=ru&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ru" title="Русский" alt="Русский"></a>
|
||||
<a href="/home?lang=sv&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=se" title="Svenska" alt="Svenska"></a>
|
||||
<a href="/home?lang=uk&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ua" title="Ukrainian" alt="Ukrainian"></a>
|
||||
<a href="/home?lang=vi&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=vn" title="Tiếng Việt" alt="Tiếng Việt"></a>
|
||||
</div>
|
||||
<h2 class="app"><%=intl._("Welcome to I2P")%></h2>
|
||||
</div>
|
||||
|
||||
<div class="news" id="news">
|
||||
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
||||
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<%
|
||||
if (newshelper.shouldShowNews()) {
|
||||
java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
||||
%>
|
||||
<h3 class="app"><%=intl._("Latest I2P News")%></h3>
|
||||
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||
<jsp:getProperty name="newshelper" property="content" />
|
||||
<hr>
|
||||
<%
|
||||
} // shouldShowNews()
|
||||
%>
|
||||
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
||||
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<jsp:getProperty name="updatehelper" property="newsStatus" /><br>
|
||||
</div>
|
||||
|
||||
<div class="home" id="home">
|
||||
<div class="search">
|
||||
<form action="/search.jsp" method="POST">
|
||||
<table><tr><td align="right">
|
||||
<input size="50" type="text" class="search" name="query" />
|
||||
</td><td align="left">
|
||||
<button type="submit" value="search" class="search"><%=intl._("Search I2P")%></button>
|
||||
</td></tr><tr><td align="right">
|
||||
<b>Using search engine:</b>
|
||||
</td><td align="left">
|
||||
<jsp:useBean class="net.i2p.router.web.SearchHelper" id="searchhelper" scope="request" />
|
||||
<jsp:setProperty name="searchhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<jsp:getProperty name="searchhelper" property="selector" />
|
||||
</td></tr></table>
|
||||
</form>
|
||||
</div>
|
||||
<jsp:useBean class="net.i2p.router.web.HomeHelper" id="homehelper" scope="request" />
|
||||
<jsp:setProperty name="homehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<div class="ag2">
|
||||
<h4 class="app"><%=intl._("Recommended Eepsites")%></h4>
|
||||
<jsp:getProperty name="homehelper" property="favorites" /><br>
|
||||
</div>
|
||||
<div class="ag2">
|
||||
<h4 class="app"><%=intl._("Local Services")%></h4>
|
||||
<jsp:getProperty name="homehelper" property="services" /><br>
|
||||
</div>
|
||||
</div>
|
||||
</body></html>
|
@@ -1,65 +1,18 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<%@page contentType="text/plain"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html><head>
|
||||
<%@include file="css.jsi" %>
|
||||
<%=intl.title("home")%>
|
||||
</head><body>
|
||||
<%
|
||||
String consoleNonce = System.getProperty("router.consoleNonce");
|
||||
if (consoleNonce == null) {
|
||||
consoleNonce = Long.toString(new java.util.Random().nextLong());
|
||||
System.setProperty("router.consoleNonce", consoleNonce);
|
||||
}
|
||||
response.setStatus(302, "Moved");
|
||||
String req = request.getRequestURI();
|
||||
if (req.endsWith("index"))
|
||||
req = req.substring(0, req.length() - 5);
|
||||
else if (req.endsWith("index.jsp"))
|
||||
req = req.substring(0, req.length() - 9);
|
||||
if (!req.endsWith("/"))
|
||||
req += '/';
|
||||
boolean oldHome = net.i2p.I2PAppContext.getGlobalContext().getBooleanProperty("routerconsole.oldHomePage");
|
||||
if (oldHome)
|
||||
req += "console";
|
||||
else
|
||||
req += "home";
|
||||
response.setHeader("Location", req);
|
||||
%>
|
||||
|
||||
<%@include file="summary.jsi" %><h1><%=intl._("I2P Router Console")%></h1>
|
||||
<div class="news" id="news">
|
||||
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
||||
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<%
|
||||
if (newshelper.shouldShowNews()) {
|
||||
java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
||||
%>
|
||||
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||
<jsp:getProperty name="newshelper" property="content" />
|
||||
<hr>
|
||||
<%
|
||||
} // shouldShowNews()
|
||||
%>
|
||||
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
||||
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<jsp:getProperty name="updatehelper" property="newsStatus" /><br>
|
||||
</div><div class="main" id="main">
|
||||
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
|
||||
<div class="welcome">
|
||||
<div class="langbox">
|
||||
<a href="/?lang=en&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=us" title="English" alt="English"></a>
|
||||
<a href="/?lang=ar&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=lang_ar" title="عربية" alt="عربية"></a>
|
||||
<a href="/?lang=zh&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=cn" title="中文" alt="中文"></a>
|
||||
<a href="/?lang=da&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=dk" title="Danish" alt="Danish"></a>
|
||||
<a href="/?lang=de&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=de" title="Deutsch" alt="Deutsch"></a>
|
||||
<a href="/?lang=ee&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ee" title="Eesti" alt="Eesti"></a>
|
||||
<a href="/?lang=es&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=es" title="Español" alt="Español"></a>
|
||||
<a href="/?lang=fi&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fi" title="Suomi" alt="Suomi"></a>
|
||||
<a href="/?lang=fr&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=fr" title="Français" alt="Français"></a><br>
|
||||
<a href="/?lang=it&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=it" title="Italiano" alt="Italiano"></a>
|
||||
<a href="/?lang=nl&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=nl" title="Nederlands" alt="Nederlands"></a>
|
||||
<a href="/?lang=pl&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=pl" title="Polski" alt="Polski"></a>
|
||||
<a href="/?lang=pt&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=pt" title="Português" alt="Português"></a>
|
||||
<a href="/?lang=ru&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ru" title="Русский" alt="Русский"></a>
|
||||
<a href="/?lang=sv&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=se" title="Svenska" alt="Svenska"></a>
|
||||
<a href="/?lang=uk&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=ua" title="Ukrainian" alt="Ukrainian"></a>
|
||||
<a href="/?lang=vi&consoleNonce=<%=consoleNonce%>"><img height="11" width="16" style="padding: 0 2px;" src="/flags.jsp?c=vn" title="Tiếng Việt" alt="Tiếng Việt"></a>
|
||||
</div>
|
||||
<a name="top"></a>
|
||||
<h2><%=intl._("Welcome to I2P")%></h2>
|
||||
</div>
|
||||
<% java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/readme.html"); %>
|
||||
<jsp:setProperty name="contenthelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="contenthelper" property="maxLines" value="300" />
|
||||
<jsp:setProperty name="contenthelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<jsp:getProperty name="contenthelper" property="content" />
|
||||
</div></body></html>
|
||||
|
34
apps/routerconsole/jsp/search.jsp
Normal file
34
apps/routerconsole/jsp/search.jsp
Normal file
@@ -0,0 +1,34 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
<jsp:useBean class="net.i2p.router.web.SearchHelper" id="searchhelper" scope="request" />
|
||||
<jsp:setProperty name="searchhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||
<jsp:setProperty name="searchhelper" property="engine" value="<%=request.getParameter("engine")%>" />
|
||||
<jsp:setProperty name="searchhelper" property="query" value="<%=request.getParameter("query")%>" />
|
||||
<html><head></head><body><b>
|
||||
<%
|
||||
String url = searchhelper.getURL();
|
||||
if (url != null) {
|
||||
response.setStatus(303, "Redirecting");
|
||||
response.setHeader("Location", url);
|
||||
%>
|
||||
Searching...
|
||||
<%
|
||||
} else {
|
||||
response.setStatus(403, "Bad");
|
||||
String query = request.getParameter("query");
|
||||
if (query == null || query.trim().length() <= 0) {
|
||||
%>
|
||||
No search string specified!
|
||||
<%
|
||||
} else if (request.getParameter("engine") == null) {
|
||||
%>
|
||||
No search engine specified!
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
No search engines found!
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</b></body></html>
|
24
apps/routerconsole/jsp/xhr1.jsi
Normal file
24
apps/routerconsole/jsp/xhr1.jsi
Normal file
@@ -0,0 +1,24 @@
|
||||
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="helper" scope="request" />
|
||||
<jsp:setProperty name="helper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<jsp:setProperty name="helper" property="action" value="<%=request.getParameter("action")%>" />
|
||||
<table><tr><td align="left"><b><%=intl._("Version")%>:</b></td><td align="right">
|
||||
<jsp:getProperty name="helper" property="version" />
|
||||
</td></tr><tr><td align="left"><b><%=intl._("Uptime")%>:</b></td><td align="right">
|
||||
<jsp:getProperty name="helper" property="uptime" />
|
||||
</td></tr></table><hr>
|
||||
<jsp:setProperty name="helper" property="updateNonce" value="<%=request.getParameter("updateNonce")%>" />
|
||||
<jsp:setProperty name="helper" property="consoleNonce" value="<%=request.getParameter("consoleNonce")%>" />
|
||||
<%
|
||||
String reqURI = request.getRequestURI();
|
||||
if (reqURI != null)
|
||||
reqURI = reqURI.replace("/xhr1.jsp", "/home");
|
||||
helper.setRequestURI(reqURI);
|
||||
%>
|
||||
<h4><a href="/confignet#help" title="<%=intl._("Help with configuring your firewall and router for optimal I2P performance")%>"><%=intl._("Network")%>:
|
||||
<jsp:getProperty name="helper" property="reachability" /></a></h4>
|
||||
<hr>
|
||||
<jsp:getProperty name="helper" property="updateStatus" />
|
||||
<jsp:getProperty name="helper" property="restartStatus" />
|
||||
<hr>
|
||||
<jsp:getProperty name="helper" property="firewallAndReseedStatus" />
|
||||
<jsp:getProperty name="helper" property="destinations" />
|
14
apps/routerconsole/jsp/xhr1.jsp
Normal file
14
apps/routerconsole/jsp/xhr1.jsp
Normal file
@@ -0,0 +1,14 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<%@page pageEncoding="UTF-8"%>
|
||||
<%
|
||||
// http://www.crazysquirrel.com/computing/general/form-encoding.jspx
|
||||
if (request.getCharacterEncoding() == null)
|
||||
request.setCharacterEncoding("UTF-8");
|
||||
|
||||
if (request.getParameter("i2p.contextId") != null) {
|
||||
session.setAttribute("i2p.contextId", request.getParameter("i2p.contextId"));
|
||||
}
|
||||
%>
|
||||
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="intl" scope="request" />
|
||||
<jsp:setProperty name="intl" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
|
||||
<%@include file="xhr1.jsi" %>
|
Reference in New Issue
Block a user