<%@page contentType="text/html"%> <%@page trimDirectiveWhitespaces="true"%> <%@page pageEncoding="UTF-8"%> <% /* * All links in the summary bar must have target="_top" * so they don't load in the iframe */ %> <%@include file="css.jsi" %> Sidebar <% // try hard to avoid an error page in the iframe after shutdown String action = request.getParameter("action"); String d = request.getParameter("refresh"); // Normal browsers send value, IE sends button label boolean allowIFrame = intl.allowIFrame(request.getHeader("User-Agent")); boolean shutdownSoon = (!allowIFrame) || "shutdownImmediate".equals(action) || "restartImmediate".equals(action) || "Shutdown immediately".equals(action) || "Restart immediately".equals(action); if (!shutdownSoon) { if (d == null || "".equals(d)) { // set below } else if (net.i2p.router.web.CSSHelper.getNonce().equals(conNonceParam)) { d = net.i2p.data.DataHelper.stripHTML(d); // XSS intl.setRefresh(d); intl.setDisableRefresh(d); } d = intl.getRefresh(); // we probably don't get here if d == "0" since caught in summary.jsi, but just // to be sure... if (!intl.getDisableRefresh()) { // doesn't work for restart or shutdown with no expl. tunnels, // since the call to ConfigRestartBean.renderStatus() hasn't happened yet... // So we delay slightly if (action != null && ("restart".equals(action.toLowerCase(java.util.Locale.US)) || "shutdown".equals(action.toLowerCase(java.util.Locale.US)))) { synchronized(this) { try { wait(1000); } catch(InterruptedException ie) {} } } long timeleft = net.i2p.router.web.helpers.ConfigRestartBean.getRestartTimeRemaining(); long delay = 60; try { delay = Long.parseLong(d); } catch (NumberFormatException nfe) {} if (delay*1000 < timeleft + 5000) out.print("\n"); else shutdownSoon = true; } } %>
<% java.io.File newspath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml"); %> <%@include file="summarynoframe.jsi" %> <% // d and shutdownSoon defined above if (!shutdownSoon) { out.print("
\n
\n"); if (intl.getDisableRefresh()) { out.print(""); out.print(intl._t("Refresh (s)")); out.print(": \n"); out.print("
\n"); } %>