⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photodel.jsp

📁 一个练习JAVA的例子程序 一个练习JAVA的例子程序
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" %><%@ page import="jasp.buildin.*, jasp.vbs.*, jasp.util.*" %><%@ page extends="jasp.servlet.JspBase" %><%  try {    jspinit(request,response,application,out,"jasp0");%><%     Session.setCodePage(936);    String photoid = "";    jasp.adodb.Recordset rs = null;    String sql = "";    jasp.io.FileSystemObject fso = null;%><%@ include file="../include/connect.jsp" %><%    photoid = checkstr(new variant(Request.QueryString("photoid")));    rs = new jasp.adodb.Recordset();    sql = "select * from iisALLPhoto where PhotoID=" + photoid + "";    rs.Open(sql, cn, 1, 1);    if (rs.getEOF() || rs.getBOF()) {        Response.Write("<script>alert('找不到此照片!');history.back(-1);</script>");        Response.End();    } else if (rs.getItem("Username").getValue().unequals(Session.getItem("username"))){        Response.Write("<script>alert('您没有权限!');window.location.replace('photolist.jsp?Username=" + rs.getItem("Username").getValue() + "');</script>");        rs.Close();        rs = (jasp.adodb.Recordset)null;        Response.End();    }    cn.Execute("delete from iisALLPhoto where PhotoID=" + photoid + "");    cn.Execute("delete from iisPhotocomment where PhotoID=" + photoid + "");    fso = new jasp.io.FileSystemObject();    Err.ResumeNext();
    fso.DeleteFile("E:\\Wwwroot\\show5net\\UploadPhoto\\" + rs.getItem("Username").getValue() + "\\" + rs.getItem("Filename").getValue() + "");    fso.DeleteFile("E:\\Wwwroot\\show5net\\UploadPhoto_s\\" + rs.getItem("Filename").getValue() + "");    fso = (jasp.io.FileSystemObject)null;    Response.Write("<script>alert('成功删除照片!');window.location.replace('photolist.jsp?Username=" + rs.getItem("Username").getValue() + "&viewmode=1');</script>");    rs.Close();    rs = (jasp.adodb.Recordset)null;%><%    End();    } catch(Exception ex) {         printStackTrace(ex);    } %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -