<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->


<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />



<title><%=webname%>-最高权限-全站买家ID黑名单管理</title>

<DIV>

<SCRIPT LANGUAGE="JavaScript">
var checkflag1 = "false";
function check1(field) {
if (checkflag1 == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag1 = "true";
return "false"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag1 = "false";
return "true"; }
}

function unselectall1()
{
    if(document.myform.chkAll1.checked){
	document.myform.chkAll1.checked = document.myform.chkAll1.checked&0;
	checkflag1 = "false";
    } 	
}
</script>
<%
link="adminheibuy.asp?ct="
act=request.QueryString("act")

sql="select * from aymaiidhei order by aymaiidheiid desc" 

if act="del" then
call lognamecode()
call logquanxian("a8",1)
uid=request.QueryString("uid")
page=request.QueryString("page")
sql="select * from aymaiidhei where aymaiuid="&uid&"" 
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
rs.delete
else
call PopErr("未找到")
end if
rs.close
'call logadd(request.Cookies("aynameid"),"管理-黑名单删除成功"&ipid,0,0)
response.Redirect "adminheibuy_all.asp?page="&page
end if

if act="add" then
call lognamecode()
call logquanxian("a8",1)
uid=request.form("uid")

sql="select top 1 * from aymaiidhei where aymaiuid="&uid&"" 
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
call PopErr("买家ID已存在")
response.End()
else
rs.addnew
rs("aymaiuid")=uid
rs.update
end if
rs.close

'call logadd(request.Cookies("aynameid"),"管理-黑名单删除成功"&ipid,0,0)
call PopErr2("添加成功","adminheibuy_all.asp")
end if


if act="cha" then
'call lognamecode()
'call logquanxian("a8",1)
uid=trim(request.form("uid"))
if uid="" then call PopErr("请填写完整")
sql="select * from aymaiidhei where aymaiuid="&uid&"" 
end if
%>
<DIV id=main1200> 
<%call webleft()%>

<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {
	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>
<DIV class=right_titleadmin>&nbsp;&nbsp;买家黑名单管理</DIV>
<DIV class=main><br>

<table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="?act=add" method="post" name="zengsongque" id="zengsongque"> 
       <tr>
        <th colspan="10" align="center"  >添加买家ID       
          <input name="uid" type="text" id="uid">
          <input type="submit" name="Submit" value=" 确 认 添 加 ">
          <input name="act" type="hidden" id="act" value="add">        </tr>
       </form>
    </table>
<br>
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="?act=cha" method="post" name="zengsongque" id="zengsongque"> 
       <tr>
        <th colspan="10" align="center"  >查询买家ID       
          <input name="uid" type="text" id="uid">
          <input type="submit" name="Submit" value=" 确 认 查 询 ">
          <input name="act" type="hidden" id="act" value="cha">        </tr>
       </form>
    </table>
	<br>
<%
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
rs.pagesize=50
pagecount=rs.pagecount 
if request("page")="" then 
page=1
else
page=int(request("page")) 
end if
if page<=0 then page=1 
if request("page")="" then page=1
rs.absolutepage=page


%>
<table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
<%do while not rs.eof%>
       <tr><td align="center" class="border_right border_bottom"><%=rs("aymaiuid")%> &nbsp;<a href="?act=del&uid=<%=rs("aymaiuid")%>&page=<%=page%>">删除</a></td>
         </tr>
<%
n=n+1
rs.movenext 
if n>=rs.pagesize then exit do  
loop
zongshu=rs.RecordCount
%>
       <tr><td align="left" class="border_right border_bottom"> 
	   <%if pagecount=0 then   
response.write("首页 ")
elseif page=1 then       
response.write("首页 ")
else%>                   
<a href="<%=link%>&page=1">首页</a>
<%end if

if pagecount=0 then   
response.write("上页&nbsp;")
elseif page=1 then       
response.write("上页&nbsp;")
else%>                   
<a href="<%=link%>&page=<%=page-1%>">上页</a>&nbsp;
<%end if

if pagecount>20 then
if page<=10 then 
aa=1
bb=20
aabu=""
bbbu=" … "
elseif page>=11 then 
aa=page-9
bb=page+10
aabu=" …"
bbbu=" … "
	if bb>=pagecount then 
	aa=pagecount-20
	bb=pagecount
	aabu=" … "
	bbbu=""
	end if
end if
response.Write aabu
for aa=aa to bb
if page=aa then
response.Write("<a href="&link&"&page="&aa&"><strong>"&aa&"</strong></a>&nbsp;")
else
response.Write("<a href="&link&"&page="&aa&">"&aa&"</a>&nbsp;")
end if
next
response.Write bbbu

else

for i=1 to pagecount
if page=i then
response.Write("<a href="&link&"&page="&i&"><strong>"&i&"</a></strong>&nbsp;")
else
response.Write("<a href="&link&"&page="&i&">"&i&"</a>&nbsp;")
end if
next

end if

if pagecount=0 then 
response.write("下页&nbsp;")
elseif page=pagecount then 
response.write("下页&nbsp;")
else%>                    
<a href="<%=link%>&page=<%=page+1%>">下页</a>
<%end if%>
<%if pagecount=0 then  '总页数为0 显示空
response.write("尾页 ") 
elseif page=pagecount then 
response.write("尾页 ")
else%>                    
<a href="<%=link%>&page=<%=pagecount %>">尾页</a>
<%end if

if pagecount<>0 then 
response.Write page&"/"&pagecount
end if
response.Write "&nbsp;共"&zongshu&"条"
%>
	   </td>
       </tr>
    </table>

<%
end if
rs.close%>




<br>
</DIV>
</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>
<SCRIPT>
$(function(){
$('.left_title').each(function(){
   $(this).click(function(){
	   var index=$('.left_title').index(this);
	   if($(this).next().hasClass('hide_m')){
		   $(this).next().removeClass('hide_m');
           $(this).next().show();		 
		   $(this).find('img').attr('src','<%=ossurl%>images/expansion.gif');
		   $.cookie('m_index_'+index,'',{expires:0});
	   } else {
	       $(this).next().hide();
		   $(this).next().addClass('hide_m');
		   $(this).find('img').attr('src','<%=ossurl%>images/shrank.gif');		   
		   $.cookie('m_index_'+index,'none',{expires:365});
	   }
   })
})

$('.left_title').each(function(){
	var index=$('.left_title').index(this);
    $(this).next().css('display',$.cookie('m_index_'+index) ? $.cookie('m_index_'+index) : '');
	if($.cookie('m_index_'+index)){
	    $(this).next().addClass('hide_m');
	}
	$(this).find('img').attr('src',$.cookie('m_index_'+index) ? '<%=ossurl%>images/shrank.gif' : '<%=ossurl%>images/expansion.gif');
})
})

</SCRIPT>


<!--#include virtual="/show/footadmin.asp"-->

