⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 b2b_flfw.asp

📁 信运网店系统是一套功能完善、简洁美观
💻 ASP
字号:
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if session("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
else
if request.cookies("Buy2Buy")("admin")="" then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('请先登录!');history.go(-1);</script>"
response.End
end if
end if
'限制添加权限管理员
if session("rank")=2 then
conn.close
set conn = nothing
response.Write "<script language='javascript'>alert('您的管理权限未达到此操作等级!');history.go(-1);</script>"
response.End
end if
%>
<title>订单管理</title>
<style type="text/css">
<!--
.style4 {color: #FF0000}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {	color: #000000;
	font-weight: bold;
}
-->
</style>
<table width="99%" border="5" align="center" cellpadding="5" cellspacing="5" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
  <tr> 
    <td background="images/topbg.gif"><span class="STYLE1"><img src="images/pic5.gif" width="28" height="22" align="absmiddle" />您现在所在的位置是: <a href="adminhelp.asp">管理首页</a> -&gt; <span class="style4">分类访问排名</span></span></td>
  </tr>
  <tr> 
    <td valign="top" bgcolor="#FFFFFF"><table width="70%" border="2" align="center" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#CCCCCC">
        <tr bgcolor="#F7F7F7" align="center"> 
          <td width="19%" height="25" background="images/topbg.gif" bgcolor="#F7F7F7"><strong>排名</strong></td>
          <td width="53%" height="25" background="images/topbg.gif"><strong>分类名称</strong></td>
          <td width="28%" background="images/topbg.gif"><strong>访问数量</strong></td>
        </tr>
		<%
		dim KindName(),KindViewNum()
		
		sql="select * from category where ParentID = 0"
		set rs=server.CreateObject("adodb.recordset")
		rs.open sql,conn,1,3
		if not (rs.eof and rs.bof) then
			iCount = rs.recordcount
			redim KindName(iCount)
			redim KindViewNum(iCount)
			i=0
			while not rs.eof
				KindName(i)=rs("category")
				
				catid=rs("categoryid")
				CatList =catid
				PID = catid
				sorts(catid)
				sql="select sum(ViewNum) as SumViewNum from 分类浏览统计 where categoryid in ("& CatList&")"
				set tmpRs=conn.execute(sql)
				if isnull(tmpRs("SumViewNum")) then
					KindViewNum(i)=0	
				else
					KindViewNum(i)=tmpRs("SumViewNum")
				end if
				i=i+1
				tmpRs.close
				set tmpRs=nothing
				
				rs.movenext
			wend
		end if
		
		

Dim KeepChecking,I,FirstValue,SecondValue
 KeepChecking = TRUE 
Do Until KeepChecking = FALSE 
 KeepChecking = FALSE 
 For I = 0 to UBound(KindViewNum) 
  If I = UBound(KindViewNum) Then Exit For 
   If KindViewNum(I) < KindViewNum(I+1) Then 
    FirstValue = KindViewNum(I) 
    SecondValue = KindViewNum(I+1) 
    KindViewNum(I) = SecondValue 
    KindViewNum(I+1) = FirstValue
	
    FValue = KindName(I) 
    SValue = KindName(I+1) 
    KindName(I) = SValue 
    KindName(I+1) = FValue
	 
    KeepChecking = TRUE 
   End If 
 Next 
Loop 


		
		for i=0 to iCount-1 
		%>		
        <tr bgcolor="#F7F7F7" align="center">
          <td height="25" bgcolor="#FFFFFF"><%=i+1%></td>
          <td height="25" bgcolor="#FFFFFF"><%=KindName(i)%></td>
          <td bgcolor="#FFFFFF"><%=KindViewNum(i)%></td>
        </tr>
		<%
		Next
		%>
		
	  </table></td>
</tr></table>
<%
sub sorts(selec)
	sql="select categoryid from category where ParentID = "&selec&" order by categoryorder"
	Set Rs1=Conn.Execute(sql)
	do while not rs1.eof
		IntCat =  rs1("categoryid")
	 	If Len(CatList) = 0 Then
      		CatList =catid
   		ElseIf InStr( CatList, IntCat ) <= 0 Then
      		CatList = CatList&", "&IntCat &""
   		End If
	sorts rs1("categoryid")
	rs1.movenext
	loop
rs1.close
Set Rs1 = Nothing
end sub



%>     
<br>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -