<%
dim review_page_num
review_page_num=dim_num(26)

'call review_type("art",id,"article_view.asp?id="&id,1|2|3|4,)
sub review_type(rtsort,rtid,rturl,rtt,ruser)
  dim isadmin,ri,bgs,rsr,sqlr,rusername,remail,rtype,rtim,retim,reword,rrssum
  isadmin=false
  if int(login_modep)=1 then isadmin=true
  rrssum=0
  sqlr="select count(rid) from review where rsort='"&rtsort&"' and re_id="&rtid
  set rsr=joekoe_cms.exec(sqlr,1)
  if not rsr.eof then
    rrssum=rsr(0)
  end if
  rsr.close
%>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr><td class=bg_tds height=20>&nbsp;&nbsp;→&nbsp;<a onclick="document.all.review_word.style.display=document.all.review_word.style.display=='none'?'':'none';return false;" href="javsscript:;"><b>评论内容</b> (点击查看)</a><%
  response.write "&nbsp;&nbsp;&nbsp;共<font class=red>"&rrssum&"</font>条评论，每页显示<font class=red>"&review_page_num&"</font>条评论&nbsp;&nbsp;&nbsp;<a href='javascript:;' onclick=""javascript:open_win('review.asp?action=list&rsort="&rtsort&"&re_id="&rtid&"','review_list',500,400,'yes');"">浏览所有评论</a>"
  if isadmin then response.write "&nbsp;&nbsp;&nbsp;<a href='review.asp?action=delete&rsort="&rtsort&"&re_id="&rtid&"&rurl="&server.urlencode(rturl)&"' onclick=""javascript:return click_return('删除相关的所有评论内容',0);"">删除所有评论</a>"
%></td></tr>
<tr id=review_word<%if rtt<>1 then response.write " style=""display:none;"""%>><td class=bg_td align=center>
  <table border=0 cellspacing=1 cellpadding=2 class=table bordercolor=#808080>
<%
  sqlr="select top "&review_page_num&" rid,rusername,remail,rword,rtim,rtype,retim,reword from review where rsort='"&rtsort&"' and re_id="&rtid&" order by rid desc"
  set rsr=joekoe_cms.exec(sqlr,1)
  do while not rsr.eof
    bgs=""
    if (ri+1) mod 2=0 then bgs="_td"
    rusername=rsr("rusername")
    remail=rsr("remail")
    rtype=rsr("rtype")
    rtim=rsr("rtim")
    retim=rsr("retim")
    reword=rsr("reword")
    if var_null(remail)<>"" then remail="<a href='mailto:"&remail&"'><img src='"&joekoe_cms.web_dir_skin&"small/email.gif' border=0 align=absmiddle alt='"&rusername&" 的电子邮件："&remail&"'></a>"
    if rtype=1 then rusername=format_user_name(rusername,0,"")
    rtim="<font class=tims alt='"&joekoe_cms.time_type(rtim,2)&"'>"&joekoe_cms.time_type(rtim,4)&"</font>"
%>
<tr class=bg<%response.write bgs%>><td>
  <table border=0 cellspacing=0 cellpadding=2 width='100%' class=tf>
  <tr><td class=bw><%response.write img_skin("h_review")
    response.write rtim&"&nbsp;&nbsp;"&rusername&"&nbsp;&nbsp;"&remail
    if login_username=ruser and login_mode<>"" or isadmin then
      response.write "&nbsp;&nbsp;"&review_page("review.asp?action=reply&rsort="&rtsort&"&re_id="&rtid&"&rid="&rsr("rid")&"&rurl="&server.urlencode(rturl))
    end if
    if isadmin then
       response.write "&nbsp;&nbsp;<a href='review.asp?action=del&rsort="&rtsort&"&re_id="&rtid&"&rid="&rsr("rid")&"&rurl="&server.urlencode(rturl)&"' onclick=""javascript:return click_return('删除这条评论内容',0);""><img src='skin/"&joekoe_cms.web_skin&"/small/del.gif' border=0 align=absmiddle alt='删除这条评论'></a>"
    end if
%></td></tr>
  <tr><td class=bw><font class=blue><b>评：</b></font><%response.write joekoe_cms.code_html(rsr("rword"),2,0)%></td></tr>
<%
    if var_null(reword)<>"" then
      response.write "  <tr><td class=bw><font class=red2><b>回：</b></font>"&joekoe_cms.code_html(reword,2,0)&"</td></tr>"
    end if
%>
  </table>
</td></tr>
<%
    rsr.movenext
    ri=ri+1
  loop
  rsr.close
  set rsr=nothing
  if ri=0 then response.write "<tr class=bg><td class=gray>（没有相关评论）</td></tr>"
%>
  </table>
</td></tr>
<tr><td class=bg_tds height=20>&nbsp;&nbsp;<b>→&nbsp;<a onclick="document.all.review_add.style.display=document.all.review_add.style.display=='none'?'':'none';return false;" href="javsscript:;"><font class=red_3>发表我的评论</font></a></b></td></tr>
<tr id=review_add><td align=center>
  <table border=0 cellspacing=0 cellpadding=0 width='100%'>
  <tr align=center>
  <td width='75%'>
    <table border=0 cellspacing=0 cellpadding=2>
    <form name=review_frm action='review.asp?rsort=<%response.write rtsort%>&re_id=<%response.write rtid%>&ruser=<%response.write ruser%>&rurl=<%response.write server.urlencode(rturl)%>' method=post onsubmit="javascript:frm_submitonce(this);">
    <tr><td>您的姓名：</td><td><input type=text name=rusername value='<%response.write login_username%>' size=15 maxlength=20>　您的Email：<input type=text name=remail size=24 id=0 maxlength=50></td></tr>
    <tr valign=top><td class=htd>评论内容：<br>250字内</td><td><textarea rows=4 cols=55 name=rword></textarea></td></tr>
    <tr><td>发表评论：</td><td><input type=submit value='点击发表评论'>　　<input type=reset value='重新填写'>　　　　发表评论须知&nbsp;→</td></tr>
    </form>
    </table>
  </td>
  <td width='25%'>
    <table border=0 cellspacing=0 cellpadding=2 width='100%'>
    <tr><td class=gray><li>尊重网上道德，遵守《全国人大常委会关于维护互联网安全的决定》及中华人民共和国其他各项有关法律法；</li></td></tr>
    <tr><td class=gray><li>本站有权保留或删除您发表的任何评论内容；</li></td></tr>
    </table>
  </td>
  </tr>
  </table>
</td></tr>
<tr><td height=2></td></tr>
</table>
<%
end sub

function review_page(t1)
  dim a
  a="<a href='javascript:;' onclick=""javascript:open_win('"&t1&"','review_page',500,305,'no');""><img src='skin/"&joekoe_cms.web_skin&"/small/reply.gif' border=0 align=absmiddle alt='回复这条评论'></a>"
  review_page=a
end function

sub font_word_js()
%>
<script language=JavaScript>
<!--
  function do_color(vobject,vvar)
  { document.getElementById(vobject).style.color=vvar; }
  function do_zooms(vobject,vvar)
  { document.getElementById(vobject).style.fontsize=vvar+'px'; }
-->
</script>
<%
end sub

sub font_word_action()
%>浏览选项：
<!--
<a href="###" onclick="javascript:do_zooms('font_word',16);">大</a>
<a href="###" onclick="javascript:do_zooms('font_word',14);">中</a>
<a href="###" onclick="javascript:do_zooms('font_word',12);">小</a>&nbsp;
-->
<select name=do_color_frm size=1 onchange="if(this.options[this.selectedIndex].value!=''){do_color('font_word',this.options[this.selectedIndex].value);}">
<option value=''>颜色</option>
<option value='#000000' style="color:#000000">默认</option>
<option value='#808080' style="color:#808080">灰度</option>
<option value='#808000' style="color:#808000">橄榄色</option>
<option value='#008000' style="color:#008000">绿色</option>
<option value='#0000FF' style="color:#0000FF">蓝色</option>
<option value='#800000' style="color:#800000">褐色</option>
<option value='#FF0000' style="color:#FF0000">红色</option>
</select>&nbsp;<%
end sub
' style="font-size:14px; line-height:150%;"
sub font_word_type(fvar)
%>
  <table border=0 cellpadding=0 cellspacing=0 width='100%'>
  <tr>
  <td width=22 height=1 background='images/main/view_line.gif'></td>
  <td bgcolor=#666666></td>
  <td width=1 rowspan=5 bgcolor=#666666></td>
  </tr>
  <tr><td width=22 height=5 background='images/main/view_b.gif'></td><td></td></tr>
  <tr>
  <td background='images/main/view_bg.gif'></td>
  <td align=center>
    <table border=0 width='98%' align=center class=tf>
    <tr><td width='100%' class=bw><font id="font_word" class=htd style="font-size:14px; font-family:宋体, Verdana, Arial, Helvetica, sans-serif;"><% response.write fvar %></font></td></tr>
    </table>
  </td>
  </tr>
  <tr><td width=22 height=5 background='images/main/view_b.gif'></td><td></td></tr>
  <tr>
  <td height=1 background='images/main/view_line.gif'></td>
  <td height=1 bgcolor=#666666></td>
  </tr>
  </table>
<%
end sub
%>
