2012-06-05 15:19:40 +00:00
|
|
|
<%@page contentType="text/html"%>
|
|
|
|
<%@page trimDirectiveWhitespaces="true"%>
|
|
|
|
<%@page pageEncoding="UTF-8"%>
|
|
|
|
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="tester" scope="request" />
|
|
|
|
<jsp:setProperty name="tester" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
|
|
|
<%
|
|
|
|
// CSSHelper is also pulled in by css.jsi below...
|
|
|
|
boolean testIFrame = tester.allowIFrame(request.getHeader("User-Agent"));
|
|
|
|
if (!testIFrame) {
|
|
|
|
response.setStatus(302, "Moved");
|
|
|
|
response.setHeader("Location", "/i2ptunnel/");
|
|
|
|
} else {
|
|
|
|
%>
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
|
|
|
|
<html><head>
|
|
|
|
<%@include file="css.jsi" %>
|
2012-07-11 21:44:02 +00:00
|
|
|
<%=intl.title("i2p tunnel manager")%>
|
2012-06-05 15:19:40 +00:00
|
|
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
2012-06-12 00:12:51 +00:00
|
|
|
function requestAjax1() { ajax("/xhr1.jsp?requestURI=<%=request.getRequestURI()%>", "xhr", <%=intl.getRefresh()%>000); }
|
2012-06-05 15:19:40 +00:00
|
|
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
2012-07-04 12:49:54 +00:00
|
|
|
function resizeFrame(f) {
|
|
|
|
var body = f.contentWindow.document.body,
|
|
|
|
html = f.contentWindow.document.documentElement;
|
|
|
|
f.style.height = body.scrollHeight + "px";
|
|
|
|
}
|
2012-07-05 13:04:45 +00:00
|
|
|
function injectClass(f) { f.contentWindow.document.body.setAttribute('class', 'iframed'); }
|
2012-06-27 02:16:21 +00:00
|
|
|
function setupFrame() {
|
2012-06-21 23:47:49 +00:00
|
|
|
f = document.getElementById("i2ptunnelframe");
|
|
|
|
resizeFrame(f);
|
|
|
|
injectClass(f);
|
2012-06-05 15:19:40 +00:00
|
|
|
}
|
|
|
|
</script>
|
2012-06-27 02:16:21 +00:00
|
|
|
</head><body onload="initAjax()">
|
2012-06-05 15:19:40 +00:00
|
|
|
|
|
|
|
<%@include file="summary.jsi" %>
|
|
|
|
|
2012-07-12 10:32:00 +00:00
|
|
|
<h1><%=intl._("I2P Tunnel Manager")%> <span class="newtab"><a href="/i2ptunnel/" target="_blank" title="<%=intl._("Open in new tab")%>"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/newtab.png" /></a></span></h1>
|
2012-06-05 15:19:40 +00:00
|
|
|
<div class="main" id="main">
|
2012-06-27 02:16:21 +00:00
|
|
|
<iframe src="/i2ptunnel/" width="100%" height="100%" frameborder="0" border="0" name="i2ptunnelframe" id="i2ptunnelframe" onload="setupFrame()" allowtransparency="true">
|
2012-06-05 15:19:40 +00:00
|
|
|
</iframe>
|
|
|
|
</div></body></html>
|
|
|
|
<%
|
|
|
|
}
|
|
|
|
%>
|