?? list.jsp
字號(hào):
<%@ page language="java" import="model.*,java.util.*" pageEncoding="gbk"%>
<HTML><HEAD><TITLE>用戶管理系統(tǒng)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="\hiber\images\SystemStyle.css" type=text/css rel=stylesheet>
<script language="JavaScript" src="/hiber/images/datetime.js"></script>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="../show.tld" prefix="llb" %>
<%
if(request.getSession().getAttribute("uname")==null) response.sendRedirect("/hiber/login.jsp");
request.setCharacterEncoding("gbk");
String nn=request.getParameter("name");
String dn=request.getParameter("dname");
if(nn==null) nn="";
//System.out.println(nn);
//System.out.println("jsb"+dn);
//System.out.println(al.size());
int curPage= Integer.parseInt((String)request.getAttribute("page"));
int rowCount= Integer.parseInt((String)request.getAttribute("rowCount"));
int pageCount= Integer.parseInt((String)request.getAttribute("pageCount"));
%>
<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<body background="/hiber/images/back.gif">
<FORM name=Form1 action="/hiber/news.do?method=list_k&op=que" method=post>
<TABLE cellSpacing=3 cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD height=25 class=xiangdao align=center><llb:show/>管理
</TD>
</TR>
<TR><TD height=10> </TD></TR>
<TR><TD style="font-size:16px">
<table border="1" bordercolor="#7FB0DE" align="center" bordercolordark="#ffffff"
cellpadding="3" cellspacing="0" width="80%" style="font-size:13px">
<tr>
<td colspan="2"><div align="center">查詢條件</div></td>
</tr>
<tr>
<td align="right">標(biāo)題:</td>
<td><input type="text" name="titleNews" value="<%=request.getAttribute("titleNews")%>" size=50></td>
</tr>
<tr>
<td align="right">發(fā)布時(shí)間:</td>
<td>從
<input type="text" name="beginTime" value="<%=request.getAttribute("beginTime")%>" onClick="SelectDate(this,'yyyy-MM-dd')" readonly="readonly">
到
<input type="text" name="endTime" value="<%=request.getAttribute("endTime")%>" onClick="SelectDate(this,'yyyy-MM-dd')" readonly="readonly"></td>
</tr>
<tr>
<td colspan="2" align="center">
<INPUT class=button1 type="submit" value="查詢">
<input class=button1 type="reset" value="重置"/></td>
</tr>
</table></TD></TR>
<TR><TD height=10> </TD></TR>
<TR align="right"><TD>
<INPUT class=button1 type="button" value=添加 onClick="ad(document.Form1)" name=add>
<INPUT class=button1 type=button value=刪除 name=delete onClick="de(document.Form1)"> </TD></TR>
<TR><TD height=5></TD></TR>
<TR align=middle>
<TD>
<TABLE class=tab2 cellSpacing=0 width="100%">
<TBODY>
<TR align=center>
<TD vAlign=bottom width=20% height=15><B>期數(shù)</B></TD>
<TD vAlign=bottom width=20% height=22><B>開獎(jiǎng)日期</B></TD>
<TD vAlign=bottom width=40% height=22><B>開獎(jiǎng)號(hào)碼</B></TD>
<TD vAlign=bottom width=10% height=22><B>修改信息</B></TD>
<TD vAlign=bottom width=10% height=22><B>刪除</B><input type=checkbox onclick='sele(this)'></TD></TR>
<TR>
<TD align=middle colSpan=9>
<HR noShade SIZE=1> </TD></TR>
<logic:iterate id="value1" name="list">
<TR onMouseOver="this.bgColor='#C1CDD8'"
onmouseout="this.bgColor='#FFF7E5'" bgColor=#fff7e5>
<TD align=left><bean:write name='value1' property='newsTitle'/></TD>
<TD align=center><bean:write name='value1' property='newsDate'/></TD>
<TD align=center><bean:write name='value1' property='newsContent'/></TD>
<TD align=center><INPUT class=button1 onclick=Update("<bean:write name='value1' property='id'/>") type=button value=修改></TD>
<TD align=center width=60><INPUT type=checkbox name=chk value="<bean:write name='value1' property='id'/>"></TD></TR>
</logic:iterate>
<TR>
<TD align=middle colSpan=9>
<HR noShade SIZE=1> </TD></TR>
<tr>
<td colspan="4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr style="font-size:12px" height="22">
<td ><%=curPage%>/<%=pageCount%>頁(yè) 共:<%=rowCount%>條</td>
<td align="center">
<%=(curPage>1)?"<a href='javascript:goPage(1)'>首頁(yè)</a> | <a href='javascript:goPage("+(curPage-1)+")'>上頁(yè)</a>":"首頁(yè) | 上頁(yè)"%> |
<%=(curPage<pageCount)?"<a href='javascript:goPage("+(curPage+1)+")'>下頁(yè)</a> | <a href='javascript:goPage("+pageCount+")'>末頁(yè)</a>":"下頁(yè) | 末頁(yè)"%> </td>
<td align="right" valign="top">頁(yè)
<input type="text" name="curPage" size="4" maxlength="2" value="<%=curPage%>" style="height:17px">
<input class=button1 type="button" name="Submit" value="Go" onClick="goPage()" style="height:18px">
</td></tr>
</table>
</td>
</tr>
</TBODY></TABLE></TD></TR>
<TR>
<TD class=itemFont align=right height=10> </TD></TR>
</TBODY></TABLE></TD></TR></TBODY></TABLE>
<INPUT type="hidden" name="id">
<INPUT type="hidden" name="page" value="<%=request.getAttribute("page")%>">
<INPUT type="hidden" name="newsType" value="<%=request.getAttribute("newsType")%>">
<INPUT type="hidden" name="cx" value="<%=request.getAttribute("cx")%>"></FORM></BODY>
<SCRIPT language=javascript>
var count = document.getElementsByName("chk").length
function sele(obj){
if(count==1) self.document.all.chk.checked =obj.checked;
if(count>1) for(i=0;i<count;i++) self.document.all.chk[i].checked=obj.checked;
}
function de(obj){
var s="";
if(count==1) if(obj.chk.checked) s=obj.chk.value;
if(count>1)
for(i=0;i<document.getElementsByName("chk").length;i++){
if(obj.chk[i].checked){
if(s!="") s+=",";
s+=obj.chk[i].value;
}
}
if(s=="") alert("請(qǐng)選擇要?jiǎng)h除的用戶!");
else{
//if(confirm("確定要?jiǎng)h除選擇的用戶?")){
obj.action="/hiber/news.do?method=del_k&id="+s;
obj.submit();
//}
}
}
function ad(obj){
obj.action="kjhm/add.jsp?method=ins_k";
obj.submit();
}
function Update(id){
document.Form1.id.value=id;
document.Form1.action="/hiber/news.do?method=getMdfInfo_k";
document.Form1.submit();
}
function goPage(toPage) {
if (toPage==null){
if(document.Form1.curPage.value.replace(/(^\s*)|(\s*$)/g,"")==""||isNaN(document.Form1.curPage.value)){
alert("頁(yè)碼不合法");
return false;
}
else{
toPage = document.Form1.curPage.value.replace(/(^\s*)|(\s*$)/g,"");
}
}
if (toPage><%=pageCount%> || toPage<1) {
alert("目標(biāo)頁(yè)碼超出范圍!");
return 0;
} else {
document.Form1.page.value = toPage;
document.Form1.action="/hiber/news.do?method=list_k";
document.Form1.submit();
}
}
</SCRIPT>
</HTML>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -