<%
'------------------------------------特别说明--------------------------------------
'下面的代码都用于首页的调用
'如果操作不慎导致首页错误，请把以前备份的文件覆盖回去，或者下载HSCMS原文件覆盖
'HSCMS开发 www.2332.cn
'----------------------------------------------------------------------------------
sub runsub(label)
	dim tmp1,tmp2,i
	dim tmpstr,para
	tmp2=1
	while instr(tmp2,Index_Tmp,label)>0
		tmp1=instr(tmp2,Index_Tmp,label)
		tmp2=instr(tmp1+1,Index_Tmp,"}")
		tmpstr=mid(Index_Tmp,tmp1,tmp2-tmp1)
		tmpstr=replace(tmpstr,"(","")
		tmpstr=replace(tmpstr,")","")
		tmpstr=trim(replace(tmpstr,label,""))
		para=split(tmpstr,",")
		
		select case label
        case "{$Article_List"
			Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Article_List(para(0),para(1),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),cint(para(6)),cint(para(7)),para(8)))
		case "{$Flash_Pic"
			Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Flash_Pic(para(0),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5))))
		case "{$Down_List"
		    Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Main_List("down",cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),para(6)))
		case "{$Flea_List"
		    Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Main_List("flea",cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),para(6)))
		case "{$Blog_List"
		    Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Main_List("blog",cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),para(6)))
		case "{$GB_List"
		    Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Main_List("gbook",cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),para(6)))
		case "{$Pris_List"
		    Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Main_List("pris",cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),para(6)))
		case "{$Job_List"
            Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Main_List("job",cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),para(6)))
		case "{$Job_Person_List"
            Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Main_List("job_person",cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5)),para(6)))

		case "{$BBS_List"
		    Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",BBS_List(cint(para(0)),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),para(5)))
		case "{$Pic_List"
			Index_Tmp=replace(Index_Tmp,label&"("&tmpstr&")}",Pic_List(para(0),cint(para(1)),cint(para(2)),cint(para(3)),cint(para(4)),cint(para(5))))
        end select
	wend
end sub


'---------------------------新闻----------------------------
function Flash_Pic(channel,pic_width,pic_height,txt_height,cs_tnum,cs_cnum)
dim id,pic,pics1,texts1,links1,tmp

sql="select top "&cs_tnum&" id,topic,pic from "&channel&" where hidden=1 and ispic=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
pic=rs("pic")
pic=joekoe_cms.code_html(pic,1,0)
if instr(pic,"://")<1 then
pic=joekoe_cms.web_upload&pic
end if

pics1= pics1&"|"&pic
links1= links1&"|"&channel&"/view.asp?id="&id
texts1= texts1&"|"&joekoe_cms.code_html(rs("topic"),1,cs_cnum)
rs.movenext
loop
rs.close
    if left(pics1,1)="|" then pics1=right(pics1,len(pics1)-1)
    if left(links1,1)="|" then links1=right(links1,len(links1)-1)
    if left(texts1,1)="|" then texts1=right(texts1,len(texts1)-1)

 tmp=vbcrlf&"<script type=""text/javascript"">"&_
  vbcrlf&"<!--"&_
  vbcrlf&"var focus_width="&pic_width&_
  vbcrlf&"var focus_height="&pic_height&_
  vbcrlf&"var text_height="&txt_height&_
  vbcrlf&"var swf_height = focus_height+text_height"&vbcrlf&_
  
  vbcrlf&"var pics='"&pics1&"'"&_
  vbcrlf&"var links='"&links1&"'"&_
  vbcrlf&"var texts='"&texts1&"'"&vbcrlf&_
  
vbcrlf&"document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"" width=""'+ focus_width +'"" height=""'+ swf_height +'"">');"&_
vbcrlf&"document.write('<param name=""allowscriptAccess"" value=""sameDomain""><param name=""movie"" value=""images/pic.swf""><param name=""quality"" value=""high""><param name=""bgcolor"" value=""#ffeabb"">');"&_
vbcrlf&"document.write('<param name=""menu"" value=""false""><param name=wmode value=""opaque"">');"&_
vbcrlf&"document.write('<param name=""FlashVars"" value=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"">');"&_
vbcrlf&"document.write('<embed src=""images/pic.swf"" wmode=""opaque"" FlashVars=""pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'"" menu=""false"" bgcolor=""#ffeabb"" quality=""high"" width=""'+ focus_width +'"" height=""'+ swf_height +'"" allowscriptAccess=""sameDomain"" type=""application/x-shockwave-flash"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" />');"&_
vbcrlf&"document.write('</object>');"&_
vbcrlf&" -->"&_
vbcrlf&" </script>"

Flash_Pic=tmp
end function

'---------------------------list text----------------------------
function Article_List(pdname,pdmark,getcid,getsid,imgmark,opentype,getnum,getlen,getcss)
  dim tmp1,tmp_title,tmp_tit,tmp_count,tmp_where,tmp_url,tmp_color,tmp_name,body,new_windown,new_day,new_win
  new_windown=""
  tmp_where="hidden=1"
  if getcid>0  then tmp_where=tmp_where&" and c_id="&getcid
  if getsid>0  then tmp_where=tmp_where&" and s_id="&getsid
  if opentype=1 then new_windown="target='_blank'"
    tmp_title="&nbsp;"&pdname&"频道"
    tmp_tit=pdname&"标题"
	tmp_name="发 布 人"
    tmp_count="浏览次数"
	tmp_tim="整理时间"
    iscolor=true
	
  if opentype=1 then new_windown="target='_blank'"
    tmp_title=" "&pdname&"频道"
    tmp_tit=pdname&"标题"
 tmp_name="发 布 人"
    tmp_count="浏览次数"
 tmp_tim="整理时间"
    iscolor=true
   'sql="select top "&getnum&" id,topic,username,tim,counter,tcolor from "&pdmark&" where "&tmp_where&" order by id desc"
  if c_id<>0 and s_id<>0  then 
   '二级分类   
 sql="select top "&getnum&" "&pdmark&".id,"&pdmark&".topic,username,tim,counter,tcolor,jk_sort.s_name,jk_sort.c_id,jk_sort.s_id FROM "&pdmark&" INNER JOIN jk_sort ON "&pdmark&".c_id = jk_sort.c_id and "&pdmark&".s_id = jk_sort.s_id where "&tmp_where&" order by "&pdmark&".id desc"
      set rs=joekoe_cms.exec(sql,1)
       do while not rs.eof
     tmp_url=pdmark&"/view.asp?id="&rs(0)  
     tmp1_url=pdmark&"/list.asp?action=more&c_id="&rs(7)&"&s_id="&rs(8)
     nsort=joekoe_cms.code_html(rs("s_name"),1,10) '显示二级分类
  id=rs("id") 
  topic=rs("topic")
  tcolor=rs("tcolor")
  tmp_color=""
  new_day = now - rs("tim")
  if new_day<1 then
  new_win = "<img src='../skin/skin_1/small/ico_new.gif' border=0>"
  else
  new_win= ""
  end if
  if var_null(rs(5))<>"" then tmp_color="style=""color:"&rs(5)&";"""
    tmp1=tmp1&vbcrlf&"<tr class="&getcss&"><td>&nbsp;"&img_skin("index_"&imgmark)&"&nbsp;[<a href='"&tmp1_url&"' class=h_user>"&nsort&"</a>] <a href='"&tmp_url&"' "&tmp_color&" alt='"&tmp_tit&"："&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&"："&rs(2)&"<br>"&tmp_count&"："&rs(4)&" 人次<br>"&tmp_tim&"："&rs(3)&"' "&new_windown&">"&joekoe_cms.code_html(rs(1),1,getlen)&""&new_win&"</td><td class=tims align=right><font color=gray>"&joekoe_cms.time_type(rs("tim"),10)&"</font></a></td></tr>"            
      rs.movenext 
     loop 
    rs.close
