<%
Sub CopyRight()
	 endtime=timer()
	str="<hr size='1' color='#666666' width='750'>"
	str=str&"<table width='600' border='0' cellspacing='0' cellpadding='0' align='center'>"
	str=str&"<tr><td align='right' class='gray'>"
	str=str&"<a href='#TOP'><b><font color='#009900'>TOP▲</font></b></a></div></td>"
	str=str&"</tr><tr> <td align='center' class='gray'>"
	str=str&"<a href='http://www.nd169.com/' target='_blank'>"&RS5(1)&"</a> 版权所有V1.5 设计：<font color='#000000'>"&RS5(5)&"</font> / TEL:"&RS5(13)&"<font color=red><b> <a href="&RS5(2)&"admin/index.asp>管理入口</a></b></font>"
	str=str&"<br><Center>Email:"&RS5(6)&"  <img src=images/qq.gif> "&RS5(7)&" 页面执行时间："&FormatNumber((endtime-startime)*1000,3)&"毫秒</Center></td>"
	str=str&"</tr></table><script src='"&RS5(2)&"count/mystat.asp'></script>"
	response.Write(str)
     Rs5.close:Set Rs5=nothing
	 Conn.close:Set Conn=nothing
End Sub
function ReplaceBadChar(strChar)
	if strChar="" then
		ReplaceBadChar=""
	else
		ReplaceBadChar=replace(replace(replace(replace(replace(replace(replace(strChar,"'",""),"*",""),"?",""),"(",""),")",""),"<",""),".","")
	end if
end function

Sub ShowClass(CurrentID)
	str="<select name='ClassID' id='ClassID' class='f1' style='width: 68px'>"
    str=str&"<option value='0'"
	if CurrentID=0 then
		str=str&" selected"
	end if
	str=str&">全部</option>"
	set rs=conn.execute("select * from ClassName where classtype=1 Order by RootID")
	do while not rs.eof
		str=str&"<option value='"&rs("ID")&"'"
		if CurrentID=rs("ID") then
			str=str&" selected"
		end if
		str=str&">"&rs("ClassName")&"</option>"
	rs.movenext
	loop
	RsClose
	str=str&"</select>"
	response.Write(str)
End Sub
Sub ShowClass1(CurrentID)
	str="<select name='ClassID' id='ClassID' class='f1' style='width: 68px'>"
    str=str&"<option value='0'"
	if CurrentID=0 then
		str=str&" selected"
	end if
	str=str&">全部</option>"
	set rs=conn.execute("select * from ClassName where classtype>1 Order by RootID")
	do while not rs.eof
		str=str&"<option value='"&rs("ID")&"'"
		if CurrentID=rs("ID") then
			str=str&" selected"
		end if
		str=str&">"&rs("ClassName")&"</option>"
	rs.movenext
	loop
	RsClose
	str=str&"</select>"
	response.Write(str)
End Sub

Sub ShowClass2(CurrentID)
	str="<select name='ClassID' id='ClassID' class='f1' style='width: 68px'>"
    str=str&"<option value='0'"
	if CurrentID=0 then
		str=str&" selected"
	end if
	str=str&">全部</option>"
	set rs=conn.execute("select * from ClassName where classtype=5 Order by RootID")
	do while not rs.eof
		str=str&"<option value='"&rs("ID")&"'"
		if CurrentID=rs("ID") then
			str=str&" selected"
		end if
		str=str&">"&rs("ClassName")&"</option>"
	rs.movenext
	loop
	RsClose
	str=str&"</select>"
	response.Write(str)
End Sub
Sub ShowUpTime()
	str="<SELECT name='UpTime' id='UpTime' class='f1' style='width: 68px'>"
	str=str&"	  <option value='7' selected>全部</option>"
	str=str&"	  <option value='0'>今天</option>"
	str=str&"	  <option value='1'>一天以前</option>"
	str=str&"	  <option value='2'>两天以前</option>"
	str=str&"	  <option value='3'>三天以前</option>"
	str=str&"	  <option value='4'>四天以前</option>"
	str=str&"	  <option value='5'>五天以前</option>"
	str=str&"	  <option value='6'>六天以前</option>"
	str=str&"    </SELECT>"
	response.Write(str)
End Sub

Sub ShowNum()
	str="<input name='titleNum' class='f1' id='titleNum' style='width: 68px'>"
	response.write(str)
End Sub

Sub ShowPhotoer()
	str="<input name='Photoer' id='Photoer' class='f1' style='width: 68px'>"
	response.Write(str)
End Sub

Sub WriteTop(CurrentID)
	str="<script src='Inc/noright.js' language='javascript'></script>"
	str=str&"<table width='738' height='62' border='0' align='center' cellpadding='0' cellspacing='0'>"
	str=str&"<tr><td width='183' valign='bottom' align='center'><a href='index.asp'><img src='"&LogoUrl&"' border='0' alt='"&SiteName&"' border='0'></a></td>"
	str=str&"<td width='462' valign='bottom' class='f1' align='right'>"
	set rs=conn.execute("select * from TopLink order by ID")
	do while not rs.eof
		str=str&"<b> ■</b><a href="""&rs("url")&""" target="""&rs("target")&"""><font color=""#FFFFFF"">"&rs("name")&"</font></a>"
		rs.movenext
	loop
	RsClose
	str=str&"<b><font color='#CCCCCC'><span class='red'> ■</span></font><span class='red'><a href='news.asp'>"&_
		"<span class='style3'>新闻快递</span></a></span><font color='#CCCCCC'><span class='red'> ■</span></font><span class='red'><a href='about.asp'>"&_
		"<span class='style3'>关于我们</span></a></span><font color='#CCCCCC'><span class='red'> <b>"&_
		"<font color='#CCCCCC'>■</font></b></span></font><a href='gb.asp'><span class='style3'>留言簿</span></a></b>&nbsp;&nbsp;</td>"&_
		"<td width='50' class='f1' valign='bottom'><strong><script language='javaScript' src='webbing.js'></script></strong>"&_
		"</td><td valign='bottom'><img src='images/count.gif'>&nbsp;</td>"&_
	  	"</tr></table><hr width='750' size='1' color='#666666'>"
	str=str&"<table width='738' border='0' align='center' cellpadding='0' cellspacing='0'>"
	str=str&"<tr><td align=""right"" style=""padding-right: 10px;"">"
	set rs=conn.execute("select ID,ClassName from ClassName order by RootID")
	str=str&"<a href=""index.asp""><font color=""#FFFFFF"">首页</font></a> "
	do while not rs.eof
		str=str&"| <a href=""ShowClass.asp?ClassName="&rs(1)&"&ID="&rs(0)&""">"
		if CurrentID=rs(0) then
			str=str&"<font color=""#FF0000"">"&rs(1)&"</font></a> "
		else
			str=str&"<font color=""#FFFFFF"">"&rs(1)&"</font></a> "
		end if
		rs.movenext
	loop
	rsclose
	str=str&"</td></tr></table><hr width='750' size='1' color='#666666'>"
	response.Write(str)
end sub

Sub ShowLinks(NextID)
	str="<table border='0' cellpadding='0' cellspacing='1' width='100%' align='center'>"
	set rs=conn.execute("select * from links order by ID desc")
	do while not rs.eof
	str=str&"<tr>"
		for i=1 to NextID
		if rs.eof then exit for
			str=str&"<td height='50' align='center'>"
			str=str&"<table width='100%' border='0' cellpadding='2' cellspacing='1' height='50'>"
			str=str&"<tr><td width='100%' height='37' align='center'>"
			str=str&"<a href='"&rs("url")&"' target='_blank'><img src='"&rs("logo")&"' width='80' height='31' border='0' alt='"&rs("name")&"'></a></td>"
			str=str&"</tr><tr><td>&nbsp;</td></tr></table></td>"
		rs.movenext
		next
	str=str&"</tr>"
	loop
	RsClose
	str=str&"</table>"
	response.Write(str)
End Sub

Sub WriteNews(NewID,NextID)
	i=0
	str="<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'>"
	set rs=conn.execute("select * from News order by ID desc")
	do while not rs.eof and i<=9
		str=str&"<tr>"
		for j=1 to NextID
		if rs.eof then exit for
			str=str&"<td height='20' width='50%'>"&i+1&".<a href='news.asp?ID="&rs("ID")&"&title="&rs("title")&"' target='_blank'>"
			title=rs("title")
			if len(title)>14 then title=left(title,12)&"……"
			if rs("ID")=NewID then
				str=str&"<font color='#FF0000'>"&title&"</font>"
			else
				str=str&"<font color='#CCCCCC'>"&title&"</font>"
			end if
			str=str&"</a></td>"
			rs.movenext
			i=i+1
		next
		str=str&"</tr>"
	loop
	rsclose
	str=str&"</table>"
	response.Write(str)	
End Sub
'########################
Function ObjectExists(oClass)
'########################
	On Error Resume Next
	Set obj=Server.CreateObject(oClass)
	If Err Then ObjectExists=False Else ObjectExists=True
	Set Obj=Nothing
End Function
%>