<!-- #include file="../include/skin.asp" -->
<!-- #include file="../include/jk_email.asp" -->
<!-- #include file="../include/jk_sendmail.asp" -->
<!-- #include file="../include/jk_val_code.asp" -->
<!-- #include file="include/main.asp" -->
<%
dim tmp
tit="查看投票信息"
call web_head(0,0,4,0,0)
call joekoe_cms.js_put("self.moveTo(0,0);",1)
if login_mode="" then
%>
<script language=javascript>
<!--
alert("错误信息：\n\n您现在还没有登陆本站！\n\n请先注册并登陆本站.");
window.close();
-->
</script>
<%
else
  call vote_user_main()
  call web_copy()
end if
call web_end(0,1)


sub vote_user_main()
  dim viewid,topic,tim,vote_num,v_username,vdim,vnum,tdim,tnum,ti
  viewid=trim(request.querystring("view_id"))
  if not int_true(viewid) then
    tmp=tmp&vbcrlf&"<script language=javascript>alert(""查看调查信息的ID出错！\n\n请勿非法提交参数！"");window.close();</script>"
    exit sub
  end if
  sql="select top 1 t.topic,t.tim,t.vote_num,v.v_username from bbs_topic as t,bbs_vote as v where  t.isvote=1 and t.id="&viewid&" and v.reply_id="&viewid
  set rs=joekoe_cms.exec(sql,1)
  if rs.eof then
    rs.close
    tmp=tmp&vbcrlf&"<script language=javascript>alert(""查看调查信息的ID出错！\n\n请勿非法提交参数！"");window.close();</script>"
    exit sub
  end if
  topic=rs("topic")
  tim=rs("tim")
  vote_num=rs("vote_num")
  v_username=rs("v_username")
  rs.close
tmp=tmp&vbcrlf&"<tr ><td colspan=2 class=bbs_td>查看: "&joekoe_cms.code_html(topic,1,0)&"</td></tr>" & _
        vbcrlf&"<tr class=bbs_tr><td colspan=2  class=htd><font class=gray>共<font class=red>"&vote_num&"</font>票，发起时间：<font alt='"&joekoe_cms.time_type(tim,2)&"'>"&joekoe_cms.time_type(tim,4)&"</font></font></td></tr>"
  vdim=split(v_username,"|")
  vnum=ubound(vdim)
  for i=0 to vnum

tmp=tmp&vbcrlf&"<tr class=bbs_tr>" & _
vbcrlf&"<td width='30%'>"&format_user_name(left(vdim(i),instr(vdim(i),":")-1),0,"")&"</td>" & _
vbcrlf&"<td width='*'>"
    tdim=split(right(vdim(i),len(vdim(i))-instr(vdim(i),":")),",")
    tnum=ubound(tdim)
    for ti=0 to tnum
      tmp=tmp&(tdim(ti)+1)
      if ti<tnum then tmp1=tmp&","
    next
    erase tdim
tmp=tmp&vbcrlf&"</td>" & _
vbcrlf&"</tr>"
  next
  erase vdim
  call forum_bar_top(tit,tmp,1)
end sub
%>