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

<script>document.getElementById('o_1').setAttribute("class", "ed"); document.getElementById("t_1").style.display="";document.getElementById('s_1_11').setAttribute("class", "ed4");</script>

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

<%
call gaojiquanxian_old("dlshouquan")

set rs2=server.CreateObject("adodb.recordset")
act=SafeRequest("act")



if SafeRequestform("act")="isyidiip" then
isyidiip=SafeRequestform("isyidiip")
sql="select * from ayname where aynameid="&request.Cookies("aynameid")&"" 
rs.open sql,conn,1,3
rs("isyidiip")=isyidiip
rs.update
rs.close

call logadd(request.Cookies("aynameid"),"异地登录设置成功",4,0)
call PopErr2("异地登录设置成功","dlshouquan")

end if




if SafeRequest("act")="on" then
id=SafeRequest("id")
if id="" then call PopErr("缺少参数")

sql="select * from "&request.Cookies("rzku")&" where aylogid="&id&" and ayloguserid="&request.Cookies("aynameid")&"" 
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then

	sql2="select * from aykexinip where aykxuid="&request.Cookies("aynameid")&" and aykxipd='"&trim(rs("ayipd"))&"'" 
	rs2.open sql2,conn,1,3
	if not(rs2.bof and rs2.eof) then
	call PopErr2("该IP位置已在授信列表","dlshouquan")
	else
	rs2.addnew
	rs2("aykxuid")=request.Cookies("aynameid")
	rs2("aykxip")=trim(rs("aylogip"))
	rs2("aykxipd")=trim(rs("ayipd"))
	rs2("aykxdate")=now()
	rs2.update
	end if
	rs2.close
	
else
call PopErr2("未找到该IP位置信息","dlshouquan")
end if
rs.close


call logadd(request.Cookies("aynameid"),"授权IP位置添加成功",4,0)
call PopErr2("添加成功","dlshouquan")

end if


if SafeRequest("act")="off" then
id=SafeRequest("id")
if id="" then call PopErr("缺少参数")

sql="select * from "&request.Cookies("rzku")&" where aylogid="&id&" and ayloguserid="&request.Cookies("aynameid")&"" 
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then

	sql2="select * from aykexinip where aykxuid="&request.Cookies("aynameid")&" and aykxipd='"&trim(rs("ayipd"))&"'" 
	rs2.open sql2,conn,1,3
	if not(rs2.bof and rs2.eof) then
	rs2.delete
	else
	call PopErr2("未找到该授信IP位置信息","dlshouquan")
	end if
	rs2.close
	
else
call PopErr2("未找到该IP位置信息","dlshouquan")
end if
rs.close


call logadd(request.Cookies("aynameid"),"授权IP位置删除成功",4,0)
call PopErr2("删除成功","dlshouquan")

end if


if SafeRequest("act")="del" then
id=SafeRequest("id")
if id="" then call PopErr("缺少参数")


sql="select * from aykexinip where aykxuid="&request.Cookies("aynameid")&" and aykxid="&id&"" 
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
rs.delete
else
call PopErr2("未找到该授信IP位置信息","dlshouquan")
end if
rs.close
	

call logadd(request.Cookies("aynameid"),"授权IP位置删除成功",4,0)
call PopErr2("删除成功","dlshouquan")

end if
%>



