<%
'------------------------------------forum_view-------------------------------------
function view_type()
  dim up:up=int(objv7.popedom_format(u_popedom,42))
  table_bg=" class=tdbg"
  if ii mod 2=0 then table_bg=" class=tdbg-dark"
  if var_null(u_whe)<>"" then
    u_whe="来自："&u_whe&"<br>"
  end if
  if var_null(u_nname)<>"" then
    u_nname="头衔："&u_nname&"<br>"
  end if
  
  view_type=vbcrlf & "<table width='100%' border=0 align=center cellpadding=2 cellspacing=1><tr align=center valign=top"&table_bg&"><td width='20%'>" & _
	    vbcrlf & "<table border=0 width='99%'><tr><td align=center height=30><table border=0><tr><td><font class=hit><b>"&u_username&"</b></font></td><td>&nbsp;"&user_view_sex(u_sex,u_last_tim)&"</td></tr></table></td></tr>" & _
	    vbcrlf & "<tr><td align=center height=96><img src='images/face/"&rs("u_face")&".gif' border=0></td></tr>" & _
	    vbcrlf & "<tr><td height=15><img src='images/star/star_"&user_star(u_integral,u_power,1)&".gif' border=0></td></tr>" & _
	    vbcrlf & "<tr><td>等级："&user_view_power(u_power,0)&user_star(u_bbs_counter,u_power,2)&"<br>"&u_nname&"贴子："&u_bbs_counter&"<br>积分："&u_integral&"<br>"&money_name&"："&u_emoney&"<br>"&u_whe&"注册："&formatdatetime(rs("u_tim"),2)&"</td></tr>" & _
	    vbcrlf & "</table></td><td width='80%' height='100%'>" & _
	    vbcrlf & "<table border=0 width='99%' cellspacing=2 cellpadding=0 height='100%'><tr height=25><td width='85%'>" & _
	    vbcrlf & "<a target=_blank href='user_view.asp?username="&server.urlencode(u_username)&"'><img src='images/small/forum_profile.gif' title='查看 "&u_username&" 的详细信息' border=0></a>&nbsp;" & _
	    vbcrlf & "<a target=_blank href='user_friend.asp?action=add&add_username="&server.urlencode(u_username)&"'><img src='images/small/forum_friend.gif' title='将 "&u_username&" 加为我的好友' border=0></a>&nbsp;" & _
	    vbcrlf & "<a target=_blank href='user_message.asp?action=write&accept_uaername="&server.urlencode(u_username)&"'><img src='images/small/forum_message.gif' title='给 "&u_username&" 发短信' border=0></a>&nbsp;" & _
	    vbcrlf & "<a target=_blank href='mailto:"&u_email&"'><img src='images/small/forum_email.gif' title='给 "&u_username&" 发邮件' border=0></a>&nbsp;"
  if len(u_url)>7 then
    view_type=view_type&vbcrlf&"<a href='"&objv7.code_html(u_url,1,0)&"' target=_blank><img src='images/small/forum_url.gif' title='访问 "&u_username&" 的主页' border=0></a>&nbsp;"
  end if
  if len(u_qq)>1 and isnumeric(u_qq) then
    view_type=view_type&vbcrlf&"<a href='http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&u_qq&"' target=_blank><img src='images/small/forum_qq.gif' title='"&u_username&" 的QQ是："&u_qq&"' border=0></a>&nbsp;"
  end if
  view_type=view_type&vbcrlf&"<a href='forum_edit.asp?forum_id="&forumid&"&edit_id="&qid&"'><img src='images/small/forum_edit.gif' title='编辑这个贴子' border=0></a>&nbsp;"
  if int(fir_islock)<>1 then
    view_type=view_type&vbcrlf&"<a href='forum_reply.asp?forum_id="&forumid&"&quote=yes&view_id="&qid&"'><img src='images/small/forum_quote.gif' title='引用并回复这个贴子' border=0></a>&nbsp;" & _
	      vbcrlf&"<a href='forum_reply.asp?forum_id="&forumid&"&view_id="&qid&"'><img src='images/small/forum_reply.gif' title='回复这个贴子' border=0></a>"
  else
    view_type=view_type&vbcrlf&"<img src='images/small/forum_reply.gif' title='这个贴子已被锁定' border=0>"
  end if
  view_type=view_type&vbcrlf & "</td><td width='15%' align=center>第 <font class=time><b>"&ii+(viewpage-1)*nummer&"</b></font> 楼</td></tr>" & _
	    vbcrlf & "<tr><td colspan=2 height=1 bgcolor="&objv7.web_var(web_color,3)&"></td></tr>"
	    
  if up=0 then
    view_type=view_type&vbcrlf & "<tr><td colspan=2 valign=top align=center>" & _
	      vbcrlf & "<table border=0 width='98%'>" & _
	      vbcrlf & "<tr><td height=30><img src='images/icon/"&rs("icon")&".gif' align=absMiddle border=0>&nbsp;<font class=time><b>"&objv7.code_html(rs("topic"),1,0)&"</b></font></td></tr>" & _
	      vbcrlf & "<tr><td><font class=htd>"&code_jk(rs("word"))&"</font></td></tr>" & _
	      vbcrlf & "</table></td></tr>" & _
	      vbcrlf & "<tr><td colspan=2 height=20 align=right>"&img_small("signature")&"</td></tr>" & _
	      vbcrlf & "<tr><td colspan=2 height=30 align=center valign=top><table border=0 width='96%' class=tf><tr><td><font class=htd>"&u_remark&"</font></td></tr></table></td></tr>"
  else
    view_type=view_type&vbcrlf & "<tr><td colspan=2 valign=top><br><table border=0><tr><td class=htd><font class=red_2>========================<br>&nbsp;&nbsp;该用户的论坛发言已暂时被管理屏蔽！<br>========================</font></td></tr></table></td></tr>"
  end if
  '<script language=javascript>ads_txt_type("&objv7.rand_num(2)&",1);</script>
  view_type=view_type&vbcrlf & "</table></td></tr>" & _
	    vbcrlf & "<tr"&table_bg&"><td>&nbsp;&nbsp;"&img_small("forum_tim")&"<font class=gray>"&objv7.time_type(rs("tim"),8)&"</font></td>" & _
	    vbcrlf&"<td><table border=0 width='100%'><tr><td width=*></td><td align=right>"&objv7.ip_types(rs("ip"),u_username,1)&"　<img src='images/small/sys.gif' align=absMiddle title='"&objv7.view_sys(rs("sys"))&"' border=0>　<a href=""javascript:"&del_type&"('"&forumid&"','"&iid&"');""><img src='images/small/forum_del.gif' align=absMiddle border=0></a></td></tr></table></td></tr>" & _
	    "</table>"&web_right()&web_left(2)
end function

function user_view_power(uvp,ut)
  user_view_power=img_small("icon_"&uvp)
  if ut=1 then user_view_power=user_view_power&"<font class=time>"&format_power(uvp,1)&"</font>"
end function

'-------------------------------------主题转移--------------------------------------
function forum_move(fmfid,fmid)
  dim rsclass,strsqlclass,rsboard,strsqlboard,fid,fb,cid
  forum_move=vbcrlf & "<select onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">" & _
	   vbcrlf & "<option selected>将此主题转移至...</option>"
  strsqlclass="select class_id,class_name from bbs_class order by class_order"
  set rsclass=conn.execute(strsqlclass)
  if not(rsclass.bof and rsclass.eof) then
    do while not rsclass.eof
      cid=rsclass("class_id")
      call forum_move_board(cid,0,fmfid,fmid,0,fb)
      forum_move=forum_move & vbcrlf & "<option class=bg_2>╋ "& rsclass("class_name") &"</option>"
      forum_move=forum_move & fb
      fb=""
      rsclass.movenext
    loop
  end if
  set rsclass=nothing:set rsboard=nothing
  forum_move=forum_move & vbcrlf & "</select>"
end function

sub forum_move_board(cid,fid,fmfid,fmid,ff,fo)
  dim rsboard,strsqlboard,forumid,forumname,fi,foo
  strsqlboard="select forum_id,forum_name,forum_power,forum_hidden from bbs_forum where forum_f="&fid&" and class_id=" & cid & " order by forum_order"
  set rsboard=conn.execute(strsqlboard)
  if rsboard.eof and rsboard.bof then
    rsboard.close:set rsboard=nothing
    exit sub
  end if
  do while not rsboard.eof
    forumid=rsboard("forum_id"):forumname=rsboard("forum_name")
    foo=vbcrlf & "<option"
    if int(forumid)<>int(fmfid) then  foo=foo&" value='forum_list.asp?action=move&view_id="&fmid&"&forum_id=" &forumid& "'"
    foo=foo&">"
    for fi=0 to ff
      if fi=ff then
        foo=foo&"├"
      else
        foo=foo&"│"
      end if
    next
    foo=foo&forumname & "</option>"");"
    fo=fo&foo
    call forum_move_board(cid,forumid,fmfid,fmid,ff+1,fo)
    rsboard.movenext
  loop
  rsboard.close:set rsboard=nothing
end sub
%>