<%
'---------------------------新闻----------------------------
function main_news_pic()
dim tmp1
tmp1=vbcrlf&"<table border=0 width='100%'><tr><td align=center>" & _
vbcrlf&"<table border=0 width='100%'>" & _
vbcrlf&"    <tr>" & _
vbcrlf&"     <td width='35%'>"
dim id0,pic0,pic,temp2
i=0
id0=0
pic0=joekoe_cms.web_upload&"no_pic.gif"
sql="select top 8 id,topic,pic from news 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
if i=0 then
id0=rs("id")
pic0=rs("pic")
end if
temp2= temp2&vbcrlf&" bannerAD["&i&"]="""&pic&""";"
temp2= temp2&vbcrlf&" bannerADlink["&i&"]=""news_view.asp?id="&id&""";"&vbcrlf
i=i+1
rs.movenext
loop
rs.close
pic0=pic_fk(pic0&"' name=bannerADrotator style='FILTER: revealTrans(duration=2,transition=20)",12,"javascript:jump2url();")
if instr(pic0,"target=_blank")>0 then pic0=replace(pic0,"target=_blank","")
tmp1= tmp1& pic0

tmp1= tmp1&vbcrlf&"<script language=Javascript>"& _
vbcrlf&"var bannerAD=new Array();"& _
vbcrlf&"var bannerADlink=new Array();"& _
vbcrlf&"var adNum=0;"
if id0=0 then
tmp1= tmp1&vbcrlf&"bannerAD[0]=""&=pic0&"";"& _
             vbcrlf&"bannerADlink[0]='#';"& _
             vbcrlf&"bannerAD[1]=""&=pic0&"";"& _
             vbcrlf&"bannerADlink[1]='#';"
else
tmp1=tmp1&temp2
end if
tmp1= tmp1&vbcrlf&"var preloadedimages=new Array();"& _
vbcrlf&"for (i=1;i<bannerAD.length;i++){"& _
vbcrlf&"preloadedimages=new Image();"& _
vbcrlf&"preloadedimages.src=bannerAD;"& _
vbcrlf&"}"& _
vbcrlf&"function setTransition(){"& _
vbcrlf&"if (document.all){"& _
vbcrlf&"bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);"& _
vbcrlf&"bannerADrotator.filters.revealTrans.apply();"& _
vbcrlf&"}"& _
vbcrlf&"}"& _
vbcrlf&"function playTransition(){"& _
vbcrlf&"if (document.all)"& _
vbcrlf&"bannerADrotator.filters.revealTrans.play()"& _
vbcrlf&"}"& _
vbcrlf&"function nextAd(){"& _
vbcrlf&"if(adNum<bannerAD.length-1)adNum++"& _ 
vbcrlf&"else adNum=0;"& _
vbcrlf&"setTransition();"& _
vbcrlf&"document.images.bannerADrotator.src=bannerAD[adNum];"& _
vbcrlf&"playTransition();"& _
vbcrlf&"theTimer=setTimeout('nextAd()', 8000);"& _
vbcrlf&"}"& _
vbcrlf&"function jump2url(){"& _
vbcrlf&"jumpUrl=bannerADlink[adNum];"& _
vbcrlf&"jumpTarget='';"& _
vbcrlf&"if (jumpUrl != ''){"& _
vbcrlf&"if (jumpTarget != '')window.open(jumpUrl,jumpTarget);"& _
vbcrlf&"else location.href=jumpUrl;"& _
vbcrlf&"}"& _
vbcrlf&"}"& _
vbcrlf&"function displayStatusMsg() { "& _
vbcrlf&"status=bannerADlink[adNum];"& _
vbcrlf&"document.returnvalue = true;"& _
vbcrlf&"}"& _
vbcrlf&"nextAd()"& _
vbcrlf&"</script>"

tmp1=tmp1&vbcrlf&"</td>" & _
vbcrlf&"      <td width='65%'>" & _
vbcrlf&"        <table border=0 width='100%'>" 
sql="select top 10 id,topic,tim,counter from news where hidden=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
  id=rs("id")
  topic=rs("topic")
  tmp1=tmp1&vbcrlf&"<tr><td height='"&dim_num(6)&"'><img src='skin/"&joekoe_cms.web_skin&"/small/h_main.gif' border=0 align=absMiddle>&nbsp;&nbsp;<a href='news_view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(topic,1,25)&"</a></tr><tr><td height=1 background='images/bg_dian.gif'></td></tr>"
  rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"    </table>" & _
vbcrlf&"  </td>" & _
vbcrlf&"  </tr>" & _
vbcrlf&"  </table>" & _
vbcrlf&"  </td>" & _
vbcrlf&"  </tr></table>"
 main_news_pic=tmp1
end function

'---------------------------论坛、文章、市场、企业、人才、下载、主机、邮局----------------------------
function main_center_zonghea(cl_type,cl_tnum,cl_cnum,cl_classid)
  dim tmp1,tmp_title,tmp_tit,tmp_count,tmp_img,tmp_record,tmp_table,tmp_where,tmp_url,tmp_color,tmp_name,body
  tmp_img=cl_type
  tmp_where="hidden=1"
  if cl_classid>0 then tmp_where=tmp_where&" and s_id="&cl_classid
  select case cl_type
  case "forum"
    cl_type="forum"
    tmp_title="&nbsp;论坛新帖"
    tmp_tit="论坛标题"
	tmp_name="发 布 人"
    tmp_count="论坛回复"
	tmp_tim="整理时间"
    tmp_img="forum"
    tmp_table="bbs_topic"
    tmp_record="id,topic,username,tim,re_counter,tcolor,forum_id"
    tmp_where="forum_id>0"
    if cl_classid>0 then tmp_where="forum_id="&cl_classid
  case "down"
    tmp_title="&nbsp;下载中心"
    tmp_tit="软件名称"
	tmp_name="发 布 人"
    tmp_count="下载次数"
	tmp_tim="整理时间"
    tmp_table="down"
    tmp_record="id,name,username,tim,counter"
   case "host"
    tmp_title="&nbsp;虚拟主机"
    tmp_tit="主机名称"
	tmp_name="主机价格"
    tmp_count="浏览次数"
	tmp_tim="整理时间"
    tmp_table="host_product"
    tmp_record="id,name,price,tim,counter"
   case "email"
    tmp_title="&nbsp;企业邮局"
    tmp_tit="邮局名称"
	tmp_name="邮局价格"
    tmp_count="浏览次数"
	tmp_tim="整理时间"
    tmp_table="email_product"
    tmp_record="id,name,price,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 "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 else
    tmp_title="&nbsp;文章总汇"
    tmp_tit="文章标题"
	tmp_name="发 布 人"
    tmp_count="浏览次数"
	tmp_tim="整理时间"
    tmp_table="article"
    tmp_record="id,topic,username,tim,counter,tcolor"

  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="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
    tmp_color=""
    if cl_type="article" or cl_type="news" then 
      tmp_color="style=""color:"&rs(5)&";"""
	end if   
	if cl_type="forum" then
      tmp_url=cl_type&"_view.asp?forum_id="&rs(6)&"&view_id="&rs(0)
    end if
   tmp1=tmp1&vbcrlf&"<table cellspacing=0 cellpadding=0 width='100%'><tr><td height="&dim_num(6)&">&nbsp;&nbsp;"&img_skin("h_main")&"&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>"&tmp_tim&"："&rs(3)&"<br>"&tmp_typess&""&typess&"' target=_blank> "&joekoe_cms.code_html(rs(1),1,cl_cnum)&"</a></td></tr><tr><td height=1 background='images/bg_dian.gif'></td></tr></table>"                      
    rs.movenext
  loop
  rs.close
  main_center_zonghea=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 class=table align=center><tr><td><a href='update.asp?action=news#"&rs("id")&"'><center><b>"&joekoe_cms.code_html(topic,1,0)&"</b></center></a></td></tr><tr><td><marquee scrollamount=2 direction=up width='100%' height='90' 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='update.asp?action=news'>网站更新</a> ]    [ <a href='update.asp?action=forum'>论坛公告</a> ]</CENTER></td></tr></table>"
end if
rs.close
main_left_update=tmp1
end function
'---------------------------电影、音乐、推荐、商品----------------------------

function main_center_lift(cl_type,cl_tnum,cl_cnum,cl_classid)
  dim tmp1,tmp_title,tmp_tit,tmp_count,tmp_img,tmp_record,tmp_table,tmp_where,tmp_url,tmp_color,tmp_name,body
  tmp_img=cl_type
  tmp_where="hidden=1"
  if cl_classid>0 then tmp_where=tmp_where&" and s_id="&cl_classid
  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"
  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="shop"  then
      pic=rs("smallimg")
    end if
	if cl_type="gallery"  then
      pic=rs("spic")
    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
	typess=rs("types")
	select case typess
    case "flash"
    tmp_typess="Flash作品"
    case "film"
    tmp_typess="视频作品"
    case else
    tmp_typess="贴图作品"
    end select
 end if
   tmp1=tmp1&vbcrlf&"<td align=center><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>"&img_skin("h_main")&"<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&"' target=_blank> "&joekoe_cms.code_html(rs(1),1,cl_cnum)&"</a></td></tr></table></td>" 
         
    rs.movenext

  loop
  rs.close
 main_center_lift=tmp1
end function

'---------------------------连接----------------------------
function main_left_linkes()
  dim tmp1,body
  tmp1="<script language=javascript src='style/data_link.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(17,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(20,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></table>" 
main_left_data=tmp1
end function
'---------------------------搜索----------------------------

function main_search()
  dim tmp1
  tmp1=vbcrlf&"<table border=0>" & _
                 vbcrlf&"  <form action='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=20 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='forum'>论坛</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='host_product'>主机</option>" & _
				 vbcrlf&"<option value='email_product'>邮箱</option>" & _
				 vbcrlf&"<option value='dmain_product'>域名</option>" & _
                 vbcrlf&"<option value='flea'>企业</option>" & _
				 vbcrlf&"<option value='pris'>市场</option>" & _
				 vbcrlf&"<option value='flash'>Flash</option>" & _
                 vbcrlf&"</select></td>" & _
                 vbcrlf&"  <td>&nbsp;<input type=checkbox name=celerity value='yes'></td>" & _
                 vbcrlf&"  <td>快速搜索&nbsp;</td>" & _
                 vbcrlf&"  <td valign=top><input type=image src='images/small/web_sea.gif' border=0></td>" & _
                 vbcrlf&"  <td>&nbsp;&nbsp;<a href='search.asp?action=help' title='多功能搜索'>搜索帮助？</a></td>" & _
                 vbcrlf&"  </tr>" & _
                 vbcrlf&"  </form>" & _
                 vbcrlf&"  </table>"
main_search=tmp1
end function
%>