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

📄 problem_list.jsp

📁 网上考试系统文件版
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" import="java.sql.*" %>
<jsp:useBean id="Operate" scope="page" class="todb.Operate"/>
<%
int CAnswer=0;
int answer=0;
int temp=0;
String CSAnswer="";
String action="";

ResultSet rs = null;
String sql="";
 
if(request.getParameter("problemid")!=null)
	{
	String problemid=new String(request.getParameter("problemid").getBytes("ISO8859_1"));
	sql="select * from problemstore where ID="+problemid+"";
	}
	
if(request.getParameter("problemcontext")!=null)
	{
	String problemcontext=new String(request.getParameter("problemcontext").getBytes("ISO8859_1"));
	sql="select * from problemstore where problem_context = '"+problemcontext+"'";
	}
	
if(request.getParameter("problemchart")!=null)
	{
	String problemchart=new String(request.getParameter("problemchart").getBytes("ISO8859_1"));
	sql="select * from problemstore where problem_chart='"+problemchart+"'";
	}

if(request.getParameter("action")!=null)
	sql="select * from problemstore";
	
	rs = Operate.executeQuery(sql);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<style type=text/css>
BODY
{CURSOR: url(images/mouse.ani);
FONT-SIZE: 12px;
	COLOR: #000000;
	FONT-FAMILY: 宋体;
        SCROLLBAR-FACE-COLOR: #f6f6f6;
        SCROLLBAR-HIGHLIGHT-COLOR: #cccccc;
        SCROLLBAR-SHADOW-COLOR: #cccccc;
        SCROLLBAR-3DLIGHT-COLOR: #cccccc;
        SCROLLBAR-ARROW-COLOR: #330000;
        SCROLLBAR-TRACK-COLOR: #f6f6f6;
        SCROLLBAR-DARKSHADOW-COLOR: #cccccc;}
TD { 
FONT-SIZE: 12px; FONT-FAMILY: 宋体; line-height: 16px;table-layout:fixed;word-break:break-all}
input,select,Textarea{
        font-family:Verdana, Arial, Helvetica, sans-serif,宋体; 
        font-size: 12px; line-height: 16px;}
.table
{ border-collapse: collapse }
A {
        COLOR: #183468; 
        TEXT-DECORATION: none
}
A:hover {
        COLOR: #FF8C40; 
        TEXT-DECORATION: underline
}
A.ToolBarLink{
	font-size: 12px;
	text-decoration: none;
	color: #555555;
}
A.ToolBarLink:hover{
	font-size: 12px;
	text-decoration: underline;
	color: #666666;
}
A.TableLink{
	font-size: 12px;
	text-decoration: none;
	color: #555555;
}
A.TableLink:hover{
	font-size: 12px;
	text-decoration: underline;
	color: #FF9900;
}
th

.TableBorder 
{background-color: #000000;
border: 1px solid #000000;
font-size: 12px;
}
.Tablebody 
{background-color: #CCCCCC;
WORD-BREAK: break-all
font-size: 12px;
width:98%;}
.Shadow 
{FONT-SIZE: 9pt; FILTER: dropshadow(color=#FFFFFF,offx=-1,offy=1,positive=1); COLOR: #666666}
.ArticleSize
{font-size: 11pt; 
        font-family:"Verdana", "Arial", "宋体";
        line-height:150%;}
.Border1 
{background-color: #F5F5F5;}
.Border2 
{background-color: #FFFFFF; }
div.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#F3F3F3 ;line-height : normal ;
}
div.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#FDFDDF ;
font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;
}
<!--
.style3 {color: #880000}
-->
</style>
<body>
<table width="600" height="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top">
	<p>
<%
if(rs == null)
{  	
	out.println("<table width=\"500\" height=\"200\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	out.println("<tr>");
	out.println("<td><span class=\"style3\">结果集中无数据或者输入查询条件有错误!!</span></td>");
	out.println("</tr>");
	out.println("</table>");
}else{
	while(rs.next()){
	%></p>
      <table class=center_tdbgall width="415" height="344" border="1" align="center" cellSpacing=0 cellPadding=0>
        <tr>
          <td width="98" height="20"><div align="center">题号</div></td>
          <td width="90"><div align="center">类型</div></td>
          <td width="159"><div align="center">所属章节</div></td>
          <td width="68"><div align="center">分值</div></td>
        </tr>
        <tr>
          <td height="18"><div align="center"><%=rs.getString("ID")%></div></td>
          <td><div align="center"><%=rs.getString("problem_type")%></div></td>
          <td><div align="center"><%=rs.getString("problem_chart")%></div></td>
          <td><div align="center"><%=rs.getString("problem_value")%></div></td>
        </tr>
        <tr>
          <td height="64"><div align="center">题目内容</div></td>
          <td colspan="3"><%=rs.getString("problem_context")%></td>
        </tr>
        <tr>
          <td height="36"><div align="center">选项1</div></td>
          <td colspan="3"><%=rs.getString("answer1")%></td>
        </tr>
        <tr>
          <td height="39"><div align="center">选项2</div></td>
          <td colspan="3"><%=rs.getString("answer2")%></td>
        </tr>
        <tr>
          <td height="40"><div align="center">选项3</div></td>
          <td colspan="3"><%=rs.getString("answer3")%></td>
        </tr>
        <tr>
          <td height="37"><div align="center">选项4</div></td>
          <td colspan="3"><%=rs.getString("answer4")%></td>
        </tr>
        <tr>
          <td height="41"><div align="center">选项5</div></td>
          <td colspan="3"><%=rs.getString("answer5")%></td>
        </tr>
        <tr>
		<%
		CAnswer=rs.getInt("problem_key");
		answer=0;
		CSAnswer="";
		if((temp=CAnswer-10000)>=0)	{	CAnswer=temp;CSAnswer=CSAnswer+"A;";	}
		if((temp=CAnswer-1000)>=0)	{	CAnswer=temp;CSAnswer=CSAnswer+"B;";	}
		if((temp=CAnswer-100)>=0)	{	CAnswer=temp;CSAnswer=CSAnswer+"C;";	}
		if((temp=CAnswer-10)>=0)	{	CAnswer=temp;CSAnswer=CSAnswer+"D;";	}
		if((temp=CAnswer-1)>=0)		{	CAnswer=temp;CSAnswer=CSAnswer+"E;";	}
		%>
          <td height="28"><div align="center">正确答案</div></td>
          <td colspan="3"><%=CSAnswer%></td>
        </tr>
        <tr>
          <td height="21">&nbsp;</td>
          <td colspan="3"><div align="center"><a href="problem_modify.jsp?problemid=<%=rs.getString("ID")%>">修改</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="problem_delete.jsp?problemid=<%=rs.getString("ID")%>">删除</a></div></td>
        </tr>
      </table> 

      <p>
	  <%
	  }
	  rs.close();
}
	  %>
	  </p>
      <p>&nbsp;</p>      <p>&nbsp;</p></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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