📄 ttdel.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 ttid = ""; jasp.adodb.Recordset rs = null; String sql = ""; jasp.io.FileSystemObject fso = null;%><%@ include file="../include/connect.jsp" %><% ttid = checkstr(new variant(Request.QueryString("ttid"))); rs = new jasp.adodb.Recordset(); sql = "select * from iisALLTT where TTID=" + ttid + ""; 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('ttlist.jsp?Username=" + rs.getItem("Username").getValue() + "&viewmode=1');</script>"); rs.Close(); rs = (jasp.adodb.Recordset)null; Response.End(); } cn.Execute("delete from iisALLTT where TTID=" + ttid + ""); cn.Execute("delete from iisTTcomment where TTID=" + ttid + ""); fso = new jasp.io.FileSystemObject(); Err.ResumeNext();
fso.DeleteFile("UserTT\\" + rs.getItem("Username").getValue() + "\\" + rs.getItem("Filename").getValue() + ""); fso = (jasp.io.FileSystemObject)null; Response.Write("<script>alert('成功删除拍贴!');window.location.replace('ttlist.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 + -