?? selectforce.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.util.List"%>
<%@ page import="com.actionForm.ForceForm"%><jsp:useBean id="chinese" scope="request" class="com.tool.Chinese"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><jsp:useBean id="time" scope="request" class="com.tool.TimeShow"/>
<title>宇晨網絡新聞中心后臺</title>
<script language="javascript">
function deleteForm(date){
if(confirm("您真的要刪除嗎?")){
window.location.href="forceAction.do?method=deleteForceAction&id="+date;
}
}
</script>
</head>
<%
String bigSort=chinese.toChinese(request.getParameter("bigSort"));
List list=(List)request.getAttribute("list");
int number=list.size();
//以下這段代碼是計算多少頁數
int pageNumber=number;
if(pageNumber%10==0){
pageNumber=pageNumber/10;
}else{
pageNumber=pageNumber/10+1;
}
//以下是計算當前頁的頁數
int count;
if(request.getParameter("count")==null){
count=0;
}else{
count=Integer.valueOf(request.getParameter("count"));
}
//以下顯示多少條紀錄
int start=count*10;//開始條數
int over=(count+1)*10;//結束條數
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> 當前位置提示 >> 焦點新聞管理</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>焦點新聞管理</td>
</tr>
</table>
<br>
<%if(number==0){%>
<br>暫--無
<br><br><br>
<a href="forceAction.do?method=insertForceAction">焦點新聞添加</a><%}else{%>
<table width="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="right"><a href="forceAction.do?method=insertForceAction">焦點新聞添加</a> </div></td>
</tr>
</table>
<table width="500" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="77" height="27"><div align="center">編號</div></td>
<td width="218"><div align="center">焦點新聞題目</div></td>
<td width="101"><div align="center">創建時間</div></td>
<td width="94"><div align="center">操作</div></td>
</tr>
<%
for(int i=start;i<over;i++){
ForceForm form=(ForceForm)list.get(i);
%>
<tr>
<td width="77" height="31"><div align="center"><%=i+1%></div></td>
<td width="218"><div align="center"><a href="forceAction.do?method=selectOneForceAction&id=<%=form.getId()%>&sign=1"><%=form.getTitle()%></a></div></td>
<td width="101"><div align="center">
<%if(time.cuttentMonthDate().equals(form.getCreateTime())){%>
<b><font color="#0265CB">NEW</font></b>
<%}else{%><%=form.getCreateTime()%><%}%>
</div></td>
<td width="94"><div align="center"><a href="forceAction.do?method=selectOneForceAction&id=<%=form.getId()%>">修改</a> <a href="javascript:deleteForm('<%=form.getId()%>')">刪除</a></div></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="forceAction.do?method=selectForceAction&count=<%=i%>"><b><%=i+1%></b></a>]
<%}}%></td>
</tr>
</table><%}%></td>
</tr>
</table>
</div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -