📄 addwatch.jsp
字号:
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/user/addwatch.jsp,v 1.8 2003/05/31 19:22:27 minhnn Exp $
- $Author: minhnn $
- $Revision: 1.8 $
- $Date: 2003/05/31 19:22:27 $
-
- ====================================================================
-
- Copyright (C) 2002, 2003 by MyVietnam.net
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or any later version.
-
- All copyright notices regarding mvnForum MUST remain intact
- in the scripts and in the outputted HTML.
- The "powered by" text/logo with a link back to
- http://www.mvnForum.com and http://www.MyVietnam.net in the
- footer of the pages MUST remain visible when the pages
- are viewed on the internet or intranet.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- Support can be obtained from support forums at:
- http://www.mvnForum.com/mvnforum/index
-
- Correspondence and Marketing Questions can be sent to:
- info@MyVietnam.net
-
- @author: Minh Nguyen minhnn@MyVietnam.net
- @author: Mai Nguyen mai.nh@MyVietnam.net
--%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.Collection" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.myvietnam.mvncore.util.ParamUtil" %>
<%@ page import="net.myvietnam.mvncore.filter.EnableEmotionFilter" %>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.db.*" %>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.MyUtil" %>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.MVNForumGlobal" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<html>
<head>
<title>mvnForum - Add Watch</title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
</head>
<link href="<%=contextPath%>/mvnplugin/mvnforum/css/style.css" rel=stylesheet type=text/css>
<body leftmargin=0 topmargin=0>
<%@ include file="header.jsp"%>
<script language="JavaScript">
function showGlobalWatch() {
document.getElementById("WatchSelector0").checked = true;
document.getElementById("GlobalWatch").style.display = '';
document.getElementById("CategoryWatch").style.display = 'none';
document.getElementById("ForumWatch").style.display = 'none';
document.getElementById("ThreadWatch").style.display = 'none';
}
function showCategoryWatch() {
document.getElementById("WatchSelector1").checked = true;
document.getElementById("GlobalWatch").style.display = 'none';
document.getElementById("CategoryWatch").style.display = '';
document.getElementById("ForumWatch").style.display = 'none';
document.getElementById("ThreadWatch").style.display = 'none';
}
function showForumWatch() {
document.getElementById("WatchSelector2").checked = true;
document.getElementById("GlobalWatch").style.display = 'none';
document.getElementById("CategoryWatch").style.display = 'none';
document.getElementById("ForumWatch").style.display = '';
document.getElementById("ThreadWatch").style.display = 'none';
}
function showThreadWatch() {
document.getElementById("WatchSelector3").checked = true;
document.getElementById("GlobalWatch").style.display = 'none';
document.getElementById("CategoryWatch").style.display = 'none';
document.getElementById("ForumWatch").style.display = 'none';
document.getElementById("ThreadWatch").style.display = '';
}
</script>
<p>
<table width="95%" align="center">
<tr class="nav">
<td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
<td width="100%" nowrap>
<a class="navLink" href="index">mvnForum</a> »
<a class="navLink" href="myprofile">My Profile</a> »
<a class="navLink" href="mywatch">My Watch</a> »
Add Watch
</td>
</tr>
</table>
<p>
<table width="95%" cellspacing="1" cellpadding="3" align="center" bgcolor="#999999">
<tr bgcolor=#f5f5f5>
<td class="messageText"><b>IMPORTANT:</b> Please check if your email is valid, if your email is not a valid email, then your account will be disabled.</td>
</tr>
</table>
<p>
<%
CategoryCache categoryCache = CategoryCache.getInstance();
Collection categoryBeans = categoryCache.getBeans();
ForumCache forumCache = ForumCache.getInstance();
Collection forumBeans = forumCache.getBeans();
%>
<form action="addwatchprocess" method="post">
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#999999">
<tr bgcolor="#666699" class="header">
<td colspan="2">Select your watch:</td>
</tr>
<tr bgcolor=#f5f5f5>
<td width="30%" valign="top" class="messageTextBold">Watch Type</td>
<td class="messageText">
<input type="radio" name="WatchSelector" value="0" id="WatchSelector0" onClick="showGlobalWatch();" class="noborder"> Global Watch<br>
<input type="radio" name="WatchSelector" value="1" id="WatchSelector1" onClick="showCategoryWatch();" class="noborder"> Category Watch<br>
<input type="radio" name="WatchSelector" value="2" id="WatchSelector2" onClick="showForumWatch();" class="noborder"> Forum Watch<br>
<input type="radio" name="WatchSelector" value="3" id="WatchSelector3" onClick="showThreadWatch();" class="noborder"> Thread Watch<br>
</td>
</tr>
<tr bgcolor="#F5F5F5" id="GlobalWatch" style="display: none;">
<td colspan="2" align="center" class="messageTextBold">You will watch the whole system</td>
</tr>
<tr bgcolor="#F5F5F5" id="CategoryWatch" style="display: none;">
<td class="messageTextBold">Category</td>
<td>
<select name="CategoryID">
<option value="">Select a category</option>
<%
Iterator catIterator = categoryBeans.iterator();
while (catIterator.hasNext()) {
CategoryBean categoryBean = (CategoryBean)catIterator.next();
%>
<option value="<%=categoryBean.getCategoryID()%>"> <%=categoryBean.getCategoryName()%></option>
<%
}//while
%>
</select>
</td>
</tr>
<tr bgcolor="#F5F5F5" id="ForumWatch" style="display: none;">
<td class="messageTextBold">Forum</td>
<td>
<select name="ForumID">
<option value="">Select a forum</option>
<%
Iterator forumIterator = forumBeans.iterator();
int lastCategoryID = -1;
while(forumIterator.hasNext()) {
ForumBean row = (ForumBean)forumIterator.next();
if (row.getCategoryID() != lastCategoryID) {// to print the category
lastCategoryID = row.getCategoryID();
CategoryBean categoryBean = categoryCache.getBean(lastCategoryID);
%>
<option value="<%=categoryBean.getCategoryID()%>"> <%=categoryBean.getCategoryName()%></option>
<option value=""> ---------------------------------</option>
<%
}//if
%>
<option value="<%=row.getForumID()%>"> <%=row.getForumName()%></option>
<%
}//while
%>
</select>
</td>
</tr>
<tr bgcolor="#F5F5F5" id="ThreadWatch" style="display: none;">
<td class="messageTextBold">Thread</td>
<td><input type="text" name="ThreadID" value="<%=ParamUtil.getParameter(request, "thread")%>"></td>
</tr>
<tr bgcolor="Silver">
<td colspan="2" align="center"><input type="button" value="Watch It" onclick="disabled=true; submit();" class="mainoption"></td>
</tr>
</table>
</form>
<script language="JavaScript">
showCategoryWatch();
</script>
<p>
<%@ include file="footer.jsp"%></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -