📄 delmess.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!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>无标题文档</title>
</head>
<body>
<jsp:useBean id="ConBean" scope="session" class="com.bitc.ch13.DBCon"/>
<%
request.setCharacterEncoding("gb2312");
String id = request.getParameter("id");
String sid = request.getParameter("h");
Connection cond = ConBean.getConnection();
Statement stmt = cond.createStatement();
try{
String strdel = "delete jsp8_mess where id = '"+id+"'";
stmt.executeUpdate(strdel);
}catch(Exception ee){
session.setAttribute("yy","删除主题失败!");
session.setAttribute("yyh","管理员<font color=red><b>"+session.getAttribute("adminuser")+"</font></b>在后台删除信息时失败,系统找不到原因,未能自主修复,建议亲自查看:错误代码:"+ee);
response.sendRedirect("../../error/index.jsp");
}
try{
String strdels = "delete jsp8_mess_hui where messid = '"+id+"'";
stmt.executeUpdate(strdels);
}catch(Exception e){
session.setAttribute("yy","删除主题成功,但是删除该主题回复时失败,请和管理员联系!");
session.setAttribute("yyh","管理员<font color=red><b>"+session.getAttribute("adminuser")+"</font></b>在后台删除信息删除主题成功,但是删除该主题回复时失败,系统找不到原因,未能自主修复,建议亲自查看:错误代码:"+e);
response.sendRedirect("../../error/index.jsp");
}
stmt.close();
ConBean.close();
%><script language="vbscript">
msgbox "删除成功!",vbInformation,"提示"
window.location="allmess.jsp?id=<%=sid%>"
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -