<%@page contentType="text/html;charset=GBK" language="java" %>
<%@ include file="/pub/taglibs.jsp"%>
<%@ page import ="java.util.Vector" %>
<%@ page import ="com.dhcc.action.sysframe.FuncModel" %>
<%@ page import="com.dhcc.util.*"%>
<%@ page import="java.sql.*"%>
<jsp:useBean id="keyUserSessionModel" type="com.dhcc.action.sysframe.UserSessionModel" scope="session"></jsp:useBean>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>系统管理</title>
<link href="<%= request.getContextPath() %>/include/style.css" rel="stylesheet" type="text/css">
</head>
<script language="Javascript1.1" src="<%= request.getContextPath() %>/staticJavascript.jsp"></script>
<%String myip=(String)request.getAttribute("myip");%>
<body bgcolor="EFF2F4" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%@ include file="/sysframe/smheader.jsp" %>
<table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td background="<%= request.getContextPath() %>/image/bj01.gif"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="182" valign="top" background="<%= request.getContextPath() %>/image/leftbj02.gif"> 
            <%@ include file="/sysframe/smleft.jsp" %>
          </td>
          <td valign="top">    
          <br>
           <html:form action="/userOpertAction.do" method="post">
           <html:hidden property="type"/>
           <html:hidden property="seqid"/>        
            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td>
           <TABLE width=100% 
                  border=0 align=center cellPadding=0 cellSpacing=0>
                    <TBODY>
                      <TR> 
                        <TD 
                      width=92 height="25" valign="bottom" nowrap background="<%= request.getContextPath() %>/image/table_bj01.gif" class=tab-on id=navcell onmouseover=switchCell(0)><table width="90" border="0" cellspacing="0" cellpadding="0">
                            <tr> 
                              <td width="10" background="<%= request.getContextPath() %>/image/table_bj02.gif"><img src="<%= request.getContextPath() %>/image/table_pic01.gif" width="6" height="25"></td>
                              <td align="center" nowrap background="<%= request.getContextPath() %>/image/table_bj02.gif" class=tab-on id=navcell > 
                                用户信息</td>
                              <td width="11" align="right" background="<%= request.getContextPath() %>/image/table_bj02.gif"> 
                                <img src="<%= request.getContextPath() %>/image/table_pic02.gif" width="6" height="25"></td>
                            </tr>
                          </table></TD>
                        <TD valign="bottom" background="<%= request.getContextPath() %>/image/table_bj01.gif" class=tab-off id=navcell></TD>
                      </TR>
                    </TBODY>
                  </TABLE>     
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableStyle">
                    <tr> 
                      <td height="5"></td>
                    </tr>
                    <tr> 
                      <td>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="tableStyle01" >
<tr>
<td width="20%" class="TDstyle02">&nbsp;&nbsp;部门名称</td>
<td width="80%" class="TDstyle02"><html:text property="orgName" size="81"/></td>
</tr>
                   <tr>
<td width="20%" class="TDstyle02" >&nbsp;&nbsp;用户姓名</td>
<td width="80%" class="TDstyle02"><html:text property="userName" size="81"/></td>
</tr>
<tr>
<td width="20%" class="TDstyle02" >&nbsp;&nbsp;登陆口令</td>
<td width="80%" class="TDstyle02"><html:text property="loginid" size="81"/></td>
</tr>
<tr>
<td width="20%" class="TDstyle02">
<html:checkbox property="ipFlag"  value="1" /> 启用IP验证</td>
<td width="80%" class="TDstyle02" >
IP地址1:<html:text property="user_IP1" size="20"/>&nbsp;&nbsp;&nbsp;&nbsp; 


IP地址2:<html:text property="user_IP2" size="20"/></td>
</tr>
<tr>
<td width="20%" class="TDstyle02">&nbsp;&nbsp;备注</td>
<td width="80%" class="TDstyle02" >
<html:textarea property="meno" cols="80" rows="6" />
</td>
</tr>
<tr>
    <td width="20%" class="TDstyle02" nowrap >&nbsp;&nbsp;当前的IP地址是</td>
<td width="80%" class="TDstyle02" ><%=myip%></td>
</tr>
</table>
</td>
</tr>
<tr> 
                      <td height="5"></td>
                    </tr>
                    </table></td>
              </tr>
<tr><td align="center">
<br>
<input type="button" value="保 存" onclick="subEvent();">&nbsp;&nbsp;
<input type="button" value="返 回" onclick="back();">
<br>
<br>
<br>
<br>
<br>
</td></tr>
</table>   
</html:form>      
            </td>
        </tr>
      </table></td>
  </tr>
</table>
<script language="javascript" type="text/javascript">    function back() {
window.location = "<%= request.getContextPath() %>/userOpertAction.do";
}

function subEvent(){
if ( document.forms[0].orgName.value == "" ) {
alert("请输入部门名称");
return;
}
if ( document.forms[0].userName.value == "" ) {
alert("请输入用户姓名");
return;
}
if ( document.forms[0].loginid.value == "" ) {
alert("请输入登陆名称");
return;
}
if ( !validateMaxLength(document.forms[0]) ) {
return;
}

if ( document.forms[0].type.value == "add"  ) {
document.forms[0].type.value = "addsave";
}

document.forms[0].submit();
}
function maxlength(){
this.aa = new Array("orgName", "部门名称长度不能大于80个字符!", new Function ("varName", "this.maxlength='80'; return this[varName];"));
this.ab = new Array("userName", "用户姓名描述长度不能大于10个字符!", new Function ("varName", "this.maxlength='10'; return this[varName];"));
this.ac = new Array("loginid", "登陆名称长度不能大于20个字符!", new Function ("varName", "this.maxlength='20'; return this[varName];"));
this.ad = new Array("meno", "角色描述长度不能大于200个字符!", new Function ("varName", "this.maxlength='200'; return this[varName];"));

}
</script>
<%@ include file="/tail.jsp" %></body>
</html>应该怎么样修改,能实现“IP 地址输入框”,请教大家,谢谢!