📄 userprofile.jsp.svn-base
字号:
<%@ page import="java.util.Map" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Set" %>
<%@ page import="com.nsi.components.util.LoginuserUtil" %>
<%@ page import="com.nsi.components.util.info.RsDropInfo" %>
<%@ page import="com.nsi.components.util.UserProfileWebUtil" %>
<%@ page import="com.nsi.components.userprofile.UserProfile" %>
<%@ page import="com.nsi.util.ValHelper" %>
<%
UserProfile userprofile = UserProfileWebUtil.getInstance().getUserprofile(request);
String resourceid = UserProfileWebUtil.getInstance().getResourceid(request);
String userid = UserProfileWebUtil.getInstance().getUserid(request);
List<RsDropInfo> rslist = UserProfileWebUtil.getInstance().getResourcelist(request);
Map<String,String> rolemap = UserProfileWebUtil.getInstance().getRolemap(request);
%>
<html>
<head>
<meta http-equiv="content-style-type" content="text/css">
<meta http-equiv="pragma" content="no-cache">
<title>Achievo-RMS Timesheet Entry</title>
<link href="../theme/master.css" rel="stylesheet" type="text/css">
<%
if ( LoginuserUtil.getInstance().isNotLogined(request) )
{
%><meta http-equiv="refresh" content="0; url=/entrance.jsp"><%
}
%>
<script language="javascript">
<!--
function submitform( theform, action )
{
theform.action.value = action;
theform.submit();
}
// -->
</script>
</head>
<body>
<form name="up_form" method="post" action="/rms/mainservlet">
<h1>User Profile</h1>
<input type="hidden" name="urlmapping" value="/user/userprofile">
<input type="hidden" name="action" value="displayUsrProfile">
<input type="hidden" name="userid" value="<%=userid%>">
<table width="837" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="150" class="txtLabel">Resources Name</td>
<td width="200" class="cell">
<%
String id = request.getParameter("resourcid");
if(ValHelper.getInstance().isNotNullAndEmpty(id))
{
resourceid = id;
}
%>
<select class="cell" name="resourcid" size="1">
<%
int size = rslist.size();
for ( int i=0;i<size;i++ )
{
RsDropInfo info = rslist.get(i);
if( ( resourceid.trim() ).equalsIgnoreCase(info.getResourceid() ) )
{
%><option class="cell" selected value="<%=resourceid%>"><%= info.getName()%></option> <%
}
else
{
%><option class="cell" value="<%=info.getResourceid()%>"><%= info.getName()%></option><%
}
}
%>
</select>
</td>
<td width="487" class="cell"><input type="button" class="cell" name="rpdisplay" value="Display & Modify" onclick="javascript:submitform( this.form, 'displayUsrProfile');"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<%
if( ValHelper.getInstance().isNotNullAndEmpty(resourceid))
{
%>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<%
if ( ValHelper.getInstance().isNullOrEmpty(userid) )
{
if ( UserProfileWebUtil.getInstance().isAdd(request) )
{
%>
<tr>
<td colspan="4" class="txt"><span class="txtRed">*</span> denotes required field</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td width="100" class="txtHighlight">Login Name <span class="txtRed">*</span></td>
<td width="150" class="cell"><input type="text" class="cell" name="loginname" size="12" maxlength="12" value=""></td>
<td width="100" class="txtHighlight">Password</td>
<td width="487" class="cell"><input type="hidden" class="cell" name="pwd" value="">netstar</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td class="txtHighlight">User Role</td>
<td class="cell">
<select class="cell" name="userroleid" size="1">
<%
Set<String> keySet = rolemap.keySet();
Iterator<String> iter = keySet.iterator();
while( iter.hasNext() )
{
String roleid = iter.next();
%><option class="cell" value="<%=roleid%>"><%=rolemap.get( roleid )%></option><%
}
%>
</select>
</td>
<td class="txtHighlight">Status</td>
<td class="cell">
<select class="cell" name="active" size="1">
<option class="cell" selected value="T">Active</option>
<option class="cell" value="F">Inactive</option>
</select>
</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4">
<input value="Create" type="button" onclick="javascript:submitform(this.form, 'updateUsrProfile');">
<input value="Reset" type="Reset">
</td>
</tr>
<%
}
else
{
%>
<tr>
<td colspan="4" class="cell">
<hr width="750" size="1">
There is no User Profile assigned to this resources. If you would like to create User Profile for this resources, please press "Create User Profile" button bellow.
<br><br>
</td>
</tr>
<tr>
<td colspan="4" class="cell">
<input type="button" class="cell" name="adduserprofile" value="Create User Profile" onclick="javascript:submitform(this.form, 'addUsrProfile');">
</td>
</tr>
<%
}
}
else
{
%>
<tr>
<td colspan="4" class="txt"><span class="txtRed">*</span> denotes required field</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td width="100" class="txtHighlight">Login Name <span class="txtRed">*</span></td>
<td width="150" class="cell"><input type="text" class="cell" name="loginname" size="12" maxlength="12" value="<%= userprofile.getLoginname()%>"></td>
<td width="100" class="txtHighlight">Password</td>
<td width="487" class="cell"><input type="hidden" class="cell" name="pwd" value="">********</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td class="txtHighlight">User Role</td>
<td class="cell">
<select class="cell" name="userroleid" size="1">
<%
Set<String> keySet = rolemap.keySet();
Iterator<String> iter = keySet.iterator();
while( iter.hasNext() )
{
String roleid = iter.next();
if ( roleid.equals( userprofile.getUserroleid() ) )
{
%><option class="cell" selected value="<%=roleid%>"><%=rolemap.get( roleid )%></option><%
}
else
{
%><option class="cell" value="<%=roleid%>"><%=rolemap.get( roleid )%></option><%
}
}
%>
</select>
</td>
<td class="txtHighlight">Status</td>
<td class="cell">
<select class="cell" name="active" size="1">
<%
if( ( "T" ).equals( userprofile.getActive() ) )
{
%>
<option class="cell" selected value="T">Active</option>
<option class="cell" value="F">Inactive</option>
<%
}
else
{
%>
<option class="cell" value="T">Active</option>
<option class="cell" selected value="F">Inactive</option>
<%
}
%>
</select>
</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4" class="cell">
<input type="button" class="cell" value="Update" onclick="javascript:submitform(this.form, 'updateUsrProfile');">
<input type="Reset" class="cell" value="Reset">
<input type="button" class="cell" value="Reset Password" onclick="javascript:submitform(this.form, 'resetPWD');">
</td>
</tr>
<%
}
%>
</table>
</td>
</tr>
<%
}
%>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -