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

📄 epaperpreview.jsp

📁 培训考试系统代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="/agt/public/jsp/top.jsp" %>
<!-- title>业务代表管理系统生成试卷的预览页面</title -->
<form name="epaperform" method="POST" action="/ExamPaperMan.do">

<input type="hidden" name="backURL" value="/ExamPaperMan.do?opeType=1">  

 <input type="hidden" name="status" value="1">
 <input type="hidden" name="opeType">
 <input type="hidden" name="paperId" value="<%=(String)request.getAttribute("paperId")%>">
  <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">


    <tr class="td-cs2">
      <td colspan="2">名称:<%=request.getAttribute("title")%></td>
      <td colspan="2">所属类别:<%=ClassInfo.get((String)request.getAttribute("classId"))%></td>
 </tr>

    <tr class="td-cs2">
      <%
        SysResultSet rs  =  (SysResultSet)request.getAttribute("EPAPER-QUERY-TESTSET");

        int allScore = 0;
        if(rs != null)
        {  for(int i=0;rs.setRecord(i)&&i<rs.getMetaData().getRecordCount();i++)
           {
               allScore += rs.getInt(2);
           }
        }

        int paperType = Integer.parseInt((String)request.getAttribute("paperType"));
        String paperTypeStr = "";
        if(paperType == 0) {paperTypeStr = "考试题";}
        else if(paperType == 1) {paperTypeStr = "自测题";}
        else {paperTypeStr = "考试题&自测题";}
  %>
      <td width="25%">类型:<%=paperTypeStr%> </td>
   <%
      int status = Integer.parseInt((String)request.getAttribute("testStatus"));
      String statusStr = "";
      if(status == 0) {statusStr = "编辑";}
      else if(status == 1) {statusStr = "发布";}
      else {statusStr = "取消";}

  %>

      <td width="25%">状态:<%=statusStr%> </td>
      <td width="25%">总题量:<%=rs.getMetaData().getRecordCount()%> </td>
      <td width="25%">总分数:<%=allScore%> </td>

 </tr>
 </table>

                    <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
                      <%
        if(rs != null)
        {  for(int i=0;rs.setRecord(i)&&i<rs.getMetaData().getRecordCount();i++)
           {
           //5:试题类型,7:试题难度,3:试题内容,8:试题选项,2:试题分数
      %>
                      <tr class="td-cs2">
                        <td width="80" align="center" valign="top"><%=i+1%>、(<%=rs.getString(5)%>) </td>
                        <td style="word-break:break-all"  class="td-cs2"><%=rs.getString(3)%>&nbsp;(<%=rs.getString(2)%>分)&nbsp;(<%=rs.getString(7)%>)
						  <%
		   int testType = rs.getInt(4);
		   String optionRsSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		   int loc = 0;

		   StringTokenizer stoken = new StringTokenizer(rs.getString(8),"#");

	           while(stoken.hasMoreTokens())
	           {
		      String optionRs = optionRsSet.substring(loc,loc+1);

		       if(testType == 1 || testType == 2)
		       {//判断题,单选题
		 %> <table border="0" cellpadding="1" cellspacing="0">
                            <tr>
							<td width="30"></td>
                              <td  class="td-cs2"> <%=optionRs%>.
                                <input type="radio" name="option" value="<%=optionRs%>">
                                <%=stoken.nextToken()%> </td>
                            </tr>
                          </table>
                          <%}
		       else if(testType == 3)
		       {//多选题
		     %> <table border="0" cellpadding="1" cellspacing="0">
                            <tr> <td width="30"></td>
                              <td  class="td-cs2"> <%=optionRs%>.
                                <input type="checkbox" name="option2" value="<%=optionRs%>">
                                <%=stoken.nextToken()%> </td>
                            </tr>
                          </table>
                          <%
		       }
		       else
		       {//填空题,问答题
		       %> <table border="0" cellpadding="1" cellspacing="0">
                            <tr> <td width="30"></td>
                              <td  class="td-cs2"> <%=optionRs%>.
                                <textarea class="remark" rows="<%=stoken.nextToken()%>" name="textarea" cols="45"></textarea>
                              </td>
                            </tr>
                          </table>

                      <%
		       }
		       loc++;
		    }
        %>
        </td>
                      </tr>
        <%
	     }
	  }
	%>
                    </table>
                    <table width="539" height="30" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td align="center"> <table width="424" height="30" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td width="25%"><input name="edit1" type="image" onclick="submitEdit();return false;" src="/agt/public/images/edit1.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"></td>
                              <td width="25%"><input name="public" type="image" onclick="submitRelease();return false;" src="/agt/public/images/public.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"></td>
                              <td><input name="del" type="image" onclick="submitDelete();return false;" src="/agt/public/images/del.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'"></td>
                            </tr>
                          </table></td>
    </tr>
  </table>
</form>
                  <script src="../public/js/scriptfuns.js" type="text/javascript"></script>
<script language="javascript">
//提交表单-编辑
function submitEdit()
{
    document.epaperform.opeType.value = "<%=OperatorFlagCode.EPAPER_QUERY_DETAILEDIT%>";
    document.epaperform.submit();
}

//提交表单-发布
function submitRelease()
{

    document.epaperform.opeType.value = "<%=OperatorFlagCode.EPAPER_RELEASE_SINGLE%>";
    document.epaperform.submit();
}

//提交表单-删除
function submitDelete()
{
    document.epaperform.opeType.value = "<%=OperatorFlagCode.EPAPER_DELETE_SINGLE%>";
    document.epaperform.submit();
}
</script>
<%@ include file="/agt/public/jsp/bot.jsp" %>

⌨️ 快捷键说明

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