?? selectsort.jsp
字號(hào):
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.util.List"%>
<%@ page import="com.actionForm.SortForm"%><jsp:useBean id="chinese" scope="request" class="com.tool.Chinese"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>宇晨網(wǎng)絡(luò)新聞中心后臺(tái)</title>
<script language="javascript">
function deleteForm(date1,date2){
if(confirm("您真的要?jiǎng)h除嗎?")){
window.location.href="sortAction.do?method=deleteSortAction&bigSort="+date1+"&id="+date2;
}
}
</script>
</head>
<%
String bigSort=chinese.toChinese(request.getParameter("bigSort"));
List list=(List)request.getAttribute("list");
int number=list.size();
//以下這段代碼是計(jì)算多少頁(yè)數(shù)
int pageNumber=number;
if(pageNumber%10==0){
pageNumber=pageNumber/10;
}else{
pageNumber=pageNumber/10+1;
}
//以下是計(jì)算當(dāng)前頁(yè)的頁(yè)數(shù)
int count;
if(request.getParameter("count")==null){
count=0;
}else{
count=Integer.valueOf(request.getParameter("count"));
}
//以下顯示多少條紀(jì)錄
int start=count*10;//開(kāi)始條數(shù)
int over=(count+1)*10;//結(jié)束條數(shù)
int lastCount=number-over;//還剩多少條記錄
if(lastCount<=0){
over=number;
}
%>
<body><div align="center">
<jsp:include page="../bTop.jsp"/>
<table width="800" height="465" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="196" rowspan="2" valign="top"><jsp:include page="../bleft.jsp"/></td>
<td width="604" height="57" background="bImage/place.jpg" >
<table width="601" height="36" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> 當(dāng)前位置提示 >> <%=bigSort%> >> 詳細(xì)類別管理</td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="400" align="center" valign="top" background="bImage/big.jpg"><table width="601" border="0" cellpadding="0" cellspacing="0" background="bImage/placeNext.jpg">
<tr>
<td height="21" > </td>
<td>新聞?lì)悇e查詢</td>
</tr>
</table>
<%if(number==0){%>
<br>
<br>
沒(méi)有新聞詳細(xì)類別!!!<br>
<br>
<br>
<a href="sortAction.do?method=insertSortAction&bigSort=<%=bigSort%>">添加</a> 或者 <a href="newsAction.do?method=selectNewsAction&bigSort=<%=bigSort%>">返回</a>
<%}else{%>
<table width="415" border="0">
<tr align="right">
<td><a href="newsAction.do?method=selectNewsAction&bigSort=<%=bigSort%>">返回</a></td>
<td width="76"> <a href="sortAction.do?method=insertSortAction&bigSort=<%=bigSort%>">添加類別</a> </td>
</tr>
</table>
<table width="415" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="64" height="27"><div align="center">類別編號(hào)</div></td>
<td width="150"><div align="center">名稱</div></td>
<td width="83"><div align="center">創(chuàng)建時(shí)間</div></td>
<td width="108"><div align="center">操作</div></td>
</tr>
<%
for(int i=start;i<over;i++){
SortForm form=(SortForm)list.get(i);
%>
<tr align="center">
<td width="64" height="31"><%=i+1%></td>
<td width="150"><%=form.getSmallSort()%></td>
<td width="83"><%=form.getCreateTime()%></td>
<td width="108"><a href="sortAction.do?method=selectOneAction&smallSort=<%=form.getSmallSort()%>">修改</a> <a href="javascript:deleteForm('<%=bigSort%>','<%=form.getId()%>')">刪除</a></td>
</tr>
<%}%>
</table>
<%}%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="center">
<td width="578" height="37" >
<%for(int i=0;i<pageNumber;i++){%>
<%if(count==i){%>
[<font color="#FF0000"><b><%=i+1%></b></font>]
<%}else{%>
[<a href="sortAction.do?method=selectSortAction&bigSort=<%=bigSort%>&count=<%=i%>"><b><%=i+1%></b></a>]
<%}}%></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -