📄 epaperlist.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="/agt/public/jsp/top.jsp" %>
<% Object sessionRs = session.getAttribute("EPAPER-QUERY-RESULTSET");
SysResultSet turnOrderRs = sessionRs == null ?null:(SysResultSet)sessionRs;
%>
<%@ include file="/agt/public/jsp/Order.jsp" %>
<!-- title>试卷列表页面 </title -->
<form method="post" name="epaperForm" action="/ExamPaperMan.do">
<%
//获取查询条件,并传送到下一页面
String titleTerm = request.getParameter("titleTerm");
if(titleTerm == null) { titleTerm = "";}
String classIdTerm = (String)request.getAttribute("classIdTerm");
if(classIdTerm == null) { classIdTerm = "";}
String paperTypeTerm = request.getParameter("paperTypeTerm");
if(paperTypeTerm == null) { paperTypeTerm = "";}
String statusTerm = request.getParameter("statusTerm");
if(statusTerm == null) { statusTerm = "";}
String queryTerm = "&titleTerm=" + titleTerm + "&classIdTerm=" + classIdTerm + "&paperTypeTerm=" + paperTypeTerm;
queryTerm += "&statusTerm=" + statusTerm + "&byClass=" + byClass;
int tableWidth = 539;
if("1".equalsIgnoreCase(byClass))
{
tableWidth = 500;
}
%>
<input type="hidden" name="backURL" value="/ExamPaperMan.do?opeType=6<%=queryTerm%>">
<input type="hidden" name="opeType">
<input type="hidden" name="status">
<input type="hidden" name="titleTerm" value="<%=titleTerm%>">
<input type="hidden" name="classIdTerm" value="<%=classIdTerm%>">
<input type="hidden" name="paperTypeTerm" value="<%=paperTypeTerm%>">
<input type="hidden" name="statusTerm" value="<%=statusTerm%>">
<input type="hidden" name="byClass" value="<%=byClass%>">
<table width="<%=tableWidth%>" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
<tr class="td-cs1">
<td width="7%" height="25" align="center" nowrap> </td>
<td height="25" width="58%" align="center" nowrap> <a href="/agt/epaper/EPaperList.jsp?orderColum=1&orderFlag=<%=isOrderFlag%><%=queryTerm%>" class="lnk-cs1">试卷名称
</a> </td>
<td height="25" width="10%" align="center" nowrap> <a href="/agt/epaper/EPaperList.jsp?orderColum=2&orderFlag=<%=isOrderFlag%><%=queryTerm%>" class="lnk-cs1">状态
</a> </td>
<td height="25" width="10%" align="center" nowrap> <a href="/agt/epaper/EPaperList.jsp?orderColum=3&orderFlag=<%=isOrderFlag%><%=queryTerm%>" class="lnk-cs1">
试卷类型 </a> </td>
<td height="25" width="15%" align="center" nowrap> <a href="/agt/epaper/EPaperList.jsp?orderColum=4&orderFlag=<%=isOrderFlag%><%=queryTerm%>" class="lnk-cs1">发布日期
</a> </td>
</tr>
<%
int editCount = 0; //编辑状态的个数
int releaseCount = 0; //发布状态的个数
int cancelCount = 0; //作废状态的个数
if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 )
{
//此处是用来显示结果
for(int i=(pageNum-1)*pageRecoder; turnOrderRs.setRecord(i)&&(i<pageNum*pageRecoder); i++)
{
%>
<tr class="td-cs2">
<td height="25">
<input type="checkbox" name="paperIds" value="<%=turnOrderRs.getString(0) %>"></td>
<input type="hidden" name="paperStatus" value="<%=turnOrderRs.getString(2) %>">
<td height="25" style="word-break:break-all" align="center"><a class="lnk-cs2" href="/ExamPaperMan.do?opeType=<%=OperatorFlagCode.EPAPER_QUERY_DETAILSHOW %>&paperId=<%=turnOrderRs.getString(0) %>&byClass=<%=byClass %>"><%=turnOrderRs.getString(1) %></a></td>
<%
String statusStr = "未知状态";
if("0".equalsIgnoreCase(turnOrderRs.getString(2)))
{
statusStr = "编辑";
editCount++;
}
else if("1".equalsIgnoreCase(turnOrderRs.getString(2)))
{
statusStr = "发布";
releaseCount++;
}
else if("2".equalsIgnoreCase(turnOrderRs.getString(2)))
{
statusStr = "作废";
cancelCount++;
}
String typeStr = "未知类型";
if("0".equalsIgnoreCase(turnOrderRs.getString(3)))
{
typeStr = "考试题";
}
else if("1".equalsIgnoreCase(turnOrderRs.getString(3)))
{
typeStr = "自测题";
}
else if("2".equalsIgnoreCase(turnOrderRs.getString(3)))
{
typeStr = "考试题&自测题";
}
String timeStr = turnOrderRs.getString(4);
if(!("0".equalsIgnoreCase(turnOrderRs.getString(2))))
{
timeStr = timeStr.substring(0,10);
}
else
{
timeStr =" ";
}
%>
<td height="25" align="center"><%=statusStr %></td>
<td height="25" align="center"><%=typeStr %></td>
<td height="25" align="center"><%=timeStr %></td>
</tr>
<%
}
}
%>
</table>
<%if( turnOrderRs != null && turnOrderRs.getMetaData().getRecordCount() != 0 )
{%>
<table width="<%=tableWidth%>" height="30" border="0" cellpadding="0" cellspacing="0" class="table-cs1">
<tr>
<td width="81"><input type="checkbox" name="selectItem" onclick="selectDo();">
全选 </td>
<td width="80"><input name="edit1" type="image" onclick="modifySubmit();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="80"><input name="public" type="image" onclick="releaseSubmit();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 width="80"><input name="del" type="image" onclick="deleteSubmit();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>
<td width="80"><input name="cancel1" type="image" onclick="cancelSubmit();return false;" src="/agt/public/images/cancel1.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="80"> </td>
</tr>
</table>
<%}%>
</form>
<form method="post" name="changePageForm">
<table width="<%=tableWidth%>" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>总共有<font color="#FF0000"><%=recordCount%></font>条记录,<font color="#FF0000"><%=maxPage%></font>页</td>
<td>当前第<font color="#FF0000"><%=pageNum%></font>页</td>
<td><%if(pageNum != 1) {%><a href="/agt/epaper/EPaperList.jsp?pageNum=1&orderFlag=<%=isOrderFlag%><%=queryTerm%>">首页 </a><%} else {%>首页 <%}%></td>
<td><%if(pageNum != 1) {%><a href="/agt/epaper/EPaperList.jsp?pageNum=<%=frontPageNum%>&orderFlag=<%=isOrderFlag%><%=queryTerm%>">上一页 </a><%} else {%>上一页 <%}%></td>
<td ><%if(pageNum < maxPage) {%><a href="/agt/epaper/EPaperList.jsp?pageNum=<%=backPageNum%>&orderFlag=<%=isOrderFlag%><%=queryTerm%>">下一页 </a><%} else {%> 下一页<%}%></td>
<td><%if(pageNum < maxPage) {%><a href="/agt/epaper/EPaperList.jsp?pageNum=<%=maxPage%>&orderFlag=<%=isOrderFlag%><%=queryTerm%>">末页 </a><%} else {%>末页 <%}%></td>
<td><table width="113" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="44"> 跳转到 </td>
<td width="37">
<input name="pageNum" type="text" class="input1-2" size="3" onKeyPress="GoPageKeyPress();" <%if(maxPage < 2) { %> readonly <%}%>>
</td>
<td width="32">
<input name="go" type="image" onClick="changePageSubmit();return false;" <%if(maxPage < 2) { %> disabled <%}%> src="/agt/public/images/go.jpg" width="21" height="21" border="0" onMouseOver="this.src='/agt/public/images/'+ this.name + '_2.jpg';" onMouseOut="this.src='/agt/public/images/'+ this.name + '.jpg'"></td>
</tr>
</table>
</td>
</tr>
</table> <input type="hidden" name="orderFlag" value="<%=isOrderFlag%>"></form>
<script src="/agt/public/js/scriptfuns.js" type="text/javascript"></script>
<script language="JavaScript">
function changePageSubmit()
{
var pageNum = document.changePageForm.pageNum;
if(pageNum==null || trim(pageNum.value)=="" || !isNumber(pageNum.value) )
{
alert("跳转到的页数参数输入有误,请重新输入。");
pageNum.value = "";
pageNum.focus();
return;
}
var maxPage = <%=maxPage%>; //Order.jsp文件中已计算出maxPage
var goPageNum = parseInt(pageNum.value) ;
var maxNum = parseInt(maxPage) ;
if(goPageNum < 1 || goPageNum > maxNum)
{
alert("跳转到的页数参数输入范围不正确,请重新输入。");
pageNum.value = "";
pageNum.focus();
return;
}
document.changePageForm.action="/agt/epaper/EPaperList.jsp?orderFlag=<%=isOrderFlag%><%=queryTerm%>";
document.changePageForm.submit();
}
function selectDo()
{
var selectItem = document.epaperForm.selectItem;
var paperIds = document.epaperForm.paperIds;
if(paperIds == null)
{
return false;
}
if(selectItem.checked == true)
{
for(var i=0; i<paperIds.length;i++)
{
paperIds[i].checked = true;
}
paperIds.checked = true;
}
else
{
for(var i=0; i<paperIds.length;i++)
{
paperIds[i].checked = false;
}
paperIds.checked = false;
}
}
function modifySubmit()
{
var selectedCount = 0; //选择的条数
var paperIds = document.epaperForm.paperIds; //ID数组
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -