⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newtopiccontents.jsp

📁 struts+hibernate BBS mysql数据库 功能基本齐全
💻 JSP
字号:
<%@ page language="java" pageEncoding="gbk"%>
<%@ page import = "com.elan.forum.model.ForumUser" %>
<%@ include file = "/forum/view/inc/Taglib.jsp" %>
<%
ForumUser fu = (ForumUser)session.getAttribute("user");
int pieceId = -1 ;
if(request.getParameter("pieceId") != null) {
pieceId = Integer.parseInt(request.getParameter("pieceId"));
}
String pieceIdStr = (String)session.getAttribute("pieceId");
if(pieceIdStr != null) {
	pieceId = Integer.parseInt(pieceIdStr);
	session.removeAttribute("pieceId");	
}
%>
<div class="bodywidth">
	<center><html:errors /></center>
	<form name="myform"
		action="<%=request.getContextPath()%>/forum/topic.do?action=newTopic"
		method="post" onsubmit="return Check(this)">
		测试测试
		<input type="hidden" name="authorId" value="<%=fu.getId()%>">
		<input type="hidden" name="pieceId" value="<%=pieceId %>" />
		<table width="100%" border="0" cellpadding="0" cellspacing="1"
			class="forum_border">
			<tr>
				<td height="30" colspan="2" class="forum_title">
					发表帖子
				</td>
			</tr>
			<tr>
				<td class="forum_td_item">
					<strong>用户名:</strong>
				</td>
				<td class="forum_td_input">
					<input type='text' name="author" readonly value="<%=((ForumUser)session.getAttribute("user")).getUsername()%>" />
				</td>
			</tr>
			<tr>
				<td width="17%" class="forum_td_item">
					<strong>主题标题:</strong>
				</td>
				<td width="83%" class="forum_td_input">
					<select name="topicType">
						<option value="">
							请选择
						</option>
						<option value="[灌水]">
							[灌水]
						</option>
						<option value="[转帖]">
							[转帖]
						</option>
						<option value="[推荐]">
							[推荐]
						</option>
						<option value="[公告]">
							[公告]
						</option>
						<option value="[贴图]">
							[贴图]
						</option>
						<option value="[分享]">
							[分享]
						</option>
						<option value="[注意]">
							[注意]
						</option>
						<option value="[下载]">
							[下载]
						</option>
					</select>
					<script language='javascript'>function setClass(){var o = getObject('Title'); o.value = getObject('Class').value + o.value; }</script>
					<input type='text' name='title' id='title' value='' size='60' />
					<select id='Color' name='Color'>
						<option value='' selected>
							标题颜色
						</option>
						<option value='#FF0000'>
							红色
						</option>
						<option value='#0000FF'>
							蓝色
						</option>
						<option value='#008000'>
							绿色
						</option>
						<option value='#FF6600'>
							橙色
						</option>
					</select>
				</td>
			</tr>
			<tr>
				<td class="forum_td_item">
					<strong>心情图标:</strong>
				</td>
				<td class="forum_td_input">
					<%@ include file="/forum/view/inc/Face.jsp"%></td>
			</tr>
			<tr>
				<td class="forum_td_item">
					<strong>主题内容:</strong>
				</td>
				<td class="forum_td_input">
					<script language='javascript'>function AddItem(strFileName){ var arrName = strFileName.split('.'); var FileExt = arrName[1];if(getObject('Uploadfiles').value.trim() == ''){ getObject('Uploadfiles').value = strFileName; }else{ getObject('Uploadfiles').value += '|'+ strFileName; } }</script>
					<textarea name='text' style='display: none;' id='text'></textarea>
					<iframe ID='Editor'
						src="/ElanNet/ditor/ewebeditor.htm?id=text&style=coolblue"
						frameborder='1' scrolling='no' width='700' height='400'></iframe>
				</td>
			</tr>
			<tr>
				<td class="forum_td_item">
					<strong>验证码:</strong>
				</td>
				<td class="forum_td_input">
					<input type='text' name='CheckCode' id='CheckCode' size='10' />
					<img style='border: 1px solid #ffffff; cursor: hand;' src="<%=request.getContextPath()%>/forum/view/inc/CheckCode.jsp"
						onClick="this.src='<%=request.getContextPath()%>/forum/view/inc/CheckCode.jsp'" />
				</td>
			</tr>
			<tr>
				<td class="forum_td_item">
					&nbsp;
				</td>
				<td class="forum_td_input">
					<input type="submit" name="Submit" value="发表主题" />
					<input type="button" name="Submit2" value=" 取 消 "
						onclick="history.back()" />
					<input type='hidden' id='Action' name='Action' value='SaveNew' />
					<input type='hidden' id='BoardID' name='BoardID' value='3' />
					<input type='hidden' id='TopicType' name='TopicType' value='0' />
					<input type='hidden' id='Uploadfiles' name='Uploadfiles' value='' />
				</td>
			</tr>
		</table>
	</form>
</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -