www.gusucode.com > QQ空间互踩整站源码asp网站源码程序 > QQ空间互踩整站源码asp网站源码程序/index.asp

    <!--#include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=WebName&ChannelName%>_QQ空间互踩联盟</title>
<meta name="description" content="QQ空间互踩联盟,QQ空间互踩,互踩空间,QQ互踩。">
<meta name="keywords" content="<%=WebAlt%>">
<link rel="stylesheet" href="style.css">
</head>
<SCRIPT language=JavaScript src="images/js.js"></SCRIPT>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<%
dim find,webtype,pl
dim rs,sql
dim condition,linkstr
find=hx.checkstr(trim(request("find")),50)
webtype=request("webtype")

sql="select * from CL_Link"
condition = " where 1=1 " 

pl=request("pl")
if pl="" then
pl="inp"
end if
linkstr = "pl=" & pl

if webtype="" or not isnumeric(webtype) then
webtype=0 
elseif webtype>0 then
condition = condition & " and webtype="&webtype
end if
linkstr = linkstr & "&webtype="&webtype


if find<>"" then
condition = condition & " and (sitename like '%"&find&"%' or siteintro like '%"&find&"%' or siteurl like '%"&find&"%')"
linkstr = linkstr & "&find="&find
end if


'分页信息
dim PageNo
PageNo=Request.QueryString("PageNo")
if PageNo="" or not isnumeric(PageNo) then
PageNo=1
else
PageNo=int(PageNo)
end if

'普通sql语句
sql=sql & condition &" ORDER BY "&pl&" DESC"

%>
<!--#include file="top.asp"-->
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
  <form method="Get">
    <tr>
      <td width="53"><img src="images/soo.jpg" width="53" height="33" /></td>
      <td height="33" background="images/soobg.jpg"> 关键字:
          <input name="find" type="text" value="<%=find%>" size="15" maxlength="20" >
        Qzone分类:
          <select name="webtype" size="1">
            <option value="">全部类别</option>
            <%hx.listwebtype(webtype)%>
          </select>
        排序:
      <select name="pl" size="1">
          <option value="inc"<%if pl="inc" then%> selected<%end if%>>总计踩入</option>
          <option value="inj"<%if pl="inj" then%> selected<%end if%>>今天踩入</option>
          <option value="inp"<%if pl="inp" then%> selected<%end if%>>平均踩入</option>
          <option value="outc"<%if pl="outc" then%> selected<%end if%>>总计踩出</option>
          <option value="outj"<%if pl="outj" then%> selected<%end if%>>今天踩出</option>
          <option value="outp"<%if pl="outp" then%> selected<%end if%>>平均踩出</option>
          <option value="indate"<%if pl="indate" then%> selected<%end if%>>踩入时间</option>
          <option value="outdate"<%if pl="outdate" then%> selected<%end if%>>踩出时间</option>
          <option value="fromdate"<%if pl="fromdate" then%> selected<%end if%>>统计时间</option>
          <option value="dateandtime"<%if pl="dateandtime" then%> selected<%end if%>>加入时间</option>
        </select>
      <input type="image" name="submit" src="images/cx.jpg" />
	  &nbsp;&nbsp;<%hx.showPageInfo "CL_link","username",condition,PageNo,MaxPageSize,linkstr%>&nbsp;
      </form>
      | </td>
    </tr>
</table>
<%if webtype=0 then%>
<div class="jiange"></div>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="380" height="189" background="images/bg_hot_box.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>踩出排行榜</td>
        <td>踩入排行榜</td>
      </tr>
      <tr>
        <td><%call showtop(2,2)%></td>
        <td><%call showtop(1,2)%></td>
      </tr>
    </table></td>
    <td width="10">&nbsp;</td>
    <td width="380" height="189" background="images/bg_hot_box.jpg"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>今日踩入排行榜</td>
        <td>今日踩出排行榜</td>
      </tr>
      <tr>
        <td><%call showtop(1,1)%></td>
        <td><%call showtop(2,1)%></td>
      </tr>
    </table></td>
    <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>欢迎加入QQ空间互踩联盟,让你的空间回访人气更高!</td>
      </tr>
    </table></td>
  </tr>
</table>
<%end if%>
<div class="jiange"></div>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="750" valign="top" ><table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="29" background="images/title.jpg">&nbsp;&nbsp;&nbsp; <strong>QQ空间互踩联盟</strong> | <a href="addlink.asp">申请加入</a></td>
      </tr>
      <tr>
        <td height="37" background="images/950_bg.jpg"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <%
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>暂无QQ加入互踩!!</p>"
else
	rs.PageSize = MaxPageSize
	rs.AbsolutePage = PageNo 
	dim i
i=0
do while not rs.eof or rs.bof
%>
              <td align="left" valign="top"><a href="http://<%=hx.BaseUrl%>out.asp?username=<%=rs("username")%>" target="_blank"><img src="<%=rs("sitelogo")%>" alt="名称:<%=rs("sitename")%>
主人:<%=rs("username")%>
简介:<%=hx.htmlencode2(rs("siteintro"))%>
统计:点入:<%=rs("inc")%>今:<%=rs("inj")%>|点出:<%=rs("outc")%>今:<%=rs("outj")%>" border="0" /></a></td>
              <% i=i+1  
rs.movenext  
if i mod 18=0 then  
response.write"</tr></TBODY>" 
If i>=MaxPageSize Then Exit do
end if  
loop  
end if  
rs.close  
set rs=nothing  
%>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="images/bottom.jpg" width="760" height="8" /></td>
      </tr>
    </table></td>
    <td width="2">&nbsp;</td>
    <td valign="top"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FEE1BF">
      <tr>
        <td height="29" bgcolor="#FEF1E0">&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.dutushidai.cn/qq" target="_blank">QQ资料大全--站长推荐</a></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><script language='javascript' src='http://www.dutushidai.cn/qq/JS/qqhucai.js'></script></td>
      </tr>
    </table></td>
  </tr>
</table>
<%
	Function ShowTop(x,y)
		Dim OutStr,conditionstr
		Dim rs,sql,i
		if y=2 then
			if x=1 then 
				conditionstr=" where inc>0 order by inc desc"
			else
				conditionstr=" where outc>0 order by outc desc"			
			end if
		sql="select top 5 sitename,inc,outc,username from CL_link "&conditionstr
		else
			if x=1 then 
				conditionstr=" where inj>0 order by inj desc"
			else
				conditionstr=" where outj>0 order by outj desc"			
			end if		
		sql="select top 5 sitename,inj,outj,username from CL_link "&conditionstr		
		end if
		OutStr = "<table cellpadding=1 cellspacing=0 border=0>"
		set rs=hx.Execute(sql)
		if rs.eof then
			OutStr= OutStr & "<tr><td align=center>暂时还没有数据</td></tr>"		
		else
		do while not rs.eof and i<5
			OutStr= OutStr & "<tr><td width=120>"
			OutStr= OutStr & "<img src=images/icon.gif> "
			OutStr= OutStr & " <a href=out.asp?username="&rs(3)&" target=_blank>"&rs(0)&"</a>"
			OutStr= OutStr & "</td><td>"			
			if x=1 then
			OutStr= OutStr & " in:"&rs(1)
			else
			OutStr= OutStr & " out:"&rs(2)
			end if				
			OutStr= OutStr & "</td><tr>"
			i=i+1
			rs.movenext
		loop
		end if
		OutStr= OutStr & "</table>"
		Response.Write OutStr
	End Function
%>
<!--#include file="under.asp"-->
</body>
</html>