<!-- #include file="config.asp" -->
<!-- #include file="skin.asp" -->
<%
index_url="main"
tit_fir=format_menu(index_url)

dim us,table1,table2,table3,table4,c1,c2
 dim uploadpic,pic
    c1=web_var(web_color,5):c2=web_var(web_color,1)
us="fk2"
table1=format_table(1,3)
table2=format_table(5,2)
table3=format_table(3,1)
table4=format_table(3,5)

sub user_data_top(utt,ijt,sh,n_num)
  '积分排行 integral
  '发贴排行 bbs_counter
  '财富排行 emoney
  dim temp1
  temp1=vbcrlf&"<table border=0 width='99%' cellspacing=2 cellpadding=0 align=center class=tf><tr height=0><td width='75%'></td><td width='25%'></td></tr>"
  sql="select top "&n_num&" sex,username,"&utt&" from user_data order by "&utt&" desc,id"
  set rs=conn.execute(sql)
  do while not rs.eof
   if rs("sex")=true then
    temp1=temp1&vbcrlf&"<tr><td height="&space_mod&" class=bw>"&"<img src=images/small/forum_boy.gif> "&format_user_view(rs("username"),1,"")&"</td><td align=center class=red_3>"&rs(utt)&"</td></tr>"
   else
    temp1=temp1&vbcrlf&"<tr><td height="&space_mod&" class=bw>"&"<img src=images/small/forum_girl.gif> "&format_user_view(rs("username"),1,"")&"</td><td align=center class=red_3>"&rs(utt)&"</td></tr>"
   end if
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
  call left_type(temp1,utt,sh)
end sub

sub vote_type(t1,t2,t3,t4)
  call left_type(kong&"<script language=javascript src='vote.asp?id="&t1&"&types="&t2&"&mcolor="&t3&"&bgcolor="&t4&"'></script>","vote",1)
end sub

sub left_type(ltv,pn,ltt)
  if ltt=1 then response.write "<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"
  response.write kong&format_bar("<img src='images/"&web_var(web_config,5)&"/left_"&pn&".gif' border=0>",ltv,13,2,"","|"&web_var(web_color,6)&"|","")
  if ltt=1 then response.write "</td></tr></table>"
end sub

sub main_down_pic(nnhead,dsql,nt,n_num,c_num)
  dim sk_bar,sk_class,temp1,pic_temp,nid,name,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2><tr align=center valign=top>"
  sql="select top "&n_num&" id,name,tim,pic from down where hidden=1"&dsql
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
    if nhead="" then nhead="热点排行"
  case "good"
    sql=sql&" and types=5 order by id desc"
    if nhead="" then nhead="酷软推荐"
  case else
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新软件"
  end select
  set rs=conn.execute(sql)
  do while not rs.eof
    name=rs("name"):nid=rs("id")
    pic_temp="<a href='down_view.asp?id="&nid&"'"&atb&"><img src='"&web_var(web_upload,1)&rs("pic")&"' border=0 width="&web_var(web_down,1)&" height="&web_var(web_down,2)&"></a>"
    temp1=temp1&vbcrlf&"<td width='"&int(100\n_num)&"%'><table border=0 cellspacing=0 cellpadding=2 width='100%' class=tf><tr><td align=center>"&format_rk(pic_temp,2,4,web_var(web_down,1),web_var(web_down,2))&"</td></tr>" & _
	  vbcrlf&"<tr><td align=center class=bw><a href='down_view.asp?id="&nid&"'"&atb&" class=red_3><b>"&code_html(name,1,c_num)&"</b></a></td></tr></table></td>"
    rs.movenext
  loop
  temp1=temp1&"</tr></table>"
  response.write kong&format_bar("<font class="&sk_class&"><b>"&nhead&"</b></font>",temp1,sk_bar,0,0,"||","")
end sub

sub main_down(n_jt,nnhead,nmore,nsql,nt,n_num,n_m,c_num,et,tt)
  dim sk_bar,sk_class,temp1,nid,name,tim,counter,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1=vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf><tr height=0><td width='70%'></td><td width='28%'></td></tr>"
  sql="select top "&n_num+n_m&" id,name,username,tim,counter from down where hidden=1"&nsql
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
    if nhead="" then nhead="下载排行"
  case "good"
    sql=sql&" and types=5 order by id desc"
    if nhead="" then nhead="软件推荐"
  case else
    sql=sql&" order by id desc"
    if nhead="" then nhead="软件更新"
  end select
  set rs=conn.execute(sql)
  if n_m>0 then rs.move(n_m)
  do while not rs.eof
    name=rs("name"):tim=rs("tim"):counter=rs("counter")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&" class=bw>"&n_jt&"<a href='down_view.asp?id="&rs("id")&"'"&atb&" title='软件名称："&code_html(name,1,0)&"<br>发 布 人："&rs("username")&"<br>下载人次："&counter&"<br>整理时间："&time_type(tim,88)&"'>"&code_html(name,1,c_num)&"</a></td><td>"
    if tt>0 then temp1=temp1&format_end(et,time_type(tim,tt)&",<font class=blue>"&counter&"</font>")
    temp1=temp1&"</td></tr><tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&vbcrlf&"</table>"
  response.write kong&format_bar("<font class="&sk_class&"><b>"&nhead&"</b></font>",temp1,sk_bar,0,0,"||",nmore)
end sub

sub video_new_hot_pic(nnhead,dsql,nt,n_num,c_num,w,h)
  dim sk_bar,sk_class,temp1,pic_temp,hot,emoney,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2><tr align=center valign=top>"
  sql="select top "&n_num&" id,title,username,tim,counter,pic,hot,emoney from video where hidden=1"&dsql
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
    if nhead="" then nhead="观看排行"
  case "good"
    sql=sql&" and hot=5 order by id desc"
    if nhead="" then nhead="影片推荐"
  case else
    sql=sql&" order by id desc"
    if nhead="" then nhead="影片更新"
  end select
  set rs=conn.execute(sql)
  do while not rs.eof
 pic_temp="<a href='video_view.asp?id="&rs("id")&"'"&atb&"><img src='"&url_true(web_var(web_upload,1),rs("pic"))&"' border=0 width='"&w&"' height='"&h&"' alt='影片名称："&code_html(rs("title"),1,0)&" <br>发 布 人："&rs("username")&"<br>观看人气："&rs("counter")&"<br>整理时间："&time_type(rs("tim"),33)&"'></a>"

 temp1=temp1&vbcrlf&"<td width='"&int(100\n_num)&"%'><table border=0 cellspacing=0 cellpadding=2 width='100%' class=tf><tr><td align=center class=bw>" & _
   vbcrlf&"<tr><td align=center>"&format_rk(pic_temp,2,4,w,h)&"</td></tr><tr><td align=center class=bw><a href='video_view.asp?id="&rs("id")&"' class=blue><b>"&code_html(rs("title"),1,c_num)&"</b></a></td></tr><tr><td align=center>推荐星级：<img src='images/down/star"&rs("hot")&".gif' border=0></td></tr><tr><td align=center>"&web_var(web_config,8)&"：<FONT class=red>"&rs("emoney")&"</FONT>&nbsp;&nbsp;人气：<FONT class=red>"&rs("counter")&"</FONT></td></tr></table></td>"
    rs.movenext
  loop
  temp1=temp1&"</tr></table>"
  response.write kong&format_bar("<font class="&sk_class&"><b>"&nhead&"</b></font>",temp1,sk_bar,0,0,"||","")
end sub

sub main_video(n_jt,nnhead,nmore,nsql,nt,n_num,n_m,c_num,et,tt)
  dim sk_bar,sk_class,temp1,nid,title,tim,counter,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1=vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num+n_m&" id,title,username,tim,counter from video where hidden=1"&nsql
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
    if nhead="" then nhead="观看排行"
  case "good"
    sql=sql&" and types=5 order by id desc"
    if nhead="" then nhead="web_down"
  case else
    sql=sql&" order by id desc"
    if nhead="" then nhead="影片更新"
  end select
  set rs=conn.execute(sql)
  if n_m>0 then rs.move(n_m)
  do while not rs.eof
    title=rs("title"):tim=rs("tim"):counter=rs("counter")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&" class=bw>"&n_jt&"<a href='video_view.asp?id="&rs("id")&"'"&atb&" title='影片名称："&code_html(title,1,0)&"<br>发 布 人："&rs("username")&"<br>观看人次："&counter&"<br>整理时间："&time_type(tim,88)&"'>"&code_html(title,1,c_num)&"</a>"
    if tt>0 then temp1=temp1&format_end(et,time_type(tim,tt)&",<font class=blue>"&counter&"</font>")
    temp1=temp1&"</td></tr><tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&vbcrlf&"</table>"
  response.write kong&format_bar("<font class="&sk_class&"><b>"&nhead&"</b></font>",temp1,sk_bar,0,0,"||",nmore)
end sub

sub main_news(n_jt,a_cid,a_sid,n_num,c_num,et,timt)
  dim temp1,topic,sqladd,nhead,url,ccname
  nhead=n_head(""&a_cid&"",""&a_sid&"","news")
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sqladd="select top "&n_num&" id,topic,tim,counter from news where hidden=1"
  if a_cid<>"" then sqladd=sqladd&" and c_id="&a_cid&""
  if a_sid<>"" then sqladd=sqladd&" and s_id="&a_sid&""
  sql=sqladd&" order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&">"&n_jt&"<a href='news_view.asp?id="&rs("id")&"'"&atb&" title='"&code_html(topic,1,0)&"'>"&code_html(topic,1,c_num)&"</a>"
    if et>-1 then temp1=temp1&format_end(et,"<font class=gray>"&time_type(rs("tim"),timt)&"</font>,<font class=blue>"&rs("counter")&"</font>")
    temp1=temp1&"</td></tr><tr><td  height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
      response.write kong&format_bar(nhead,temp1,11,0,0,"|"&web_var(web_color,1)&"|100","")&"</td>"
end sub

sub main_article(n_jt,a_cid,a_sid,n_num,c_num,et,timt)
  dim tnum,istop,temp1,topic,sqladd,nhead,url,news_tui
  news_tui="&nbsp;&nbsp;<img src=images/small/tj.gif border=0 title=推荐文章不想看看么？>"
  nhead=n_head(""&a_cid&"",""&a_sid&"","article")
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sqladd="select top "&n_num&" id,topic,tim,counter,istop from article where hidden=1"
  if a_cid<>"" then sqladd=sqladd&" and c_id="&a_cid&""
  if a_sid<>"" then sqladd=sqladd&" and s_id="&a_sid&""
  sql=sqladd&" order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    tnum=c_num:istop=""
    if rs("istop")=1 then tnum=tnum-3:istop=news_tui
    topic=rs("topic")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&">"&n_jt&"<a href='article_view.asp?id="&rs("id")&"'"&atb&" title='"&code_html(topic,1,0)&"'>"&code_html(topic,1,c_num)&"</a>"&istop&""
    if et>-1 then temp1=temp1&format_end(et,"<font class=gray>"&time_type(rs("tim"),timt)&"</font>,<font class=blue>"&rs("counter")&"</font>")
    temp1=temp1&"</td></tr><tr><td  height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
  response.write kong&format_bar(nhead,temp1,11,0,0,"|"&web_var(web_color,1)&"|100","")&"</td>"
  'response.write kong&format_bar(nhead,temp1,21,0,0,"|"&web_var(web_color,1)&"|100","")&"</td>"
end sub

sub main_forum(n_jt,n_num,c_num,et,timt)
  dim temp1,topic
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf><tr height=0><td width='68%'></td><td width='17%'></td><td width='15%'></td></tr>"
  sql="select top "&n_num&" forum_id,icon,id,topic,tim,counter,re_counter,username,re_username from bbs_topic order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&"><img border=0 src='images/icon/"&rs("icon")&".gif' align=absmiddle> <a href='forum_view.asp?forum_id="&rs("forum_id")&"&view_id="&rs("id")&"'"&atb&" title='贴子主题："&code_html(topic,1,0)&"<br>发 贴 人："&rs("username")&"<br>发贴时间："&time_type(rs("tim"),88)&"<br>最后回复："&rs("re_username")&"'>"&code_html(topic,1,c_num)&"</a></td><td height="&space_mod&" align=center class=red_3>"&format_end(et,"<font class=gray>"&time_type(rs("tim"),timt)&"</font></td><td height="&space_mod&" align=right><font class=blue>"&rs("re_counter")&"</font>|<font class=red>"&rs("counter")&"</font>")&"</td></tr><tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
  response.write kong&format_bar("<a href='forum.asp'><b><font class=end>"&format_menu("forum")&"</font></b></a>",temp1,11,0,0,"|"&web_var(web_color,1)&"|80","")&"</td>"
end sub

sub main_update_view()
  dim temp1,topic,conn,connstr,rs  
connstr="DBQ="&server.mappath(web_var(web_config,6))&";DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  temp1=temp1&"<marquee scrollamount=1 scrollDelay=5 direction=up width='95%' height='135' onMouseOver=this.stop() onMouseOut=this.start()>"
  sql="select top 5 * from bbs_cast where sort='news' order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&"<a href='update.asp?action=news&id="&rs("id")&"'>"&code_jk(topic)&"</a><br><br>"&code_jk(rs("word"))&"<br><br><br>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</marquee>"
  temp1=temp1&"<tr><td class=gray align=center>[<a href='update.asp?action=news'>网站公告</a>]        [<a href='update.asp?action=forum'>论坛公告</a>]</td></tr></table>"
  response.write kong&format_bar("<a href='update.asp'><b><font class=end>公告更新</font></b></a>",temp1,11,0,0,"|"&web_var(web_color,1)&"|80","")&"</td>"
end sub

sub main_update(n_jt,n_num,c_num,et,timt)
  dim temp1,topic,word
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,topic,word,tim from bbs_cast where sort='news' order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    word=rs("word")
    temp1=temp1&vbcrlf&"<tr><td align=center height="&space_mod&"><a href='update.asp?action=news&id="&rs("id")&"' title='"&code_html(topic,1,0)&"'>"&code_html(topic,1,c_num)&"</a></td></tr><tr><td align=center height=65><MARQUEE id=typhoon onmouseover=typhoon.stop() onmouseout=typhoon.start() scrollAmount=1 scrollDelay=5 direction=up width=210 height=65 border=0>      "&word&format_end(et,"<font class=gray>"&time_type(rs("tim"),timt)&"</font>")&"</MARQUEE></td></tr><tr><td align=center valign=bottom height=25>[ <a href=update.asp?action=news>更多网站公告</a> ]    [ <a href=update.asp?action=forum>更多论坛公告</a> ]</td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
  response.write kong&format_bar("<a href='update.asp'><b><font class=end>网站公告</font></b></a>",temp1,11,0,0,"|"&web_var(web_color,1)&"|80","")&"</td>"
end sub
sub news_fpic(fsql,t_num,n_jt,n_num,c_num,et,timt)
  dim tnum,news_tui,istop,topic,temp1,rs,sql,nid,sk_bar,sk_class,temp2,new_tu,cnum,tim,ispic,pic_temp
  news_tui="&nbsp;&nbsp;<img src=images/small/tj.gif border=0 title=推荐新闻不想看看么？>"
  new_tu="<font class=gray>   <img src='images/small/IMAGE.GIF' border=0 title=图片新闻不想看看么？></font>"
  atb=" target=_blank":sk_bar=11:sk_class="end"
  sql="select top 1 id,topic,pic,tim,username,counter from news where hidden=1 and istop=1 and ispic=1 "&fsql&" order by id desc"
  set rs=conn.execute(sql)
  if not(rs.eof and rs.bof) then
    nid=rs("id"):topic=rs("topic")
    pic_temp="<img src='"&url_true(web_var(web_upload,1),rs("pic"))&"' border=0 title='新闻标题："&code_html(rs("topic"),1,0)&"<br>发 布 人："&rs("username")&"<br>浏览人次："&rs("counter")&"<br>整理时间："&rs("tim")&"' width="&web_var(web_num,7)&" height="&web_var(web_num,8)&">"
    temp1="<table border=0 width='100%' class=tf>" & _
	  vbcrlf&"<tr align=center><td width='100%'>" & _
	  vbcrlf&"  <table border=0>" & _
	  vbcrlf&"  <tr><td align=center><a href='news_view.asp?id="&nid&"' target =_blank class=red_3>"&format_rk(pic_temp,2,4,web_var(web_num,7),web_var(web_num,8))&"</a></td></tr>" & _
	  vbcrlf&"  <tr><td height=18 align=center class=btd><a href='news_view.asp?id="&nid&"' target=_blank class=red_3>"&code_html(rs("topic"),1,t_num)&"</a></td></tr>" & _
	  vbcrlf&"  </table>" & _
	  vbcrlf&"</td></tr></table>"
 end if
  rs.close

  if n_jt<>"" then n_jt=img_small(n_jt)
  temp2="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf><tr height=0><td width='75%'></td><td width='20%'></td></tr>"
  sql="select top "&n_num&" id,topic,tim,counter,ispic,istop from news where hidden=1 order  by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    tnum=c_num:istop=""
    if rs("istop")=true then tnum=tnum-3:istop=news_tui
    cnum=c_num:ispic="":topic=rs("topic"):tim=rs("tim")
    if rs("ispic")=true then cnum=cnum-2:ispic=new_tu
    temp2=temp2&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&">"&n_jt&"<a href='news_view.asp?id="&rs("id")&"'"&atb&" title='"&code_html(topic,1,0)&"'>"&code_html( topic,1,cnum)&ispic&"</a>"&istop&"</td><td>"
    if et>-1 then temp2=temp2&format_end(et,"<font class=gray>"&time_type(rs("tim") ,timt)&"</font>,<font class=blue>"&rs("counter")&"</font>")
    temp2=temp2&"</td></tr><tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
  rs.close
  temp2=temp2&"</table>"
  temp1="<table border=0 width='100%'><tr><td width='33%'>"&temp1&"</td><td  width='1%'></td><td width='66%' valign='top'><table width='100%' border=0><tr><td>"&temp2 &"</td></tr></table></td></tr></table>"
  response.write kong&format_bar("<a href='news.asp'><font class="&sk_class&"><b>今日图片新闻</b></font></a>",temp1,sk_bar,0,0,"||","")
end sub

sub links_main(lt,nummer)
  dim temp1,nname
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=0>"
  sql="select * from links where sort='"&lt&"' and hidden=1 order by orders"
  set rs=conn.execute(sql)
  do while not rs.eof
    temp1=temp1&vbcrlf&"<tr align=center height=40>"
    for i=1 to nummer
      if rs.eof then exit for
      temp1=temp1&vbcrlf&"<td width='16%'><a href='"&rs("url")&"' target=_blank>"
      if lt="txt" then
        temp1=temp1&code_html(rs("nname"),1,0)
      else
        temp1=temp1&"<img src='"&rs("pic")&"' border=0 width=88 height=31 title='"&code_html(rs("nname"),1,0)&"'>"
      end if
      temp1=temp1&"</a></td>"
      rs.movenext
    next
    temp1=temp1&vbcrlf&"</tr>"
  loop
  rs.close
  temp1=temp1&"</table>"
  response.write temp1
end sub

sub web_search(wt)
  if wt=1 then response.write ukong
%>
  <table border=0>
  <form action='search.asp' method=get>
  <tr>
  <td><%response.write img_small("new")%>站内搜索：</td>
  <td>&nbsp;<input type=text name=keyword value='' size=20 maxlength=20></td>
  <td>&nbsp;&nbsp;<select name=sea_type>
<option value='forum'>论坛</option>
<option value='news'>新闻</option>
<option value='article'>文栏</option>
<option value='down'>下载</option>
<option value='paste'>图片</option>
<option value='video'>影视</option>
<option value='flash'>Flash</option>
<option value='website'>网站</option>
</select>&nbsp;&nbsp;</td>
  <td><input type=checkbox name=celerity value='yes'></td>
  <td>快速搜索&nbsp;&nbsp;</td>
  <td valign=top><input type=image src='images/small/web_sea.gif' border=0></td>
  <td>&nbsp;&nbsp;<a href='search.asp?action=help' title='多功能搜索'>搜索帮助</a></td>
  </tr>
  </form>
  </table>
<%
end sub

sub ip_search
%>
<table border=0 cellpadding=0 cellspacing=0 width='100%'><tr><td colspan=2 align=left height=24>&nbsp;&nbsp;请输入正确的 IP 地址</td></tr>
<form action='ip_address.asp' method=post>
<tr height=26><td align=center><input type=text name=ip size=18></td>
<td><input type=submit value='搜索' style=""width:35;""></td></tr></form></table>

<%
end sub

sub vouch_top(ijt,sh,n_num)
  dim temp1,n_jt,et
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" name,url,remark from website where isgood=1 and hidden=1 order by counter desc,id"
  set rs=conn.execute(sql)
  do while not rs.eof
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td height="&space_mod&" class=bw><img border=0 src='images/"&web_var(web_config,5)&"/jt13.gif'>&nbsp;<a href="&rs("url")&" target='_blank' title="&rs("remark")&">"&code_html(rs("name"),1,8)&"</a></td></tr><tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
  response.write kong&table1%>
<tr<%response.write table2%>><td class=end> <%response.write img_small(us)%>  <b>最新推荐</b></td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='98%' cellspacing=0 cellpadding=0>
  <tr><td align=center><% response.write temp1%></td></tr>
  </table>
</td></tr>
</table>
<%
end sub

sub main_gallery_pic(nnhead,dsql,nt,n_num,c_num,w,h)
  dim sk_bar,sk_class,temp1,temp2,nid,cid,sid,name,uname,tim,pic,spic,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2><tr align=center valign=top>"
  sql="select top "&n_num&" * from gallery where hidden=1 and types='"&nt&"'"&dsql
  select case nt
  case "paste"
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新贴图" 
  end select
  set rs=conn.execute(sql)
  do while not rs.eof
    name=rs("name"):nid=rs("id"):cid=rs("c_id"):sid=rs("s_id"):uname=rs("username"):tim=rs("tim")
 pic=rs("pic"):spic=rs("spic")
    temp1=temp1&vbcrlf&"<td width='"&int(100\n_num)&"%'>"
 if nt="paste" then
 temp2="<table border=0 cellspacing=0 cellpadding=2 width='100%' class=tf><tr><td align=center><a href='gallery.asp?types=view&action=paste&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&"><img src='"&url_true(web_var(web_upload,1),pic)&"' border=0 width='"&w&"' height='"&h&"' alt='图片名称："&code_html(name,1,0)&" <br>发 布 人："&rs("username")&"<br>整理时间："&time_type(tim,33)&"'></a></td></tr>" & _
   vbcrlf&"<tr><td align=center class=bw><a href='gallery.asp?types=view&action=paste&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&" class=red_3><b>"&code_html(name,1,c_num)&"</b></a></td></tr></table>"
 temp1=temp1&vbcrlf&format_k(temp2,1,5,w+7,h+30)&"</td>"
 else
 end if
    rs.movenext
  loop
  temp1=temp1&"</tr></table>"
  response.write kong&table1%>
<tr<%response.write table2%>><td class=end> <%response.write img_small(us)%>  <b>精彩贴图</b></td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='98%' cellspacing=0 cellpadding=0>
  <tr><td align=center><% response.write temp1%></td></tr>
  </table>
</td></tr>
</table>
<%
end sub

sub main_flash_pic(nnhead,dsql,nt,n_num,c_num,w,h)
  dim sk_bar,sk_class,temp1,temp2,nid,cid,sid,name,uname,tim,pic,spic,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2><tr align=center valign=top>"
  sql="select top "&n_num&" * from flash where hidden=1 and types='"&nt&"'"&dsql
  select case nt
  case "flash"
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新Flash"
  end select
  set rs=conn.execute(sql)
  do while not rs.eof
    name=rs("name"):nid=rs("id"):cid=rs("c_id"):sid=rs("s_id"):uname=rs("username"):tim=rs("tim")
 pic=rs("pic"):spic=rs("spic")
    temp1=temp1&vbcrlf&"<td width='"&int(100\n_num)&"%'>"
 if nt="flash" then
 temp2="<table border=0 cellspacing=0 cellpadding=2 width='100%' class=tf><tr><td align=center><a href='flash.asp?types=view&action=flash&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&"><img src='"&url_true(web_var(web_upload,1),spic)&"' border=0 width='"&w&"' height='"&h&"' alt='Flash名称："&code_html(name,1,0)&" <br>发 布 人："&rs("username")&"<br>整理时间："&time_type(tim,33)&"'></a></td></tr>" & _
   vbcrlf&"<tr><td align=center class=bw><a href='flash.asp?types=view&action=flash&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&" class=red_3><b>"&code_html(name,1,c_num)&"</b></a></td></tr></table>"
 temp1=temp1&vbcrlf&format_k(temp2,1,5,w+10,h+30)&"</td>"
 else
 end if
    rs.movenext
  loop
  temp1=temp1&"</tr></table>"
  response.write kong&table1%>
<tr<%response.write table2%>><td class=end> <%response.write img_small(us)%>  <b>闪客剧场</b></td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='98%' cellspacing=0 cellpadding=0>
  <tr><td align=center><% response.write temp1%></td></tr>
  </table>
</td></tr>
</table>
<%
end sub

sub links_up(sl,lt,nummer)
  dim temp1,nname
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=0><tr><td height='10'></td></tr><tr><td><marquee scrollamount=1 scrollDelay=5 direction=up height='155' onMouseOver=this.stop() onMouseOut=this.start()><table border=0 width='100%' cellspacing=0 cellpadding=0>"
  sql="select top "&sl&" * from links where sort='"&lt&"' and hidden=1 order by orders"
  set rs=conn.execute(sql)
  do while not rs.eof
    temp1=temp1&vbcrlf&"<tr align=center height=40>"
    for i=1 to nummer
      if rs.eof then exit for
      temp1=temp1&vbcrlf&"<td width='16%'><a href='"&rs("url")&"' target=_blank>"
      if lt="txt" then
        temp1=temp1&code_html(rs("nname"),1,0)
      else
        temp1=temp1&"<img src='"&rs("pic")&"' border=0 width=88 height=31 title='"&code_html(rs("nname"),1,0)&"'>"
      end if
      temp1=temp1&"</a></td>"
      rs.movenext
    next
    temp1=temp1&vbcrlf&"</tr>"
  loop
  rs.close
  temp1=temp1&"</table></marquee></td></tr></table>"
  call left_type(temp1,"links",1)
end sub

sub vouch_left(vjt,vjt2)
  dim temp1
  if vjt<>"" then vjt=img_small(vjt)
  if vjt2<>"" then vjt2=img_small(vjt2)
  temp1=vbcrlf&"<table border=0 width='98%' cellspacing=0 cellpadding=4 align=center>" & _
 vbcrlf&"<tr><td height=5 width='48%'></td><td width='52%'></td></tr>" & _
 vbcrlf&"<tr><td>"&vjt&"<a href='gallery.asp?action=paste'>精彩贴图</a></td><td>"&vjt2&"<a href='user_put.asp?action=gallery'>推荐图片</a></td></tr>" & _
 vbcrlf&"<tr><td>"&vjt&"<a href='flash.asp?action=flash''>精彩动画</a></td><td>"&vjt2&"<a href='user_put.asp?action=flash'>推荐动画</a></td></tr>" & _
 vbcrlf&"<tr><td>"&vjt&"<a href='business.asp?action=business'>精彩交易</a></td><td>"&vjt2&"<a href='user_put.asp?action=business'>推荐源码</a></td></tr>" & _
 vbcrlf&"<tr><td>"&vjt&"<a href='website.asp?action=website'>网站推荐</a></td><td>"&vjt2&"<a href='user_put.asp?action=website'>推荐网站</a></td></tr>" & _
 vbcrlf&"</table>"
  call vouch_skin(format_menu(index_url),temp1,"",1)
end sub

sub vouch_skin(t1,t2,t3,t4)
  if t4=1 then response.write "<table border=0 width='96%' cellspacing=0 cellpadding=0 align=center><tr><td align=center>"
  response.write kong&format_bar("<font class=end><b>"&t1&"</b></font>",t2,14,0,0,"||",t3)
  if t4=1 then response.write "</td></tr></table>"
end sub

sub main_gallery_pic(nnhead,dsql,nt,n_num,c_num,w,h,p_num)
  dim sk_bar,sk_class,temp1,pic_temp,nid,cid,sid,name,uname,tim,pic,r_num,j,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  r_num=int(n_num/p_num)
  if n_num mod p_num > 0 then r_num=r_num+1
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2>"
  sql="select top "&n_num&" * from gallery where hidden=1 and types='"&nt&"'"&dsql
  select case nt
  case "paste"
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新贴图" 
  case "flash"
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新Flash"
  end select
  set rs=conn.execute(sql)
  'do while not rs.eof
    for i = 1 to r_num
      temp1=temp1&"<tr align=center valign=top>"
        for j = 1 to p_num
        if rs.eof then exit for
            name=rs("name"):nid=rs("id"):cid=rs("c_id"):sid=rs("s_id"):uname=rs("username"):tim=rs("tim")
         pic=rs("pic")
 if nt="flash" then
    pic_temp="<table border=0><tr><td align=center><a href='gallery.asp?types=view&action="&nt&"&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&"><img src='"&url_true(web_var(web_upload,1),pic)&"' border=0 width="&w&" height="&h&" alt='Flash名称："&code_html(name,1,0)&"><br>发 布 人："&rs("username")&"<br>整理时间："&time_type(tim,33)&"'></a></td></tr>" & _
      vbcrlf&"<tr><td align=center class=bw><a href='gallery.asp?types=view&action="&nt&"&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&" class=red_3><b>"&code_html(name,1,c_num)&"</b></a></td></tr></table>"
 else
    pic_temp="<table border=0><tr><td align=center><a href='gallery.asp?types=view&action="&nt&"&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&"><img src='"&url_true(web_var(web_upload,1),pic)&"' border=0 width="&w&" height="&h&" alt='图片名称："&code_html(name,1,0)&"><br>发 布 人："&rs("username")&"<br>整理时间："&time_type(tim,33)&"'></a></td></tr>" & _
      vbcrlf&"<tr><td align=center class=bw><a href='gallery.asp?types=view&action="&nt&"&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&" class=red_3><b>"&code_html(name,1,c_num)&"</b></a></td></tr></table></td>"
 end if
    temp1=temp1&"<td height="&h+50&">"&format_k(pic_temp,1,5,w+10,h+30)&"</td>"
    rs.movenext
    next
   temp1=temp1&"</tr>" 
  next
  'loop
  temp1=temp1&"</table>"
  response.write kong&format_bar("<font class="&sk_class&"><b>"&nhead&"</b></font>",temp1,sk_bar,0,0,"||","")
end sub

sub main_flash_picv(nnhead,dsql,nt,n_num,c_num,w,h)
  dim sk_bar,sk_class,temp1,temp2,nid,cid,sid,name,uname,tim,pic,spic,nhead:nhead=nnhead:sk_bar=11:sk_class="end"
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2><tr align=center valign=top>"
  sql="select top "&n_num&" * from flash where hidden=1 and types='"&nt&"'"&dsql
  select case nt
  case "flash"
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新Flash"
  end select
  set rs=conn.execute(sql)
  do while not rs.eof
    name=rs("name"):nid=rs("id"):cid=rs("c_id"):sid=rs("s_id"):uname=rs("username"):tim=rs("tim")
 pic=rs("pic"):spic=rs("spic")
    temp1=temp1&vbcrlf&"<td width='"&int(100\n_num)&"%'>"
 if nt="flash" then
 temp2="<table border=0 cellspacing=0 cellpadding=2 width='100%' class=tf><tr><td align=center><a href='flash.asp?types=view&action=flash&c_id="&cid&"&s_id="&sid&"&id="&nid&"'"&atb&"><img src='"&url_true(web_var(web_upload,1),spic)&"' border=0 width="&w&" height="&h&"></a></td></tr>" & _
        "<tr><td align=center class=blue><b>"&code_html(name,1,10)&"</b></td></tr>" & _
               "<tr><td align=center>"&m_unit&"：<font class=red_3>"&rs("emoney")&"</font>  人气：<font class=red>"&rs("counter")&"</font></td></tr>" & _
        "<tr><td align=center>"&power_pic(0,rs("power"),0)&"</td></tr>" & _
   "</table>"
 temp1=temp1&vbcrlf&format_k(temp2,1,5,w+10,h+30)&"</td>"
 else
 end if
    rs.movenext
  loop
  temp1=temp1&"</tr></table>"
  response.write kong&table1%>
<tr<%response.write table2%>><td class=end> <%response.write img_small(us)%>  精彩动画</td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='98%' cellspacing=0 cellpadding=0>
  <tr><td align=center><% response.write temp1%></td></tr>
  </table>
</td></tr>
</table>
<%
end sub

sub main_web_sitenew(nh,n_jt,nnhead,nmore,nsql,nt,n_num,c_num,et,tt)
  dim temp1,nid,name,tim,counter,nhead:nhead=nnhead
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1=vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,c_id,s_id,name,username,url,tim,isgood,counter from website where hidden=true"&nsql
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
    if nhead="" then nhead="热门站点"
  case "good"
    sql=sql&" and isgood=true order by id desc"
    if nhead="" then nhead="推荐站点"
  case else
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新站点"
  end select
 set rs=conn.execute(sql)
  do while not rs.eof
    name=rs("name"):tim=rs("tim"):counter=rs("counter")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td class=bw>"&n_jt&"<a href='website.asp?c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&action=view&id="&rs("id")&"' target=_blank title='站点名称："&code_html(name,1,0)&"<br>发 布 人："&rs("username")&"<br>网站人气："&counter&"<br>整理时间："&time_type(tim,88)&"'>"&code_html(name,1,c_num)&"</a>"
    if tt>0 then temp1=temp1&format_end(et,time_type(tim,tt)&",<font class=blue>"&counter&"</font>")
    temp1=temp1&"<tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
    temp1=temp1&"</tr></table>"
  response.write kong&table1%>
<tr<%response.write table2%>><td class=end> <%response.write img_small(us)%>  最新站点</td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='98%' cellspacing=0 cellpadding=0>
  <tr><td align=center><% response.write temp1%></td></tr>
  </table>
</td></tr>
</table>
<%
end sub

sub main_web_sitehot(nh,n_jt,nnhead,nmore,nsql,nt,n_num,c_num,et,tt)
  dim temp1,nid,name,tim,counter,nhead:nhead=nnhead
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1=vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,c_id,s_id,name,username,url,tim,isgood,counter from website where hidden=true"&nsql
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
    if nhead="" then nhead="热门站点"
  case "good"
    sql=sql&" and isgood=true order by id desc"
    if nhead="" then nhead="推荐站点"
  case else
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新站点"
  end select
 set rs=conn.execute(sql)
  do while not rs.eof
    name=rs("name"):tim=rs("tim"):counter=rs("counter")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td class=bw>"&n_jt&"<a href='website.asp?c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&action=view&id="&rs("id")&"' target=_blank title='站点名称："&code_html(name,1,0)&"<br>发 布 人："&rs("username")&"<br>网站人气："&counter&"<br>整理时间："&time_type(tim,88)&"'>"&code_html(name,1,c_num)&"</a>"
    if tt>0 then temp1=temp1&format_end(et,time_type(tim,tt)&",<font class=blue>"&counter&"</font>")
    temp1=temp1&"<tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
    temp1=temp1&"</tr></table>"
  response.write kong&table1%>
<tr<%response.write table2%>><td class=end> <%response.write img_small(us)%>  热门站点</td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='98%' cellspacing=0 cellpadding=0>
  <tr><td align=center><% response.write temp1%></td></tr>
  </table>
</td></tr>
</table>
<%
end sub

sub main_web_sitegood(nh,n_jt,nnhead,nmore,nsql,nt,n_num,c_num,et,tt)
  dim temp1,nid,name,tim,counter,nhead:nhead=nnhead
  if n_jt<>"" then n_jt=img_small(n_jt)
  temp1=vbcrlf&"<table border=0 width='100%' cellspacing=0 cellpadding=2 class=tf>"
  sql="select top "&n_num&" id,c_id,s_id,name,username,url,tim,isgood,counter from website where hidden=true"&nsql
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
    if nhead="" then nhead="热门站点"
  case "good"
    sql=sql&" and isgood=true order by id desc"
    if nhead="" then nhead="推荐站点"
  case else
    sql=sql&" order by id desc"
    if nhead="" then nhead="最新站点"
  end select
 set rs=conn.execute(sql)
  do while not rs.eof
    name=rs("name"):tim=rs("tim"):counter=rs("counter")
    temp1=temp1&vbcrlf&"<tr onmouseover=""javascript:this.bgColor='"&c1&"';"" onmouseout=""javascript:this.bgColor='"&c2&"';""><td class=bw>"&n_jt&"<a href='website.asp?c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&action=view&id="&rs("id")&"' target=_blank title='站点名称："&code_html(name,1,0)&"<br>发 布 人："&rs("username")&"<br>网站人气："&counter&"<br>整理时间："&time_type(tim,88)&"'>"&code_html(name,1,c_num)&"</a>"
    if tt>0 then temp1=temp1&format_end(et,time_type(tim,tt)&",<font class=blue>"&counter&"</font>")
    temp1=temp1&"<tr><td height=1 background='images/bg_dian.gif'></td></tr>"
    rs.movenext
  loop
    temp1=temp1&"</tr></table>"
  response.write kong&table1%>
<tr<%response.write table2%>><td class=end> <%response.write img_small(us)%>  推荐站点</td></tr>
<tr<%response.write table3%>><td align=center>
  <table border=0 width='98%' cellspacing=0 cellpadding=0>
  <tr><td align=center><% response.write temp1%></td></tr>
  </table>
</td></tr>
</table>
<%
end sub


sub main_shop()
%>
<table border=0 width='98%' cellspacing=0 cellpadding=0><tr valign=top><%
  sql="select top 3 id,name,serial,brand,stock,smallimg,price_1,price_2,remark_1 from product where isgood=1 and hidden=1 order by tim desc,id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    response.write vbcrlf&"<td width='33%' align=center>"&shop_view1()&"</td>"
    rs.movenext
  loop
  rs.close
%></tr></table><%
end sub

function shop_view1()
 dim w_h,nid:w_h=" width=120 height=90":nid=rs("id")
  shop_view1=vbcrlf&"<table border=0 width='90%' cellspacing=0 cellpadding=0 class=tf>" & _
	    vbcrlf&"<tr><td height=5></td></tr>" & _
	    vbcrlf&"<tr><td colspan=2 align=center><a href='shop_view.asp?id="&nid&"'><img src='"&url_true(web_var(web_upload,1),rs("smallimg"))&"' border=0"&w_h&"></a></td></tr>" & _
	    vbcrlf&"<tr><td colspan=2 align=center height=25><a href='shop_view.asp?id="&nid&"' class=blue><b>"&rs("name")&"</b></a></td></tr>" & _
    vbcrlf&"</table>"
end function

%>