<%
dim Site_Name,Site_Url,Site_Memo,Site_Pass,Site_Div,Site_Copyright,Site_AdminDiv,Site_ClassSkinId
set rs=server.createobject("adodb.recordset")
   rs.open"select * from ConFig",conn,1,3
   Site_Name=rs("Site_Name")
   Site_ClassSkinId=int(rs("Site_ClassSkinId"))
   Site_Url=rs("Site_Url")
   Site_Pass=rs("Site_Pass")
   Site_Div=rs("Site_Div")
   Site_AdminDiv=rs("Site_AdminDiv")
   Site_Copyright=rs("Site_Copyright")
   Site_Memo=rs("Site_Memo")
   rs.close
set rs=nothing
//网站主要标签
Sub SiteLable()
    strOut=Replace(strOut,"$Site_Name$",Site_Name)
	strOut=Replace(strOut,"$Site_Url$",Site_Url)
	strOut=Replace(strOut,"$Site_Memo$",Site_Memo)
	strOut=Replace(strOut,"$Site_Pass$",Site_Pass)
	strOut=Replace(strOut,"$Site_Copyright$",Site_Copyright)
	strOut=Replace(strOut,"$Site_Div$",Site_Div)
	strOut=Replace(strOut,"$Site_Tjl$",Site_Tjl)
end Sub
//网站单个标签
Sub ClassLabel()
	   StrClass=StrClass & ""
       rs.open"select UrlClass_Id,UrlClass_Name,UrlClass_Search from UrlClass where UrlClass_ClassId="&Class_Id&" order by UrlClass_Id",conn,1,3
	   while not rs.eof and not rs.bof
	   Search_Html=""
	   StrClass=StrClass & "<div class='mod-content clearfix'><div class='content-con content-con-first'><h2 class='content-title'>"&rs("UrlClass_Name")&"</h2><ul class='content-link'>"
	   
	   rss.open "select Url_Name,Url_Url,Url_Color from Url where Url_UrlClassId="&rs("UrlClass_Id")&" order by Url_TopId desc,Url_Id",conn,1,3
	   'jishu=1
while not rss.eof
	'if jishu=1 or jishu mod 5 = 1 then
	if rss("Url_Color")<>"" then
	    StrClass=StrClass & "<li><h3 class='last-row'><div><a href='"&rss("Url_Url")&"' class='"&rss("Url_Color")&"' target='_blank'>"&rss("Url_Name")&"</a></div></h3></li>"
	else
		StrClass=StrClass & "<li><h3 class='last-row'><div><a href='"&rss("Url_Url")&"' target='_blank'>"&rss("Url_Name")&"</a></div></h3></li>"
	end if
	'	else
	'if rss("Url_Color")<>"" then
	'    StrClass=StrClass & "<td width='20%'><a href='"&rss("Url_Url")&"' class='"&rss("Url_Color")&"'>"&rss("Url_Name")&"</a></td>"
	'else
	'	StrClass=StrClass & "<td width='20%'><a href='"&rss("Url_Url")&"'>"&rss("Url_Name")&"</a></td>"
	'end if
	'end if
	'if jishu mod 5 =0  then StrClass=StrClass & "</tr>"
	'jishu=jishu+1
	rss.movenext
wend
StrClass=StrClass & "</div></div>"
'jishu=jishu-1
'if jishu mod 5 <> 0 then
'for i= 1 to 5-(jishu mod 5)
'	StrClass=StrClass & "<td width='20%'>&nbsp;</td>"
'	if  i = 5-(jishu mod 5) then StrClass=StrClass & "</tr>"
'next
'end if
rss.close
UrlClass_Search=Trim(rs("UrlClass_Search"))
if UrlClass_Search<>"" then
   GetSearch=Split(UrlClass_Search, ",")
   For s = 0 To UBound(GetSearch)
       Search_Name=GetSearch(s)
       Search_Html=Search_Html & "&nbsp;&nbsp;<a href=http://www.sogou.com/sogou?pid=sogou-site-85b7bf6a1781d2f0&query="&Search_Name&"><font color='#0066FF'>"&Search_Name&"</font></a>"
   Next
    StrClass=StrClass & ""
else
   StrClass=StrClass & ""
