<%@ Page Language="C#" AutoEventWireup="true" Codebehind="addIP.aspx.cs" Inherits="ZYDN.Web.system.myWeb.addIP" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<link rel="stylesheet" type="text/css" href="../skins/css/main.css" />
	<link rel="stylesheet" type="text/css" href="css/myWeb.css" />
	<link rel="stylesheet" type="text/css" href="../skins/css/Sys.css" />
	<script language="javascript" src="../js/JFramework.js"></script>
	<script language="javascript" src="../js/Sys.js"></script>
	<script language="javascript" src="../js/power.js"></script>

    <title>添加新的IP段</title>
    <style type="text/css" >
     .inputWidth{ width:100px;}
    </style>
    <script type="text/jscript" language="javascript">
       var ok=function(){
           var v=new validate();
           v.form=$("f1");
           if (!v.start()){
                return;
           }
           
           var stIP=$("sIP").value;
           var enIP=$("eIP").value;
           var adStr=$("addText").value+" "+$("jr").value;
           
           var objAjax=new JAjax();
           var objResponse=new JHttpResponse();
		   objResponse.write("sIP",stIP);
		   objResponse.write("eIP",enIP);
		   objResponse.write("add",adStr);
		   var out=objAjax.getText("post","../user/saveUser.aspx?type=addIP",objResponse,null);
		   switch (out){
		    case "0":
		        alert("你没有权限进行此操作，需要系统管理员才能作这个工作");
		        break;
		      case "1":
		        alert("设置成功");
		        window.close();
		      　break;
		      default:
		        alert(erStr(out));
		        break;
		   }
        
        
        
       }
    
    </script>
</head>
<body style=" padding:10px;">
<form name="f1" id="f1">
    <div style="text-align: center; width:100%; clear:both;">
        加入新的IP段
    </div>
    <div style="text-align: center; width:100%; clear:both;">
        <div style="width: 200px; float: left;">
          所在地区：
            <input name="addText" id="addText" title="地区" isV="1" notNull="1" max="30"  min="2" type="text" value=""  class="inputWidth"/>
        </div>
        <div style="width: 200px; float: left;">
            接入商：
            <input  name="jr" id="jr" title="接入商" isV="1" notNull="1" max="30" type="TEXT" value="" class="inputWidth" />
        </div>
    </div>
    <div style="text-align: center; width:100%; clear:both;">
        <div style="width: 200px; float: left; ">
            &nbsp;
            起始IP：
            <input  name="sIP" id="sIP" isIP="1" title="起始IP" isV="1" notNull="1" max="30" type="text" value=""  class="inputWidth"/>
        </div>
        <div style="width: 200px; float: left;">
            结束IP：
            <input  name="eIP" id="eIP" title="结束IP" isIP="1"  isV="1" notNull="1" max="30" type="TEXT" value=""  class="inputWidth"/>
        </div>
    </div>
    <div style="text-align: center; width:100%; clear:both;">
        <input type="button" value="提交" onclick="ok();" />
    </div>
    </form>
</body>
</html>
