2005-08-31 09:50:23 +00:00
|
|
|
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="net.i2p.syndie.web.*" %>
|
|
|
|
<% request.setCharacterEncoding("UTF-8"); %>
|
2005-08-23 21:25:49 +00:00
|
|
|
<jsp:useBean scope="session" class="net.i2p.syndie.web.RemoteArchiveBean" id="remote" />
|
|
|
|
<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
|
2005-08-25 20:59:46 +00:00
|
|
|
<jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive" />
|
2005-08-23 21:25:49 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>SyndieMedia</title>
|
|
|
|
<link href="style.jsp" rel="stylesheet" type="text/css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<table border="1" cellpadding="0" cellspacing="0" width="100%">
|
|
|
|
<tr><td colspan="5" valign="top" align="left"><jsp:include page="_toplogo.jsp" /></td></tr>
|
|
|
|
<tr><td valign="top" align="left" rowspan="2"><jsp:include page="_leftnav.jsp" /></td>
|
|
|
|
<jsp:include page="_topnav.jsp" />
|
|
|
|
<td valign="top" align="left" rowspan="2"><jsp:include page="_rightnav.jsp" /></td></tr>
|
|
|
|
<tr><form action="remote.jsp" method="POST"><td valign="top" align="left" colspan="3">
|
|
|
|
<%
|
|
|
|
if (!user.getAuthenticated() || !user.getAllowAccessRemote()) {
|
|
|
|
%>Sorry, you are not allowed to access remote archives from here. Perhaps you should install Syndie yourself?<%
|
2005-08-25 20:59:46 +00:00
|
|
|
} else { %>Import from:
|
2005-08-23 21:25:49 +00:00
|
|
|
<select name="schema">
|
2005-08-27 22:15:35 +00:00
|
|
|
<option value="web" <%=("web".equals(request.getParameter("schema")) ? "selected=\"true\"" : "")%>>I2P/TOR/Freenet</option>
|
|
|
|
<option value="mnet" <%=("mnet".equals(request.getParameter("schema")) ? "selected=\"true\"" : "")%>>MNet</option>
|
|
|
|
<option value="feedspace" <%=("feedspace".equals(request.getParameter("schema")) ? "selected=\"true\"" : "")%>>Feedspace</option>
|
|
|
|
<option value="usenet" <%=("usenet".equals(request.getParameter("schema")) ? "selected=\"true\"" : "")%>>Usenet</option>
|
2005-08-25 20:59:46 +00:00
|
|
|
</select>
|
|
|
|
Proxy <input type="text" size="10" name="proxyhost" value="localhost" />:<input type="text" size="4" name="proxyport" value="4444" />
|
2005-08-27 22:15:35 +00:00
|
|
|
<input name="location" size="40" value="<%=(request.getParameter("location") != null ? request.getParameter("location") : "")%>" />
|
|
|
|
<input type="submit" name="action" value="Continue..." /><br />
|
2005-08-23 21:25:49 +00:00
|
|
|
<%
|
|
|
|
String action = request.getParameter("action");
|
|
|
|
if ("Continue...".equals(action)) {
|
2005-08-25 20:59:46 +00:00
|
|
|
remote.fetchIndex(user, request.getParameter("schema"), request.getParameter("location"), request.getParameter("proxyhost"), request.getParameter("proxyport"));
|
2005-08-23 21:25:49 +00:00
|
|
|
} else if ("Fetch metadata".equals(action)) {
|
|
|
|
remote.fetchMetadata(user, request.getParameterMap());
|
|
|
|
} else if ("Fetch selected entries".equals(action)) {
|
2005-08-27 22:15:35 +00:00
|
|
|
//remote.fetchSelectedEntries(user, request.getParameterMap());
|
|
|
|
remote.fetchSelectedBulk(user, request.getParameterMap());
|
2005-08-23 21:25:49 +00:00
|
|
|
} else if ("Fetch all new entries".equals(action)) {
|
2005-08-27 22:15:35 +00:00
|
|
|
//remote.fetchAllEntries(user, request.getParameterMap());
|
|
|
|
remote.fetchSelectedBulk(user, request.getParameterMap());
|
2005-08-25 20:59:46 +00:00
|
|
|
} else if ("Post selected entries".equals(action)) {
|
|
|
|
remote.postSelectedEntries(user, request.getParameterMap());
|
2005-08-23 21:25:49 +00:00
|
|
|
}
|
|
|
|
String msgs = remote.getStatus();
|
|
|
|
if ( (msgs != null) && (msgs.length() > 0) ) { %><pre><%=msgs%>
|
2005-08-25 20:59:46 +00:00
|
|
|
<a href="remote.jsp">Refresh</a></pre><br /><%
|
|
|
|
}
|
2005-08-23 21:25:49 +00:00
|
|
|
if (remote.getFetchIndexInProgress()) { %><b>Please wait while the index is being fetched
|
|
|
|
from <%=remote.getRemoteLocation()%></b>. <%
|
|
|
|
} else if (remote.getRemoteIndex() != null) {
|
|
|
|
// remote index is NOT null!
|
2005-08-25 20:59:46 +00:00
|
|
|
%><b><%=remote.getRemoteLocation()%></b>
|
|
|
|
<a href="remote.jsp?schema=<%=remote.getRemoteSchema()%>&location=<%=remote.getRemoteLocation()%><%
|
|
|
|
if (remote.getProxyHost() != null && remote.getProxyPort() > 0) {
|
|
|
|
%>&proxyhost=<%=remote.getProxyHost()%>&proxyport=<%=remote.getProxyPort()%><%
|
|
|
|
} %>&action=Continue...">(refetch)</a>:<br />
|
2005-08-23 21:25:49 +00:00
|
|
|
<%remote.renderDeltaForm(user, archive, out);%>
|
|
|
|
<textarea style="font-size:8pt" rows="5" cols="120"><%=remote.getRemoteIndex()%></textarea><%
|
|
|
|
}
|
|
|
|
}
|
|
|
|
%>
|
|
|
|
</td></form></tr>
|
|
|
|
</table>
|
|
|
|
</body>
|