venice-main-classic/web/format/sideboxlist.jsp
Eric J. Bowersox 1c69955046 Reworked the sidebox implementation to depend less on the database and more
on XML config files...the implementation should now be much more customizable
and less klunky.  Added a provision for implementing "generic" (JSP-driven)
sideboxes.  Implemented the sidebox configure button on the front page
(finally!).  Implemented a random password generator class which will be used
in a future implementation of reminder-driven automatic forgotten-password
changing.  Fixed some minor funnies in SIG menu generation.
2001-11-04 05:57:58 +00:00

109 lines
4.8 KiB
Plaintext

<%--
The contents of this file are subject to the Mozilla Public License Version 1.1
(the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License.
The Original Code is the Venice Web Communities System.
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
Contributor(s):
--%>
<%@ page import = "java.util.*" %>
<%@ page import = "com.silverwrist.util.StringUtil" %>
<%@ page import = "com.silverwrist.venice.core.*" %>
<%@ page import = "com.silverwrist.venice.servlets.Variables" %>
<%@ page import = "com.silverwrist.venice.servlets.format.*" %>
<%
SideBoxList data = SideBoxList.retrieve(request);
Variables.failIfNull(data);
RenderData rdat = RenderConfig.createRenderData(application,request,response);
String stdfont = rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2);
int i;
SideBoxDescriptor d;
%>
<% if (rdat.useHTMLComments()) { %><!-- User sidebox list --><% } %>
<% rdat.writeContentHeader(out,"Your Front Page Configuration",null); %>
<%= stdfont %><A HREF="<%= rdat.getEncodedServletPath("top") %>">Return to Front Page</A></FONT><P>
<% if (data.getInListSize()>0) { %>
<TABLE BORDER=0 ALIGN=CENTER CELLPADDING=0 CELLSPACING=3>
<% for (i=0; i<data.getInListSize(); i++) { %>
<% d = data.getInListItem(i); %>
<TR VALIGN=MIDDLE>
<TD ALIGN=CENTER WIDTH=16>
<% if (i==(data.getInListSize()-1)) { %>&nbsp;<% } else { %>
<A HREF="<%= rdat.getEncodedServletPath("settings?cmd=BD&box=" + d.getID()) %>"><IMG
SRC="<%= rdat.getFullImagePath("icn_down.gif") %>" ALT="[Down]" BORDER=0 WIDTH=16
HEIGHT=16></A>
<% } // end if %>
</TD>
<TD ALIGN=CENTER WIDTH=16>
<% if (i==0) { %>&nbsp;<% } else { %>
<A HREF="<%= rdat.getEncodedServletPath("settings?cmd=BU&box=" + d.getID()) %>"><IMG
SRC="<%= rdat.getFullImagePath("icn_up.gif") %>" ALT="[Up]" BORDER=0 WIDTH=16
HEIGHT=16></A>
<% } // end if %>
</TD>
<TD ALIGN=CENTER WIDTH=16>
<A HREF="<%= rdat.getEncodedServletPath("settings?cmd=BX&box=" + d.getID()) %>"><IMG
SRC="<%= rdat.getFullImagePath("icn_x.gif") %>" ALT="[Remove]" BORDER=0 WIDTH=16
HEIGHT=16></A>
</TD>
<TD ALIGN=LEFT CLASS="content"><%= stdfont %>
<B><%= StringUtil.encodeHTML(d.getTitle(false)) %></B>
</FONT></TD>
</TR>
<% } // end for %>
</TABLE><P>
<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0>
<TR VALIGN=MIDDLE>
<TD ALIGN=CENTER WIDTH=16>
<IMG SRC="<%= rdat.getFullImagePath("icn_down.gif") %>" ALT="[Down]" BORDER=0 WIDTH=16 HEIGHT=16>
</TD>
<TD ALIGN=LEFT CLASS="content"><%= stdfont %>
Click this symbol to move the specified sidebox down on your Front Page.
</FONT></TD>
</TR>
<TR VALIGN=MIDDLE>
<TD ALIGN=CENTER WIDTH=16>
<IMG SRC="<%= rdat.getFullImagePath("icn_up.gif") %>" ALT="[Up]" BORDER=0 WIDTH=16 HEIGHT=16>
</TD>
<TD ALIGN=LEFT CLASS="content"><%= stdfont %>
Click this symbol to move the specified sidebox up on your Front Page.
</FONT></TD>
</TR>
<TR VALIGN=MIDDLE>
<TD ALIGN=CENTER WIDTH=16>
<IMG SRC="<%= rdat.getFullImagePath("icn_x.gif") %>" ALT="[Remove]" BORDER=0 WIDTH=16 HEIGHT=16>
</TD>
<TD ALIGN=LEFT CLASS="content"><%= stdfont %>
Click this symbol to remove the specified sidebox from your Front Page.
</FONT></TD>
</TR>
</TABLE>
<% } else { %>
<%= stdfont %><EM>You have no sideboxes on your Front Page.</EM></FONT>
<% } // end if %>
<% if (data.getOutListSize()>0) { %>
<P>
<FORM METHOD="POST" ACTION="<%= rdat.getEncodedServletPath("settings") %>">
<DIV CLASS="content"><%= stdfont %>
<INPUT TYPE="HIDDEN" NAME="cmd" VALUE="BA">
<B>Add sidebox:</B>&nbsp;&nbsp;
<SELECT NAME="box" SIZE=1>
<% for (i=0; i<data.getOutListSize(); i++) { %>
<% d = data.getOutListItem(i); %>
<OPTION VALUE="<%= d.getID() %>"><%= StringUtil.encodeHTML(d.getTitle(false)) %></OPTION>
<% } // end for %>
</SELECT>&nbsp;&nbsp;
<INPUT TYPE="IMAGE" SRC="<%= rdat.getFullImagePath("bn_add.gif") %>" NAME="add" ALT="Add"
ALIGN=MIDDLE WIDTH=80 HEIGHT=24 BORDER=0>
</FONT></DIV>
</FORM>
<% } // end if %>