www.gusucode.com > 黑鹰自助链管理系统 1.1 商业版码程序 > adminhymm/id_search.asp

    <!--#include file="mdb.asp"-->
<%
dim pn,leibie
pn=request("pn")
id=request("id")
%>
<%
dim delete,tj,btj,lj,blj,verity,noverity
pn=request("pn")
delete=request("delete")
tj=request("tj")
btj=request("btj")
lj=request("lj")
blj=request("blj")
verity=request("verity")
noverity=request("noverity")
if delete<>"" and session("lastdeleted")<>delete then
conn.execute "delete from detail where id="&delete
response.write "<big><big><font color='red'>已删除一条编号为"&delete&"的网站记录!</font></big></big>"
session("lastdeleted")=delete
end if
%>
<HTML>
<HEAD>
<TITLE>网站搜索结果</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> 
<LINK REL="stylesheet" HREF="../css/style.css" TYPE="text/css">
</HEAD>
<BODY>

<table width=100% border=0 align=center cellpadding=5 cellspacing=1 bordercolorlight=#cecece bordercolordark=#ffffff bgcolor="#000000">
<tr>
<td height=25 bgcolor=#ececec align=middle colspan=6>&nbsp;<font color=#FF0000>★<B>网站搜索结果</B>★</font></td></tr>
<tr>
<td nowrap bgcolor="#FFFFFF">编号</td>
<td bgcolor="#FFFFFF">网站名称</td>
<td bgcolor="#FFFFFF">网站url</td>
<td nowrap bgcolor="#FFFFFF">所属分类</td>
<td bgcolor="#FFFFFF">编辑</td>
<td bgcolor="#FFFFFF">删除</td>
</tr>
<%
if pn="" then pn=1
set r=server.createobject("adodb.recordset")
r.open "select * from detail where id="&id,conn,1,3
if  r.eof or r.bof then
response.write "<tr><td height=25 colspan=6 align=middle bgcolor=#FFFFFF>没有找到所需记录!</td></tr>"
response.end
end if
r.pagesize=1000
r.absolutepage=pn
rowcount=r.pagesize
do while not r.eof and not r.bof and rowcount>0
set rr=server.createobject("adodb.recordset")
rr.open "select * from feilei where classid="&r("classid"),conn,1,3
response.write "<td nowrap bgcolor=#FFFFFF>"&r("id")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF>"&r("title")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF>"&r("url")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF>"&rr("classname")&"</td>"
response.write "<td nowrap bgcolor=#FFFFFF><a href='wz_edit.asp?id="&r("id")&"'>编辑</a></td>"
response.write "<td nowrap bgcolor=#FFFFFF><a href='?pn=1&delete="&r("id")&"'>删除</a></td></tr>" 
rr.close                   
set rr=nothing
rowcount=rowcount-1
r.movenext
loop
%>
<tr>
<td height=25 bgcolor=#ececec colspan=6>&nbsp;
<%  
ppage=pn-1  
npage=pn+1  
totalpage=r.pagecount  
if cint(totalpage)>cint(pn) then  
%> 
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=totalpage%>页
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>'>上一页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>'>下一页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=totalpage%>'>尾页</a>  
<%  
else  
if pn=1 then  
%>
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=totalpage%>页  
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=npage%>'>下一页</a>  
<a href='<%=request.servervariables("script_name")%>?pn=<%=totalpage%>'>尾页</a>  
<%  
else  
%>
每页显示<%=r.pagesize%>个网站,当前第<%=pn%>页,总共<%=totalpage%>页
<a href='<%=request.servervariables("script_name")%>?pn=1'>首页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=ppage%>'>上一页</a>
<a href='<%=request.servervariables("script_name")%>?pn=<%=totalpage%>'>尾页</a>
<%  
end if
end if
%>
</td></tr>
</table>
</BODY> 
</HTML>