?? 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 + -