isvisable.jsp
来自「新闻管理系统实现对新闻添加修改删除外挂了一个用户的注册还有一个外挂的投票」· JSP 代码 · 共 43 行
JSP
43 行
<%@page contentType="text/html;charset=GB2312"%>
<%@page import="java.sql.*"%>
<%@include file="opendata.jsp"%>
<%@include file="check.jsp"%>
<%
if(request.getParameter("questionid")!=null){
int questionid;
int isvisable;
questionid = Integer.parseInt(request.getParameter("questionid"));
out.print(questionid);
sql = "SELECT IsVisable from Questions where QuestionID ="+questionid;
// System.out.println("sqls:"+sql);
rs = smt.executeQuery(sql);
while(rs.next())
{
isvisable = rs.getInt(1);
if(isvisable==1)
{
sql = "update Questions set IsVisable = 0 ,IsOpen = 0 where QuestionID = "+questionid;
smt.executeUpdate(sql);
response.sendRedirect("mainform.jsp");
}
else if(isvisable==0)
{
sql = "update Questions set IsVisable = 1 ,IsOpen = 0 where QuestionID = "+questionid;
smt.executeUpdate(sql);
response.sendRedirect("mainform.jsp");
}
}
}
%>
<html>
<head>
<title>
isvisable
</title>
</head>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?