<!--#include file="../Include/conig.asp"-->
<!--#include file="Admin_check.asp"-->
<%
dim FYCC_(15),FYCC_SZ_(15)
if request("type")="DEL" then
dim fo,filenamestr 
set fo=Server.Createobject("Scripting.FileSystemObject") 
filenamestr=Server.MapPath("Admin_fycc.asp") 
if fo.FileExists(filenamestr) then 
fo.DeleteFile filenamestr 
end if 
set fo=nothing
Response.Write "文件(Admin_fycc.asp)删除成功,关闭本页面即可"
response.end
elseif request("type")="save" then
if request.form("FYQQ_FCC_03")=>request.form("FYQQ_FCC_05") then
	Response.Write "<script>alert('设置错误：\n\n恶意刷新(目前："&request.form("FYQQ_FCC_05")&")值必须大于或等于刷新次数(目前："&request.form("FYQQ_FCC_03")&"的数值！');history.back();</Script>"
	response.end
else
Set FYCC_SZ_(10) = Server.CreateObject("Scripting.FileSystemObject")
Set FYCC_SZ_(4)=FYCC_SZ_(10).CreateTextFile(Server.MapPath(""&FYCC_(10)&"/FY_CCLog_"&request.form("FYQQ_FCC_12")&".txt"),True)
FYCC_SZ_(4).Write ""
FYCC_SZ_(4).Close
Set FYCC_SZ_(4)=Nothing
Set FYCC_SZ_(10) = Nothing
session("FYCC_TXT")="FY"

Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set TS1 = fs.CreateTextFile(Server.MapPath("../Include/CC_config.asp"), True)
TS1.writeline "<"&chr(37)
TS1.writeline "FYCC_(10)="&chr(34)&""&chr(34)&""
TS1.writeline "FYCC_(11)="&replace(request.form("FYQQ_FCC_11"),"""","")&""
TS1.writeline "FYCC_(12)="&replace(request.form("FYQQ_FCC_12"),"""","")&""
TS1.writeline "FYCC_(5)="&chr(34)&""&replace(request.form("FYQQ_FCC_04"),"""","""""")&""&chr(34)&""
TS1.writeline "FYCC_(7)="&replace(request.form("FYQQ_FCC_01"),"""","""""")&""
TS1.writeline "FYCC_(8)="&replace(request.form("FYQQ_FCC_02"),"""","")&""
TS1.writeline "FYCC_(6)="&replace(request.form("FYQQ_FCC_03"),"""","")&""
TS1.writeline "FYCC_(4)="&replace(request.form("FYQQ_FCC_05"),"""","")&""
TS1.writeline "FYCC_(9)="&replace(request.form("FYQQ_FCC_07"),"""","")&""
TS1.writeline "FYCC_(3)="&replace(request.form("FYQQ_FCC_06"),"""","")&""
TS1.writeline chr(37)&">"
Set TS1 = Nothing
Set fs=nothing
Response.Write("<script language=javascript>alert('修改成功！');this.location.href='Admin_fycc.asp';</script>")
Response.End
end if
end if
session("FYCC_TXT")=""
%>

<!--#include file="../Include/CC_config.asp"-->
<%
response.expires = 0 
response.expiresabsolute = now() - 1 
response.addHeader "pragma","no-cache" 
response.addHeader "cache-control","private" 
Response.cachecontrol = "no-cache"
if Instr(session("AdminPurview"),"|124,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限，请返回！</font>")
  response.end
end if
'========判断是否具有管理权限 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<link href="images/Admin_css.css" type=text/css rel=stylesheet>
<script language="javascript" src="images/Admin.js"></script>
<title>安全防CC攻击</title>
</head>
<body>
<form action="Admin_fycc.asp?type=save" method="post">
  <table border="0" cellspacing="1" width="99%" bgcolor="#6298E1">
    <tr>
      <td width="100%" height="24" background="images/skin/th_bg.gif"><font color="#FFFFFF"><b>基本配置</b></font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
     程序状态：<select name="FYQQ_FCC_01" id="FYQQ_FCC_01" size="1">
               <option value=1<%if FYCC_(7)=1 then%> selected<%end if%>>启动</option>
                <option value=0<%if FYCC_(7)<>1 then%> selected<%end if%>>关闭</option>
              </select> <font color="#808080">防CC攻击关闭与启动</font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      禁止ＩＰ：<select name="FYQQ_FCC_02" id="FYQQ_FCC_02" size="1">
               <option value=1<%if FYCC_(8)=1 then%> selected<%end if%>>启动</option>
                <option value=0<%if FYCC_(8)<>1 then%> selected<%end if%>>关闭</option>
              </select> <font color="#FF6600">禁止IP功能关闭与启动</td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      解封时间：<select name="FYQQ_FCC_11" id="FYQQ_FCC_11" size="1">
      <%for j=0 to 59%>
      <option value=<%=j%><%if FYCC_(11)=j then%> selected<%end if%>><%if j=0 then%>禁止解封<%else%><%=j%>分钟前<%end if%></option>
      <%next%>
      </select>
      <br> <font color="#808080">每小时该分钟之前刷新网站,TXT所禁止的IP将会被清除!</font>
     </td>
    </tr>
    <%if FYCC_(12)="" or FYCC_(12)<10000 then
    Randomize '初始化随机数生成器 
    FYCC_SZ_(0)=Int(Rnd*89999)+10000
    else
    FYCC_SZ_(0)=FYCC_(12)
    end if%>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      TXT数部：<input name="FYQQ_FCC_12" value="<%=FYCC_SZ_(0)%>" size="5" style="border-style: solid; border-width: 1" maxlength="5" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"><br> <font color="#808080">TXT的后域,一般由系统产生无需手动更改!(防止有人查看被封IP列)</font></td>
    </tr>
    
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      刷新次数：<input name="FYQQ_FCC_03" value="<%=FYCC_(6)%>" size="5" style="border-style: solid; border-width: 1" maxlength="5" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"><br> <font color="#808080">每分钟刷新次数,将会出现提示,注意:出现提示并不代表禁止了IP,只要在下一分钟再次访问依然正常!</font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      转入页面：<input name="FYQQ_FCC_04" value="<%=FYCC_(5)%>" size="60" style="border-style: solid; border-width: 1"><br> <font color="#808080">被封IP后自动转入的页面,建议另外建设一个HTML页面作为提示页面!</font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      恶意刷新：<input name="FYQQ_FCC_05" value="<%=FYCC_(4)%>" size="5" style="border-style: solid; border-width: 1" maxlength="5" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"><br> <font color="#808080">恶意刷新几次将禁止IP!</font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      代理ＩＰ：<select name="FYQQ_FCC_06" id="FYQQ_FCC_06" size="1">
               <option value=1<%if FYCC_(3)=1 then%> selected<%end if%>>禁止代理IP访问</option>
                <option value=0<%if FYCC_(3)<>1 then%> selected<%end if%>>允许代理IP访问</option>
              </select> <font color="#808080">此项强烈建议当受到攻击的时才启动!!</font></td>
    </tr>
    <tr>
      <td width="100%" bgcolor="#FFFFFF">
      代理IP自动状态：<input name="FYQQ_FCC_07" value="<%=FYCC_(9)%>" size="5" style="border-style: solid; border-width: 1" maxlength="5" onKeyUp="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"><br> <font color="#808080">大于0的时候将会表示启动自动化，即当CCLog.txt保存的被封IP数大于该值的时候将会自动启动禁止代理IP访问功能!!<br></font>
		<b> <font color="#FF0000">本功能强烈建议您在无法管理网站的时候才启动自动功能！</font></b></td>
    </tr>
     <tr>
      <td width="100%" height="24" align="center" bgcolor="#f7f7f7">
     </b> 所有数值必须大于或等于０本程序才可以正常运作！     </td>
    </tr>
    <tr>
      <td width="100%" height="24" align="center" bgcolor="#f7f7f7">
        <input name="b1" type="submit" class="button" value="确认修改">
      &nbsp;&nbsp;
      <input name="b2" type="reset" class="button" value="全部还原">
     </td>
    </tr>
  </table>
</form>
</body>
</html>