?? grantrole.jsp
字號:
?<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; UTF-8">
<title>Y6高級銷售管理平臺-授予用戶角色</title>
<link href="${pageContext.request.contextPath}/css/global.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/contact.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
<script type="text/javascript">
function checkForm(){
var roleIds = document.getElementsByName("roleIds");
var flag = false;
for(var i=0; i<roleIds.length; i++){
if(roleIds[i].checked){
flag = true;
break;
}
}
if(flag){
if(confirm("確定為用戶授予所選角色?")){
document.forms[0].submit();
}
}else{
document.getElementById("message").innerHTML = "<font color='red'>請選擇角色</font>";
}
}
</script>
</head>
<body>
<br/>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td height="30" background="${pageContext.request.contextPath}/images/t_25.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=center>授予用戶角色</td>
</tr>
</table>
</td>
</tr>
</table>
<form action="${pageContext.request.contextPath}/role.do">
<input type="hidden" name="dispatch" value="grantUserRole">
<input type="hidden" name="userId" value="${user.id }">
<table width="98%" border="0" cellspacing="0" cellpadding="0" background="images/tiao.gif" height="27" align="center">
<tr>
<td align=center>用戶名稱:[ ${user.familyName } ]</td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td bgcolor="#CCCCCC" width="2" height="2"></td>
<td height="2" bgcolor="#F3F7FA">
<br>
<div id="myContacts" style="text-align: center;">
<table width="98%" cellspacing="0" cellpadding="0" align="center" bordercolor="#000000" bordercolordark="#FFFFFF">
<tr align="center" >
<td width="5%" >
<logic:empty name="roles">
<font color="red">系統沒有角色</font>
</logic:empty>
<logic:notEmpty name="roles">
<logic:iterate id="role" name="roles" scope="request" indexId="i">
<input type="checkbox" id="roleIds" name="roleIds" value="${role.id }" ${role.isChecked}>${role.roleName }
<c:if test="${(i+1)%4==0}"> <br/><br/></c:if>
</logic:iterate>
</logic:notEmpty>
</td>
</tr>
</table>
<table width="100%">
<tr>
<td align="center" >
<br/>
<input type="button" class="userButton" value="授予角色" onclick="checkForm();">
<div><span id="message"></span></div>
</td>
</tr>
</table>
</div>
</td>
<td bgcolor="#CCCCCC" width="2" height="2"></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td width="8" height="5" valign="top">
<img src="images/left.gif" width="8" height="11">
</td>
<td background="images/ht.gif" height="11">
</td>
<td width="8" height="5" valign="top">
<img src="images/rg.gif" width="8" height="11">
</td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -