⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isvisable.jsp~2~

📁 system1为用户注册模块 system2为在线聊天系统 system3为在线投票系统 system4为在线考试系统 system5为新闻发布模块
💻 JSP~2~
字号:
<%@page contentType="text/html;charset=GB2312"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@include file="check.jsp"%>
<jsp:useBean id="sqltest" class="database.opendata" scope="page">
</jsp:useBean>
<%
 ResultSet rs=null;
 int questionid;
 int isvisable;
 questionid = Integer.parseInt(request.getParameter("questionid"));
 out.print(questionid);
 String sqlstring = "SELECT IsVisable from Questions where QuestionID ="+questionid;
 rs = sqltest.executeQuery(sqlstring);
 while(rs.next())
  {
   isvisable = rs.getInt(1);
   if(isvisable==1)
   {
     sqlstring = "update Questions set IsVisable = 0 ,IsOpen = 0 where QuestionID = "+questionid;
     sqltest.executeUpdate(sqlstring);
     response.sendRedirect("mainform.jsp");
   }
   else if(isvisable==0)
   {
     sqlstring = "update Questions set IsVisable = 1 ,IsOpen = 0 where QuestionID = "+questionid;
     sqltest.executeUpdate(sqlstring);
     response.sendRedirect("mainform.jsp");;
   }

  }
%>
<html>
<head>
<title>
isvisable
</title>
</head>

</html>

⌨️ 快捷键说明

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