<!--#include file="../inc/Bll.asp"-->
<!--#include file="../inc/Constant.asp"-->
<!--#include file="../inc/Md5.asp"-->
<!--#include file="../inc/App.asp"-->

<%
Auto_Login()

if Request.QueryString("ac")="GetBlackListRecord" then 
	RS_End
	dim SumPay,SumIncome,CurrentPage,k,Re
	Re="var Re=""{data:["
	Set RS=DB_CONN.EXECUTE("select a.*,b.[i_User_NickName] as 'UN',(select [i_Sys_Room_ID] from [i_Sys_Room] where [i_Sys_Room_AdminUserID]=b.[i_User_ID]) as 'uid' from [i_User_BlackList] a join [i_User_Info] b on a.[i_User_BlackList_GUID]=b.[i_User_ID] where a.[i_User_BlackList_UID]="&Session(Session_UserID_Arg)&" order by [i_User_BlackList_Date] desc")
	RS.pagesize=20
	if isempty(Request.QueryString("page")) or Request.QueryString("page")="" then CurrentPage=1 else CurrentPage=Cint(Request.QueryString("page")) end if
	if not RS.eof then RS.absolutepage = CurrentPage
	while (not RS.eof and k<RS.pagesize )
		if k>0 then Re=Re&","		
		Re=Re&"{r:'"&RS("i_User_BlackList_ID")&"',d:'"&RS("i_User_BlackList_Date")&"',gu:'"&RS("uid")&"',gun:'"&RS("UN")&"'}"
		k=k+1
		RS.MoveNext
	Wend
	Re=Re&"],recordcount:"&RS.recordcount&",pagenum:"&RS.pagecount&",currentpage:"&CurrentPage&"}"";"
	RS_End
	RW Re
	Rend
end if

if Request.QueryString("ac")="n" then
	RS_End
	if not Request.QueryString("RID")<>"" then RWS "alert('非法传参!');history.back();"
	if not IsNumeric(Request.QueryString("RID")) then RWS "alert('非法传参!');history.back();":REND
	Set RS=DB_CONN.EXECUTE("delete from [i_User_BlackList] where [i_User_BlackList_UID]="&Session(Session_UserID_Arg)&" and [i_User_BlackList_ID]="&Request.QueryString("RID"))
	RWS "location.href='"&split(Request.servervariables("HTTP_REFERER"),"?")(0)&"?"&Now()&"';"
	RS_End
end if

if Request.QueryString("ac")="dl" then
	RS_End
	if not Request.Form("RID")<>"" then RWS "alert('未选择要删除的申请!');history.back();"
	if not IsNumeric(Request.Form("RID")) then RWS "alert('非法传参!');history.back();":REND
	Set RS=DB_CONN.EXECUTE("delete from [i_User_BlackList] where [i_User_BlackList_UID]="&Session(Session_UserID_Arg)&" and [i_User_BlackList_ID] in ("&Request.Form("RID")&")")
	RWS "location.href='"&split(Request.servervariables("HTTP_REFERER"),"?")(0)&"?"&Now()&"';"
	RS_End
end if

%>