<!--#include file="mdb.asp"-->
<%
if session("User")="" then
	response.write"<SCRIPT language=JavaScript>alert('您尚未登录！');"
	response.write"location.href=""sd_admin_login.asp"";</SCRIPT>"
end if
%>
<%
response.expires = 0 
response.expiresabsolute = now() - 1 
response.addHeader "pragma","no-cache" 
response.addHeader "cache-control","private" 
Response.cachecontrol = "no-cache" 
set sd=server.createobject("adodb.recordset")
sd.open "select * from sd_title",conn,1,3
sd_sd=sd("sd_sd")
sd.close
set sd=nothing
	Set fs=Server.CreateObject("Scripting.FileSystemObject")
	Set Rs=Server.CreateObject("adodb.recordSet")
	act=request.QueryString("act")
	id=request.QueryString("id")
	keyword=request.form("keyword")
	if keyword="" or keyword="输入网站名..." then 	keyword=request.QueryString("keyword")
%>
<html>
<head>
<TITLE>爱链接友情链接交换交易网站—雨过天晴工作室 www.zzcodes.net</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="images/Admin_css.css" type=text/css rel=stylesheet>
<script language="javascript" src="js/prototype.js"></script>
</head>
<body>
<table height="1" border="0" cellpadding="3" cellspacing="1" bgcolor="#F2F9E8" class="admintable1">
  <tr>
    <td colspan="10" class="admintitle">全部网站列表</td>
  </tr>
  <tr bgcolor="E8FBD1" align="center">
    <td width="4%" height="30">置顶</td>
    <td width="4%">ID</td>
    <td width="8%">类型</td>
    <td width="19%">网站名</td>
    <td width="19%">网址</td>
    <td width="8%">价格</td>
    <td width="8%">腾讯QQ</td>
    <td width="6%">静态HTML</td>
    <td width="8%">更新时间</td>
    <td width="20%">操作</td>
  </tr>
<%
dim pagecount,page,Spage,Epage,recordcount,i
Const PAGESIZE=15
Const PARTSIZE=10
Const AboutSize=8

page = request.querystring("page")
if page = "" or IsNull(page) then page = 1
if not IsNumeric(page) then page = 1
page = Cint(page)
if act<>"search" then
	sql="select * from [sd_web] where sd_jy=2 Order by sd_topendtime DESC"
	rs.open sql,conn,1,1
else
	sql="select * from [sd_web] where sd_jy=2 Order by sd_topendtime DESC"
	rs.open sql,conn,1,1
	rs.filter = "sd_webname like '%"&keyword&"%'"
end if
recordcount = RS.RecordCount
RS.PageSize = PAGESIZE
pagecount = RS.PageCount
if page < 1 then
    page = 1
elseif page > pagecount then
    page = pagecount
end if
if RS.EOF  then
    Response.Write("<tr bgcolor=#ffffff><td colspan=10 height=20><center><font color=red>没有找到相应记录</font></td></tr>")
else
  if recordcount > 0 then RS.AbsolutePage = page
  for i=1 to PAGESIZE
  if RS.EOF then exit for
%>
  <tr align="center" <%If i/2=Cint(i/2) Then response.write "bgcolor=#F7FDEF" Else Response.write "bgcolor=#FFFFFF" End If %> >
   <td height="30"><%if rs("sd_TOP")=0 then%><img src='../images/common.gif' width='16' height='18' /><%else%><%if DateDiff("d",now(),CDate(rs("sd_TopEndTime")))<0 then%><img src='../images/common.gif' width='16' height='18' /><%else%><img src='../images/top3.gif' title='置顶到<%=right(year(rs("sd_topendtime")),2)%>-<%=right("0" &month(rs("sd_topendtime")),2)%>-<%=right("0" &day(rs("sd_topendtime")),2)%>' width='20' height='22' /><%end if%><%end if%></td>
   <td><%=rs("sd_id")%></td>
  	<td><%set rsc = Server.CreateObject("ADODB.RecordSet")
sql = "select classid,sd_classname from sd_class where classid="&rs("sd_classid")&""
rsc.open sql, conn,1,1
%><a href="?t2=<%=rsc("classid")%>&seo=5"><%=rsc("sd_classname")%></a><%rsc.close
set rsc=nothing%></td>
   <td><a href="../sd_show.asp?id=<%=rs("sd_id")%>" target="_blank"><%if rs("sd_rgb")=1 then%><font color="#ff0000"><%elseif rs("sd_rgb")=2 then%><font color="#0000ff"><%else%><font color="#000000"><%end if%><%=rs("sd_WEBNAME")%></font></a><%if rs("sd_TopEndTime")>now() then Response.Write(" <a title='置顶到："&rs("sd_TopEndTime")&"'><font color='red'>[顶]</font></a>") end if%></td>
   <td><%=rs("sd_weburl")%></td>
   <td><%if rs("sd_jg")=0 then%>商议<%else%><%=rs("sd_jg")%>元/月<%end if%></td>
   <td><a target="blank" href="http://wpa.qq.com/msgrd?V=1&Uin=<%=rs("sd_QQ")%>&Site=站长助手&Menu=yes"><%=rs("sd_qq")%></a></td>
   <td><%if sd_sd=1 then%><%If (fs.FileExists(server.MapPath("../links")&"\"&rs("sd_weburl")&".html")) Then%><font color="#008000"><a href="sd_html.asp?id=<%=rs("sd_id")%>">已生成</a></font><%else%><a href="sd_html.asp?id=<%=rs("sd_id")%>"><font color="#FF0000">未生成</font></a><%end if%><%end if%><%if sd_sd=0 then%>动态<%end if%></td>
   <td><%=year(rs("sd_RegTime"))%>-<%=month(rs("sd_RegTime"))%>-<%=day(rs("sd_RegTime"))%></td>
   <td><a href="sd_web_edit.asp?id=<%=rs("sd_id")%>">修改</a>　<a href="sd_color.asp?id=<%=rs("sd_id")%>">标色</a>　<a href="sd_webtop.asp?id=<%=rs("sd_id")%>">置顶</a>　<a href="sd_del.asp?id=<%=rs("sd_id")%>">删除</a></td>
  </tr>
<%
	RS.MoveNext()
	next
end if
%>

<tr>
<td height="40" colspan="10">　
<%
if pagecount > 0 then
%><span class='black12'>共<span class='calendar_checked'><%=recordcount%></span>条信息&nbsp;&nbsp;|&nbsp;&nbsp;共有<span class='calendar_checked'><%=pagecount%></span>页&nbsp;&nbsp;|&nbsp;&nbsp;每页<span class='calendar_checked'><%=pagesize%></span>条记录&nbsp;&nbsp;|&nbsp;&nbsp;当前第<span class='calendar_checked'><%=page%></span>页</span>&nbsp;&nbsp;|&nbsp;&nbsp;
<%
if page>1 then
	if keyword<>"" and act="search" then %>
	<a href='sd_weblist.asp?page=1&act=search&keyword=<%=keyword%>' style="text-decoration: none"><font color="#009300">首页</font></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='sd_weblist.asp?act=search&keyword=<%=keyword%>&page=<%=page-1%>' style="text-decoration: none"><font color="#009300">上一页</font></a>&nbsp;&nbsp;|&nbsp;&nbsp;
	<%else%>
	<a href='sd_weblist.asp?page=1' style="text-decoration: none"><font color="#009300">首页</font></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='sd_weblist.asp?page=<%=page-1%>' style="text-decoration: none"><font color="#009300">上一页</font></a>&nbsp;&nbsp;|&nbsp;&nbsp;
	<%end if
else%>
首页&nbsp;&nbsp;|&nbsp;&nbsp;上一页&nbsp;&nbsp;|&nbsp;&nbsp;
<%end if
if pagecount>page then
	if keyword<>"" and act="search" then %>
		<a href='sd_weblist.asp?act=search&keyword=<%=keyword%>&page=<%=page+1%>' style="text-decoration: none"><font color="#009300">下一页</font></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='sd_weblist.asp?act=search&keyword=<%=keyword%>&page=<%=pagecount%>' style="text-decoration: none"><font color="#009300">尾页</font></a>
	<%else%>
		<a href='sd_weblist.asp?page=<%=page+1%>' style="text-decoration: none"><font color="#009300">下一页</font></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='sd_weblist.asp?page=<%=pagecount%>' style="text-decoration: none"><font color="#009300">尾页</font></a>
	<%end if
else%>
下一页&nbsp;&nbsp;|&nbsp;&nbsp;尾页
<%end if
end if
rs.close
set rs=nothing
%>
</td></tr>
<tr>
<td height="40" colspan="10" align='center'>
<form name="search" method="post" action="sd_weblist.asp?act=search">
模糊搜索：<input name="keyword" type="text" value="输入网站名..." onClick="javascript:if(this.value='输入网站名...') this.value=''">&nbsp;&nbsp;
<input type="submit" onClick="sousuo()" value="立即搜索"/></form>
<SCRIPT language=Javascript>

	function delrec(code)
	{
		if (confirm("您确认要删除吗？")==true)
		{
		window.location.href="sd_weblist.asp?act=del&id="+code
		}
	}
function sousuo()
{
	if($F('keyword')=='' || $F('keyword')=='输入用户名...'){
		alert('请输入你要搜索别名！');
		return false;
	}
	$("search").submit();
}
//-->
</script>
</td></tr>
</table>
<!--#include file="sd_copy.asp"-->
</body>
</html>