shixiao_news.jsp

来自「该源码为JSP的开发案例集锦」· JSP 代码 · 共 33 行

JSP
33
字号
<html>
<head>
<%@ page contentType="text/html; charset=gb2312"%>
<%@ include file="verify.jsp" %>
<%@ include file="../share/connection.jsp" %>
<%
String name = (String)session.getAttribute("adminname");
if(!name.equals("admin"))
{
	out.println("您没有此权限");
	return;
}
%>

<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
<%
String newsid=request.getParameter("newsid");
//SQL_update="update tempquestion set tempanswer='"+tempanswer+"' where countnumber = "+j;

String sqlnews="UPDATE cs_news SET "
	+"news_level="+0+" where news_id="+newsid;  
	

if(stm.executeUpdate(sqlnews)==1)
	out.print("操作成功(网页上不再显示该新闻)!");
%>
</body>
</html>

⌨️ 快捷键说明

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