📄 repost.jsp
字号:
<%@ page language="java" contentType="text/html; charset=gb2312" pageEncoding="gb2312"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>Insert title here</title>
<%@page import="java.util.*" %></head><body>
<table width="921" height="600" border="2" align="center">
<tr>
<th height="51" colspan="2" scope="col"> </th>
<th width="298" rowspan="2" scope="col"><div align="center"><span class="STYLE2">软件工程交流论坛</span></div></th>
<th colspan="2" scope="col"> </th>
</tr>
<%
String id;
id = (String)session.getAttribute("name");
String bbsstate =(String)request.getAttribute("bbsstate");//得到目前所在版块
System.out.println("当前repost.jsp页面的bbsstate值为:"+bbsstate);
if(id!=null){
%>
<tr>
<td width="150"><div align="center">用户ID:<%=id %></div></td>
<td width="154" height="17"> </td>
<td width="170"><div align="center"><a href="/bbs_design/ReqServlet?action=login">用户登陆</a> </div></td>
<td width="115"><div align="center"><a href="/bbs_design/ReqServlet?action=register">新用户注册</a></div></td>
</tr>
<%
}
else{
id ="visitor";
session.setAttribute("name","visitor");
session.setAttribute("author","游客");
%>
<tr>
<td width="150"><div align="center">用户ID:<%=id %></div></td>
<td width="154" height="17"> <div align="center">昵称: 游客</div></td>
<td width="170"><div align="center"><a href="/bbs_design/ReqServlet?action=login">用户登陆</a> </div></td>
<td width="115"><div align="center"><a href="/bbs_design/ReqServlet?action=register">新用户注册</a></div></td>
</tr>
<tr>
<td height="23"> </td>
<td height="23"> </td>
<td width="298" height="23"> </td>
<td height="23"> </td>
<td height="23"> </td>
</tr>
<%} %>
<%
if(!id.equals("visitor")){%>
<tr>
<td height="23"> </td>
<td height="23"> </td>
<td width="298" height="23">
<jsp:useBean id="cm" scope="session" class="bean.check.CheckMessage" />
<a href="/bbs_design/ReqServlet?action=message&userid=<%=id %>">短消息</a> 未读<%=cm.CheckUnReadMessage(id) %>个</td>
<td height="23"><a href="/bbs_design/ReqServlet?action=usercontrolform&userid=<%=id %>">控制面板</a> </td>
<td height="23"><a href="/bbs_design/ReqServlet?action=quit">安全退出</a></td>
</tr>
<%}
%>
<tr>
<td height="4" colspan="5"><div align="center">
<%
Vector post;
post = (Vector)request.getAttribute("postcontent");
String url = (String)post.elementAt(0);
String author = (String)post.elementAt(1);
String title = (String)post.elementAt(2);
String floor = (String)post.elementAt(3);
String content = (String)post.elementAt(4);
System.out.println("内容:"+content);
%><form action="/bbs_design/ReqForm" method="get">
用户<input type="text" name = "author" value=<%=author %> >
回复<input type="text" name = "title" value=<%=title %> ><br>
内容<textarea name="recontent" rows=10 cols=40 ><%=content %></textarea><br>
<input type="hidden" name="action" value="updatepost">
<input type="hidden" name="floor" value=<%=floor %>>
<input type="hidden" name="postid" value=<%=url %>>
<input type="hidden" name="bbsstate" value=<%=bbsstate %>>
<input type="submit" value="提交" >
</form>
上传表单
<form enctype ="multipart/form-data" action="/bbs_design/ReqUpload" method="post">
<INPUT TYPE="file" NAME="ulfile"><br>
<input type="hidden" name="PATH" value="E:\eclipse\workspace\bbs_design\WebContent\image\">
<input type="hidden" name="floor" value=<%=floor %>>
<input type="hidden" name="postid" value=<%=url %>>
<INPUT TYPE="submit" value="上传">
</form>
<br>
</div>
</td>
</tr>
</table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -