del.jsp
上传用户:manager48
上传日期:2022-07-31
资源大小:997k
文件大小:1k
- <%@page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
- <html>
- <head>
- <title>delete</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- </head>
- <jsp:useBean id="jezz_mj" scope="page" class="wm.bean.DB" />
- <body>
- <%
- String login = (String)session.getAttribute("login") ;
- String error="";
- String id = request.getParameter("id") ;
- String httpfile="";
- httpfile=request.getHeader("REFERER");
- if(login==null)
- error+="您不是管理员!不能登陆删除";
- if(id=="")
- error+="非法删除";
- if(error.equals(""))
- {
- String sql = "delete from liuyan_temp where id="+id ;
- try {
- jezz_mj.executeUpdate(sql) ;
- jezz_mj.all_close();
- }
- catch (Exception ex) {
- }
- response.sendRedirect(httpfile);
- }
- else
- {
- out.print(error);
- }
- %>
- </body>
- </html>