<!--#include file="conn.asp"-->
<!--#include file="inc/cookies_check.asp"-->
<%
'*****************************************
'* 软件名称 乐彼网上开店软件(56770 EShop)
'* 软件开发 http://www.56770.com
'* 版权所有 http://www.56770.com
'* 文件名称 Admin_lockip.asp
'* 最后更新 2010-09-19 by 56770.kingdge
'*****************************************
Dim admin_flag
admin_flag=",10.4,"
include "lang/"& LangFilePath &"/lang_sys.inc"
include "lang/"& LangFilePath &"/lang_menu.inc"
include "lang/"& LangFilePath &"/lang_lockip.inc"
CurrentId = 0
CurrentUrl = "admin_lockip.asp"
LB_Head()
LB_Menu()
Response.Write("<div class=""mainbody"">")
Response.Write("<div class=""mainbody2"">")
If Eshop_Lebi_name="" Or instr(","&Eshop_Lebi_flag&",",admin_flag)=0 Then
        adminflag()
Else
		If OutSubmit = 1 Then CheckOutSubmit()
		Select Case Request("action")
			   Case "savelockip" : savelockip()
			   Case Else
				    lockip()
		End Select
end If
Response.Write("</div>")
Response.Write("</div>")
LB_Footer()

Sub	savelockip()
        If OnlyRead = 1 Then OnlyReadMessage()
		Dim AcceptIP,Tempstr,i
		Tempstr = Safereplace(Trim(Request("AddAcceptIP")))
		If Tempstr<>"" Then
			Tempstr = Split(Tempstr,vbCrLf)
			For i = 0 To ubound(Tempstr)
				If Tempstr(i)<>"" and Tempstr(i)<>" " and Instr(Tempstr(i),",")=0 Then
					If i=0 or AcceptIP="" Then
						AcceptIP = Tempstr(i)
					Else
						AcceptIP = AcceptIP & "|" & Tempstr(i)
					End If
				End If
			Next
		End If
		If Len(AcceptIP)>=25500 Then
			Call Up_mes(Lang_sys(69),"·"& Lang_Lockip(1),0,"?",0,0,2,0)
		End If
        conn.execute"Update [Lebi_system] set lockip='"&Acceptip&"'"
		ManageLog Lang_Lockip(2)
		NewEvent "0"
		Call Up_mes(Lang_sys(69),"·"& Lang_sys(68),0,m_u,0,0,2,1)
end	sub

Sub	lockip()
		Dim AcceptIP,i,AddIP
		set	Rs=Conn.Execute("select lockip from [Lebi_system]")
		AcceptIP = Rs(0)
%>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="classtable">
		<form action="?action=savelockip" method="post">
		<tr>
			<td height="30" align="left" class="classhead"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"></td>
			<td align="right" class="classhead">
			<%=QuickMenu("admin_count.asp|"& Lang_Menu(151) &"","Admin_upfile.asp|"& Lang_Menu(153) &"")%>
			</td>
		 </tr>
		<tr>
		   <td colspan="2" class="classtop" height="30"><%=Lang_Menu(152)%></td>
		</tr>
		<tr>
			<td colspan="2" class="classrow" align="center">
			<textarea name="AddAcceptIP" cols="88" rows="20" class="text" style="margin:10px; width:97%"><%If AcceptIP<>"" or not IsNull(AcceptIP) Then
				AcceptIP=Split(Trim(AcceptIP),"|")
				For i=0 To Ubound(AcceptIP)
					Response.Write AcceptIP(i)
					If i<Ubound(AcceptIP) Then Response.Write vbCrLf
				Next
			End If
			%></textarea>
			</td>
		  </tr>
		<tr class="classfooter">
		  <td colspan="2" height="30" align="left" class="classfooter"><input name="submit" type="image" src="lang/<%=LangFilePath%>/images/bt_app.gif" value=" <%=Lang_sys(1)%> " title=" <%=Lang_sys(1)%> " align="absmiddle">&nbsp;<input type="image" src="lang/<%=LangFilePath%>/images/bt_res.gif" border="0" title=" <%=Lang_sys(2)%> " onclick="reset();return false;" align="absmiddle"></td>
		 </tr>
		</form>
		<tr>
		<td colspan="2" class="classfaq">
		  <div class="faq_main">
		  <p class="faq_title"><%=Lang_sys(49)%></p>
		   <%=Lang_Lockip(3)%>
		  </div>
		</td>
		</tr>
		</table>
<%		 Rs.close
		 Set Rs=nothing
End	Sub
%>