⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grantrole.jsp

📁 基于Sturts+Spring+Hibernate的一个高级销售管理系统。内容丰富
💻 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>用户名称:[&nbsp;${user.familyName }&nbsp;]</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();">&nbsp;
    		<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">
					&nbsp;
				</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 + -