<%
Dim page,show,id,classid_s,classid_s01,show_webname,show_weburl,show_webkey,show_webdec,show_txtlink,show_piclink,show_class_link,pagenums
Dim show_topnotice,show_txtinfo,show_picinfo,show_topvote,show_vote
Dim show_n_title,show_n_author,show_n_date,show_n_hits,show_n_content,show_n_list
Dim show_i_id,show_i_title,show_i_author,show_i_date,show_i_hits,show_i_content,show_i_classid,show_i_keyword,show_i_classname,show_txt_list,show_pic_list,show_i_commentnum,show_i_hits_hits,show_i_hits_day,show_i_hits_week,show_i_hits_month
Dim show_i_pre,show_i_next,show_i_jj,show_i_position,show_i_likeinfo
Dim show_list_id,show_list_classname,show_list_keyword,show_list_desc,show_son_class
Dim show_skin_author,show_menu,show_map
Dim show_ad,show_ad_group,plug_name,plug_content,content_page,show_list_page
Dim show_c_title,show_topcomment,show_comment,show_infotags,show_toptags,show_tagslist,show_flashinfo
Dim show_keyword,show_search,other_id,other_title,other_content,other_link,show_other_class,show_tagname
'------------------------------------------------------------------------------------
'自定义全局变量
'------------------------------------------------------------------------------------
Dim sun_show_box1
Dim sun_show_box2
Dim sun_show_box3
Dim sun_show_page
Dim sun_show_listPic
Class sdcms_Power
   Public Sub sdcms_power(id)
     
	 set rs=conn.execute("select title,sdcms_content from sd_label where classid=0 order by id desc")
	 while not rs.eof
	  if instr(show,"{sdcms_"&rs(0)&"}")>0 then
		show=replace(show,"{sdcms_"&rs(0)&"}",rs(1))
	 end if
	 rs.movenext
	 wend
	 
	 set rs=conn.execute("select id,title from sd_label where classid=1 order by id desc")
	 while not rs.eof
	  if instr(show,"{sdcms_"&rs(1)&"}")>0 then
		show=replace(show,"{sdcms_"&rs(1)&"}",get_label(rs(0)))
	 end if
	 rs.movenext
	 wend
	 
     if instr(show,"{sdcms:webname}")>0 then
		show=replace(show,"{sdcms:webname}",sdcms_webname)
	 end if
	 
	 if instr(show,"{sdcms:weburl}")>0 then
		show=replace(show,"{sdcms:weburl}",sdcms_weburl)
	 end if
	 
	  if instr(show,"{sdcms:webdir}")>0 then
		show=replace(show,"{sdcms:webdir}",sdcms_root)
	 end if
	 
	 if instr(show,"{sdcms:webkey}")>0 then
		sdcms_webkey=conn.execute("select webkey from sd_const where id=1")(0)
		show=replace(show,"{sdcms:webkey}",sdcms_webkey)
	 end if
	 
	 if instr(show,"{sdcms:webdec}")>0 then
		sdcms_webdec=conn.execute("select webdec from sd_const where id=1")(0)
		show=replace(show,"{sdcms:webdec}",sdcms_webdec)
	 end if
	 
	 if instr(show,"{sdcms:version}")>0 then
		show=replace(show,"{sdcms:version}",sdcms_version)
	 end if
	 
	 if instr(show,"{sdcms:skin_author}")>0 then
	    showskin_author()
		show=replace(show,"{sdcms:skin_author}",show_skin_author)
	 end if
	 
	 if instr(show,"{sdcms:vote}")>0 then
	    showvote()
		show=replace(show,"{sdcms:vote}",show_vote)
	 end if
	 
	 if instr(show,"{sdcms:map}")>0 then
	    showmap(0)
		show=replace(show,"{sdcms:map}",show_map)
	 end if
	 
	 if instr(show,"{sdcms:plugname}")>0 then
		show=replace(show,"{sdcms:plugname}",plug_name)
	 end if
	 
	 if instr(show,"{sdcms:plugcontent}")>0 then
		show=replace(show,"{sdcms:plugcontent}",plug_content)
	 end if
	 
	 '公告显示页面
	 if instr(show,"{sdcms:notice_title}")>0 then
		show=replace(show,"{sdcms:notice_title}",show_n_title)
	 end if
	 
	 if instr(show,"{sdcms:notice_author}")>0 then
		show=replace(show,"{sdcms:notice_author}",show_n_author)
	 end if
	 
	 if instr(show,"{sdcms:notice_date}")>0 then
		show=replace(show,"{sdcms:notice_date}",show_n_date)
	 end if
	 
	 if instr(show,"{sdcms:notice_hits}")>0 then
		show=replace(show,"{sdcms:notice_hits}",show_n_hits)
	 end if
	 
	 if instr(show,"{sdcms:notice_content}")>0 then
		show=replace(show,"{sdcms:notice_content}",show_n_content)
	 end if
	 
	 '信息显示页面
	 if instr(show,"{sdcms:info_id}")>0 then
		show=replace(show,"{sdcms:info_id}",show_i_id)
	 end if
	 if instr(show,"{sdcms:info_title}")>0 then
		show=replace(show,"{sdcms:info_title}",show_i_title)
	 end if
	 
	 if instr(show,"{sdcms:info_author}")>0 then
	 if Isnull(show_i_author) Then show_i_author=""
		show=replace(show,"{sdcms:info_author}",show_i_author)
	 end if
	 
	 if instr(show,"{sdcms:info_date}")>0 then
		show=replace(show,"{sdcms:info_date}",show_i_date)
	 end if
	 
	 if instr(show,"{sdcms:info_jj}")>0 then
	 if Isnull(show_i_jj) Then show_i_jj=""
		show=replace(show,"{sdcms:info_jj}",show_i_jj)
	 end if
	 
	 if instr(show,"{sdcms:info_tags}")>0 then
	 if Isnull(show_infotags) Then show_infotags=""
		show=replace(show,"{sdcms:info_tags}",show_infotags)
	 end if
	 
	 if instr(show,"{sdcms:info_pre}")>0 then
		show=replace(show,"{sdcms:info_pre}",show_i_pre)
	 end if
	 
	 if instr(show,"{sdcms:info_next}")>0 then
		show=replace(show,"{sdcms:info_next}",show_i_next)
	 end if
	 
	 if instr(show,"{sdcms:info_commentnum}")>0 then
		show=replace(show,"{sdcms:info_commentnum}",show_i_commentnum)
	 end if
	 
	 if instr(show,"{sdcms:info_classid}")>0 then
		show=replace(show,"{sdcms:info_classid}",show_i_classid)
	 end if
	 
	  if instr(show,"{sdcms:info_position}")>0 then
	  showi_position()
		show=replace(show,"{sdcms:info_position}",show_i_position)
	 end if
	 
	 if instr(show,"{sdcms:info_keyword}")>0 then
		show=replace(show,"{sdcms:info_keyword}",show_i_keyword)
	 end if
	 
	 if instr(show,"{sdcms:info_content}")>0 then
		show=replace(show,"{sdcms:info_content}",show_i_content)
	 end if
	 
	 if instr(show,"{sdcms:list_keyword}")>0 then
	    showlist_keyword
		show=replace(show,"{sdcms:list_keyword}",show_list_keyword)
	 end if
	 
	 if instr(show,"{sdcms:list_desc}")>0 then
	    showlist_desc
		if show_list_desc<>"" then
		show=replace(show,"{sdcms:list_desc}",show_list_desc)
		else
		show=replace(show,"{sdcms:list_desc}","")
		end if
	 end if
	 
	 if instr(show,"{sdcms:list_id}")>0 then
		show=replace(show,"{sdcms:list_id}",classid_s01)
	 end if
	 '搜索页面
	 if instr(show,"{sdcms:keyword}")>0 then
		show=replace(show,"{sdcms:keyword}",key)
	 end if
     '单页面
	 if instr(show,"{sdcms:other_id}")>0 then
		show=replace(show,"{sdcms:other_id}",other_id)
	 end if
	 if instr(show,"{sdcms:other_title}")>0 then
		show=replace(show,"{sdcms:other_title}",other_title)
	 end if
	 if instr(show,"{sdcms:other_content}")>0 then
		show=replace(show,"{sdcms:other_content}",other_content)
	 end if
	 if instr(show,"{sdcms:other_link}")>0 then
		show=replace(show,"{sdcms:other_link}",other_link)
	 end if
	 if instr(show,"{sdcms:content_page}")>0 then
		show=replace(show,"{sdcms:content_page}",content_page)
	 end if
	 
	 if instr(show,"{sdcms:tagname}")>0 then
		show=replace(show,"{sdcms:tagname}",show_tagname)
	 end if
 
   runsub("{sdcms:menu")
   runsub("{sdcms:class_link")
   runsub("{sdcms:txtlink")
   runsub("{sdcms:piclink")
   runsub("{sdcms:topnotice")
   runsub("{sdcms:txtinfo")
   runsub("{sdcms:picinfo")
   runsub("{sdcms:topvote")
   runsub("{sdcms:likeinfo")
   runsub("{sdcms:notice_list")
   runsub("{sdcms:info_hits")
   runsub("{sdcms:info_classname")
   runsub("{sdcms:txt_list")
   runsub("{sdcms:pic_list")
   runsub("{sdcms:son_class")
   runsub("{sdcms:other_class")
   runsub("{sdcms:list_classname")
   runsub("{sdcms:c_title")
   runsub("{sdcms:topcomment")
   runsub("{sdcms:comment")
   runsub("{sdcms:search")
   runsub("{sdcms:ads")
   runsub("{sdcms:ad_group")
   runsub("{sdcms:top_tags")
   runsub("{sdcms:tags_list")
   runsub("{sdcms:flashinfo")
'------------------------------------------------------------------------------------
'自定义函数
'------------------------------------------------------------------------------------
   runsub("{sdcms:sun_1List")
   runsub("{sdcms:sun_2List")
   runsub("{sdcms:sun_3List")
   runsub("{sdcms:sun_Page")
   runsub("{sdcms:sun_indexPlist")
   
   if instr(show,"{sdcms:list_page}")>0 then
		show=replace(show,"{sdcms:list_page}",show_list_page)
		show_list_page=""
	end if
   End sub
      
   Public sub runsub(label)
		dim tmp1,tmp2,i
		dim tmpstr,para
		tmp2=1
		while instr(tmp2,show,label)>0
			tmp1=instr(tmp2,show,label)
			tmp2=instr(tmp1+1,show,"}")
			tmpstr=mid(show,tmp1,tmp2-tmp1)
			tmpstr=replace(tmpstr,"(","")
			tmpstr=replace(tmpstr,")","")
			tmpstr=trim(replace(tmpstr,label,""))
			para=split(tmpstr,",")
			on error resume next
			select case label
			case "{sdcms:sun_indexPlist"
				call showIndexPic(para(0),para(1),para(2),para(3),para(4),para(5),para(6),para(7))
				show=replace(show,label&"("&tmpstr&")}",sun_show_listPic)
				If Err Then
						echo "<br/>{sdcms:sun_indexPlist}标签有错误，请检查参数":Died
				End If 			
			case "{sdcms:sun_1List"
				call show1txtinfo(para(0),para(1),para(2),para(3),para(4),para(5),para(6))
				show=replace(show,label&"("&tmpstr&")}",sun_show_box1)
				If Err Then
						echo "<br/>{sdcms:sun_1List}标签有错误，请检查参数":Died
				End If 
			case "{sdcms:sun_2List"
				call show2txtinfo(para(0),para(1),para(2),para(3),para(4),para(5),para(6))
				show=replace(show,label&"("&tmpstr&")}",sun_show_box2)
				If Err Then
						echo "<br/>{sdcms:sun_2List}标签有错误，请检查参数":Died
				End If 
			case "{sdcms:sun_3List"
				call show3txtinfo(para(0),para(1),para(2),para(3),para(4),para(5),para(6))
				show=replace(show,label&"("&tmpstr&")}",sun_show_box3)
				If Err Then
						echo "<br/>{sdcms:sun_3List}标签有错误，请检查参数":Died
				End If 
			case "{sdcms:sun_Page"
				call showSunPageinfo(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",sun_show_page)
				If Err Then
						echo "<br/>{sdcms:sun_Page}标签有错误，请检查参数":Died
				End If 
			case "{sdcms:menu"
				call showmenu(para(0),para(1),para(2))
				show=replace(show,label&"("&tmpstr&")}",show_menu)
				If Err Then
						echo "<br/>{sdcms:menu}标签有错误，请检查参数":Died
				End If
			case "{sdcms:class_link"
				call showclass_link(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",show_class_link)
				If Err Then
						echo "<br/>{sdcms:class_link}标签有错误，请检查参数":Died
				End If
			case "{sdcms:txtlink"
				call showtxtlink(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_txtlink)
				If Err Then
						echo "<br/>{sdcms:txtlink}标签有错误，请检查参数":Died
				End If
			case "{sdcms:piclink"
				call showpiclink(para(0),para(1),para(2))
				show=replace(show,label&"("&tmpstr&")}",show_piclink)
				If Err Then
						echo "<br/>{sdcms:piclink}标签有错误，请检查参数":Died
				End If 
			case "{sdcms:topnotice"
				call showtopnotice(para(0),para(1),para(2),para(3))
				show=replace(show,label&"("&tmpstr&")}",show_topnotice)
				If Err Then
						echo "<br/>{sdcms:topnotice}标签有错误，请检查参数":Died
				End If
			 case "{sdcms:flashinfo"
				call showflashinfo(para(0),para(1),para(2),para(3),para(4))
				show=replace(show,label&"("&tmpstr&")}",show_flashinfo)
				If Err Then
						echo "<br/>{sdcms:flashinfo}标签有错误，请检查参数":Died
				End If
			case "{sdcms:txtinfo"
				call showtxtinfo(para(0),para(1),para(2),para(3),para(4),para(5),para(6))
				show=replace(show,label&"("&tmpstr&")}",show_txtinfo)
				If Err Then
						echo "<br/>{sdcms:txtinfo}标签有错误，请检查参数":Died
				End If 
			case "{sdcms:picinfo"
				call showpicinfo(para(0),para(1),para(2),para(3),para(4),para(5),para(6),para(7))
				show=replace(show,label&"("&tmpstr&")}",show_picinfo)
				If Err Then
						echo "<br/>{sdcms:picinfo}标签有错误，请检查参数":Died
				End If 
			case "{sdcms:topvote"
				call showtopvote(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",show_topvote)
				If Err Then
						echo "<br/>{sdcms:topvote}标签有错误，请检查参数":Died
				End If 
		    case "{sdcms:notice_list"
				call shown_list(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",show_n_list)
				If Err Then
						echo "<br/>{sdcms:notice_list}标签有错误，请检查参数":Died
				End If
			case "{sdcms:son_class"
				call showson_class(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_son_class)
				If Err Then
						echo "<br/>{sdcms:son_class}标签有错误，请检查参数":Died
				End If  
			case "{sdcms:other_class"
				call showother_class(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_other_class)
				If Err Then
						echo "<br/>{sdcms:other_class}标签有错误，请检查参数":Died
				End If  
			case "{sdcms:info_classname"
				call showi_classname(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_i_classname)
				If Err Then
						echo "<br/>{sdcms:info_classname}标签有错误，请检查参数":Died
				End If
			case "{sdcms:info_hits"
				call showi_hits(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_i_hits)
				If Err Then
						echo "<br/>{sdcms:info_hits}标签有错误，请检查参数":Died
				End If
			case "{sdcms:txt_list"
				call showtxt_list(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",show_txt_list)
				If Err Then
						echo "<br/>{sdcms:txt_list}标签有错误，请检查参数":Died
				End If
			case "{sdcms:pic_list"
				call showpic_list(para(0),para(1),para(2),para(3))
				show=replace(show,label&"("&tmpstr&")}",show_pic_list)
				If Err Then
						echo "<br/>{sdcms:pic_list}标签有错误，请检查参数":Died
				End If
			case "{sdcms:list_classname"
				call showlist_classname(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_list_classname)
				If Err Then
						echo "<br/>{sdcms:list_classname}标签有错误，请检查参数":Died
				End If
			case "{sdcms:c_title"
				call showc_title(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_c_title)
				If Err Then
						echo "<br/>{sdcms:c_title}标签有错误，请检查参数":Died
				End If
			case "{sdcms:topcomment"
				call showtopcomment(para(0),para(1),para(2),para(3))
				show=replace(show,label&"("&tmpstr&")}",show_topcomment)
				If Err Then
						echo "<br/>{sdcms:topcomment}标签有错误，请检查参数":Died
				End If
			case "{sdcms:comment"
				call showcomment(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",show_comment)
				If Err Then
						echo "<br/>{sdcms:comment}标签有错误，请检查参数":Died
				End If
			case "{sdcms:search"
				call showsearch(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_search)
				If Err Then
						echo "<br/>{sdcms:search}标签有错误，请检查参数":Died
				End If
			case "{sdcms:ads"
				call showad(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_ad)
				If Err Then
						echo "<br/>{sdcms:ads}标签有错误，请检查参数":Died
				End If
			case "{sdcms:ad_group"
				call showad_group(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_ad_group)
				If Err Then
						echo "<br/>{sdcms:ad_group}标签有错误，请检查参数":Died
				End If
			case "{sdcms:top_tags"
				call showtoptags(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",show_toptags)
				If Err Then
						echo "<br/>{sdcms:top_tags}标签有错误，请检查参数":Died
				End If
			case "{sdcms:tags_list"
				call showtagslist(para(0))
				show=replace(show,label&"("&tmpstr&")}",show_tagslist)
				If Err Then
						echo "<br/>{sdcms:tags_list}标签有错误，请检查参数":Died
				End If
			case "{sdcms:likeinfo"
				call showlikeinfo(para(0),para(1))
				show=replace(show,label&"("&tmpstr&")}",show_i_likeinfo)
				If Err Then
						echo "<br/>{sdcms:likeinfo}标签有错误，请检查参数":Died
				End If
				
            end select
		wend
   End sub
   

End Class

Function Get_label(t0)
set sdcms_ff=new sdcms_function
Get_label=""
set rs_label=conn.execute("select sdcms_sql,sdcms_begin,sdcms_over,sdcms_content,sdcms_title,sdcms_jj,sdcms_date from sd_label where id="&t0&"")
if not rs_label.eof then
Get_label=Get_label&rs_label(1)
	set rs_c=conn.execute(""&rs_label(0)&"")
	if rs_c.eof then
	Get_label=Get_label&"没有资料"
	end if
	while not rs_c.eof
	get_loops=rs_label(3)
	if instr(get_loops,"{id}")>0 then get_loops=replace(get_loops,"{id}",rs_c("id"))
	if instr(get_loops,"{author}")>0 then
		if rs_c("author")<>"" then
			get_loops=replace(get_loops,"{author}",rs_c("author"))
		end if
	end if
	if instr(get_loops,"{comment}")>0 then get_loops=replace(get_loops,"{comment}",rs_c("comment_num"))
	if instr(get_loops,"{title}")>0 then
		if rs_label(4)<>0 then
			get_loops=replace(get_loops,"{title}",sdcms_ff.gottopic(rs_c("title"),clng(rs_label(4))))
		else
			get_loops=replace(get_loops,"{title}",rs_c("title"))
		end if
	end if
	if instr(get_loops,"{link}")>0 then get_loops=replace(get_loops,"{link}",sdcms_root&sdcms_htmdir&sdcms_ff.LoadRecord("classdir","sd_class",rs_c("classid"))&rs_c("htmlname")&sdcms_filetxt)
	if instr(get_loops,"{pic}")>0 then get_loops=replace(get_loops,"{pic}",rs_c("pic"))
	if instr(get_loops,"{date}")>0 then
	    select case rs_label(6)
		case "1":get_loops=replace(get_loops,"{date}",sdcms_ff.sdcms_date(rs_c("adddate"),1))
		case "2":get_loops=replace(get_loops,"{date}",sdcms_ff.sdcms_date(rs_c("adddate"),0))
		case else:get_loops=replace(get_loops,"{date}",rs_c("adddate"))
		end select
	end if
	if instr(get_loops,"{hits}")>0 then get_loops=replace(get_loops,"{hits}",rs_c("hits"))
	if instr(get_loops,"{jj}")>0 then
		if rs_label(5)<>0 then
			get_loops=replace(get_loops,"{jj}",sdcms_ff.gottopic(rs_c("jj"),clng(rs_label(5))))
		else
			get_loops=replace(get_loops,"{jj}",rs_c("jj"))
		end if
	end if
	if instr(get_loops,"{tags}")>0 then
		if len(rs_c("tags"))>0 then
			get_loops=replace(get_loops,"{tags}",get_tags(rs_c("tags")))
		end if
	end if
	if instr(get_loops,"{classid}")>0 then get_loops=replace(get_loops,"{classid}",rs_c("classid"))
	Get_label=Get_label&get_loops
	rs_c.movenext
	wend
Get_label=Get_label&rs_label(2)	
end if
set sdcms_ff=nothing
End Function

Sub showmenu(t0,t1,t2)
show_menu=""
if t0<>0 then tj="top "&t0&""
set rs=conn.execute("select "&tj&" title,classdir,indexshow from sd_class where followid="&t1&" order by ordnum desc")
i=1
while not rs.eof
show_menu=show_menu&"<a href="&sdcms_root&sdcms_htmdir&rs(1)&">"&rs(0)&"</a>"
if t0<>0 then
	if clng(i)<>conn.execute("select count(id) from sd_class where followid="&t1&"")(0) and clng(i)<clng(t0) then show_menu=show_menu&t2
else
	if clng(i)<>conn.execute("select count(id) from sd_class where followid="&t1&"")(0) then show_menu=show_menu&t2
end if
i=i+1
rs.movenext
wend
End Sub

dim iis
Sub showmap(t0)
	Set Rs=Conn.Execute("select id,title,classdir From [sd_class] where followid="&t0&"  order by ordnum desc")
	while not rs.eof
		if t0<>0 then
			show_map=show_map&string(iis,"　")
		end if
		show_map=show_map&"<a href="&sdcms_root&sdcms_htmdir&rs(2)&">"&rs(1)&"</a>　<a href="""&sdcms_root&"plug/rss.asp?id="&rs(0)&"""><img src="""&sdcms_root&"editor/rss.gif"" alt=""订阅RSS"" align=""absmiddle"" border=""0"" /></a><br><br>"
	iis=iis+1
	showmap rs(0)
	iis=iis-1
	rs.Movenext
	wend
End Sub

Sub showskin_author
	set skins=conn.execute("select title,url from sd_skins where isused=1")
		if skins.eof then
			show_skin_author=""
		else
			show_skin_author="<a href="&skins(1)&" target=""_blank"">"&skins(0)&"</a>"
		end if
End Sub

Sub showclass_link(t0,t1)
set rs_link=conn.execute("select classdir,title from sd_class where id="&t0&"")
	if not rs_link.eof then
		select case t1
			case "0":show_class_link=sdcms_root&sdcms_htmdir&rs_link(0)
			case else:show_class_link="<a href="""&sdcms_root&sdcms_htmdir&rs_link(0)&""">"&rs_link(1)&"</a>"
		end select
	end if
End Sub

Sub showtxtlink(t0)
show_txtlink=""
if clng(t0)<>0 then topnums=" top "&t0&" "
sql="select "&topnums&" id,title,url from sd_link where ispic=0 and ispass=1 order by ordnum desc,id asc"
set rs=conn.execute(sql)
if rs.eof then
	show_txtlink=show_txtlink&"暂无链接"
end if
while not rs.eof
	show_txtlink=show_txtlink&"<a href="""&rs(2)&""" title="""&rs(1)&""" target=""_blank"">"&rs(1)&"</a>&nbsp;"
rs.movenext
wend
End Sub

Sub showpiclink(t0,t1,t2)
show_piclink=""
if clng(t0)<>0 then topnums=" top "&t0&" "
sql="select "&topnums&" id,title,url,pic from sd_link where ispic=1 and ispass=1 order by id asc"
set rs=conn.execute(sql)
if rs.eof then
	show_piclink=show_piclink&"<li>没有资料</li>"
end if
while not rs.eof
	show_piclink=show_piclink&"<li><a href="""&rs(2)&""" target=""_blank"" alt="""&rs(1)&"""><img src="""&rs(3)&""" border=""0"" width="""&t1&""" height="""&t2&"""></a></li>"
rs.movenext
wend
End Sub



Sub showtoptags(t0,t1)
	if not isnumeric(t0) then t0=10
	show_toptags=""
	Randomize
	if t0<>0 then  topnums=" top "&t0&" "
	sql="select "&topnums&" title,followid,tag_size,tag_font,tag_color from sd_tags where followid>0"
	select case t1
		case "1":sql=sql&" order by hits desc,id desc"
		case "2"
		If Is_sql=0 Then sql=sql&" order by rnd(-(id +" & rnd() & "))" else sql=sql&" order by newid()"
		case else:sql=sql&" order by id desc"
	end select
	set rs=conn.execute(sql)
	if rs.eof then
	show_toptags=show_toptags&"没有标签"
	end if
	while not rs.eof
	show_toptags=show_toptags&"<a href="""&sdcms_root&"tags/?/"&server.URLEncode(rs(0))&"/"" style=""font:"&rs(2)&" "&rs(3)&";color:"&rs(4)&""">"&rs(0)&"("&rs(1)&")</a> "
	rs.movenext
	wend
End Sub

Sub showtopnotice(t0,t1,t2,t3)
if clng(t0)<>0 then topnums=" top "&t0&" "
show_topnotice=""
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,adddate from sd_notice order by id desc"
set rs=conn.execute(sql)
if rs.eof then
	show_topnotice=show_topnotice&"<li>没有资料</li>"
end if
while not rs.eof
if clng(t2)<>0 then
	times="<span>"
	  select case t2
			 case "1":times=times&""&sdcms.sdcms_date(rs(2),1)&""
			 case "2":times=times&""&sdcms.sdcms_date(rs(2),0)&""
			 case else:times=times&""&rs(2)&""
	  end select
	times=times&"</span>"
else
	times=""
end if
if t3<>0 then openurl=" target=""_blank"""
	show_topnotice=show_topnotice&"<li>"&times&"<a href="""&sdcms_root&"notice/"&rs(0)&sdcms_filetxt&""""&openurl&">"&sdcms.gotTopic(rs(1),clng(t1))&"</a></li>"
rs.movenext
wend
set sdcms=nothing
End Sub

sub showflashinfo(t0,t1,t2,t3,t4)
set sdcms=new sdcms_function
if t4<>0 then
tj=" and classid in("&sdcms.get_son_classid(t4)&")"
end if
sql="select top "&t0&" id,title,pic,classid,issdcms,htmlname from sd_info where ispic=1 and right(pic,3)='jpg' and ispass=1 "&tj&" order by id desc"
set rs=conn.execute(sql)
if not rs.eof then
	while not rs.eof
		pics=pics+"|"&rs(2)&""
		links=links+"|"&sdcms_root&sdcms_htmdir&sdcms.loadrecord("classdir","sd_class",rs(3))&rs(5)&sdcms_filetxt&""
		texts=texts+"|"&left(rs(1),t3)&""
	rs.movenext
	wend
else
	pics=pics+"|"&sdcms_root&"editor/pics.jpg"
	links=links+"|"
	texts=texts+"|暂无数据"
end if
set sdcms=nothing
show_flashinfo="<script language=""javascript"">"&vbLf
show_flashinfo=show_flashinfo&" <!--"&vbLf
show_flashinfo=show_flashinfo&" var focus_width="&t1&"     //场景宽"&vbLf
show_flashinfo=show_flashinfo&" var focus_height="&t2&"　　//场景高"&vbLf
show_flashinfo=show_flashinfo&" var text_height=20　　　//文字说明字高，为0时不显示文本"&vbLf
show_flashinfo=show_flashinfo&" var swf_height = focus_height+text_height"&vbLf
show_flashinfo=show_flashinfo&" var pics='"&Mid(pics,2)&"'"&vbLf
show_flashinfo=show_flashinfo&" var links='"&Mid(links,2)&"'"&vbLf
show_flashinfo=show_flashinfo&" var texts='"&Mid(texts,2)&"' "&vbLf
show_flashinfo=show_flashinfo&" document.write('<object ID=""focus_flash"" classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"" width=""'+ focus_width +'"" height=""'+ swf_height +'"">');"&vbLf
show_flashinfo=show_flashinfo&" document.write('<param name=""allowScriptAccess"" value=""sameDomain""><param name=""movie"" value="""&sdcms_root&"plug/ad/02.swf""><param name=""quality"" value=""high""><param name=""bgcolor"" value=""#ffffff"">');"&vbLf
show_flashinfo=show_flashinfo&" document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');"&vbLf
show_flashinfo=show_flashinfo&" document.write('<param name=""FlashVars"" value=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"">');"&vbLf
show_flashinfo=show_flashinfo&" document.write('<embed ID=""focus_flash"" src="""&sdcms_root&"plug/ad/02.swf"" wmode=""opaque"" FlashVars=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"" menu=""false"" bgcolor=""#ffffff"" quality=""high"" width=""'+ focus_width +'"" height=""'+ focus_height +'"" allowScriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer""/>');  document.write('</object>');"&vbLf
show_flashinfo=show_flashinfo&"//-->"&vbLf
show_flashinfo=show_flashinfo&"</script>"&vbLf
end sub



Sub show1txtinfo(t0,t1,t2,t3,t4,t5,t6)
Dim tmpI
tmpI = 0
if clng(t0)<>0 then topnums=" top "&t0&" "
sun_show_box1=""
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,adddate,classid,htmlname from sd_info"
if  t5<>0  then sql=sql&" where classid in("&sdcms.get_son_classid(t5)&")"
if  t5<>0  then sql=sql&" and ispass=1 and iscreate=1 " else sql=sql&" where ispass=1 and iscreate=1 "
  sql=sql&" order by ontop desc, "
  select case t4
	  case "1":sql=sql&"isnice desc,id desc"
	  case "2":sql=sql&"comment_num desc,id desc"
	  case "3":sql=sql&"hits desc,id desc"
	  case "4":sql=sql&"dayhits desc,id desc"
	  case "5":sql=sql&"weekhits desc,id desc"
	  case "6":sql=sql&"monthhits desc,id desc"
	  case "7":sql=sql&"lastupdate desc,id desc"
	  case else:sql=sql&"id desc"
  end select
set rs=conn.execute(sql)
if rs.eof then
	sun_show_box1=sun_show_box1&"<li>没有资料</li>"&vblf
end if
while not rs.eof
if clng(t2)<>0 then
times="<span>"
  select case t2
         case "1":times=times&""&sdcms.sdcms_date(rs(2),1)&""
		 case "2":times=times&""&sdcms.sdcms_date(rs(2),0)&""
		 case else:times=times&""&rs(2)&""
  end select
times=times&"</span>"
else
times=""
end if
if t3<>0 then openurl=" target=""_blank"""
select case t6
case "1"
classurl=" [<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&""">"&sdcms.LoadRecord("title","sd_class",rs(3))&"</a>] "
end select
if tmpI < 3 then 
	sun_show_box1=sun_show_box1&"<li>"&times&classurl&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(4)&sdcms_filetxt&" "" "&openurl&" title="""&rs(1)&""">"&sdcms.gotTopic(rs(1),clng(t1))&"</a>&nbsp;&nbsp;<img src=""/skins/sseoo/images/new.gif""/></li>"&vblf
else
	sun_show_box1=sun_show_box1&"<li>"&times&classurl&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(4)&sdcms_filetxt&" "" "&openurl&" title="""&rs(1)&""">"&sdcms.gotTopic(rs(1),clng(t1))&"</a></li>"&vblf
end if
tmpI = tmpI + 1
rs.movenext
wend
set sdcms=nothing
End Sub



Sub show2txtinfo(t0,t1,t2,t3,t4,t5,t6)
Dim tmpI
tmpI = 0
if clng(t0)<>0 then topnums=" top "&t0&" "
sun_show_box2=""
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,adddate,classid,htmlname from sd_info"
if  t5<>0  then sql=sql&" where classid in("&sdcms.get_son_classid(t5)&")"
if  t5<>0  then sql=sql&" and ispass=1 and iscreate=1 " else sql=sql&" where ispass=1 and iscreate=1 "
  sql=sql&" order by ontop desc, "
  select case t4
	  case "1":sql=sql&"isnice desc,id desc"
	  case "2":sql=sql&"comment_num desc,id desc"
	  case "3":sql=sql&"hits desc,id desc"
	  case "4":sql=sql&"dayhits desc,id desc"
	  case "5":sql=sql&"weekhits desc,id desc"
	  case "6":sql=sql&"monthhits desc,id desc"
	  case "7":sql=sql&"lastupdate desc,id desc"
	  case else:sql=sql&"id desc"
  end select
set rs=conn.execute(sql)
if rs.eof then
	sun_show_box2=sun_show_box2&"<div class='box1_left2'>没有资料</div>"
end if
while not rs.eof
	if tmpI = 0 then
		sun_show_box2 = sun_show_box2 & "<div class='box1_left2'>"&vblf
		sun_show_box2 = sun_show_box2 & "<ul class='list2 clear'>"&vblf
	end if
if clng(t2)<>0 then
times="<span>"
  select case t2
         case "1":times=times&""&sdcms.sdcms_date(rs(2),1)&""
		 case "2":times=times&""&sdcms.sdcms_date(rs(2),0)&""
		 case else:times=times&""&rs(2)&""
  end select
times=times&"</span>"
else
times=""
end if
if t3<>0 then openurl=" target=""_blank"""
select case t6
case "1"
classurl=" [<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&""">"&sdcms.LoadRecord("title","sd_class",rs(3))&"</a>] "
end select
	sun_show_box2=sun_show_box2&"<li>"&times&classurl&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(4)&sdcms_filetxt&" "" "&openurl&" title="""&rs(1)&""">"&sdcms.gotTopic(rs(1),clng(t1))&"</a></li>"&vblf
tmpI = tmpI + 1
rs.movenext
if tmpI = 6 then
	sun_show_box2=sun_show_box2&"</ul>"&vblf
	sun_show_box2=sun_show_box2&"</div>"&vblf
	sun_show_box2=sun_show_box2&"<div class='box1_right2'>"&vblf
	sun_show_box2=sun_show_box2&"<ul class='list2 clear'>"&vblf
end if
if tmpI = 12 then
	sun_show_box2=sun_show_box2&"</ul>"&vblf
	sun_show_box2=sun_show_box2&"</div>"&vblf
end if
wend
if tmpI <> 12 then
	sun_show_box2=sun_show_box2&"</ul>"&vblf
	sun_show_box2=sun_show_box2&"</div>"&vblf
end if
set sdcms=nothing
End Sub


Sub show3txtinfo(t0,t1,t2,t3,t4,t5,t6)
Dim tmpI
tmpI = 0
if clng(t0)<>0 then topnums=" top "&t0&" "
sun_show_box3=""
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,adddate,classid,htmlname from sd_info"
if  t5<>0  then sql=sql&" where classid in("&sdcms.get_son_classid(t5)&")"
if  t5<>0  then sql=sql&" and ispass=1 and iscreate=1 " else sql=sql&" where ispass=1 and iscreate=1 "
  sql=sql&" order by ontop desc, "
  select case t4
	  case "1":sql=sql&"isnice desc,id desc"
	  case "2":sql=sql&"comment_num desc,id desc"
	  case "3":sql=sql&"hits desc,id desc"
	  case "4":sql=sql&"dayhits desc,id desc"
	  case "5":sql=sql&"weekhits desc,id desc"
	  case "6":sql=sql&"monthhits desc,id desc"
	  case "7":sql=sql&"lastupdate desc,id desc"
	  case else:sql=sql&"id desc"
  end select
set rs=conn.execute(sql)
if rs.eof then
	sun_show_box3=sun_show_box3&"<div class='box4_left'>没有资料</div>"
end if
while not rs.eof
	if tmpI = 0 then
		sun_show_box3 = sun_show_box3 & "<div class='box4_left'>"&vblf
		sun_show_box3 = sun_show_box3 & "<ul class='list3 clear'>"&vblf
	end if
if clng(t2)<>0 then
times="<span>"
  select case t2
         case "1":times=times&""&sdcms.sdcms_date(rs(2),1)&""
		 case "2":times=times&""&sdcms.sdcms_date(rs(2),0)&""
		 case else:times=times&""&rs(2)&""
  end select
times=times&"</span>"
else
times=""
end if
if t3<>0 then openurl=" target=""_blank"""
select case t6
case "1"
classurl=" [<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&""">"&sdcms.LoadRecord("title","sd_class",rs(3))&"</a>] "
end select
	sun_show_box3=sun_show_box3&"<li>"&times&classurl&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(4)&sdcms_filetxt&" "" "&openurl&" title="""&rs(1)&""">"&sdcms.gotTopic(rs(1),clng(t1))&"</a></li>"&vblf
tmpI = tmpI + 1
rs.movenext
if tmpI = 6 then
	sun_show_box3=sun_show_box3&"</ul>"&vblf
	sun_show_box3=sun_show_box3&"</div>"&vblf
	sun_show_box3=sun_show_box3&"<div class='box4_right'>"&vblf
	sun_show_box3=sun_show_box3&"<ul class='list3 clear'>"&vblf
end if
if tmpI = 12 then
	sun_show_box3=sun_show_box3&"</ul>"&vblf
	sun_show_box3=sun_show_box3&"</div>"&vblf
end if
wend
if Not rs.eof then
	if tmpI <> 12 then
		sun_show_box3=sun_show_box3&"</ul>"&vblf
		sun_show_box3=sun_show_box3&"</div>"&vblf
	end if
end if
set sdcms=nothing
End Sub


Sub showtxtinfo(t0,t1,t2,t3,t4,t5,t6)
if clng(t0)<>0 then topnums=" top "&t0&" "
show_txtinfo=""
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,adddate,classid,htmlname from sd_info"
if  t5<>0  then sql=sql&" where classid in("&sdcms.get_son_classid(t5)&")"
if  t5<>0  then sql=sql&" and ispass=1 and iscreate=1 " else sql=sql&" where ispass=1 and iscreate=1 "
  sql=sql&" order by ontop desc, "
  select case t4
	  case "1":sql=sql&"isnice desc,id desc"
	  case "2":sql=sql&"comment_num desc,id desc"
	  case "3":sql=sql&"hits desc,id desc"
	  case "4":sql=sql&"dayhits desc,id desc"
	  case "5":sql=sql&"weekhits desc,id desc"
	  case "6":sql=sql&"monthhits desc,id desc"
	  case "7":sql=sql&"lastupdate desc,id desc"
	  case else:sql=sql&"id desc"
  end select
set rs=conn.execute(sql)
if rs.eof then
	show_txtinfo=show_txtinfo&"<li>没有资料</li>"
end if
while not rs.eof
if clng(t2)<>0 then
times="<span>"
  select case t2
         case "1":times=times&""&sdcms.sdcms_date(rs(2),1)&""
		 case "2":times=times&""&sdcms.sdcms_date(rs(2),0)&""
		 case else:times=times&""&rs(2)&""
  end select
times=times&"</span>"
else
times=""
end if
if t3<>0 then openurl=" target=""_blank"""
select case t6
case "1"
classurl=" [<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&""">"&sdcms.LoadRecord("title","sd_class",rs(3))&"</a>] "
end select
	show_txtinfo=show_txtinfo&"<li>"&times&classurl&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(4)&sdcms_filetxt&" "" "&openurl&" title="""&rs(1)&""">"&sdcms.gotTopic(rs(1),clng(t1))&"</a></li>"
rs.movenext
wend
set sdcms=nothing
End Sub


Sub showIndexPic(t0,t1,t2,t3,t4,t5,t6,t7)
if clng(t0)<>0 then topnums=" top "&t0&" "
sun_show_listPic=""
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,pic,classid,issdcms,htmlname from sd_info where ispic=1"
if t6<>0 then sql=sql&" and classid in("&sdcms.get_son_classid(t6)&")"
  sql=sql&" and ispass=1 and iscreate=1 "
  sql=sql&" order by ontop desc, "
  select case t5
	  case "1":sql=sql&"isnice desc,id desc"
	  case "2":sql=sql&"comment_num desc,id desc"
	  case "3":sql=sql&"hits desc,id desc"
	  case "4":sql=sql&"dayhits desc,id desc"
	  case "5":sql=sql&"weekhits desc,id desc"
	  case "6":sql=sql&"monthhits desc,id desc"
	  case "7":sql=sql&"lastupdate desc,id desc"
	  case else:sql=sql&"id desc"
  end select
set rs=conn.execute(sql)
if rs.eof then
	sun_show_listPic=sun_show_listPic&"<td>没有资料</td>"
end if
while not rs.eof
  
if t4<>0 then openurl=" target=""_blank"""
select case t7
case "1"
classurl=" [<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&""">"&sdcms.LoadRecord("title","sd_class",rs(3))&"</a>] "
end select
	sun_show_listPic=sun_show_listPic&"<td>"&times&classurl&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(5)&sdcms_filetxt&" "" "&openurl&" title="""&rs(1)&""">"
	sun_show_listPic=sun_show_listPic&"<img class=""img_kuang_1px"" src="""&rs(2)&" "" title="" "&rs(1)&" "" width="""&t2&""" height="""&t3&""" border=""0"">"
	if clng(t1)<>0 then
	sun_show_listPic=sun_show_listPic&"<br>"&sdcms.gotTopic(rs(1),clng(t1))&""
	end if
	sun_show_listPic=sun_show_listPic&"</a></td>"
rs.movenext
wend
set sdcms=nothing
End Sub




Sub showpicinfo(t0,t1,t2,t3,t4,t5,t6,t7)
if clng(t0)<>0 then topnums=" top "&t0&" "
show_picinfo=""
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,pic,classid,issdcms,htmlname from sd_info where ispic=1"
if t6<>0 then sql=sql&" and classid in("&sdcms.get_son_classid(t6)&")"
  sql=sql&" and ispass=1 and iscreate=1 "
  sql=sql&" order by ontop desc, "
  select case t5
	  case "1":sql=sql&"isnice desc,id desc"
	  case "2":sql=sql&"comment_num desc,id desc"
	  case "3":sql=sql&"hits desc,id desc"
	  case "4":sql=sql&"dayhits desc,id desc"
	  case "5":sql=sql&"weekhits desc,id desc"
	  case "6":sql=sql&"monthhits desc,id desc"
	  case "7":sql=sql&"lastupdate desc,id desc"
	  case else:sql=sql&"id desc"
  end select
set rs=conn.execute(sql)
if rs.eof then
	show_picinfo=show_picinfo&"<li>没有资料</li>"
end if
while not rs.eof
  
if t4<>0 then openurl=" target=""_blank"""
select case t7
case "1"
classurl=" [<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&""">"&sdcms.LoadRecord("title","sd_class",rs(3))&"</a>] "
end select
	show_picinfo=show_picinfo&"<li>"&times&classurl&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(5)&sdcms_filetxt&" "" "&openurl&" title="""&rs(1)&""">"
	show_picinfo=show_picinfo&"<img src=""  "&rs(2)&" "" title="" "&rs(1)&" "" width="" "&t2&" "" height="" "&t3&" "" border=""0"">"
	if clng(t1)<>0 then
	show_picinfo=show_picinfo&"<br>"&sdcms.gotTopic(rs(1),clng(t1))&""
	end if
	show_picinfo=show_picinfo&"</a></li>"
rs.movenext
wend
set sdcms=nothing
End Sub

Sub showlikeinfo(t0,t1)
show_i_likeinfo=""
this_tags=conn.execute("select tags from sd_info where id="&show_i_id&" and iscreate=1 ")(0)
if len(this_tags)>0 then
	this_tags=split(this_tags,",")
	for i=0 to ubound(this_tags)
		if len(trim(this_tags(i)))>0 then
			tj=tj&"or title like '%"&trim(this_tags(i))&"%' "
		end if
	next
	tj=mid(tj,3)
end if
if tj<>"" then tj="where "&tj&""
if clng(t0)<>0 then topnums=" top "&t0&" "
set sdcms=new sdcms_function
sql="select "&topnums&" id,title,adddate,classid,htmlname from sd_info "&tj&" order by id desc"
set rs=conn.execute(sql)
if rs.eof then
	show_i_likeinfo=show_i_likeinfo&"<li>没有资料</li>"
end if
while not rs.eof
show_i_likeinfo=show_i_likeinfo&"<li>"&times&"<a href="""&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(4)&sdcms_filetxt&" ""title="""&rs(1)&""">"&sdcms.gotTopic(rs(1),clng(t1))&"</a></li>"
rs.movenext
wend
set sdcms=nothing

End Sub

Sub showtopvote(t0,t1)
show_topvote=""
sql="select top 1 id,title,vote,result,stype from sd_vote"
if clng(t0)<>0 then sql=sql&" where id="&clng(t0)&""
sql=sql&" order by id desc"
set rs=conn.execute(sql)
if rs.eof then
show_topvote=show_topvote&"<li>没有资料</li>"
else
   if rs(4)=1 then
   v_type="radio"
   else
   v_type="checkbox"
   end if
   show_topvote=show_topvote&"<form action="""&sdcms_root&"plug/vote.asp?id="&rs(0)&"&action=add"" target=""_blank"" method=""post"" onsubmit=""return postform(this)"">"
   show_topvote=show_topvote&"<li><b>"&rs(1)&"</b></li>"
   result=split(rs(3),"|")
   for i=0 to ubound(result)
   next
   vote=split(rs(2),"|")
   for i=0 to ubound(vote)-1
   show_topvote=show_topvote&"<li><input type="""&v_type&"""  name=""vote"" value="""&i&""">"&vote(i)&"</li>"  
   next
   show_topvote=show_topvote&"<li><input type=""submit"" value=""投票"" class="""&t1&""" >  <input type=""button"" onclick=""window.open('"&sdcms_root&"plug/vote.asp?id="&rs(0)&"&action=shows')"" value=""查看"" class="""&t1&""" ></li>"
   show_topvote=show_topvote&"</form>"
end if
End Sub

Sub showi_classname(t0)
	show_i_classname=""
	set rs_i=conn.execute("select classdir,title from sd_class where id="&show_i_classid&"")
	if not rs_i.eof then
		if clng(t0)=0 then
			show_i_classname=show_i_classname&rs_i(1)
		else
			show_i_classname=show_i_classname&"<a href="""&sdcms_root&sdcms_htmdir&rs_i(0)&""">"&rs_i(1)&"</a>"
		end if
	end if
End Sub

Sub showi_position
show_i_position=""
partentids=conn.execute("select partentid from sd_class where id="&show_i_classid&"")(0)
if instr(partentids,",")>0 then
	partentids=split(partentids,",")
	for i=ubound(partentids) to 0 step -1 
		set rs=conn.execute("select classdir,title from sd_class where id="&partentids(i)&"")
		if not rs.eof then
			show_i_position=show_i_position&" > <a href="&sdcms_root&sdcms_htmdir&rs(0)&">"&rs(1)&"</a>"
		end if
	next
else
	set rs=conn.execute("select classdir,title from sd_class where id="&show_i_classid&"")
	if not rs.eof then
		show_i_position=show_i_position&" > <a href="&sdcms_root&sdcms_htmdir&rs(0)&">"&rs(1)&"</a>"
	end if
end if
End sub

Sub showi_hits(t0)
	select case t0
		   case "0":show_i_hits=show_i_hits_hits
		   case "1":show_i_hits=show_i_hits_day
		   case "2":show_i_hits=show_i_hits_week
		   case "3":show_i_hits=show_i_hits_month
		   case else:show_i_hits=show_i_hits_hits
	end select
End Sub

Sub showlist_classname(t0)
	show_list_classname=""
	set rs_i=conn.execute("select classdir,title from sd_class where id="&classid_s01&"")
	if not rs_i.eof then
		if clng(t0)=0 then
			show_list_classname=show_list_classname&rs_i(1)
		else
			show_list_classname=show_list_classname&"<a href="""&sdcms_root&sdcms_htmdir&rs_i(0)&""">"&rs_i(1)&"</a>"
		end if
	end if
End Sub

Sub showlist_keyword
	show_list_keyword=""
	set rs_i=conn.execute("select keyword from sd_class where id="&classid_s01&"")
	if not rs_i.eof then
		show_list_keyword=rs_i(0)	 
	end if
End Sub

Sub showlist_desc
	show_list_desc=""
	set rs_i=conn.execute("select class_desc from sd_class where id="&classid_s01&"")
	if not rs_i.eof then
		show_list_desc=rs_i(0)
	end if
End Sub

Sub showson_class(t0)
show_son_class=""
set rs=conn.execute("select id,title,classdir,indexshow from sd_class where followid="&t0&" order by ordnum desc")
if rs.eof then
  p_classid=conn.execute("select followid from sd_class where id="&t0&"")(0)
  if p_classid<>0 then
     set rs_p=conn.execute("select id,title,classdir,indexshow from sd_class where followid="&p_classid&" order by ordnum desc")
	 while not rs_p.eof
	 show_son_class=show_son_class&"<li><a href="""&sdcms_root&sdcms_htmdir&rs_p(2)&files&""">"
	 if rs_p(0)=clng(t0) then show_son_class=show_son_class&"<b>"
	 show_son_class=show_son_class&""&rs_p(1)&""
	 if rs_p(0)=clng(t0) then show_son_class=show_son_class&"</b>"
	show_son_class=show_son_class&"</a></li>"
	 rs_p.movenext
	 wend
  end if
end if
while not rs.eof
show_son_class=show_son_class&"<li><a href="""&sdcms_root&sdcms_htmdir&rs(2)&files&""">"&rs(1)&"</a></li>"
rs.movenext
wend
End Sub

Sub showother_class(t0)
show_other_class=""
set rs=conn.execute("select id,title,htmlname,pagedir from sd_other where followid="&t0&" order by ordnum desc")
if rs.eof then
  set rs1=conn.execute("select followid from sd_other where id="&t0&"")(0)
  if rs1.eof then o_classid=0 else o_classid=rs1(0)  
  if o_classid<>0 then
     set rs_p=conn.execute("select id,title,htmlname,pagedir from sd_other where followid="&o_classid&" order by ordnum desc")
	 while not rs_p.eof
	 files=rs(3)&rs_p(2)&sdcms_filetxt
	 show_other_class=show_other_class&"<li><a href="""&files&""">"
	 if rs_p(0)=clng(t0) then show_other_class=show_other_class&"<b>"
	 show_other_class=show_other_class&""&rs_p(1)&""
	 if rs_p(0)=clng(t0) then show_other_class=show_other_class&"</b>"
	 show_other_class=show_other_class&"</a></li>"
	 rs_p.movenext
	 wend
  end if
end if
while not rs.eof
files=rs(3)&rs(2)&sdcms_filetxt
show_other_class=show_other_class&"<li><a href="""&files&""">"&rs(1)&"</a></li>"
rs.movenext
wend
End Sub

Sub shown_list(t0,t1)
set sdcms=new sdcms_function
show_n_list=""
if t1<>0 then openurl=" target=""_blank"""
pages = 20
set rs=server.CreateObject("adodb.recordset")
sql="select id,title,adddate from sd_notice order by id desc"
rs.open sql,conn,1,1
if rs.eof then
	show_n_list=show_n_list&"<li>没有资料</li>"
else
	rs.pagesize = pages
	maxpagecount=rs.pagecount
	rs.absolutepage = page 
	rcount1=0
	pagestart=page-5
	pageend=page+5
	if pagestart<1 then
	pagestart=1
	end if
	if pageend>maxpagecount then
	pageend=maxpagecount
	end if
	rcount=rs.RecordCount
do while not rs.eof and rcount1 <rs.pagesize
	if clng(t0)<>0 then
		times="<span>"
	  select case t0
			 case "1":times=times&""&sdcms.sdcms_date(rs(2),1)&""
			 case "2":times=times&""&sdcms.sdcms_date(rs(2),0)&""
			 case else:times=times&""&rs(2)&""
	  end select
		times=times&"</span>"
	else
		times=""
	end if
	show_n_list=show_n_list&"<li>"&times&"<a href='"&rs(0)&""&sdcms_filetxt&"' title='"&rs(1)&"' "&openurl&">"&rs(1)&"</a></li>" 
 rs.movenext
 rcount1=rcount1+1
 loop
end if 

if rcount>0 then
    if clng(page)=1 then
	show_list_page=show_list_page&"<a>首页</a>"
	else
	show_list_page=show_list_page&"<a href=./>首页</a>"
	end if
	if  clng(page)=1 and maxpagecount>=1 then  
		show_list_page=show_list_page&"<a>上一页</a>"
	elseif page-2=0 then
		show_list_page=show_list_page&"<a href=./>上一页</a>"
	else
		show_list_page=show_list_page&"<a href=index_"&page-2&""&sdcms_filetxt&">上一页</a>"
	end if
	for i=pagestart to pageend
		if i=0 then i=1 end if
			if i=clng(page) then 
				str="<span>"&i&"</span>" 
			else 
			    if i=1 then
					str="<a href=./>"&i&"</a>"
				else
					str="<a href=index_"&i-1&""&sdcms_filetxt&">"&i&"</a>"
				end if
			end if
		strurl=""&str&""
		show_list_page=show_list_page&strurl
	next
	if page=maxpagecount then
		show_list_page=show_list_page&"<a>下一页</a>"
	elseif page<>""&maxpagecount&"" then
		show_list_page=show_list_page&"<a href=index_"&page&""&sdcms_filetxt&">下一页</a>"
	else
		show_list_page=show_list_page&"<a>下一页</a>"
	end if
	if clng(page)<clng(pageend) then
	show_list_page=show_list_page&"<a href=index_"&maxpagecount-1&""&sdcms_filetxt&">未页</a>"
	else
	show_list_page=show_list_page&"<a>未页</a>"
	end if
	show_list_page=show_list_page&"<a>页次:"&page&"/"&maxpagecount&"</a><a>总计:"&rcount&" </a>"
end if
set sdcms=nothing
End Sub

Sub showtxt_list(t0,t1)
set sdcms=new sdcms_function
show_txt_list=""
if t1<>0 then openurl=" target=""_blank"""
pages =pagenums
set rs=server.CreateObject("adodb.recordset")
sql="select id,title,adddate,classid,htmlname from sd_info where classid in("&classid_s&") and ispass=1 and iscreate=1  order by id desc"
rs.open sql,conn,1,1
if rs.eof then
	show_txt_list=show_txt_list&"<li>没有资料</li>"
else
	rs.pagesize = pages
	maxpagecount=rs.pagecount
	rs.absolutepage = page 
	rcount1=0
	pagestart=page-5
	pageend=page+5
	if pagestart<1 then
	pagestart=1
	end if
	if pageend>maxpagecount then
	pageend=maxpagecount
	end if
	rcount=rs.RecordCount
do while not rs.eof and rcount1 <rs.pagesize
	if clng(t0)<>0 then
		times="<span class=""right"">"
	  select case t0
			 case "1":times=times&""&sdcms.sdcms_date(rs(2),1)&""
			 case "2":times=times&""&sdcms.sdcms_date(rs(2),0)&""
			 case else:times=times&""&rs(2)&""
	  end select
		times=times&"</span>"
	else
		times=""
	end if
	show_txt_list=show_txt_list&"<li>"&times&"<a href='"&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(4)&""&sdcms_filetxt&"' title='"&rs(1)&"' "&openurl&">"&sdcms.gotTopic(rs(1),40)&"</a></li>" 
 rs.movenext
 rcount1=rcount1+1
 loop
end if 
if rcount>0 then
    if clng(page)=1 then
	show_list_page=show_list_page&"首页&nbsp;"
	else
	show_list_page=show_list_page&"<a href=./>首页</a>&nbsp;"
	end if
	if  clng(page)=1 and maxpagecount>=1 then  
		show_list_page=show_list_page&"上一页&nbsp;"
	elseif page-2=0 then
		show_list_page=show_list_page&"<a href=./>上一页</a>&nbsp;"
	else
		show_list_page=show_list_page&"<a href=index_"&page-2&""&sdcms_filetxt&">上一页</a>&nbsp;"
	end if
	for i=pagestart to pageend
		if i=0 then i=1 end if
			if i=clng(page) then 
				str="<span>"&i&"</span>&nbsp;" 
			else 
			    if i=1 then
					str="<a href=./>"&i&"</a>&nbsp;"
				else
					str="<a href=index_"&i-1&""&sdcms_filetxt&">"&i&"</a>&nbsp;"
				end if
			end if
		strurl=""&str&""
		show_list_page=show_list_page&strurl
	next
	if page=maxpagecount then
		show_list_page=show_list_page&"下一页&nbsp;"
	elseif page<>""&maxpagecount&"" then
		show_list_page=show_list_page&"<a href=index_"&page&""&sdcms_filetxt&">下一页</a>&nbsp;"
	else
		show_list_page=show_list_page&"下一页&nbsp;"
	end if
	if clng(page)<clng(pageend) then
	show_list_page=show_list_page&"<a href=index_"&maxpagecount-1&""&sdcms_filetxt&">未页</a>&nbsp;"
	else
	show_list_page=show_list_page&"未页&nbsp;"
	end if
	show_list_page=show_list_page&"页次:"&page&"/"&maxpagecount&"&nbsp;总计:"&rcount&" &nbsp;"
end if
set sdcms=nothing
End Sub

Sub showpic_list(t0,t1,t2,t3)
set sdcms=new sdcms_function
show_pic_list=""
if t3<>0 then openurl=" target=""_blank"""
pages = pagenums
set rs=server.CreateObject("adodb.recordset")
sql="select id,title,pic,classid,ispic,issdcms,htmlname from sd_info where classid in("&classid_s&") and ispass=1 and iscreate=1  order by id desc"
rs.open sql,conn,1,1
if rs.eof then
	show_pic_list=show_pic_list&"<li>没有资料</li>"
else
	rs.pagesize = pages
	maxpagecount=rs.pagecount
	rs.absolutepage = page 
	rcount1=0
	pagestart=page-5
	pageend=page+5
	if pagestart<1 then
	pagestart=1
	end if
	if pageend>maxpagecount then
	pageend=maxpagecount
	end if
	rcount=rs.RecordCount
do while not rs.eof and rcount1 <rs.pagesize
	 if rs(4)=0 then
		pic=sdcms_root&"editor/nopic.jpg"
	 else
		pic=rs(2)
	 end if
	show_pic_list=show_pic_list&"<li><a href='"&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(6)&""&sdcms_filetxt&"' title='"&rs(1)&"' "&openurl&"><img src="""&pic&""" width="&t0&" height="&t1&"></a>"
	if clng(t2)<>0 then
	show_pic_list=show_pic_list&"<br><a href='"&sdcms_root&sdcms_htmdir&sdcms.LoadRecord("classdir","sd_class",rs(3))&rs(6)&""&sdcms_filetxt&"' title='"&rs(1)&"' "&openurl&">"&sdcms.gottopic(rs(1),clng(t2))&"</a>"
	end if
	show_pic_list=show_pic_list&"</li>" 
 rs.movenext
 rcount1=rcount1+1
 loop
end if 
if rcount>0 then
    if clng(page)=1 then
	show_list_page=show_list_page&"首页&nbsp;"
	else
	show_list_page=show_list_page&"<a href=./>首页</a>"
	end if
	if  clng(page)=1 and maxpagecount>=1 then  
		show_list_page=show_list_page&"上一页&nbsp;"
	elseif page-2=0 then
		show_list_page=show_list_page&"<a href=./>上一页</a>"
	else
		show_list_page=show_list_page&"<a href=index_"&page-2&""&sdcms_filetxt&">上一页</a>"
	end if
	for i=pagestart to pageend
		if i=0 then i=1 end if
			if i=clng(page) then 
				str="<span>"&i&"</span>&nbsp;" 
			else 
			    if i=1 then
					str="<a href=./>"&i&"</a>&nbsp;"
				else
					str="<a href=index_"&i-1&""&sdcms_filetxt&">"&i&"</a>&nbsp;"
				end if
			end if
		strurl=""&str&""
		show_list_page=show_list_page&strurl
	next
	if page=maxpagecount then
		show_list_page=show_list_page&"下一页&nbsp;"
	elseif page<>""&maxpagecount&"" then
		show_list_page=show_list_page&"<a href=index_"&page&""&sdcms_filetxt&">下一页</a>&nbsp;"
	else
		show_list_page=show_list_page&"下一页&nbsp;"
	end if
	if clng(page)<clng(pageend) then
	show_list_page=show_list_page&"<a href=index_"&maxpagecount-1&""&sdcms_filetxt&">未页</a>"
	else
	show_list_page=show_list_page&"未页&nbsp;"
	end if
	show_list_page=show_list_page&"页次:"&page&"/"&maxpagecount&"&nbsp;总计:"&rcount&" &nbsp;"
end if
set sdcms=nothing
End Sub

Sub showc_title(t0)
set rs=conn.execute("select id,title,classid,htmlname from sd_info where id="&id&" and iscreate=1 ")
	if not rs.eof then
		filename=""&sdcms_root&sdcms_htmdir&sdcms_f.sdcms.LoadRecord("classdir","sd_class",rs(2))&rs(3)&sdcms_filetxt
		if t0=0 then
			show_c_title=""&rs(1)&""
		elseif t0=1 then
			show_c_title="<a href="&filename&">"&rs(1)&"</a>"
		else
			show_c_title="<a href="&filename&" target=_blank>"&rs(1)&"</a>"
		end if
	end if
End Sub

Sub showtopcomment(t0,t1,t2,t3)
    set sdcms_t=new sdcms_function
	show_topcomment=""
	sql="select top "&t0&" id,title from sd_info order by comment_num desc,id desc"
	set rs=conn.execute(sql)
	if rs.eof then
		show_topcomment="没有资料"
	end if
	while not rs.eof
		show_topcomment=show_topcomment&"<li>"
	if t3=0 then
		filename="plug/comment.asp?id="&rs(0)
	elseif t3=1 then
		filename="../plug/comment.asp?id="&rs(0)
	else
		filename="comment.asp?id="&rs(0)
	end if
	if t2<>0 then openurl=" target=""_blank"""
	show_topcomment=show_topcomment&"<a href="&filename&""&openurl&">"&sdcms_t.gottopic(rs(1),clng(t1))&"</a>"
	show_topcomment=show_topcomment&"</li>"
	rs.movenext
	wend
	set sdcms_t=nothing
End Sub

Sub showad(t0)
set rs=conn.execute("select id from sd_ad where id="&t0&"")
if rs.eof then
show_ad="没找到广告信息，请检查标签是否正确"
else
show_ad="<script src="""&sdcms_root&"plug/ad.asp?id="&rs(0)&"&t="&t1&"&action=0"" language=""javascript""></script>"
end if
End Sub


't0 		：		ID号
't1			:		读取字数
Sub showSunPageinfo(t0,t1)
	set sdcms = New Sdcms_Function
	set rs = conn.Execute("select content from sd_other where id = "&t0)
	if rs.eof then
		sun_show_page = "没有读取到数据信息"
	else
		if t1 = 0 then
			sun_show_page = rs(0)
		else
			sun_show_page = sdcms.gotTopic(sdcms.Removehtml(rs(0)),clng(t1))
		end if
	end if
	set sdcms=nothing
End Sub

Sub showad_group(t0)
set rs=conn.execute("select id from sd_ad_group where id="&t0&"")
if rs.eof then
show_ad_group="没找到广告组信息，请检查标签是否正确"
else
show_ad_group="<script src="""&sdcms_root&"plug/ad.asp?id="&rs(0)&"&t="&t1&"&action=1"" language=""javascript""></script>"
end if
End Sub
%>