end if
rs.movenext
wend
rs.close
StrClass=StrClass & ""
strOut=Replace(strOut,"$StrClass$",StrClass)
end Sub
//网站全部标签
Sub ClassAllLabel()
       StrClass=""
	   StrClass=StrClass & ""
       rs.open"select UrlClass_Id,UrlClass_Name,UrlClass_Search from UrlClass where UrlClass_ClassId="&ClassArray(i,0)&" order by UrlClass_Id",conn,1,3
	   while not rs.eof and not rs.bof
	   Search_Html=""
	   StrClass=StrClass & "<div class='mod-content clearfix'><div class='content-con content-con-first'><h2 class='content-title'>"&rs("UrlClass_Name")&"</h2><ul class='content-link'>"
	   
	   rss.open "select Url_Name,Url_Url,Url_Color from Url where Url_UrlClassId="&rs("UrlClass_Id")&" order by Url_TopId desc,Url_Id",conn,1,3
	   'jishu=1
while not rss.eof
	'if jishu=1 or jishu mod 5 = 1 then
	if rss("Url_Color")<>"" then
	    StrClass=StrClass & "<li><h3 class='last-row'><div><a href='"&rss("Url_Url")&"' class='"&rss("Url_Color")&"' target='_blank'>"&rss("Url_Name")&"</a></div></h3></li>"
	else
		StrClass=StrClass & "<li><h3 class='last-row'><div><a href='"&rss("Url_Url")&"' target='_blank'>"&rss("Url_Name")&"</a></div></h3></li>"
	end if
		'else
	'if rss("Url_Color")<>"" then
	'    StrClass=StrClass & "<li><h3 class='last-row'><div><a href='"&rss("Url_Url")&"' class='"&rss("Url_Color")&"'>"&rss("Url_Name")&"</a></div></h3></li>"
	'else
	'	StrClass=StrClass & "<li><h3 class='last-row'><div><a href='"&rss("Url_Url")&"'>"&rss("Url_Name")&"</a></div></h3></li>"
	'end if
	'end if
	'if jishu mod 5 =0  then StrClass=StrClass & "</div></div>"
	'jishu=jishu+1
	rss.movenext
wend
StrClass=StrClass & "</div></div>"
'jishu=jishu-1
'if jishu mod 5 <> 0 then
'for k= 1 to 5-(jishu mod 5)
'	StrClass=StrClass & "<td width='20%'>&nbsp;</td>"
'	if  k = 5-(jishu mod 5) then StrClass=StrClass & "</tr>"
'next
'end if

rss.close
UrlClass_Search=Trim(rs("UrlClass_Search"))
if UrlClass_Search<>"" then
   GetSearch=Split(UrlClass_Search, ",")
   For s = 0 To UBound(GetSearch)
       Search_Name=GetSearch(s)
       Search_Html=Search_Html & "&nbsp;&nbsp;<a href=http://www.sogou.com/sogou?pid=sogou-site-85b7bf6a1781d2f0&query="&Search_Name&"><font color='#0066FF'>"&Search_Name&"</font></a>"
   Next
    StrClass=StrClass & ""
else
   StrClass=StrClass & ""
end if
rs.movenext
wend
rs.close
StrClass=StrClass & ""
strOut=Replace(strOut,"$StrClass$",StrClass)
end Sub

Function IsExists(byref filespec) 
	If FSO.FileExists(server.MapPath(filespec)) Then
	IsExists = True
	Else
	IsExists = False
	End If
End Function
Function IsFolder(byref Folder)
	If FSO.FolderExists(server.MapPath(Folder)) Then  
	IsFolder = True
	Else
	IsFolder = False
	End If
End Function

Function CreateFolder(byref fldr) 
	Dim f
	Set f = FSO.CreateFolder(Server.MapPath(fldr))
	CreateFolder=f.Path
	Set f=nothing
End Function
Sub Createfiles(byref filedata) 
	Dim f
	Set f = FSO.CreateTextFile(Server.MapPath(strFile))
	f.write filedata
	Set f=nothing
End sub
Function Openfiles(oldFile) 
	Dim f
	Set f = FSO.OpenTextFile(Server.MapPath(oldFile))
	Openfiles=f.Readall
	Set f=nothing
End Function
%>
