📄 deletepic.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
response.setContentType("text/html;charset=GBK");
request.setCharacterEncoding("GBK");
int blog_id = com.beijingnews.util.ParamUtils.getInt(request,"blog_id",-1);
if(blog_id < 1) {
%><script>window.close();</script><%
return;
}
String strPic = com.beijingnews.util.ParamUtils.getString(request,"picname","");
String bid = ""+blog_id;
int bidLen = 8-bid.length();
for(int i=0;i<bidLen;i++) {
bid = "0" + bid;
}
String rPath = application.getRealPath("/") + "blog\\blogs\\" + bid.substring(0,2) + "\\" + bid.substring(2,4) + "\\" + bid.substring(4,6) + "\\" + bid.substring(6) + "\\images\\" + strPic;
java.io.File f = new java.io.File(rPath);
if(f.exists()) {
f.delete();
}
response.sendRedirect("picmanagpic.jsp?blog_id="+blog_id);
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -