📄 talk.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.util.*,cn.zd.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>正大软件学院论坛</title>
<link href="style.css" rel="stylesheet" type="text/css" /></head>
<script language="javascript">
function check(){
if(document.form1.title.value==''){
alert("标题不能为空!");
return false;
}
if(document.form1.model_id2.value==''){
alert("没有选择模块");
return false;
}
if(document.form1.talk_content.value==''){
alert("帖子内容不能为空");
return false;
}
return true;
}
</script>
<body>
<%try{
//request.setCharacterEncoding("gb2312");
//接收二级模块的名称
String m_name2=new String(request.getParameter("m_name2").getBytes("iso-8859-1"));
//调用工厂传二级模块lid
int lid=Integer.parseInt(request.getParameter("lid"));
//接收一级模块ID
int lic=Integer.parseInt(request.getParameter("lic"));
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr style="background-image:url(images/bg_top.jpg)">
<td align="left"><img src="images/top_01.jpg" width="347" height="101" /><img src="images/top_02.jpg" width="330" height="101" /></td>
<td align="right"><img src="images/top_03.jpg" width="323" height="101" /></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td colspan="2" id="nav"> <img src="images/icon_nav.jpg" width="9" height="9" />
<a href="index.jsp">正大软件职业技术学院论坛</a> <img src="images/icon_barrow.jpg" width="12" height="6" />
<a href="list.jsp?lid=<%=lid %>&lic=<%=lic %>&m_name2=<%=m_name2%>"><%=m_name2 %></a> <img src="images/icon_barrow.jpg" width="12" height="6" /> 发帖主题</td>
</tr>
</table>
<table width="100%" align="center" cellpadding="0" cellspacing="1" bgcolor="#76AEF0" id="hf">
<tr>
<th
height="24" colspan="2" align="left" valign="center" background="images/bg_tt.gif" class="menu_tt"> 发起新主题</th>
</tr>
<%
if(session.getAttribute("username")==null||session.getAttribute("username")==""){
%>
<tr>
<td width="193" nowrap="nowrap" bgcolor="#F0F8FF" class="tablebody1"><b>你还没有登录,先登录再发贴!</b></td>
<td height="30" bgcolor="#F0F8FF" class="tablebody1"><%@include file="lg.jsp"%></td>
</tr>
<%}else{
%>
<form action="Talk_do.jsp" method="post" name="form1" enctype="multipart/form-data" />
<input type="hidden" value="<%=session.getAttribute("username")%>" name="username" />
<tr>
<td width="193" nowrap="nowrap" bgcolor="#F0F8FF" class="tablebody1"><b>发贴标题<b></b>:</b></td>
<td height="30" bgcolor="#F0F8FF" class="tablebody1"><input name="title" class="inputstyle" id="title" size="50" />
<strong>发表到:</strong>
<%
List all=null;
try{
all=DAOFactory.getNoteDAOInstance().queryModel(lic);
}catch(Exception e){
out.print("发贴不成功!");
}
%>
<select name="model_id2">
<option value="<%=lid %>" selected="selected"><%=m_name2 %></option>
<%
Iterator iter = all.iterator() ;
while(iter.hasNext())
{
Note note = (Note)iter.next() ;
int model_id2=Integer.parseInt(note.getModel_id2());
//i++ ;
// 进行循环打印,打印出所有的内容,以表格形式
// 从数据库中取出内容
if(model_id2==lid){continue;}
%>
<option value="<%=note.getModel_id2()%>"><%=note.getModel_name2()%></option>
<%} %>
</select></td>
</tr>
<%}%>
<tr>
<td width="193" nowrap="nowrap" bgcolor="#D7ECFF" class="tablebody2"><li>[<font
color="red"><a href="#">加入心情图标</a></font>]<br />
</li>
<li>将放在帖子的前面<br />
</li></td>
<td bgcolor="#D7ECFF" class="tablebody2">
<input type="radio" value="1" name="talk_face" />
<img
src="images/face/1.gif" width="30" height="30" />
<input type="radio" checked="checked" value="2"
name="talk_face" />
<img
src="images/face/2.gif" />
<input
type="radio" value="3" name="talk_face" />
<img
src="images/face/3.gif" />
<input
type="radio" value="4" name="talk_face" />
<img
src="images/face/4.gif" />
<input
type="radio" value="5" name="talk_face" />
<img
src="images/face/5.gif" />
<input
type="radio" value="6" name="talk_face" />
<img
src="images/face/6.gif" />
<input
type="radio" value="7" name="talk_face" />
<img
src="images/face/7.gif" />
<input
type="radio" value="8" name="talk_face" />
<img
src="images/face/8.gif" />
<input
type="radio" value="9" name="talk_face" />
<img
src="images/face/9.gif" /> <br />
<input type="radio" value="10" name="talk_face" />
<img
src="images/face/10.gif" />
<input
type="radio" value="11" name="talk_face" />
<img
src="images/face/11.gif" />
<input
type="radio" value="12" name="talk_face" />
<img
src="images/face/12.gif" />
<input
type="radio" value="13" name="talk_face" />
<img
src="images/face/13.gif" />
<input
type="radio" value="14" name="talk_face" />
<img
src="images/face/14.gif" />
<input
type="radio" value="15" name="talk_face" />
<img
src="images/face/15.gif" />
<input
type="radio" value="16" name="talk_face" />
<img
src="images/face/16.gif" />
<input
type="radio" value="17" name="talk_face" />
<img
src="images/face/17.gif" />
<input
type="radio" value="18" name="talk_face" />
<img
src="images/face/18.gif" /> <br /></td>
</tr>
<tr>
<td valign="top" nowrap="nowrap" bgcolor="#F0F8FF" class="tablebody1"><b>内容</b><br />
<li>HTML标签: 不可用 </li>
<li>UBB标签: 可用 </li>
<li>贴图标签: 可用 </li>
<li>多媒体标签:可用 </li>
<li>表情字符转换:可用 </li>
<li>上传图片:可用 </li>
<li>最多15KB </li></td>
<td bgcolor="#F0F8FF" class="tablebody1">
<textarea name="talk_content" cols="100" rows="12" wrap="virtual" id="talk_content" title="可以使用Ctrl+Enter直接提交贴子" onkeydown="ctlent()"></textarea>
</td>
</tr>
<tr>
<td height="30" nowrap="nowrap" bgcolor="#F0F8FF" class="tablebody1"><p><strong>上传资料:</strong></p> </td>
<td bgcolor="#F0F8FF" class="tablebody1"><label>
<input name="photo_up" type="file" class="inputstyle" id="photo_up" size="40" />
<input type="text" name="photo_sm" />图片说明
</label></td>
</tr>
<tr bgcolor="#ba0000" #e8f4ff;>
<td height="30" nowrap="nowrap" bgcolor="#D7ECFF" class="tablebody2">
</td>
<%if(session.getAttribute("username")==null||session.getAttribute("username")==""){ %>
<td width="1049" bgcolor="#D7ECFF" class="tablebody2"><input name="Submit" type="submit" class="inputstyle" value="OK!发表我的主题" onclick="return alert('没有登录不能发贴')" />
<%}else{ %>
<td width="1049" bgcolor="#D7ECFF" class="tablebody2"><input name="Submit" type="submit" class="inputstyle" value="OK!发表我的主题" onclick="return check()" />
<%} %>
<input name="Button" type="button" class="inputstyle" onclick="gopreview()" value="预 览" />
<input name="Clear" type="reset" class="inputstyle" value="清空内容!" />
[Ctrl+Enter直接提交贴子] </td>
</tr>
</form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="bottom">
<tr>
<td><p>版权所有©重庆正大软件职业技术学院<br />
<br />
技术支持:重庆正大软件职业技术学院网络技术系 渝ICP备07001号 </p></td>
<td width="80"><img src="images/bg_logo.gif" width="58" height="58" /></td>
</tr>
</table>
<%
}catch(Exception e){
%>
<%
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -