source: apps/susidns/src/jsp/details.jsp @ 5b31540

Last change on this file since 5b31540 was 5b31540, checked in by zzz <zzz@…>, 4 years ago

Console: Version the css links

  • Property mode set to 100644
File size: 6.4 KB
Line 
1<%
2/*
3 *  This file is part of susidns project, see http://susi.i2p/
4 * 
5 *  Copyright (C) 2005 <susi23@mail.i2p>
6 *
7 *  This program is free software; you can redistribute it and/or modify
8 *  it under the terms of the GNU General Public License as published by
9 *  the Free Software Foundation; either version 2 of the License, or
10 *  (at your option) any later version.
11 *
12 *  This program is distributed in the hope that it will be useful,
13 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *  GNU General Public License for more details.
16 *
17 *  You should have received a copy of the GNU General Public License
18 *  along with this program; if not, write to the Free Software
19 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20 * 
21 */
22
23    // http://www.crazysquirrel.com/computing/general/form-encoding.jspx
24    if (request.getCharacterEncoding() == null)
25        request.setCharacterEncoding("UTF-8");
26
27    response.setHeader("X-Frame-Options", "SAMEORIGIN");
28    response.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'");
29    response.setHeader("X-XSS-Protection", "1; mode=block");
30    response.setHeader("X-Content-Type-Options", "nosniff");
31
32%>
33<%@page pageEncoding="UTF-8"%>
34<%@ page contentType="text/html"%>
35<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
36<jsp:useBean id="version" class="i2p.susi.dns.VersionBean" scope="application" />
37<jsp:useBean id="book" class="i2p.susi.dns.NamingServiceBean" scope="session" />
38<jsp:useBean id="intl" class="i2p.susi.dns.Messages" scope="application" />
39<jsp:setProperty name="book" property="*" />
40<jsp:setProperty name="book" property="resetDeletionMarks" value="1"/>
41<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
42<html>
43<head>
44<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
45<title>${book.book} <%=intl._t("addressbook")%> - susidns</title>
46<link rel="stylesheet" type="text/css" href="<%=book.getTheme()%>susidns.css?<%=net.i2p.CoreVersion.VERSION%>">
47</head>
48<body>
49<div class="page">
50<div id="logo">
51<a href="index"><img src="<%=book.getTheme()%>images/logo.png" alt="" title="<%=intl._t("Overview")%>" border="0"/></a>
52</div>
53<hr>
54<div id="navi">
55<p>
56<%=intl._t("Address books")%>:
57<a href="addressbook?book=private&amp;filter=none&amp;begin=0&amp;end=49"><%=intl._t("private")%></a> |
58<a href="addressbook?book=master&amp;filter=none&amp;begin=0&amp;end=49"><%=intl._t("master")%></a> |
59<a href="addressbook?book=router&amp;filter=none&amp;begin=0&amp;end=49"><%=intl._t("router")%></a> |
60<a href="addressbook?book=published&amp;filter=none&amp;begin=0&amp;end=49"><%=intl._t("published")%></a> *
61<a href="subscriptions"><%=intl._t("Subscriptions")%></a> *
62<a href="config"><%=intl._t("Configuration")%></a> *
63<a href="index"><%=intl._t("Overview")%></a>
64</p>
65</div>
66<hr>
67<div id="headline">
68<h3><%=intl._t("Address book")%>: <%=intl._t(book.getBook())%></h3>
69<h4><%=intl._t("Storage")%>: ${book.displayName}</h4>
70</div>
71
72<div id="book">
73<%
74    String detail = request.getParameter("h");
75    if (detail == null) {
76        %><p>No host specified</p><%
77    } else {
78        detail = net.i2p.data.DataHelper.stripHTML(detail);
79        java.util.List<i2p.susi.dns.AddressBean> addrs = book.getLookupAll();
80        if (addrs == null) {
81            %><p>Not found: <%=detail%></p><%
82        } else {
83            for (i2p.susi.dns.AddressBean addr : addrs) {
84                String b32 = addr.getB32();
85%>
86<jsp:setProperty name="book" property="trClass" value="0" />
87<table class="book" cellspacing="0" cellpadding="5">
88<tr class="list${book.trClass}">
89<td><%=intl._t("Host Name")%></td>
90<td><a href="http://<%=addr.getName()%>/" target="_top"><%=addr.getDisplayName()%></a></td>
91</tr><tr class="list${book.trClass}">
92<%
93    if (addr.isIDN()) {
94%>
95<td><%=intl._t("Encoded Name")%></td>
96<td><a href="http://<%=addr.getName()%>/" target="_top"><%=addr.getName()%></a></td>
97</tr><tr class="list${book.trClass}">
98<%
99    }
100%>
101<td><%=intl._t("Base 32 Address")%></td>
102<td><a href="http://<%=b32%>/" target="_top"><%=b32%></a></td>
103</tr><tr class="list${book.trClass}">
104<td><%=intl._t("Base 64 Hash")%></td>
105<td><%=addr.getB64()%></td>
106</tr><tr class="list${book.trClass}">
107<td><%=intl._t("Address Helper")%></td>
108<td><a href="http://<%=addr.getName()%>/?i2paddresshelper=<%=addr.getDestination()%>" target="_top"><%=intl._t("link")%></a></td>
109</tr><tr class="list${book.trClass}">
110<td><%=intl._t("Public Key")%></td>
111<td><%=intl._t("ElGamal 2048 bit")%></td>
112</tr><tr class="list${book.trClass}">
113<td><%=intl._t("Signing Key")%></td>
114<td><%=addr.getSigType()%></td>
115</tr><tr class="list${book.trClass}">
116<td><%=intl._t("Certificate")%></td>
117<td><%=addr.getCert()%></td>
118</tr><tr class="list${book.trClass}">
119<td><%=intl._t("Added Date")%></td>
120<td><%=addr.getAdded()%></td>
121</tr><tr class="list${book.trClass}">
122<td><%=intl._t("Validated")%></td>
123<td><%=addr.isValidated() ? intl._t("yes") : intl._t("no")%></td>
124</tr><tr class="list${book.trClass}">
125<td><%=intl._t("Source")%></td>
126<td><%=addr.getSource()%></td>
127</tr><tr class="list${book.trClass}">
128<td><%=intl._t("Last Modified")%></td>
129<td><%=addr.getModded()%></td>
130</tr><tr class="list${book.trClass}">
131<td><%=intl._t("Notes")%></td>
132<td><%=addr.getNotes()%></td>
133</tr><tr class="list${book.trClass}">
134<td><%=intl._t("Destination")%></td>
135<td class="destinations"><textarea rows="1" style="height:3em;" wrap="off" cols="70" readonly="readonly" ><%=addr.getDestination()%></textarea></td>
136</tr></table>
137</div>
138<div id="buttons">
139<form method="POST" action="addressbook">
140<p class="buttons">
141<input type="hidden" name="serial" value="${book.serial}">
142<input type="hidden" name="begin" value="0">
143<input type="hidden" name="end" value="49">
144<input type="hidden" name="checked" value="<%=detail%>">
145<input class="delete" type="submit" name="action" value="<%=intl._t("Delete Entry")%>" >
146</p>
147</form>
148</div>
149<div><table><tr><td>
150<img src="/imagegen/id?s=320&amp;c=<%=addr.getB64().replace("=", "%3d")%>" width="320" height="320">
151</td><td>
152<img src="/imagegen/qr?s=320&amp;t=<%=addr.getName()%>&amp;c=http%3a%2f%2f<%=addr.getName()%>%2f%3fi2paddresshelper%3d<%=addr.getDestination()%>">
153</td></tr></table>
154<hr>
155<%
156            }  // foreach addr
157%>
158</div>
159<%
160        }  // addrs == null
161    }  // detail == null
162%>
163<div id="footer">
164<p class="footer">susidns v${version.version} &copy; <a href="${version.url}" target="_top">susi</a> 2005</p>
165</div>
166</div>
167</body>
168</html>
Note: See TracBrowser for help on using the repository browser.