⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 systeminterviewcontrol.asp

📁 又一套oa 系统,供大家使用学习,更多的源代码正在上传中,好的程序应该大家共同使用
💻 ASP
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_SystemSetInterviewControl")<>1 then HX_GoBack "对不起,您的权限不够!",""
ColumnName="":Tablename="HX_LockIP":action=request("action"):startip1=WS_S.IpEncode(WS_s.HX_Replace(request("startip"))):endip1=WS_S.IpEncode(WS_s.HX_Replace(request("endip")))
select case action
  case "addiplock" 
    if startip1>0 or endip1>0 then
	  if startip1>0 and endip1=0 then endip1=startip1
	  if startip1=0 and endip1>0 then startip1=endip1
	  if endip1<startip1 then  HX_GoBack "起始IP不能小于结束IP!",""
	  ip=WS_S.IpEncode(Request.ServerVariables("REMOTE_ADDR"))
	  if ip<=endip1 and ip>=startip1 then  HX_GoBack "您也在这个IP段内,所以不能添加!",""  else Orderby=" where (WS_Startip<="&startip1&" and WS_endip>="&startip1&") or (WS_Startip<="&endip1&" and WS_endip>="&endip1&")"
	else
	  HX_GoBack "添加的IP段有问题!",""
	end if
  case else 
    Orderby=" ORDER BY WS_LOID DESC"
end select   
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
select case action
case "addiplock"
  if rs.recordcount>0 then  HX_GoBack "此IP段已在 "&WS_S.IpDecode(rs("WS_Startip"))&" ~ "&WS_S.IpDecode(rs("WS_endip"))&" 内!",""
  sql="insert into HX_LockIP(WS_Startip,WS_Endip)values("&startip1&","&endip1&")"
  conn.execute(sql)
  HX_GoBack "添加成功!","SystemInterviewControl.asp"
case "delip"
     msg=WS_S.IpDecode(rs("WS_Startip"))&" ~ "&WS_S.IpDecode(rs("WS_endip"))&"IP段被解除!"
 	 id=request.querystring("id")
	 if id<>"" and isnumeric(id) then
       conn.execute("delete * from HX_LockIP where WS_LOID="&id)  
	   call WS_S.SaveAdminLog(LOGINUSERNAME,LogAppointment,msg)
       HX_GoBack msg,"SystemInterviewControl.asp"
	 end if  
end select
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>系统访问控制</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'></head><body topmargin='20' leftmargin='0' bottommargin='20'><table width='596'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#115F8F'><tr><td colspan='2' bgcolor=ffffff><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>系统访问控制</font></td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='0' bgcolor=f1f1f1><tr bgcolor='#A1BBE0'><td height='25' colspan='2' class='td4'>&nbsp;已经被封禁的网段:</td></tr><tr bgcolor='#FFFFFF'><td colspan='2' valign=top><table width='100%'  border='0' cellspacing='1' cellpadding='2' bgcolor='#efefef'>"
if rs.recordcount<=0 then
response.write "<tr><td bgcolor=ffffff height=25 align=center>没有被封禁的网段!</td></tr>"
else
do until rs.eof
 response.Write "<tr bgcolor='#FFFFFF'><td width='83%'>&nbsp;&nbsp;&nbsp;&nbsp;"&WS_S.IpDecode(rs("WS_Startip"))&" ~ "&WS_S.IpDecode(rs("WS_endip"))&"</td><td width='17%' align='center'><input type='button' name='Submit3' value=' 删 除 ' onClick=""javascript:location.href='?action=delip&id="&rs("WS_LOID")&"';""></td></tr>"
 rs.movenext
loop
end if
WS_S.HX_RSClose rs
response.Write "</table></td></tr><tr bgcolor='#A1BBE0'><td height='25' colspan='2' class='td4'>&nbsp;IP 封锁添加</td></tr><tr bgcolor='#FFFFFF'><td colspan='2' valign=top><table width='100%'  border='0' cellspacing='1' cellpadding='2' bgcolor='#efefef'><form method='POST' action='?action=addiplock'><tr bgcolor='#FFFFFF'><td width='13%'><div align='right'>起始IP:</div></td><td width='28%'><input type='text' name='startip' size='25'></td><td width='13%'><div align='right'>结束IP:</div></td><td width='29%'><input type='text' name='endip' size='25'></td><td width='17%'><input type='submit' value='确 认 添 加' name='B12'></td></tr></form></table></td></tr></table></td></tr></table>"%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -