<!--#include file="Conn.asp"-->
<!--#include file="cookies.asp"-->
<%
'导航条
Set rs = Server.CreateObject("ADODB.RecordSet")
StrSql="select * From sd_mingzhan order by sd_topid desc,id"
rs.open StrSql,Conn,1,1
%>
<%
dim delete
delete=request("delete")
if delete<>"" and session("lastdeleted")<>delete then
conn.execute "delete from sd_mingzhan where id="&delete
response.write "<script language=javascript>alert('已删除一条编号为[ "&delete&" ]的优推!');this.location.href='sd_mz.asp';</script>"
session("lastdeleted")=delete
end if
%>
<%
page=Request("page")
if page=0 or page="" then
page=1
end if
RecordCount = 0 
do while not rs.Eof
RecordCount = RecordCount +1
rs.MoveNext 
loop
if not RecordCount=0 then
rs.MoveFirst
end if
pageCount=RecordCount/30
pageCount=int(pageCount)
if (RecordCount mod 30)>0 then
PageCount=PageCount +1
end if 
%>
<html>
<head>
<TITLE>商奇软件 www.583344.com</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="images/Admin_css.css" type=text/css rel=stylesheet>
</head>
<body>
<table height="1" border="0" cellpadding="3" cellspacing="1" bgcolor="#F2F9E8" class="admintable1">
  <tr>
    <td colspan="6" class="admintitle">优秀推荐链接管理</td>
  </tr>
  <tr bgcolor="E8FBD1" align="center">
    <td width="8%" height="30">排序</td>
    <td width="23%">链接名称</td>
    <td>链接地址</td>
    <td width="8%">颜色</td>
    <td width="8%">修改</td>
    <td width="8%">删除</td>
  </tr>
<%
do while pos<(page-1)*30
pos=pos+1
rs.MoveNext 
loop
i=1
x=0 
do while x<30 and not rs.eof
%>
  <tr align="center" <%If i/2=Cint(i/2) Then response.write "bgcolor=#F7FDEF" Else Response.write "bgcolor=#FFFFFF" End If %> >
   <td height="30"><%=Rs("sd_topid")%></td>
   <td><%=Rs("sd_Title")%></td>
   <td><%=Rs("sd_url")%></td>
   <td><%if rs("sd_se")=0 then%>黑色<%end if%><%if rs("sd_se")=1 then%><font color="#FF0000">红色</font><%end if%><%if rs("sd_se")=2 then%><font color="#0000FF">蓝色</font><%end if%><%if rs("sd_se")=3 then%><font color="#B600E3">紫色</font><%end if%></td>
   <td><a href="sd_mz_02.asp?id=<%=Rs("id")%>">修改</a></td>
   <td><a href="?delete=<%=Rs("id")%>" onclick="return confirm('慎重！删除数据不可恢复，你确认要继续吗？')">删除</a></td>
  </tr>
<%
i=i+1
x=x+1
Rs.MoveNext
loop
rs.close
set rs=nothing
%>
<tr>
<td height="30" colspan="6"> 共有信息<font color="#FF0000"><%=RecordCount%></font>条，共 <font color="#FF0000"><%=pageCount%></font> 页，第 <font color="#FF0000"><%=page%></font> 页
<%y=1%>
<%do while y<pagecount+1%>
<a href="?page=<%=y%>">[<%=y%>]</a> 
<%
y=y+1 
loop
%>
</td></tr>
</table>
<!--#include file="sd_copy.asp"-->
</body>
</html>
