modifyuser.jsp
来自「opennms得相关源码 请大家看看」· JSP 代码 · 共 411 行 · 第 1/2 页
JSP
411 行
<!--//// This file is part of the OpenNMS(R) Application.//// OpenNMS(R) is Copyright (C) 2002-2003 The OpenNMS Group, Inc. All rights reserved.// OpenNMS(R) is a derivative work, containing both original code, included code and modified// code that was published under the GNU General Public License. Copyrights for modified // and included code are below.//// OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.//// Modifications://// 2003 Feb 07: Fixed URLEncoder issues.// 2002 Nov 26: Fixed breadcrumbs issue.// // Original code base Copyright (C) 1999-2001 Oculan Corp. All rights reserved.//// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.//// For more information contact:// OpenNMS Licensing <license@opennms.org>// http://www.opennms.org/// http://www.opennms.com///--><%@page language="java" contentType = "text/html" session = "true" import="java.util.*,java.text.*,org.opennms.netmgt.config.*,org.opennms.netmgt.config.users.*"%><% HttpSession userSession = request.getSession(false); Map users; User user = null; String userid = ""; UserFactory userFactory; try { UserFactory.init(); userFactory = UserFactory.getInstance(); users = userFactory.getUsers(); } catch(Exception e) { throw new ServletException( "UserFactory:modify() " + e ); } if (userSession != null) { user = (User)userSession.getAttribute("user.modifyUser.jsp"); userid = user.getUserId(); } %><html><head><title>Modify User | User Admin | OpenNMS Web Console</title><base HREF="<%=org.opennms.web.Util.calculateUrlBase( request )%>" /><link rel="stylesheet" type="text/css" href="includes/styles.css" /></head><script language="Javascript" type="text/javascript" > function validate() { for (var c = 0; c < document.modifyUser.dutySchedules.value; c++) { var beginName= "duty" + c + "Begin"; var endName = "duty" + c + "End"; var beginValue = new Number(document.modifyUser.elements[beginName].value); var endValue = new Number(document.modifyUser.elements[endName].value); if (!document.modifyUser.elements["deleteDuty"+c].checked) { if (isNaN(beginValue)) { alert("The begin time of duty schedule " + (c+1) + " must be expressed in military time with no other characters, such as 800, not 8:00"); return false; } if (isNaN(endValue)) { alert("The end time of duty schedule " + (c+1) + " must be expressed in military time with no other characters, such as 800, not 8:00"); return false; } if (beginValue > endValue) { alert("The begin value for duty schedule " + (c+1) + " must be less than the end value."); return false; } if (beginValue < 0 || beginValue > 2359) { alert("The begin value for duty schedule " + (c+1) + " must be greater than 0 and less than 2400"); return false; } if (endValue < 0 || endValue > 2359) { alert("The end value for duty schedule " + (c+1) + " must be greater than 0 and less than 2400"); return false; } } } return true; } function resetPassword() { newUserWin = window.open("<%=org.opennms.web.Util.calculateUrlBase(request)%>/admin/userGroupView/users/newPassword.jsp", "", "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=500,height=300"); } function addDutySchedules() { var ok = validate(); if(ok) { document.modifyUser.redirect.value="/admin/userGroupView/users/addDutySchedules"; document.modifyUser.action="admin/userGroupView/users/updateUser"; document.modifyUser.submit(); } } function removeDutySchedules() { var ok = validate(); if(ok) { document.modifyUser.redirect.value="/admin/userGroupView/users/modifyUser.jsp"; document.modifyUser.action="admin/userGroupView/users/updateUser"; document.modifyUser.submit(); } } function saveUser() { var ok = validate(); if(ok) { document.modifyUser.redirect.value="/admin/userGroupView/users/saveUser"; document.modifyUser.action="admin/userGroupView/users/updateUser"; document.modifyUser.submit(); } } function cancelUser() { document.modifyUser.action="admin/userGroupView/users/list.jsp"; document.modifyUser.submit(); }</script><body marginwidth="0" marginheight="0" LEFTMARGIN="0" RIGHTMARGIN="0" TOPMARGIN="0"><% String breadcrumb1 = "<a href='admin/index.jsp'>Admin</a>"; %><% String breadcrumb2 = "<a href='admin/userGroupView/index.jsp'>Users and Groups</a>"; %><% String breadcrumb3 = "<a href='admin/userGroupView/users/list.jsp'>User List</a>"; %><% String breadcrumb4 = "Modify User"; %><jsp:include page="/includes/header.jsp" flush="false" > <jsp:param name="title" value="Modify User" /> <jsp:param name="breadcrumb" value="<%=breadcrumb1%>" /> <jsp:param name="breadcrumb" value="<%=breadcrumb2%>" /> <jsp:param name="breadcrumb" value="<%=breadcrumb3%>" /> <jsp:param name="breadcrumb" value="<%=breadcrumb4%>" /></jsp:include><br><FORM METHOD="POST" NAME="modifyUser"><input type="hidden" name="userID" value="<%=user.getUserId()%>"/><input type="hidden" name="password"/><input type="hidden" name="redirect"/><table width="100%" border="0" cellspacing="0" cellpadding="2" > <tr> <td> </td> <td> <h3>Modify User: <%= userid %></h3> <table width="100%" border="0" cellspacing="0" cellpadding="2" > <tr> <td width="50%" valign="top"> <p><input type="button" value="Reset Password" onClick="resetPassword()" /></p> <p><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"> <p><b>User Information</b></p> </td> </tr> <%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?