📄 delmanagernewsstep1.jsp
字号:
<%@page contentType="text/html;charset=gb2312"%>
<%@ include file="../incoming/Common.jsp"%>
<%@ include file="../incoming/ConnectDB.jsp"%>
<%@ include file="../incoming/Check.jsp"%>
<html>
<head>
<%
String msg="";
String categoryid = "";
try
{
categoryid= new String(request.getParameter("categoryid").getBytes("ISO8859_1"),"GBK");
String newsid = new String(request.getParameter("newsid").getBytes("ISO8859_1"),"GBK");
sql1 = "DELETE news WHERE NewsID=?";
PreparedStatement prepstmt = null;
prepstmt=con.prepareStatement(sql1);
prepstmt.setInt(1,Integer.parseInt(newsid));
prepstmt.executeUpdate();
}
catch(Exception e)
{
msg = e.getMessage();
}
%>
<title><%=title%>管理</title>
<link href="../incoming/style.css" rel="stylesheet" type="text/css">
<script Language="JavaScript">
function ToManagerNewsMain()
{
top.location="Main.jsp?categoryid="+<%=categoryid%>;
}
</script>
</head>
<body>
<table border="1" width=700 align=center cellpadding=0 cellspacing=0>
<tr align="center" bgcolor="#CCCCCC" height=25>
<td height="49"><a class="title">删除新闻</a></TD>
</tr>
<tr>
<td height="56" align="center" ><div align="right"></div><span class="text">
<%
if(msg.equals(""))
out.println("删除新闻成功!");
else
out.println("删除新闻失败!错误原因:"+msg);
%>
</span></td>
</tr>
<tr>
<td height="36" align=center ><FONT color=#000000>
<input name=Submit type=button value="返回新闻管理" onClick="ToManagerNewsMain()">
</font></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -