📄 index.jsp
字号:
<%@ page language="java" pageEncoding="gb2312"%>
<%@ page import="java.util.*" %>
<%@ page import="com.guestbook.sys.*" %>
<%@ 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" %>
<%
Hashtable dynamicParameter = ( Hashtable)request.getAttribute( "dynamicParameter" );
Vector guestInfoList = ( Vector )request.getAttribute( "guestInfoList" );
int rowCount = ( Integer )request.getAttribute( "rowCount" );
int page1 = ( Integer )request.getAttribute( "page" );
int maxPage = ( Integer )request.getAttribute( "maxPage" );
%>
<html>
<head>
<meta name="Author" content="BlueSailor">
<title>留言簿管理区</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<base target="_self">
<script>
function deletes()
{
return window.confirm( "真的要删除吗? ");
}
function choiseGuestListId( form )
{
var guestListIds = document.getElementsByName( "guestListId" );
for( var i = 0 ; i < guestListIds.length ; i++ )
{
guestListIds[ i ].checked = true;
}
}
</script>
<%@ include file="../style.jsp" %>
</head>
<body>
<%@ include file="menu.jsp" %>
<%
boolean auditing = Boolean.parseBoolean( dynamicParameter.get( "auditing" ).toString() );
if( auditing )
{
%>
<table width="650" height="21" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom"><strong>说明:</strong><font color="#FF0000">回复了的留言</font>将会自动<font color="#FF0000">通过审核</font></td>
</tr>
</table>
<%
}
%>
<form action="batchGuestListDel.do" method="post">
<%
for( int i = 0 ; i < guestInfoList.size(); i++ )
{
Vector item = ( Vector )guestInfoList.get( i );
pageContext.setAttribute( "infoId", item.get( 0 ) );
pageContext.setAttribute( "ip", item.get( 11 ) );
%>
<table width="650" height="76" align="center" cellpadding="0" cellspacing="0" class="lybtable">
<tr>
<td width="445" height="18" class="bodytableleft"> <p align="left">
<input type=checkbox name="guestListId" value="<%=item.get( 0 )%>">
<b>留言人:</b><%=item.get( 1 )%> <b>IP:</b><%=item.get( 11 )%>
<html:link action="/admin/lockip" paramId="ip" paramName="ip">封IP</html:link>
<html:link action="/admin/lockip" paramId="ip" paramName="ip">解IP</html:link>
<%
if( auditing )
{
if( item.get( 14 ) == null || "0".equals( item.get( 14 ).toString() ) )
{
out.println( "未审核" );
}
else
{
out.println( "已审核" );
}
}
%>
</td>
<td width="203" height="13" class="toptable"> <p align="center">
<%
if( auditing )
{
%>
<html:link action="/admin/auditGuestInfo" paramId="id" paramName="infoId"><font color="#FF0000">通过审核</font></html:link> |
<%
}
else
{
%>
<html:link action="/admin/auditGuestInfo" paramId="id" paramName="infoId"><font color="#FF0000">审核</font></html:link> |
<%
}
%>
<html:link action="/admin/editGuestInfo" paramId="id" paramName="infoId"><font color="#FF0000">编辑</font></html:link> |
<html:link action="/admin/deleteGuestInfo" paramId="id" paramName="infoId"><font color="#FF0000">删除</font></html:link> |
<html:link action="/admin/revertGuestInfo" paramId="id" paramName="infoId" target="_blank"><font color="#FF0000">回复</font></html:link></td>
</tr>
<tr>
<td height="53" colspan="2" valign="top" style="word-break: break-all; font-size: 10pt" bgcolor="<%=dynamicParameter.get( "styleInfo/tablebgcolor" )%>" ><br>
<br>
<p style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px;word-wrap: break-word">
<%
String guestContent = item.get( 5 ).toString();
guestContent = SysUtil.htmlDecode( guestContent );
guestContent = SysUtil.ubb( guestContent );
out.println( guestContent );
%>
</p>
<br>可能来自:
<%
if( item.get( 3 ) == null )
{
out.println( "未知" );
}
else
{
out.println( item.get( 3 ) );
}
%>
<p> </td>
</tr>
<%
if( "0".equals( item.get( 14 ) ) )
{
%>
<tr class="bodytableleft">
<td width="475" height="18" valign="top"><b> 回 复:</b></td>
<td width="173" height="6" valign="top" class="toptable" style="word-break: break-all; font-size: 10pt">
<p align="center"> <a href="reply.asp?id=<%=item.get( 0 )%>"> <font color="#FF0000">编辑回复</font></a></td>
</tr>
<tr>
<td height="42" colspan="2" valign="top" style="word-break:break-all">
<p style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px">
<%=item.get( 6 )%>
</p> </td>
</tr>
<%
}
%>
</table>
<table width="650" border="0" align="center">
<tr>
<td height="2"><img src="csspic/blank.gif" width="1" height="1"></td>
</tr>
</table>
<%
}
%>
<table width="650" border="0" align="center">
<tr>
<td width="273">
<input name="Button" type="button" class="noBorder" value="全选" onclick="choiseGuestListId(this)">
<input name="B3" type="submit" class="noBorder" value="删除选中"> <input name="B1" type="reset" class="noBorder" value="重置">
</td>
<td width="363">
<p align="right">
<a href="baniplist.do" target="_blank">被封IP地址列表</a>
</p>
</td>
</tr>
</table>
</form>
<table width="650" height="17" align=center cellpadding="0" cellspacing="0"
class="bodytablebottom">
<form >
<tr>
<td width="100%"> 总计留言<%=rowCount%>条 共有<%=page1%>/<%=maxPage%>页
<%
if( page1 != 1 )
{
out.println( "<a href='?page="+ ( page1 - 1 ) +"'>上一页</a> " );
}
if( maxPage != page1 && maxPage != 1 )
{
out.println( "<a href='?page="+ ( page1 + 1 ) +"'>下一页</a> " );
}
out.println( "转到:<input class=smallInput type='text' name='page' size=4 maxlength=10 value="+ page1 +">" );
out.println( "<input class=noborder type='button' value='Go' name='cndok' onclick='redirectToPage(this.form)'>" );
%>
</td>
</tr>
</form>
</table>
<table width="650" border="0" align="center">
<tr>
<td height="2"><img src="csspic/blank.gif" width="1" height="1"></td>
</tr>
</table>
<%@ include file="menu.jsp" %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -