28,409
社区成员




[code=C#]<%
if request("action")="" then
dim i,thisUrl
dim page,maxPerPage,myKeyword
maxPerPage=80 '每页显示的记录数
myKeyword=Request("myKeyword")
page=Request("page")
if (page="" or isempty(page)) then page=1
thisUrl="admin_j_gbook.asp?action="
session("adminOldUrl")=thisUrl&"&page="&page
set rs=server.createobject("adodb.recordset")
sql="select * from j_gbook where 1=1"
if not (myKeyword="" or isempty(myKeyword) ) then
sql=sql&" and (title like '%"&myKeyword&"%' or content like '%"&myKeyword&"%')"
end if
sql=sql&" order by gb_id desc"
'response.write sql
'response.End
rs.open sql,conn,1,1
rs.pagesize=MaxPerPage
%>
<script language="JavaScript">
function del ()
{
var flag=true;
var temp="";
var tmp;
if((document.form1.answer.length+"")=="undefined")
{
tmp=1
}
else
{
tmp=document.form1.answer.length;
}
if (tmp==1)
{
if (document.form1.answer.checked)
{
flag=false;
temp=document.form1.answer.value;
}
}
else
{
for (i=0;i<document.form1.answer.length;i++)
{
if (document.form1.answer[i].checked)
{
if (temp=="")
{
flag=false;
temp=document.form1.answer[i].value;
}
else
{
flag=false;
temp = temp +","+ document.form1.answer[i].value;
}
}
}
}
if (flag)
{
alert("对不起,你还没有选择!")
}
else
{
name=document.form1.name.value;
//alert(name)
if (confirm("确实要删除?"))
{
window.location="delete.asp?gb_id=" + temp;
}
}
return !flag;
}
</script>
<script language=Javascript>
function checkall(all)//用于判断全选记录的函数
{
var a = document.getElementsByName("answer");
for (var i=0; i<a.length; i++) a[i].checked = all.checked;
}
</script>
<script language=Javascript>
<!--
function jumpTo(i){
if(i==1){
this.document.location="<%=thisUrl%>";}
if(i==2){
this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}
//-->
</script>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function jumpTo(i){
if(i==1){
this.document.location="<%=thisUrl%>";}
if(i==2){
this.document.location="<%=thisUrl%>&page=<%=page-1%>";}
if(i==3){
this.document.location="<%=thisUrl%>&page=<%=page+1%>";}
if(i==4){
this.document.location="<%=thisUrl%>&page=<%=rs.pageCount%>";}
}
//-->
</script>
</head>
<body bgcolor="#9CC7EF" text="#000000" leftmargin="0" topmargin="0">
<div align="center"><br>
</div>
<TABLE class=tableBorder cellSpacing=1 cellPadding=2 width="95%" align=center
border=0>
<form method="POST" id=form1 name=form1>
<TBODY>
<TR>
<TH align=left height=23>打分管理</TH>
</TR>
<TR>
<TD><table width="100%" border="0" align="center" cellpadding="4" cellspacing="1">
<tr bgcolor="#E4EDF9">
<td width="6%" align="center" nowrap >管理</td>
<td width="12%" nowrap>
<div align="center"> 编号</div></td>
<td width="8%" nowrap >
<div align="center">打分人</div></td>
<td width="19%" nowrap>
<div align="center">链接地址</div></td>
<td width="26%" nowrap >
<div align="center">留言</div></td>
<td width="6%" nowrap>
<div align="center">打分</div></td>
<td width="10%" nowrap>
<div align="center">日期</div></td>
<td width="7%" nowrap>对方</td>
</tr>
<%
dim rsID
i=1
if not (rs.eof or err) then rs.move (page-1)*maxPerPage
do while not (rs.eof or err)
rsID=rs("gb_id")
%>
<tr bgcolor="#F1F3F5">
<td align="center"><input type="checkbox" name="answer" value="<%=rs("gb_id")%>" id="checkbox1"></td>
<td>
<div align="center"><%=rs("gb_id")%></div></td>
<td nowrap bgcolor="#F1F3F5" ><a href="admin_user.asp?action=modify&userid=<%=rs("gb_userid")%>"><%=rs("gb_username")%></a></td>
<td nowrap ><a href="<%=rs("gb_http")%>" target='_blank'><%=rs("gb_http")%></a></td>
<td nowrap><%=rs("gb_content")%></td>
<td align="center" nowrap><%=rs("gb_num")%></td>
<td nowrap><%=rs("gb_addtime")%></td>
<td nowrap ><a href="admin_user.asp?action=modify&userid=<%=rs("gb_to_userid")%>"><%=rs("gb_to_username")%></a></td>
</tr>
<%
i=i+1
if i>maxPerPage then exit do
rs.moveNext
loop
%>
<tr>
<td>
<input type="checkbox" name="chkall" value="on" onclick="checkall(this)" ID="Checkbox2">全选</td>
<td>
<input type="button" name="btnDelete" value="删除" onclick="del(<%=rs("gb_id")%>)" ID="Button1"></td>
<td colspan="8">
<div align="right">
<a href="admin_j_gbook.asp">首页</a>
<a href="admin_j_gbook.asp?page=<%=page-1%>">上页</a>
<a href="admin_j_gbook.asp?page=<%=page+1%>">下页</a>
<a href="admin_j_gbook.asp?page=<%=rs.pagecount%>">末页</a>
<%=page%>/<%=rs.pagecount%>页
<input type="text" name="GoPage" size="2" onkeyup="if(isNaN(this.value))this.value='<%=Page%>'" value="<%=Page%>">
<input type="button" name="Go" value="go" onclick="go()">
<script language="javascript">
<!--
function go(){
page=document.all.GoPage.value;
window.open ("?page="+page,"_self");
}
//-->
</script>
</div>
</td>
</tr>
</table>
</TD>
</TR>
</TBODY>
</form>
</TABLE>