<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->
<!--#include virtual="/inc/getip/index.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title><%=webname%>-最高权限-日志管理</title>
<%
call logquanxian("g1",1)
%>

<DIV>
<%
set rsu=server.CreateObject("adodb.recordset")

act=SafeRequest("act")
cact=SafeRequest("cact")
page=SafeRequest("page")
chaip=SafeRequest("chaip")
lei=SafeRequest("lei")
isall=SafeRequest("isall")
if lei="" then lei="0"

if SafeRequest("rzku")<>"" then rzku=SafeRequest("rzku")
if SafeRequestform("rzku")<>"" then rzku=SafeRequestform("rzku")
if rzku="" then rzku="aylog"


link="adminlog.asp?act="&act&"&rzku="&rzku&"&lei="&lei&"&isall="&isall&"&chaip="&chaip



if act="hei" then
ip=trim(SafeRequest("ip"))
sql="select * from ayiph where ayipn='"&ip&"'" 
rs.open sql,conn,1,3
if rs.bof and rs.eof then
rs.addnew
rs("ayipn")=ip
rs.update
%>
<script language=javascript> alert("添加成功");</script>
<%
else
%>
<script language=javascript> alert("已存在");</script>
<%
end if
rs.close
%>
<script language=javascript>window.close();</script>
<%
end if

'if act="alldel" then
'call lognamecode()
'list1=SafeRequestform("list1")
'rzku=SafeRequestform("rzku")
'if list1="" then call PopErr("未找到此项目")
'delid=split(list1,",")
'For dianka=0 To Ubound(delid) 
'sql="select * from "&rzku&" where aylogid="&trim(delid(dianka))&"" 
'rs.open sql,conn,1,3
'rs.delete
'rs.close
'next
'response.Redirect "adminlog.asp?page="&page&"&rzku="&rzku
'end if

%>
<DIV id=main1200> 
<%call webleft()%>

<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>
#Layer1 { 
position:fixed; 
padding-left:100px;
top:1px; 
z-index:9999; 
} 
#Layerk { 
position:fixed; 
padding-left:100px;
top:1px; 
z-index:9999; 
} 
.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 id="Layerk" style="display:none"><span id="strk"></span></div>
<SCRIPT LANGUAGE="JavaScript">
function openk(str,str2,str3)
{
strk.innerHTML="<iframe src=adminka.asp?id="+str+"&ku="+str2+"&gid="+str3+" frameborder=0 scrolling=yes width=840 height=900></iframe>";
Layerk.style.display='';
}
</script>



<DIV class=right_titleadmin>
&nbsp;&nbsp;日志管理-日志库选择
<a style="color:#090" href="?rzku=aylog">[aylog]</a> 
<a style="color:#090" href="?rzku=aylog01">[aylog01]</a> 
<a style="color:#090" href="?rzku=aylog02">[aylog02]</a> 
<a style="color:#090" href="?rzku=aylog03">[aylog03]</a> 
<a style="color:#090" href="?rzku=aylog04">[aylog04]</a> 
<a style="color:#090" href="?rzku=aylog05">[aylog05]</a></DIV>
<DIV class=main><br>
<form action="?cact=cha&page=<%=page%>&rzku=<%=rzku%>" method="get" name="form1" id="form1"> 
IP<input name="chaip" type="text" id="chaip" value="<%if request("chaip")<>"" then response.Write request("chaip")%>" size="20" maxlength="20">
<select name="lei" id="lei">
  <option value="0">查询日志类别</option>
  <option value="3" <%if lei="3" then response.Write "selected"%>>添加卡密</option>
  <option value="4" <%if lei="4" then response.Write "selected"%>>安全相关</option>
  <option value="5" <%if lei="5" then response.Write "selected"%>>添加修改分类</option>
  <option value="6" <%if lei="6" then response.Write "selected"%>>添加修改商品</option>
</select>
<input name="rzku" type="hidden" id="rzku" value="<%=rzku%>">
<input name="isall" type="hidden" id="isall" value="<%=isall%>">
<input type="submit" name="Submit" value="查询"> 
</form><br>
  <table width="99%" border="0" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="?act=alldel&rzku=<%=rzku%>" method="post" name="myform" id="myform"> 
       <tr>
        <th align="center" class="border_right border_bottom"> 
		<th align="center" class="border_right border_bottom" >会员ID
		<th align="center" class="border_right border_bottom" >内容        
		<th align="center" class="border_right border_bottom" >时间       
		<th align="center" class="border_right border_bottom" >结果        
		<th align="center" class="border_right border_bottom" >类别       
		<th align="center" class="border_right border_bottom">IP
        <th align="center" class="border_right border_bottom">位置        </tr>
<%
if isall="y" then

	sql="select * from "&rzku&" order by aylogid desc" 

	if chaip<>"" then 
	sql="select * from "&rzku&" where aylogip='"&chaip&"' order by aylogid desc" 
	end if
	
	if lei<>"0" then 
	sql="select * from "&rzku&" where aylogleibie="&lei&" order by aylogid desc" 
	end if


else


	sql="select top 300 * from "&rzku&" order by aylogid desc" 

	if chaip<>"" then 
	sql="select top 300 * from "&rzku&" where aylogip='"&chaip&"' order by aylogid desc" 
	end if
	
	if lei<>"0" then 
	sql="select top 300 * from "&rzku&" where aylogleibie="&lei&" order by aylogid desc" 
	end if
	
end if



'response.Write sql
'response.End()
rs.open sql,conn,1,1
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
if not(rs.bof and rs.eof) then
rs.absolutepage=page
do while not rs.eof%>

	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
        <td align="center" class="border_right border_bottom"><input name="list1" type="checkbox" id="list1" value="<%=rs("aylogid")%>" onClick="unselectall1()" disabled >
        </td>
        <td align="center" class="border_right border_bottom">
		<%
		if rs("ayloguserid")<>"" then%>
		<a target="_blank" href="adminuseredit.asp?id=<%=rs("ayloguserid")%>&page=<%=page%>"><%=rs("ayloguserid")%></a>
		<%else
		response.Write ("-")
		end if
		%>		</td>
        <td align="center" class="border_right border_bottom">
		<%
		if cint(rs("aylogleibie"))=3 then
			if instr(1,trim(rs("aylogcon")),"@#")>0 then
			gid=mid(trim(rs("aylogcon")),1,instr(1,trim(rs("aylogcon")),"@#")-1)
			end if
		end if
		if cint(rs("aylogerr"))=1 then 
		response.Write("<font color=#FF0000>"&server.HTMLEncode(trim(rs("aylogcon")))&"</font>")
		else
		response.Write server.HTMLEncode(trim(rs("aylogcon")))
		end if
		%></td>
        <td align="center" class="border_right border_bottom"><%=rs("aylogdate")%></td>
        <td align="center" class="border_right border_bottom"><%
		if cint(rs("aylogerr"))=0 then response.Write("成功")
		if cint(rs("aylogerr"))=1 then response.Write("<font color=#FF0000>失败</font>")
		
		%></td>
        <td align="center" class="border_right border_bottom"><%
		if cint(rs("aylogleibie"))=1 then response.Write("登录")
		if cint(rs("aylogleibie"))=2 then response.Write("注册")
		if cint(rs("aylogleibie"))=3 then 
		rsu.open "select kamiku,aynameid from ayname where aynameid="&rs("ayloguserid")&"" ,conn,1,1
		if not(rsu.bof and rsu.eof) then
		response.Write("<font color=#FF6600>添加卡密</font> <a onMouseOver=openk("&rs("ayloguserid")&",'"&trim(rsu("kamiku"))&"','"&gid&"') onMouseOut=Layerk.style.display='none' href=ik_adminkucunka.asp?uid="&rs("ayloguserid")&"&ku="&trim(rsu("kamiku"))&"&act=cha target=_blank><span style=color:#009900>查看</span></a>")
		end if
		rsu.close
		end if
		if cint(rs("aylogleibie"))=4 then response.Write("<font color=#3333CC>安全相关</font>")
		if cint(rs("aylogleibie"))=5 then response.Write("<font color=#3333CC>添加/修改分类</font>")
		if cint(rs("aylogleibie"))=6 then response.Write("<font color=#3333CC>添加/修改商品</font>")
		if cint(rs("aylogleibie"))=7 then response.Write("兑换兑换码")
		if cint(rs("aylogleibie"))=8 then response.Write("WAP登录")
		%></td>
        <td align="center" class="border_right border_bottom"><%=rs("aylogip")%> <a href="?act=hei&ip=<%=trim(rs("aylogip"))%>" target="_blank">黑</a></td>
        <td align="center" class="border_right border_bottom"><%

		if trim(rs("ayipd"))<>"" then
		response.Write trim(rs("ayipd"))
		else
		if trim(rs("aylogip"))<>"" and trim(rs("aylogip"))<>"unknown" then response.Write "["&Look_Ip(rs("aylogip"))&"]"
		end if
		
		%></td>
        </tr>
<%
n=n+1
rs.movenext  '指针向下移动
if n>=rs.pagesize then exit do  
loop
end if
zongshu=rs.RecordCount
rs.close%>
	  

      <tr>
        <td colspan="8">&nbsp;<input name="chkAll1" type="checkbox" id="chkAll1" onClick="this.value=check1(this.form.list1)" value="checkbox" disabled> <input name="rzku" type="hidden" id="rzku" value="<%=rzku%>">
        全选
          <input type="submit" name="Submit" value="删除选定" onClick="javascript:return confirm('您确定要删除吗？');"> 

<%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&"条"
%>		<a href="?isall=y&rzku=<%=rzku%>">查看全部</a> </td>
      </tr></form>
    </table>
</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"-->