else
   '一级分类 
   sql="select top "&getnum&" "&pdmark&".id,"&pdmark&".topic,username,tim,counter,tcolor,jk_class.c_name,jk_class.c_id FROM "&pdmark&" INNER JOIN jk_class ON "&pdmark&".c_id = jk_class.c_id where "&tmp_where&" order by id desc"
      set rs=joekoe_cms.exec(sql,1)
       do while not rs.eof
    tmp_url=pdmark&"/view.asp?id="&rs(0)  
    tmp1_url=pdmark&"/list.asp?action=more&c_id="&rs(7)
    nsort=joekoe_cms.code_html(rs("c_name"),1,10)  '显示一级分类
 id=rs("id") 
 topic=rs("topic")
 tcolor=rs("tcolor")
 tmp_color=""
  new_day = now - rs("tim")
  if new_day<1 then
  new_win = "<img src='../skin/skin_1/small/ico_new.gif' border=0>"
  else
  new_win= ""
  end if
  if var_null(rs(5))<>"" then tmp_color="style=""color:"&rs(5)&";"""
    tmp1=tmp1&vbcrlf&"<tr class="&getcss&"><td>&nbsp;"&img_skin("index_"&imgmark)&"&nbsp;[<a href='"&tmp1_url&"' class=h_user>"&nsort&"</a>] <a href='"&tmp_url&"' "&tmp_color&" alt='"&tmp_tit&"："&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&"："&rs(2)&"<br>"&tmp_count&"："&rs(4)&" 人次<br>"&tmp_tim&"："&rs(3)&"' "&new_windown&">"&joekoe_cms.code_html(rs(1),1,getlen)&""&new_win&"</td><td class=tims align=right><font color=gray>"&joekoe_cms.time_type(rs("tim"),10)&"</font></a></td></tr>"            
      rs.movenext 
     loop 
    rs.close
  end if
  Article_List=tmp1
end function


function Main_List(pdmark,getcid,getsid,imgmark,opentype,getnum,getlen,getcss)
  dim tmp1,tmp_title,tmp_tit,tmp_count,tmp_record,tmp_table,tmp_where,tmp_url,tmp_name,body,new_windown,sea_num
  new_windown=""
  sea_num="人次"
  tmp_where="hidden=1"
  if getcid>0 then tmp_where=tmp_where&" and c_id="&getcid
  if getsid>0 then tmp_where=tmp_where&" and s_id="&getsid
  if opentype=1 then new_windown="target='_blank'"
  select case pdmark
  case "down"
    tmp_title="&nbsp;下载中心"
    tmp_tit="软件名称"
	tmp_name="发 布 人"
    tmp_count="下载次数"
	tmp_tim="整理时间"
    tmp_table="down"
    tmp_record="id,name,username,tim,counter"
  case "flea"
    tmp_title="&nbsp;市场信息"
    tmp_tit="信息名称"
	tmp_name="发 布 人"
    tmp_count="浏览次数"
	tmp_typess="信息类型："
	tmp_tim="整理时间"
    tmp_table="flea"
    tmp_record="id,name,username,tim,counter,types"
  case "blog"
   tmp_title="博客日志"
   tmp_tit="博客标题"
   tmp_name="发 布 人"
   tmp_count="浏览次数"
   tmp_tim="发布时间"
   tmp_table="blog_data"
   tmp_where=" hidden=-1 and type='article' "
   tmp_record="id,topic,username,tim,count,author,type"
  case "pris"
    tmp_title="&nbsp;企业黄页"
    tmp_tit="企业名称"
	tmp_name="发 布 人"
    tmp_count="浏览次数"
	tmp_typess="企业类型："
	tmp_tim="整理时间"
    tmp_table="pris"
    tmp_record="id,name,username,tim,counter,types"
  case "job"
    tmp_title="&nbsp;招聘信息"
    tmp_tit="信息名称"
	tmp_name="发布企业"
    tmp_count="浏览次数"
	tmp_typess="专业要求："
	tmp_tim="整理时间"
    tmp_table="job"
    tmp_record="id,job,cname,tim,counter,zyes"
  case "job_person"
    tmp_title="&nbsp;求职信息"
    tmp_tit="信息名称"
	tmp_name="求 职 者"
    tmp_count="浏览次数"
	tmp_typess="最高学历："
	tmp_tim="整理时间"
    tmp_table="person"
    tmp_record="id,job,iname,tim,counter,edu"
  case "gbook"
    tmp_title="&nbsp;留言本"
    tmp_tit="留言标题"
	tmp_name="留言者"
    tmp_count="发布时间"
	tmp_tim="回复时间"
	sea_num=""
    tmp_table="gb_data"
    tmp_record="id,topic,nname,re_tim,tim"
  case else
    tmp_title="&nbsp;下载中心"
    tmp_tit="软件名称"
	tmp_name="发 布 人"
    tmp_count="下载次数"
	tmp_tim="整理时间"
    tmp_table="down"
  end select

  sql="select top "&getnum&" "&tmp_record&" from "&tmp_table&" where "&tmp_where&" order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    tmp_url=pdmark&"/view.asp?id="&rs(0)
	if pdmark="gbook" then tmp_url="common/gbook.asp"
	if pdmark="job" then tmp_url=pdmark&"/job_view.asp?id="&rs(0)
	if pdmark="blog" then
           typess=trim(rs("type"))
		   if typess="photo" then 
		      typess="博客相册"
			  tmp_url=pdmark&"/photo_view.asp?userid="&rs(2)&"&id="&rs(0)
			else
			     typess="博客日志"
			  tmp_url=pdmark&"/blog_view.asp?userid="&rs(2)&"&id="&rs(0)
			End if
	        username=idtoname(rs("username"))
	end if
    if cl_type="flea" or cl_type="pris" then
    typess=rs("types")
    end if
	if cl_type="person"  then
    typess=rs("edu")
    end if
    if cl_type="job"  then
    typess=rs("zyes")
    end if
