<!-- #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="Blog"
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 class=red>博客列表 </a></td>
  <td width=10></td>
  <td> <a href=AMH_blogdata.asp>内容管理 </a></td>
  <td width=10></td>
  <td> <a href=AMH_blogbook.asp>留言管理</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
  dim stype:stype=trim(request.form("sel_type"))
 if stype <> "删除" then
    call AsaiMHGo_Handle()
 else
  if  stype<>"" then
  dim sel_id,hdim,hnum,usr
  sel_id=trim(request.form("sel_id"))
  sel_id=replace(sel_id," ","")
  hdim=split(sel_id,",")
  hnum=ubound(hdim)
  for i=0 to hnum
    id=hdim(i)
    if isnumeric(id) then
	  usr=Cls.exec("select top 1 username from  AsaiMHBlog where id="&id,1)(0)
	  call cls.exec("delete from AsaiMHblog where id="&id,0)
      call cls.exec("delete from AsaiMHblogData where username='"&usr&"'",0)
      call cls.exec("delete from AsaiMHblogBook where buser='"&usr&"'",0)
      call cls.exec("delete from AsaiMHblogSort where username='"&usr&"'",0)
      call cls.exec("delete from AsaiMHblogTags where username='"&usr&"'",0)	  
	  call cls.exec("delete from AsaiMHReView where ChannelIDs=10 and username='"&usr&"'",0)
    end if
  next
  erase hdim
  action=""
  call AMH_event("删除 "&(hnum+1)&"条博客记录")
  Response.Write vbcrlf&"<script language=javascript>alert(""已成功删除了"&(hnum+1)&"个博客(同时已清空该博客所有数据)！"");</script>"
 end if
 end if
end if


call AsaiMHChk_Main()

Call AMH_Ender(tit)

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%'>创建时间</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("blogname")
    tim=rs("tim")
%>
<tr align=center>
<td class=tims><%Response.Write obj_page.page_now+i%></td>
<td><%Response.Write "<a href='"&Cls.Web_dir&"Blog/?"&rs("username")&"' target=_blank>"&rs("blogname")&"</a>"%></td>
<td><%Response.Write "<a href='"&Cls.Web_dir&"User/View.asp?username="&rs("username")&"' target=_blank>"&rs("username")&"</a>"%></td>
<td><font class=tims alt='<%Response.Write Cls.time_type(tim,2)%>'><%Response.Write Cls.time_type(tim,4)%></font></td>
<td>
<%
if rs("hidden") then 
response.write " 正常" 
else 
response.write " <font color=red>未审核</font>" 
end if 
%>
<%
if rs("isgood") then 
response.write " <font color=blue>推荐</font>" 
else 
response.write " 未推荐" 
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>
<option value='待审核'>待审核</option>
<option value='删除'>删除</option>
</select>
<input type=submit value='操作' onclick="return sel_click(this.form);" class=btn>
</td>
</tr>
<%
end sub
%>