<style>
table{font-size:14px; font-weight:normal;line-height:27px;}
.regts{width:440px; height:36px; border:#CCC solid 1px; background:#f1f1f1; color:#666666; line-height:36px; padding-left:10px}
.reginput{width:290px; height:36px; border:#CCC solid 1px; color:#949494; text-indent:10px; line-height:36px}
.gexian20{float:left;width:100%;height:20px;}
.mzsmbox2{width:90%; height:auto; overflow:hidden; background:#fcf8e2; border-left:#edd28a solid 5px; color:#956825; line-height:22px; padding:20px;margin-left:40px; margin-bottom:60px; font-size:13px;padding-top:20px;}
.neitable table{border: 1px solid #E8E8E8;width: 100%;}
.neitable table tr{border-bottom: 1px solid #E8E8E8;}
.neitable table tr td{line-height: 42px;text-align: center;color: #1b1b1b;font-size: 14px;}
.neitable table tr.hd td{line-height: 35px;background-color: #F7F7F7;}
.btnFn1 {cursor:pointer!important;cursor:hand;  height:40px; width:101px; padding:0px 0px 0 0; }
.btnFn2 {cursor:pointer!important;cursor:hand;  height:40px; width:101px; padding:0px 0px 0 0; font-weight:bold; }
</style>
<br>
<DIV id=main2> 
<DIV style="PADDING-LEFT:0px">
<DIV id=main_right_content>

<H2><SPAN>安全中心</SPAN></H2>
<DIV class=main4><br>


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold; font-size: 14px; color: #FF0000">异地登录验证</span><br>
<div class="neitable">
					<table>
                        <%
						rs.open "select aynameid,isyidiip from ayname where aynameid="&request.Cookies("aynameid")&"",conn,1,1
						%>
                  		<tr>
                            <td>
                			 <form action="" method="post" name="form1" id="form1">
                             目前异地登录验证状态：
                              <select name="isyidiip" id="isyidiip">
                                <option value="0" <%if cint(rs("isyidiip"))=0 then response.Write("selected")%>>关闭</option>
                                <option value="1" <%if cint(rs("isyidiip"))=1 then response.Write("selected")%>>开启</option>
                              </select>
                              &nbsp;&nbsp;&nbsp;&nbsp;
                              <input name="act" type="hidden" id="act" value="isyidiip">
                              <input type="submit" name="Submit" value="    确 定 修 改    " class="logindlregedit">
                			 </form>
                            </td>
                        </tr>
						<%
                        rs.close
						%>
               		  </table>
            		</div>




<br>



<br><br> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold; font-size: 14px; color: #FF0000">信任登录位置列表</span><span style="color: #999999"></span><br>
<form action="" method="post" name="form1" id="form1">
<div class="neitable">
					<table>
                        <tr class="hd">
                            <td width="25%">授信IP</td>
                            <td width="25%">授信位置</td>
                            <td width="25%">添加时间</td>
                            <td width="25%">相关操作</td>
                        </tr>
						<%
						sql="select * from aykexinip where aykxuid="&request.Cookies("aynameid")&" order by aykxid desc" 
						rs.open sql,conn,1,1
						if not(rs.bof and rs.eof) then
						do while not(rs.eof) 
			

						
						%>
                  		<tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                            <td><%=trim(rs("aykxip"))%></td>
                            <td><%=trim(rs("aykxipd"))%></td>
                            <td><%=rs("aykxdate")%></td>
                            <td><a style="color:#F30" href="?act=del&id=<%=rs("aykxid")%>">取消信任位置</a></td>
                        </tr>
						<%
						rs.movenext
						loop
						end if
                        rs.close%>
                        
               		  </table>
            		</div>
                            </form>
  <br><br>  <br> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-weight: bold; font-size: 14px; color: #FF0000">历史登录列表</span><br>
							<div class="neitable">
					<table>
                        <tr class="hd">
                            <td width="25%">相关IP</td>
                            <td width="25%">相关位置</td>
                            <td width="25%">相关时间</td>
                            <td width="25%">相关操作</td>
                        </tr>
						<%
						sql="select * from "&request.Cookies("rzku")&" where ayloguserid="&request.Cookies("aynameid")&" and datediff(day,aylogdate,'"&now()&"')<=60 and aylogid in (select max(aylogid) from "&request.Cookies("rzku")&" where ayloguserid="&request.Cookies("aynameid")&" and datediff(day,aylogdate,'"&now()&"')<=60 group by ayipd) order by aylogid desc" 
						rs.open sql,conn,1,1
						if not(rs.bof and rs.eof) then
						do while not(rs.eof) 

						%>
                  		<tr onmouseover=this.bgColor='#FAFAFA' onmouseout=this.bgColor='#ffffff'>
                            <td><%=trim(rs("aylogip"))%></td>
                            <td><%=trim(rs("ayipd"))%></td>
                          <td><%=rs("aylogdate")%></td>
                          <td>
                          <%
						  sql2="select * from aykexinip where aykxuid="&request.Cookies("aynameid")&" and aykxipd='"&trim(rs("ayipd"))&"'" 
						  rs2.open sql2,conn,1,1
						  if not(rs2.bof and rs2.eof) then
						  %>
                          <a style="color:#F30" href="?act=off&id=<%=rs("aylogid")%>">取消信任位置</a>
                          <%
						  else
						  %>
                          <a style="color:#30F" href="?act=on&id=<%=rs("aylogid")%>">添加信任位置</a>
                          <%
						  end if
						  rs2.close
						  %>
                          </td>
                        </tr>
						<%
					
						rs.movenext
						loop
						end if
                        rs.close%>
                        
               		  </table>
            		</div>


</DIV>
</DIV>
<DIV class=clear></DIV></DIV>
</DIV>


<br>

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


