📄 i_delete.jsp
字号:
<%--
File Name:i_delete.jsp
Author:fancy
Date:2001.6.1
Usage:an interface for the user to delete this topic which posted by himself
Address:Peking University 37#215,62762526,fancyrainbow@263.net,bbs.pku.edu.cn(id:javalover)
Note:1.这是一个Open Source项目,你可以自由的获取,修改,传播本项目的代码,无需经过本人的同意。
2.你不可以将本项目的源代码用于商业应用,除非获得本人的书面允许。
3.本项目的核心源代码所有权归原开发者所有,如果需要获取最新的核心代码,请与本人联系
--%>
<%
//设定Session,可能用不上
session.putValue("prevlink","");
session.putValue("nextlink","");
session.putValue("firstlink","");
session.putValue("lastlink","");
session.putValue("editlink","");
session.putValue("deletelink","");
session.putValue("backlink","");
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Java论坛</title>
</head>
<%@ include file="defaultcss.jsp"%>
<%@ include file="menuaction.jsp"%>
<%@ include file="database.jsp" %>
<%
//获取文章的信息。
String idstr=request.getParameter("id");
int currid=Integer.parseInt(idstr);
String topicSQL="SELECT * FROM data where id="+currid;
java.sql.Statement stmtTopic=conn.createStatement();
ResultSet rsTopic=stmtTopic.executeQuery(topicSQL);
rsTopic.next();
String group=rsTopic.getString(2);
String engroup=rsTopic.getString(3);
String topic=rsTopic.getString(1);
String author=rsTopic.getString(4);
int replycount=rsTopic.getInt(11);
Date posttime=rsTopic.getDate(7);
String content=rsTopic.getString(6);
String ipaddr=rsTopic.getString(9);
rsTopic.close();
stmtTopic.close();
//利用StringTokenizer类给文章的正文分行。
java.util.StringTokenizer st = new java.util.StringTokenizer(content);
String _content="";
content=_content;
while (st.hasMoreTokens())
{
content+=st.nextToken()+"\r\n";
}
%>
<body LANGUAGE=javascript onload="return window_onload()">
<table border="0" width="100%" height="521" cellspacing="0" cellpadding="0">
<%@ include file="toptable.jsp"%>
<tr>
<td width="2%" height="13"></td>
<td width="92%" height="32" colspan="5" rowspan="2">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="80%" height="26">
<tr bgcolor="#efefef">
<td width="25%" height="24"></td>
<td width="50%" height="24" align="center"><font color="red" size="2">Java技术讨论区(删除文章)</font></td>
<td width="25%" height="24"></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="2%" height="13"></td>
</tr>
<tr>
<td width="2%" height="16"></td>
<td width="2%" height="284" rowspan="18" background="img/shu.gif"> </td>
<td width="92%" height="284" colspan="5" rowspan="18">
<div align="center">
<center>
<form action="delete.jsp" method="post">
<table border="0" cellpadding="0" cellspacing="1" width="99%" height="210">
<tr bgcolor='#DCEDED'>
<td width='18%' height='29' align="center"><font color="blue" size="2">用户名</font></td>
<td width='30%' height='29' align="center"><input type="text" name="username" value="<%=session.getValue("username")%>"></td>
<td width='21%' height='29' align="center"><font color="blue" size="2">密码</font></td>
<td width='31%' height='29' align="center"><input type="password" name="password" value="<%=session.getValue("password")%>"></td>
</tr>
<tr bgcolor='#efefef'>
<td width='18%' height='5' align="center"><font color="blue" size="2">主题</font></td>
<td width='30%' height='5' align="center"><%=topic%></td>
<td width='21%' height='29' align="center"><font color="blue" size="2">信区</font></td>
<td width='31%' height='29' align="center"><%=group%>[<%=engroup%>]</td>
</tr>
<tr>
<td width='100%' height='37' colspan="4">
<%=content%>
</td>
</tr>
<tr>
<td align="center"><input type="submit" value="直接删除"></td>
<td><input type="reset" value="算了吧"><input type="hidden" name="id" value="<%=idstr%>"></td>
</tr>
</table>
</form>
</center>
</div>
</td>
<td width="2%" height="284" rowspan="18"></td>
<td width="2%" height="284" rowspan="18" background="img/shu.gif"></td>
</tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="16"></td></tr>
<tr><td width="2%" height="12"></td></tr>
<tr>
<td width="2%" height="41" rowspan="2"></td>
<td width="2%" height="41" background="img/shu.gif" rowspan="2"></td>
<td width="92%" height="27" colspan="5"></td>
<td width="2%" height="41" rowspan="2" background="img/shu.gif"></td>
<td width="2%" height="41" background="img/shu.gif" rowspan="2"></td>
</tr>
<tr align="center"><td width="92%" height="18" colspan="5" background="img/bottom.gif"></td></tr>
</table>
<%@ include file="menu.jsp"%>
<%
conn.close();
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -