<%
'-----------------------------------------------
'公共模版654函数
'-----------------------------------------------
function guide(id)
	dim TempHTM
	if id = "" or len(id) = 0 or not isnumeric(id) then
		TempHTM = ""
	else
		dim rs
		set rs = conn.execute("select top 1 id,parent,cname,ename from DH654_class where id=" & id)
		if not rs.eof then
			TempHTM = TempHTM & guide(rs("parent"))
			TempHTM = TempHTM & "＞<a href=""" & root_html & getclasspath(id,"DH654_Class") & "/index" & site_extname & """>" & rs("cname") & "</a>"
		end if
		rs.close:set rs = nothing
		if id = 0 then
			TempHTM = TempHTM & ""
		end if
	end if
	guide = TempHTM
end function
function clickin(id) '点入
	clickin = "<script language=""javascript"" type=""text/javascript"" src=""" & site_root & "/go/in.asp?id=" & id & """></script>"
end function
function clickout(id) '点出
	clickout = "<script language=""javascript"" type=""text/javascript"" src=""" & site_root & "/go/out.asp?id=" & id & """></script>"
end function

'-----------------------------------------------
'普通分类模版654函数
'-----------------------------------------------

function tree(id)    
	dim rs,rs2,TempHTM
	set rs = conn.execute("select top 1 id,parent,cname,ename,URLNum from DH654_class where id=" & GetTopClassID(id,"DH654_Class"))
	if not rs.eof then
	end if
	rs.close:set rs = nothing
	TempHTM=TempHTM&"<ul>"&vbcrlf	
 if GetUpClassId(id,"DH654_Class")=0 then  '顶类往下
	set rs = conn.execute("select id,parent,orders,cname,ename,URLNum from DH654_class where parent=" & GetTopClassID(id,"DH654_Class")&" order by orders,id desc")
	while not rs.eof
	      if ischildclass(rs("id"),"DH654_Class")=true then

  	         set rs2 = conn.execute("select id,parent,orders,cname,ename,URLNum from DH654_class where parent=" & rs("id") &" order by orders,id desc")
			 while not rs2.eof
 		        TempHTM=TempHTM&"<li><a href="""&rs("ename")& "/index" & site_extname & "#" & rs2("id") &""">"&rs2("cname")&"</a>"&vbcrlf
	         rs2.movenext
	         wend
		     rs2.close:set rs2 = nothing
		  else
 		     TempHTM=TempHTM&"<li><a href=""#"&rs("id")&""">"&rs("cname")&"</a></li>"&vbcrlf
	      end if
	rs.movenext
	wend
	rs.close:set rs = nothing
 elseif ischildclass(id,"DH654_Class")=true then  '中间类
	set rs = conn.execute("select id,parent,orders,cname,ename,URLNum from DH654_class where parent=" & GetTopClassID(id,"DH654_Class")&" order by orders,id desc")
	while not rs.eof
	      if ischildclass(rs("id"),"DH654_Class")=true  then
			 if rs("id")=GetUpClassId(id,"DH654_Class") or rs("id")=id then
                TempHTM=TempHTM&"<li>"  '判断分类是否子分类，是 打开 该子分类的父分类
			 else
                TempHTM=TempHTM&"<li>"  '判断分类是否子分类，是 打开 该子分类的父分类
			 end if 
             TempHTM=TempHTM&"<a href=""../"&rs("ename")& "/index" & site_extname & "#" & rs("id") &""">"&rs("cname")&"</a>"&vbcrlf
  	         set rs2 = conn.execute("select id,parent,orders,cname,ename,URLNum from DH654_class where parent=" & rs("id") &" order by orders,id desc")
			 while not rs2.eof
 		       TempHTM=TempHTM&"<li><a href=""../"&rs("ename")& "/index" & site_extname & "#" & rs2("id") &""">"&rs2("cname")&"</a></li>"&vbcrlf
 		        'TempHTM=TempHTM&"<li><a href="""&root_html&getclasspath(rs("id"),"DH654_Class")& "/index" & site_extname & "#" & rs2("id") &""">"&rs2("cname")&"</a>"&vbcrlf
			 rs2.movenext
	         wend
		     rs2.close:set rs2 = nothing
		  else
 		     TempHTM=TempHTM&"<li><a href="""& "../index" & site_extname &"#"&rs("id")&""">"&rs("cname")&"</a></li>"&vbcrlf
	      end if
	rs.movenext
	wend
	rs.close:set rs = nothing
 else  '下类往上
	set rs = conn.execute("select id,parent,orders,cname,ename,URLNum from DH654_class where parent=" & GetTopClassID(id,"DH654_Class")&" order by orders,id desc")
	while not rs.eof
	      if ischildclass(rs("id"),"DH654_Class")=true then
			 if rs("id")=GetUpClassId(id,"DH654_Class") then
                TempHTM=TempHTM&"<li>"  '判断分类是否子分类，是 打开 该子分类的父分类
			 else
                TempHTM=TempHTM&"<li>"  '判断分类是否子分类，是 打开 该子分类的父分类
			 end if			 
			 TempHTM=TempHTM&"<a href=""" & root_html & getclasspath(rs("id"),"DH654_Class") & "/index" & site_extname & "#"&rs("id")&""">"&rs("cname")&"</a>"&vbcrlf
			     set rs2 = conn.execute("select id,parent,orders,cname,ename,URLNum from DH654_class where parent=" & rs("id") &" order by orders,id desc")
	             while not rs2.eof
 		              TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs2("id"),"DH654_Class") & "/index" & site_extname & "#" & rs2("id") &""">"&rs2("cname")&"</a></li>"&vbcrlf
				 rs2.movenext
	             wend
				 rs2.close:set rs2 = nothing
		  else
 		     TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs("id"),"DH654_Class") & "/index" & site_extname & "#"&rs("id")&""">"&rs("cname")&"</a></li>"&vbcrlf
	      end if
	rs.movenext
	wend
	rs.close:set rs = nothing
 end if

	tree =TempHTM
end function

function urllist(id) '分页的网址列表
  dim rs,rs2,TempID,TemParent,TempHTM
  if ischildclass(id,"DH654_Class")=true then  '如果id下有子类
	set rs = conn.execute("select top 1 id,parent,cname,ename,URLNum from DH654_class where id=" & id)
	if not rs.eof then	
	   TempID=rs("id")
	   TemParent=rs("parent")
	   TempHTM=TempHTM&"<H3><EM><A href=""#top"">返回顶部↑</A></EM>"&rs("cname")&"<a name=""#"&rs("id")&"""></a></H3>"&vbcrlf   
	end if
	rs.close:set rs = nothing
	      TempHTM=TempHTM&"<UL id=""pagelist"">"&vbcrlf
	set rs = conn.execute("select id,classid,title,type,url,elite,hide,created,filename,orders from DH654_URL where classid="&TempID&" and hide=0 order by orders desc,id desc")
	while not rs.eof
	   if is_Pop("IS01") then  '是否内部连接网址
	      TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs("classid"),"DH654_Class") &"/"& rs("filename") & site_extname & """ target=""_blank"">"&titlecolor(rs("title"),rs("type"))&"</a></li>"&vbcrlf
       else
	      TempHTM=TempHTM&"<li><a href="""&rs("url")&""" target=""_blank"">"&titlecolor(rs("title"),rs("type"))&"</a></li>"&vbcrlf
	   end if
	rs.movenext
	wend
	rs.close:set rs = nothing
	      TempHTM=TempHTM&"</ul>"&vbcrlf	
	      TempHTM=TempHTM&"<DL>"&vbcrlf
	      TempHTM=TempHTM&"<DT>相关搜索： </DT>"&vbcrlf	
	      TempHTM=TempHTM&SoKeys(ID)&vbcrlf
	      TempHTM=TempHTM&"</DL>"&vbcrlf			
	'-------------子类显示------------
	   set rs2 = conn.execute("select id,parent,cname,ename,URLNum from DH654_class where parent=" & id) '大类的所有子一代
	   while not rs2.eof
	      TempID=rs2("id")
	      set rs = conn.execute("select top 1 id,parent,cname,ename,URLNum from DH654_class where id=" & TempID)
	      if not rs.eof then
	   TempHTM=TempHTM&"<H3><EM><A href=""#top"">返回顶部↑</A></EM>"&rs("cname")&"<a name=""#"&rs("id")&"""></a></H3>"&vbcrlf
	         TempID=rs("id")
	      end if
	      rs.close:set rs = nothing
	      TempHTM=TempHTM&"<UL id=""pagelist"">"&vbcrlf
	      set rs = conn.execute("select id,classid,title,type,url,elite,hide,created,filename,orders from DH654_URL where classid="&TempID&" and hide=0 order by orders desc,id desc")
	      while not rs.eof
		  	 if is_Pop("IS01") then  '是否内部连接网址
	           TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs("classid"),"DH654_Class") & "/" & rs("filename") & site_extname & """ target=""_blank"">"&titlecolor(rs("title"),rs("type"))&"</a></li>"&vbcrlf
             else
	           TempHTM=TempHTM&"<li><a href="""&rs("url")&""" target=""_blank"">"&titlecolor(rs("title"),rs("type"))&"</a></li>"&vbcrlf
	         end if
	      rs.movenext
	      wend
	      rs.close:set rs = nothing
	      TempHTM=TempHTM&"</ul>"&vbcrlf	
	      TempHTM=TempHTM&"<DL>"&vbcrlf
	      TempHTM=TempHTM&"<DT>相关搜索： </DT>"&vbcrlf	
	      TempHTM=TempHTM&SoKeys(ID)&vbcrlf
	      TempHTM=TempHTM&"</DL>"&vbcrlf		
	   rs2.movenext
	   wend
	   rs2.close:set rs2 = nothing
  else  '如果无子类，则
	if TemParent<>0 then	
	set rs = conn.execute("select top 1 id,parent,cname,ename,URLNum from DH654_class where id=" & GetUpClassId(id,"DH654_Class"))
	if not rs.eof then
	   TempID=rs("id")
	   TempHTM=TempHTM&"<H3><EM><A href=""#top"">返回顶部↑</A></EM>"&rs("cname")&"<a name=""#"&rs("id")&"""></a></H3>"&vbcrlf   
	end if
	rs.close:set rs = nothing
	      TempHTM=TempHTM&"<UL id=""pagelist"">"&vbcrlf
	set rs = conn.execute("select id,classid,title,type,url,elite,hide,created,filename,orders from DH654_URL where classid="&TempID&" and hide=0 order by orders desc,id desc")
	while not rs.eof
	   if is_Pop("IS01") then  '是否内部连接网址
	      TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs("classid"),"DH654_Class") &"/"& rs("filename") & site_extname & """ target=""_blank"">"&titlecolor(rs("title"),rs("type"))&"</a></li>"&vbcrlf
       else
	      TempHTM=TempHTM&"<li><a href="""&rs("url")&""" target=""_blank"">"&titlecolor(rs("title"),rs("type"))&"</a></li>"&vbcrlf
	   end if
	rs.movenext
	wend
	rs.close:set rs = nothing
	      TempHTM=TempHTM&"</ul>"&vbcrlf	
	      TempHTM=TempHTM&"<DL>"&vbcrlf
	      TempHTM=TempHTM&"<DT>相关搜索： </DT>"&vbcrlf	
	      TempHTM=TempHTM&SoKeys(ID)&vbcrlf
	      TempHTM=TempHTM&"</DL>"&vbcrlf		
	end if		
	'-------------子类显示------------
	      set rs = conn.execute("select top 1 id,parent,cname,ename,URLNum from DH654_class where id=" & ID)
	      if not rs.eof then
	   TempHTM=TempHTM&"<H3><EM><A href=""#top"">返回顶部↑</A></EM>"&rs("cname")&"<a name=""#"&rs("id")&"""></a></H3>"&vbcrlf   
	         TempID=rs("id")
	      end if
	      rs.close:set rs = nothing
	      TempHTM=TempHTM&"<UL id=""pagelist"">"&vbcrlf
	      set rs = conn.execute("select id,classid,title,type,url,elite,hide,created,filename,orders from DH654_URL where classid="&TempID&" and hide=0 order by orders desc,id desc")
	      while not rs.eof
	         TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs("classid"),"DH654_Class") & "/" & rs("filename") & site_extname & """ target=""_blank"">"&titlecolor(rs("title"),rs("type"))&"</a></li>"&vbcrlf
	      rs.movenext
	      wend
	      rs.close:set rs = nothing
	      TempHTM=TempHTM&"</ul>"&vbcrlf	
	      TempHTM=TempHTM&"<DL>"&vbcrlf
	      TempHTM=TempHTM&"<DT>相关搜索： </DT>"&vbcrlf	
	      TempHTM=TempHTM&SoKeys(ID)&vbcrlf
	      TempHTM=TempHTM&"</DL>"&vbcrlf	
	
  end if
	'-------------子类显示结束------------
  urllist=TempHTM
end function
function SoKeys(id) 
    'dim So654cN:So654cN="http://www.google.cn/search?client=pub-3498092475201884&forid=1&prog=aff&ie=GB2312&oe=GB2312&hl=zh-CN&q="
	'So654cN=Dcode654cn("kwws=22vr19871fq2jr1dvsBqr@;)nh|@")
    dim i,so,TempHTM
	so=Split(left(keywords(id,"DH654_Class"),180),",")  '智能判断长度654
	so=Split(strvalue(keywords(id,"DH654_Class"),105-UBound(so)),",")
    for i=1 to UBound(so)-1
       TempHTM=TempHTM&"<DD><a href="""&So654cN&so(i)&""" target=""_blank"">"&so(i)&"</a></DD>"&vbcrlf
    next
	SoKeys=TempHTM
end function

'-----------------------------------------------
'网址模版654函数
'-----------------------------------------------
function SiteMore(id) '获得分类中前5条网址
    dim rs,TempHTM,n:n=0
	set rs = conn.execute("select id,classid,title,type,url,elite,hide,created,filename from DH654_URL where classid="&id&" order by orders desc")
	do while not rs.eof
	   TempHTM=TempHTM&"&nbsp;<a href=""" & root_html & getclasspath(rs("classid"),"DH654_Class") &"/"& rs("filename") & site_extname & """ title=当天来路:9　历史来路:633 target=""_blank""><font color=0>"&rs("title")&"</font></a>&nbsp;"&vbcrlf
	   rs.movenext
	   if n>=3 then exit do
	   n=n+1	
	loop
	rs.close:set rs = nothing
    SiteMore=TempHTM
end function
'-----------------------------------------------
'主页模版654函数
'-----------------------------------------------
function Ku654cN
   dim rs,TempHTM,Lan654cN,MyMax,nn:nn= 0
  Lan654cN=Split(site_ku,",")
  MyMax=UBound(Lan654cN)
  TempHTM=TempHTM&"<UL id=""pagelist2"">"&vbcrlf
  for nn= 0 to MyMax step 1
	 set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_KU where hide=1 and ClassID='"&nn&"' order by Orders,id desc")
	 while not rs.eof
	    if rs("Orders")=0 then
	       TempHTM=TempHTM&"<LI><STRONG><a href="""&rs("Weburl")&""">["&unencode(rs("Website"))&"]</a></STRONG>"&vbcrlf
		elseif rs("Orders")=99 then
	       TempHTM=TempHTM&"<EM><a href="""&rs("Weburl")&""">"&unencode(rs("Website"))&"</a></EM></LI>"&vbcrlf
		else
		  TempHTM=TempHTM&"<a href="""&rs("Weburl")&""" target=_blank>"&unencode(rs("Website"))&"</a>"&vbcrlf
		end if
	 rs.movenext
	 wend
	 rs.close:set rs = nothing
  next 
  TempHTM=TempHTM&"</UL>"&vbcrlf
  TempHTM=TempHTM&"</div>"&vbcrlf
  TempHTM=TempHTM&"</div>"&vbcrlf
Ku654cN=TempHTM
end function

function Class654cN
   dim rs,TempHTM,nn:nn= 1
  TempHTM=TempHTM&"<div class=""subBM BM2"" id=""hSiteCate"">"
  TempHTM=TempHTM&"<div class=""titBar""><h3>网址分类</h3><em id=""setBase"">&nbsp;</em><b class=""move"" id=""btn_hSiteCate"">&nbsp;</b></div>"
  TempHTM=TempHTM&"<div class=""txtBox"">"
  set rs = conn.execute("select ID,Parent,Orders,Cname,Ename,kinds from DH654_Class where Parent=0 order by Orders,id desc")
  while not rs.eof
      Select Case nn mod 36
             Case 1: TempHTM=TempHTM&"<ul class=""bg0"">"&vbcrlf    '奇数是bg0 偶数是bg1
		     Case 19:TempHTM=TempHTM&"<ul class=""bg1"">"&vbcrlf    '奇数是bg0 偶数是bg1
      End Select
	  nn=nn+1
	  TempHTM=TempHTM&"<li><a href=""" & root_html &"/"& rs("Ename")&"/index"&site_extname&""">"&TitleColor(rs("Cname"),rs("kinds"))&"</a></li>"&vbcrlf
      if nn mod 18 = 1 then TempHTM=TempHTM&"</ul>"&vbcrlf
  rs.movenext
  wend
  rs.close:set rs = nothing
  TempHTM=TempHTM&"</div>"
  TempHTM=TempHTM&"</div><!--subBM-->"
  Class654cN=TempHTM
end function

function New654cN
  dim rs,TempHTM,nn:nn= 1
 'set rs = conn.execute("select ID,classid,title,url,hide,addtime,elite from DH654_URL where hide=0 order by addtime desc")
  set rs = conn.execute("select ID,ClassID,CName,ESite,Filename,Auditing,Created,Hide,Utime,In5,In0,In1,type from ZZ654_Link where Hide=0 and Created=1 and Auditing=-1 order by in5 desc,in0 desc")
  do while not rs.eof
      Select Case nn mod 17
             Case 15: TempHTM=TempHTM&"<li class=""lst"">"
		     Case 16: TempHTM=TempHTM&"<li class=""lst"">" 
             Case else:TempHTM=TempHTM&"<li>"
	  End Select
	  nn=nn+1
	  'TempHTM=TempHTM&"<a href="""& rs("url")&""" target=""_blank"">"&rs("title")&"</a></li>"&vbcrlf
	  TempHTM=TempHTM&"<a href="""& rs("ESite")&""" target=""_blank"">"&TitleColor(rs("Cname"),rs("type"))&"</a></li>"&vbcrlf
	  if nn>16 then exit do
  rs.movenext
  loop
  rs.close:set rs = nothing
  New654cN=TempHTM
end function
function Hot654cN
   dim rs,TempHTM,nn:nn= 1
  set rs = conn.execute("select ID,classid,title,url,hide,addtime,Updatetime,elite from DH654_URL where elite=1 and hide=0 order by Updatetime desc") 'by addtime desc  asc
  do while not rs.eof
	  nn=nn+1
	  TempHTM=TempHTM&"<li><a href="""& rs("url")&""" target=""_blank"">"&rs("title")&"</a></li>"&vbcrlf
  if nn>12 then exit do
  rs.movenext
  loop
  rs.close:set rs = nothing
  Hot654cN=TempHTM
end function

function ZZLink654cN(id,n) '自助链 (id，显示条数)
  dim rs,TempHTM,nn:nn= 1
  if id=0 then
     set rs = conn.execute("select ID,ClassID,CName,ESite,Filename,Auditing,Created,Hide,Utime,In5,In0,In1,type from ZZ654_Link where Hide=0 and Created=1 and Auditing=-1 order by in5 desc,in0 desc")
  else
     set rs = conn.execute("select ID,ClassID,CName,ESite,Filename,Auditing,Created,Hide,Utime,In1,HitIn,type from ZZ654_Link where ClassID in(" & id & allchildclass(id,"DH654_Class") & ") and Hide=0 and Created=1 and Auditing=-1  order by in1 desc,HitIn desc")
  end if
  do while not rs.eof
    nn=nn+1
	if id=0 then
	   if is_Pop("IS01") then  '是否内部连接网址
	      TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs("classid"),"DH654_Class") &"/"& rs("filename") & site_extname & """ title=五分钟来路:"&rs("In5")&"|当天来路:"&rs("In0")&" target=""_blank"">"&titlecolor(mid(unencode(rs("CName")),1,8),rs("type"))&"</a></li>"&vbcrlf
       else
	      TempHTM=TempHTM&"<li><a href=""" & rs("ESite") & """ title=五分钟来路:"&rs("In5")&"|当天来路:"&rs("In0")&" target=""_blank"">"&titlecolor(mid(unencode(rs("CName")),1,8),rs("type"))&"</a></li>"&vbcrlf
	   end if
	else
	   if is_Pop("IS01") then  '是否内部连接网址
	      TempHTM=TempHTM&"<li><a href=""" & root_html & getclasspath(rs("classid"),"DH654_Class") &"/"& rs("filename") & site_extname & """ title=昨天:"&rs("In1")&"|历史:"&rs("HitIn")&" target=""_blank"">"&titlecolor(mid(unencode(rs("CName")),1,8),rs("type"))&"</a></li>"&vbcrlf
       else
	      TempHTM=TempHTM&"<li><a href=""" & rs("ESite") & """ title=昨天:"&rs("In1")&"|历史:"&rs("HitIn")&" target=""_blank"">"&titlecolor(mid(unencode(rs("CName")),1,8),rs("type"))&"</a></li>"&vbcrlf
	   end if
	end if
    if nn>n then exit do
    rs.movenext
  loop
  rs.close:set rs = nothing
  ZZLink654cN=TempHTM
end function

class Channeltag
    dim id
	public function Channel(stype)
		dim TempHTM,rs,i
		select case stype
			   case "1","2","3","13","15"  
			   '主打分站/热门网址/热门搜索/流行音乐榜
			        TempHTM=""
			   	    set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_Channel where Hide=1 and ClassID='"&id&"' order by Orders,id desc")
                    while not rs.eof
	                    TempHTM=TempHTM&"<a href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a>"&vbcrlf
                    rs.movenext
                    wend
                    rs.close:set rs = nothing
	                Channel=TempHTM
			   case "5","6"  
			   '话题(上)/话题(中)
			        TempHTM="":i=0
			   	    set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_Channel where Hide=1 and ClassID='"&id&"' order by Orders,id desc")
                    while not rs.eof
					   if i=0 then 
					      TempHTM=TempHTM&"<li>·<a class=""fst"" href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a></li>"&vbcrlf
                       else
						  TempHTM=TempHTM&"<li>·<a href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a></li>"&vbcrlf
				       end if
					   i=i+1
					rs.movenext
                    wend
                    rs.close:set rs = nothing
	                Channel=TempHTM
			   case "8","9"  
			   '实用工具/常用软件
			   	    TempHTM="":i=0
			   	    set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_Channel where Hide=1 and ClassID='"&id&"' order by Orders,id desc")
                    while not rs.eof
					   Select Case i mod 4
                              Case 0:TempHTM=TempHTM&"<ul class=""bg0"">"&vbcrlf    '奇数是bg0 偶数是bg1
		                      Case 2:TempHTM=TempHTM&"<ul class=""bg1"">"&vbcrlf    '奇数是bg0 偶数是bg1
                       End Select
						  TempHTM=TempHTM&"<li><a href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a></li>"&vbcrlf
					   if i mod 2=1 then TempHTM=TempHTM&"</ul>"
					   i=i+1
					rs.movenext
                    wend
                    rs.close:set rs = nothing
	                Channel=TempHTM
			   	case "10"
			    '垂直导航
			   	    TempHTM="":i=0
			   	    set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_Channel where Hide=1 and ClassID='"&id&"' order by Orders,id desc")
                    while not rs.eof
					   Select Case i mod 6
                              Case 0:TempHTM=TempHTM&"<ul class=""bg0"">"&vbcrlf    '奇数是bg0 偶数是bg1
		                      Case 3:TempHTM=TempHTM&"<ul class=""bg1"">"&vbcrlf    '奇数是bg0 偶数是bg1
                       End Select
						  TempHTM=TempHTM&"<li><a href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a></li>"&vbcrlf
					   if i mod 3=2 then TempHTM=TempHTM&"</ul>"
					   i=i+1
					rs.movenext
                    wend
                    rs.close:set rs = nothing
	                Channel=TempHTM
			   	case "11"
			    '网站榜中榜
			   	    TempHTM="":i=0
			   	    set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_Channel where Hide=1 and ClassID='"&id&"' order by Orders,id desc")
                    while not rs.eof
					   Select Case i mod 2
                              Case 0:TempHTM=TempHTM&"<li class=""bg0"">"&vbcrlf    '奇数是bg0 偶数是bg1
		                      Case 1:TempHTM=TempHTM&"<li class=""bg1"">"&vbcrlf    '奇数是bg0 偶数是bg1
                       End Select
						  TempHTM=TempHTM&"·<a href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a></li>"&vbcrlf
					   i=i+1
					rs.movenext
                    wend
                    rs.close:set rs = nothing
	                Channel=TempHTM
				
				case "14","16"
			    '人气影视榜/炫酷图铃榜
			   	    TempHTM="":i=1
			   	    set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_Channel where Hide=1 and ClassID='"&id&"' order by Orders,id desc")
                    while not rs.eof
					   Select Case i mod 10
                              Case 1
							    TempHTM=TempHTM&"<ul class=""Top TopL"">"&vbcrlf
							    TempHTM=TempHTM&"<li>"
							  Case 6
							    TempHTM=TempHTM&"<ul class=""Top TopR"">"&vbcrlf  
							    TempHTM=TempHTM&"<li>"
							  Case 5,0
							    TempHTM=TempHTM&"<li class=""lst"">" 
							  Case else:TempHTM=TempHTM&"<li>"
                       End Select
                       TempHTM=TempHTM&"<b>"&i&".</b><a href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a></li>"&vbcrlf
					   Select Case i mod 10
                              Case 5,0 :TempHTM=TempHTM&"</ul>"&vbcrlf
                       End Select
					   i=i+1
					rs.movenext
                    wend
                    rs.close:set rs = nothing
	                Channel=TempHTM			   
			   case else  '默认风格
		       '"0","4","7","12"
			   '城市导航/名站导航/话题(下)/游戏专题
			        TempHTM=""
			   	    set rs = conn.execute("select ID,ClassID,Orders,Website,Weburl,Hide from DH654_Channel where Hide=1 and ClassID='"&id&"' order by Orders,id desc")
                    while not rs.eof
	                    TempHTM=TempHTM&"<li><a href="""&rs("Weburl")&""" target=""_blank"">"&unencode(rs("Website"))&"</a></li>"&vbcrlf
					rs.movenext
                    wend
                    rs.close:set rs = nothing
  Channel=TempHTM
	

		end select		
	end function
end class

'-----------------------------------------------
'公共模版654函数
'-----------------------------------------------
%>