<!-- #Include File="Include/AMH_onlogin.asp" -->
<!-- #Include File="../Include/Cls_UbbCode.asp" -->
<!-- #Include File="../Include/Cls_IpSys.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V2.0》，简称“AsaiMHV2”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Index_Url="BlogBook"
call AMH_master(0,0)
Call AMH_Header(1)
%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
  <td width=10></td>
  <td> <a href=AMH_blog.asp>博客列表 </a></td>
  <td width=10></td>
  <td> <a href=AMH_blogdata.asp>内容管理 </a></td>
  <td width=10></td>
  <td> <a href=AMH_blogbook.asp class=red>留言管理</a></td>
  <td width=10></td>
   <td> <a href=AMH_Review.asp?ChannelIDs=10>评论管理</a></td>
  <td width=10></td>
  <td> <a href=AMH_BlogSkin.asp>用户模板管理</a></td>
  <td width=10></td>
  <td> <a href=AMH_BlogSkin2.asp>模板导入导出</a></td>
   <td width=10></td>
  </tr>
  </table>
</td></tr>
</table>
<%
call AMH_table(1)
if action="handle" then call AsaiMHGo_Handle()

select case action
case "reply"
  call AsaiMHChk_Reply()
case else
  call AsaiMHChk_Main()
end select

Call AMH_Ender(tit)

sub AsaiMHChk_Reply()
  call AMH_td(tit_fir&"回复")
  dim reword,reicon,issecret,ishidden
  sql="select top 1 * from "&Data_Name&" where id="&id
  call Cls.exec("",-1)
  rs.open sql,conn,1,3
  if rs.eof then
    rs.close
    call AMH_msg(tit_fir&"ID（"&id&"）不存在！","?",1)
    exit sub
  end if
  if chk() then
    reword=Cls.Code_Admin("reword",1,250)
	reicon=Cls.Code_Form("re_icon")
    if reword="" then
      call AMH_error("回复内容 不能为空！")
      exit sub
    end if
    rs("reply")=reword
    rs("retim")=Cls.now_time
  	rs("isreply")=1
    If 	Cls.Code_Form("issecret")="yes" then rs("secret")= false
    If 	Cls.Code_Form("issecret")="no" then rs("secret")= true
    If 	Cls.Code_Form("ishidden")="yes" then rs("hidden")= true
    If 	Cls.Code_Form("ishidden")="no" then rs("hidden")= false
    rs.update
    rs.close
    call AMH_msg("成功回复了"&tit_fir&"（ID："&id&"）","?",1)
    exit sub
  end if
  call form_first()
%>
<form name=frm_gbook action='?nsort=<%Response.Write nsort%>&action=reply&id=<%Response.Write id%>' method=post>
<input type=hidden name=chk value='yes'>
<tr>
<td width='20%'><%Response.Write tit_fir%>主题：</td>
<td width='80%'><%Response.Write Cls.Code_Html(rs("topic"),1,0)%></td>
</tr>
<tr>
<td><%Response.Write tit_fir%>作者：</td>
<td><%Response.Write Cls.Code_Html(rs("luser"),1,0)%></td>
</tr>
<tr>
<td><%Response.Write tit_fir%>区域：</td>
<td><%Response.Write "<a href='../Blog/GBook/?"&rs("buser")&"' target=_blank>"&rs("buser")&"</a>"%></td>
</tr>
<tr>
<td><%Response.Write tit_fir%>内容：</td>
<td><%Response.Write Ubb.Ubbcode(rs("word"))%></td>
</tr>
<tr>
<td><%Response.Write tit_fir%>时间：</td>
<td><%Response.Write rs("tim")%></td>
</tr>
<tr>
<td>相关属性：</td>
<td>
<%If  rs("hidden")=false then %>
<input name="ishidden" type="checkbox" value="yes"  checked="checked">&nbsp;审核此留言&nbsp;
<%else%>
<input name="ishidden" type="checkbox" value="no"  >&nbsp;设此留言为未审核&nbsp;
<%end if%>
<!--
<%If  rs("secret")=True then %>
<input name="issecret" type="checkbox" value="yes"  >&nbsp;公开此留言&nbsp;
<%else%>
<input name="issecret" type="checkbox" value="no"  >&nbsp;设此留言为悄悄话&nbsp;
<%end if%>
-->
</td>
</tr>
<%Response.Write ShowUBBEditor("","frm_gbook","reword","回复",Cls.Code_Html(rs("reply"),0,0),"Default",560,200)%>
<%if rs("retim")<>"" Then%>
<tr>
<td>回复时间：</td>
<td><%Response.Write rs("retim")%></td>
</tr>
<%
end if
  call submit_edit()
  rs.close
end sub


sub AsaiMHChk_Main()
  dim topic,tim
%>
<form name=sel_form action='?AsaiMHMod=<%Response.Write AsaiMHMod%>&action=handle' method=post>
<tr align=center>
<td class=td width='5%'>序号</td>
<td class=td width='35%'><%Response.Write tit_fir%>主题</td>
<td class=td width='15%'><%Response.Write tit_fir%>留言者</td>
<td class=td width='15%'><%Response.Write tit_fir%>留言区</td>
<td class=td width='15%'>留言时间</td>
<td class=td width='10%'>状态</td>
<td class=td width='5%'><input type=checkbox name=sel_all value='yes' onclick="javascript:select_all(this.form);"></td>
</tr>
<%
  dim obj_page
  set obj_page=new Cls_PageCute
  obj_page.pageurl=pageurl			
  obj_page.nummer=nummer						
  obj_page.page_t=1									
  obj_page.page_p=5									
  obj_page.page_unit="篇"
  obj_page.page_tit=tit_fir
  obj_page.v_id="id"
  call obj_page.p_init("*",Data_Name,sql_add,"id desc")
  sql=obj_page.sql_count
  set rs=Cls.exec(sql,1)
  obj_page.rssum=rs(0)
  rs.close
  call obj_page.p_main("*",Data_Name,sql_add,"id desc")
  for i=1 to obj_page.page_num
    id=rs("id")
    topic=rs("topic")
    tim=rs("tim")
%>
<tr align=center>
<td class=tims><%Response.Write obj_page.page_now+i%></td>
<td align="left"><%Response.Write rs("topic")%></td>
<td><%Response.Write rs("luser")%></td>
<td><%Response.Write "<a href='../Blog/GBook/?"&rs("buser")&"' target=_blank>"&rs("buser")&"</a>"%></td>
<td><font class=tims alt='<%Response.Write Cls.time_type(tim,2)%>'><%Response.Write Cls.time_type(tim,4)%></font></td>
<td><a href='?action=reply&id=<%Response.Write id%>'>
<% 
if not rs("isreply") then 
response.write "未回复" 
else 
response.write "<font color=red>已回复</font>" 
end if 
%>
</a>
<%
if rs("hidden") then 
response.write " 正常" 
else 
response.write " <font color=red>未审核</font>" 
end if 
%>
</td>
<td><input type=checkbox name=sel_id value='<%Response.Write id%>'></td>
</tr>
<%
    rs.movenext
  next
  rs.close
%>
<tr class=tr1>
<td colspan=4>
  <table border=0>
  <tr class=tr1>
  <td></td>
  <td><%Response.Write obj_page.page_var%></td>
  <td width=3></td>
  <td>分页：</td>
  <td><%Response.Write obj_page.page_cute%></td>
  </tr>
  </table>
</td>
<td colspan=4 align=center>
<select name=sel_type size=1>
<option value='审核'>审核</option>
<option value='待审核'>待审核</option>
<option value='删除'>删除</option>
</select>
<input type=submit value='操作' onclick="return sel_click(this.form);" class=btn>
</td>
</tr>
<%
end sub
%>