if pdmark="blog" then
           'typess=rs("type")
			tmp_url=pdmark&"/"&pdmark&"_view.asp?userid="&rs(2)&"&id="&rs(0)
			username=idtoname(trim(rs("username")))
	
	tmp1=tmp1&vbcrlf&"<tr class="&getcss&"><td>&nbsp;"&img_skin("index_"&imgmark)&"&nbsp;<a href='"&tmp_url&"'  alt='"&tmp_tit&"："&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&"："&username&"<br>"&tmp_count&"："&rs(4)&" "&sea_num&"<br>"&tmp_tim&"："&rs(3)&"<br>"&tmp_typess&""&typess&"' "&new_windown&">"&joekoe_cms.code_html(rs(1),1,getlen)&"</a></td></tr>"  
	
	Else
	   tmp1=tmp1&vbcrlf&"<tr class="&getcss&"><td>&nbsp;"&img_skin("index_"&imgmark)&"&nbsp;<a href='"&tmp_url&"'  alt='"&tmp_tit&"："&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&"："&rs(2)&"<br>"&tmp_count&"："&rs(4)&" "&sea_num&"<br>"&tmp_tim&"："&rs(3)&"<br>"&tmp_typess&""&typess&"' "&new_windown&">"&joekoe_cms.code_html(rs(1),1,getlen)&"</a></td></tr>"  
	
	end if
            
    rs.movenext
  loop
  rs.close
  Main_List=tmp1
end function

function BBS_List(getfid,imgmark,opentype,getnum,getlen,getcss)
  dim tmp1,tmp_title,tmp_tit,tmp_count,tmp_record,tmp_table,tmp_where,tmp_url,tmp_name,body,new_windown,tmp_color,tmp_b,new_day,new_win
  new_windown=""
  tmp_where=" and forum_id<>999999999"
  if getfid>0 then tmp_where=tmp_where&"  and forum_id="&getfid
  if opentype=1 then new_windown="target='_blank'"
    tmp_title="&nbsp;论坛新帖"
    tmp_tit="论坛标题"
	tmp_name="发 布 人"
    tmp_count="论坛回复"
	tmp_tim="整理时间"
    tmp_table="bbs_topic"
    tmp_record="id,topic,username,tim,re_counter,tcolor,tbb,forum_id"
    tmp_where="forum_id>0"

sql="select top "&getnum&" "&tmp_record&" from "&tmp_table&" where "&tmp_where&" order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    tmp_url="forum/view.asp?forum_id="&rs(7)&"&view_id="&rs(0)
    tmp_color=""
	tmp_b=""
    new_day = now - rs("tim")
    if new_day<1 then
    new_win = "<img src='../skin/skin_1/small/ico_new.gif' border=0>"
    else
    new_win= ""
    end if
    if var_null(rs(5))<>"" then tmp_color="style=""color:"&rs(5)&";""" 
	if rs(6)=true then tmp_b="<b>"
    tmp1=tmp1&vbcrlf&"<tr class="&getcss&"><td> "&img_skin("index_"&imgmark)&" <a href='"&tmp_url&"' "&tmp_color&" alt='"&tmp_tit&"："&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&"："&rs(2)&"<br>"&tmp_count&"："&rs(4)&" 人次<br>"&tmp_tim&"："&rs(3)&"<br>"&tmp_typess&""&typess&"' "&new_windown&">"&tmp_b&joekoe_cms.code_html(rs(1),1,getlen)&""&new_win&"</td><td class=tims align=right><font color=gray>"&joekoe_cms.time_type(rs("tim"),10)&"</font></a></td></tr>"             
    rs.movenext
  loop
  rs.close
  BBS_List=tmp1
end function

'---------------------------公告----------------------------
function main_left_update()
dim tmp1,topic,word
tmp1="<font class=gray>暂时没有网站公告！</font>"
sql="select top 1 * from bbs_cast where sort='news' order by id desc"
set rs=joekoe_cms.exec(sql,1)
if not rs.eof then
topic=rs("topic")
word=rs("word")
tmp1="<table cellspacing=1 cellpadding=4  align=center><tr><td><a href='common/update.asp?action=news#"&rs("id")&"'><center><b><font class=red>"&joekoe_cms.code_html(topic,1,0)&"</font></b></center></a></td></tr><tr><td><marquee scrollamount=2 direction=up width='100%' height='49' onMouseOver=this.stop() onMouseOut=this.start()>"&code_jk(word) &"<BR><BR><font class=gray> 发布人："&rs("username")&"  <BR>发布时间："&rs("tim")&"</font></marquee></td></tr><tr><td class=gray><CENTER>"&rs("tim")&"</CENTER><CENTER>[ <a href='common/update.asp?action=news'>网站更新</a> ]    [ <a href='common/update.asp?action=forum'>论坛公告</a> ]</CENTER></td></tr></table>"
end if
rs.close
main_left_update=tmp1
end function
'---------------------------电影、音乐、推荐、商品----------------------------

function Pic_List(cl_type,getcid,getsid,cl_tnum,cl_cnum,isopen)
  dim tmp1,tmp_title,tmp_tit,tmp_count,tmp_img,tmp_record,tmp_table,tmp_where,tmp_url,tmp_color,tmp_name,body,new_windown,opentype,pic,tmp_types,tmp_typess,typess,tmp2,dinggou
  tmp_img=cl_type
  tmp_where="hidden=1"
  if getcid>0  then tmp_where=tmp_where&" and c_id="&getcid
  if getsid>0  then tmp_where=tmp_where&" and s_id="&getsid
  if opentype=1 then
  new_windown="target='_blank'"
  else
  new_windown=""
  end if

  select case cl_type
   case "music_disk"
    tmp_title="&nbsp;最新专辑"
    tmp_tit="专辑名称"
	tmp_name="专辑歌手"
    tmp_count="浏览次数"
    tmp_table="music_disk"
    tmp_record="id,name,singer,tim,hits,pic"
    tmp_img="music_disk"
  case "gallery"
    tmp_title="&nbsp;精彩推荐"
    tmp_tit="推荐名称"
	tmp_name="发 布 人"
    tmp_count="浏览次数"
    tmp_types="推荐类型："
    tmp_table="gallery"
    tmp_record="id,name,username,tim,counter,spic,types"
 case "shop"
    tmp_title="&nbsp;最新商品"
    tmp_tit="商品名称"
	tmp_name="商品价格"
    tmp_count="浏览次数"
    tmp_table="shop_product"
    tmp_record="id,name,price,tim,counter,smallimg,discount,stock"
  case else
    tmp_title="&nbsp;精彩影视"
    tmp_tit="影视名称"
	tmp_name="影片主演"
    tmp_count="浏览次数"
    tmp_table="video"
    tmp_record="id,name,role,tim,counter,pic"
    tmp_img="video"

  end select
  sql="select top "&cl_tnum&" "&tmp_record&" from "&tmp_table&" where "&tmp_where&" order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    tmp_url=cl_type&"/view.asp?id="&rs(0) 
        if cl_type="music_disk"  then tmp_url="music/disk_view.asp?id="&rs(0) 
 if cl_type="shop" then
       if rs("stock")<>"暂缺" then
       dinggou="<a href='shop/bag.asp?id="&rs(0)&"' ><img src='"&joekoe_cms.web_dir_skin&"main/button_bag.gif' border=0></a>  <a href=shop/view.asp?id="&rs(0)&"><img src='"&joekoe_cms.web_dir_skin&"main/button_view.gif' border=0></a>"
          else
              dinggou="<img src='"&joekoe_cms.web_dir_skin&"main/button_bag.gif' border=0>  <a href=shop/view.asp?id="&rs(0)&"><img src='"&joekoe_cms.web_dir_skin&"main/button_view.gif' border=0></a>"
          end if
 tmp2=vbcrlf&"<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价格：<font color=red>"&rs("price")*rs("discount")\100&"</font> 元</td></tr>" &_
          vbcrlf&"<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;原价：<STRIKE>"&rs("price")&" 元</STRIKE></td></tr>" &_
             vbcrlf&"<tr><td align=center>"&dinggou&"</td></tr>"
 else
 tmp2=""
 end if
	if cl_type="shop"  then
      pic=rs("smallimg")
    end if
    if cl_type="video" or cl_type="down"  or  cl_type="music_disk" then
      pic=rs("pic")
    end if
	if cl_type="gallery"  then
        pic=rs("spic")
	typess=rs("types")
        tmp_url="vouch/gallery_view.asp?types="&typess&"&id="&rs(0) 
	select case typess
    case "flash"
    tmp_typess="Flash作品"
    case "film"
    tmp_typess="视频作品"
    case else
    tmp_typess="贴图作品"
    end select
 end if
   tmp1=tmp1&vbcrlf&"<td ><table width=98% border=0 cellspacing=0 cellpadding=0><tr><td align=center>"&pic_fk(pic,1,tmp_url)&"</td></tr><tr><td height="&dim_num(6)&" align=center>&nbsp;"&img_skin("index_0")&"&nbsp;<a href='"&tmp_url&"' "&tmp_color&" alt='"&tmp_tit&"："&joekoe_cms.code_html(rs(1),1,0)&"<br>"&tmp_name&"："&rs(2)&"<br>"&tmp_count&"："&rs(4)&" 人次<br>整理时间："&rs(3)&"<br>"&tmp_types&""&tmp_typess&"' "&new_windown&">"&joekoe_cms.code_html(rs(1),1,cl_cnum)&"</a></td></tr>"&tmp2&"</table></td>" 
         
    rs.movenext

  loop
  rs.close
  Pic_List="<table width=100% border=0 cellspacing=0 cellpadding=0><tr>"&tmp1&"</tr></table>"
end function

'---------------------------连接----------------------------
function main_left_linkes()
  dim tmp1,body
  tmp1="<script language=javascript src='style/data_link.js'></script><br><script language=javascript src='style/data_link_txt.js'></script>"
main_left_linkes=tmp1
end function

'---------------------------统计----------------------------
function main_left_data()
  dim tmp1,body
  tmp1=vbcrlf&"<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"网站注册：<font class=red>"&num_reg&"</font> 人</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"最新注册："&format_user_name(new_username,0,"")&"</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"动态总数：<font class=red>"&web_config(5,0)&"</font> 条</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"文章总数：<font class=red>"&web_config(6,0)&"</font> 篇</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"软件总数：<font class=red>"&web_config(7,0)&"</font> 个</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"商城总数：<font class=red>"&web_config(8,0)&"</font> 个</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"音乐总数：<font class=red>"&web_config(18,0)&"</font> 首</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"电影总数：<font class=red>"&num_video&"</font> 部</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"论坛主题：<font class=red>"&num_topic&"</font> 贴</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"论坛贴子：<font class=red>"&num_data&"</font> 贴</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"当前在线：<font class=red>"&online_num&"</font> 人</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"最高在线：<font class=red alt='最高在线发生于："&max_tim&"'>"&max_online&"</font> 人</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"网站浏览：<font class=red alt='从 "&start_tim&" 起计算'>"&total_counter&"</font> 人次</td></tr><tr><td height=1 background='images/bg_dian.gif'></tr>" & _
       vbcrlf&"<tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"<a href='common/rss.asp'><font class=red>本站支持 RSS 2.0</font></a></td></tr><tr><td height=1 background='images/bg_dian.gif'></tr></table>" 
main_left_data=tmp1
end function
'---------------------------搜索----------------------------

function main_search()
  dim tmp1
  tmp1=vbcrlf&"<table border=0 height=25>" & _
                 vbcrlf&"  <form action='common/search.asp' method=get onsubmit=""javascript:frm_submitonce(this);"">" & _
                 vbcrlf&"  <tr>" & _
                 vbcrlf&"  <td>"&img_small("search")&"</td>" & _
                 vbcrlf&"  <td>&nbsp;<input type=text name=keyword size=18 maxlength=20 title='多个关键字请用 空格 格开' class=bg_search></td>" & _
                 vbcrlf&"  <td>&nbsp;<select name=sea_type>" & _
                 vbcrlf&"<option value='news'>新闻</option>" & _
				 vbcrlf&"<option value='article'>文章</option>" & _
                 vbcrlf&"<option value='website'>网站</option>" & _
                 vbcrlf&"<option value='down'>下载</option>" & _
                 vbcrlf&"<option value='paste'>贴图</option>" & _
                 vbcrlf&"<option value='shop_product'>商城</option>" & _
                 vbcrlf&"<option value='video'>电影</option>" & _
				 vbcrlf&"<option value='music_song'>音乐</option>" & _
				 vbcrlf&"<option value='flea'>市场</option>" & _
				 vbcrlf&"<option value='flash'>Flash</option>" & _
				 vbcrlf&"<option value='forum'>论坛</option>" & _
                 vbcrlf&"</select></td>" & _
                 vbcrlf&"  <td>&nbsp;<input type=checkbox name=celerity value='yes'></td>" & _
                 vbcrlf&"  <td>快速搜索&nbsp;</td>" & _
                 vbcrlf&"  <td><input type=image src='images/small/web_sea.gif' border=0></td>" & _
                 vbcrlf&"  <td>&nbsp;<a href='search.asp?action=help' title='多功能搜索'>帮助？</a></td>" & _
                 vbcrlf&"  </tr>" & _
                 vbcrlf&"  </form>" & _
                 vbcrlf&"  </table>"
main_search=tmp1
end function



'****************************************************
' HS CMS 2006      Power by 2332.cn
' Email: 116116089@qq.com
' Web: http://www.2332.cn
' Copyright (C) 2006 2332.cn All Rights Reserved.
'****************************************************
%>