📄 del.jsp
字号:
<%@page contentType="text/html;charset=GBK"%>
<%@page import="net.ijsp.news.news.*,
net.ijsp.news.util.*"%>
<%@include file="getsession.jsp"%>
<%
int id = ParamUtils.getInt(request,"id",0);
String fileName = ParamUtils.getString(request,"fileName","");
if(id==0 || fileName.equals(""))
throw new Exception("<li>您正在尝试进行非法的操作。");
String pathName = application.getRealPath("./news/"+fileName) ;
boolean del = DelHtml.del(pathName);
if(!del)
throw new Exception("<li>文件没有被删除!可能的原因:此文件不存在;目录不具备删除权限。请联系系统管理员。");
NewsFactory newsFactory = Factory.getInstance().getNewsFactory();
newsFactory.del(id);
%>
<html>
<title>文章删除成功</title>
<link rel="stylesheet" href="../inc/admin.css" type="text/css">
<BODY leftmargin="0" bottommargin="0" rightmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#DDEEFF">
<br>
<center>新闻删除成功。
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -