| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>	<head>		<title>分配权限</title>		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>		<{include file='../public/admin_cssref.html'}>		<style type='text/css'>			#main{width:100%;}			#main table{width:100%;}						#contain{width:1200px;height:300px;margin:0 auto;margin-top:50px;}			li{list-style:none;}			#menu{width:100%;height:50px;display:block;text-align:center;}			#menu li{float:left;}			body{padding:0px;}			.main_left{width:100%;height:100%;}						<!--			.table{margin-bottom:0px;}			.form-actions .table th, .form-actions .table td {text-align: left;}			.radio{padding-left:0px;} .radio .inline{margin-left:0px;} .radio input[type="radio"]{margin-left:0px;}			.form-actions{padding-bottom:0px;}			#extra_info{margin-top:20px;}			.input-xxlarge{width: 430px;}			select{margin-bottom:0px;}			li{list-style:none;}			.table-bordered{margin-bottom:10px;}			-->		</style>	</head>	<body>	<{include file='../public/admin_header.html'}>	<div class="container">	<div class="row">		<{include file='../public/admin_navi.html'}>		<div class="span9">						<div class="page-header">	            <h1>分配权限</h1>	        </div>	        	        <{if $error}>	        <div   class="alert alert-error nodisplay"><{$error}></div>	        <{/if}>	        	        <{if $info}>	        <div   class="alert alert-success  nodisplay"><{$info}></div>	        <{/if}>	          		<div id='main' class="form-actions">			给用户<span style="color:red;"><{$username}></span>分配权限:			<form method="post" action="" id="to_persission">						<input type="hidden" name="uname"  value="<{$username}>" />							<table class="table table-bordered" style="margin-top:15px;">										<tr>						<td>							<input type="checkbox" id="all_pro_selectall_checkbox" />							<span style="margin-left:10px;" >全选</span>						</td>					</tr>															<{foreach from=$persission_array item=item key=key}>						<tr>							<td>														<input type="checkbox" name="persision_array[]" value="<{$key}>"  onclick="selectmsg(this)" class="select_msg"  <{if $my_persission|strpos:"$key" !== false}>  checked<{/if}>  />							<span style="margin-left:10px;"><{$item}></span>							</td>						</tr>					<{/foreach}>				</table>								<input type="button" value="提交" onclick="ps_toSubmit();" style="width:100px;height:30px;margin-bottom:15px;" />		</form>		</div></div><script>		$(document).ready(function(){					$('#all_pro_selectall_checkbox').change(function(){				all_pro_selectall_checkbox_change($(this));											 			});			function all_pro_selectall_checkbox_change(obj){				if(obj.attr('checked')=='checked'){  //如果此勾选框改变为选中					obj.parent().parent().parent().find("input").attr('checked','checked');	 // 本表 所有条目都打勾				}else{					obj.parent().parent().parent().find("input").removeAttr('checked'); //本表 所有条目都取消打勾					}				}					});				function selectmsg(){			if($(this).attr("checked") != "checked"){				$("#all_pro_selectall_checkbox").attr("checked",false);			}else if($(":checkbox[checked='checked']").length == $(".select_msg").length){				$("#all_pro_selectall_checkbox").attr("checked",true);			}		}				function ps_toSubmit(){					var n = $("input:checked").length;									if (n == 0  ) {			    alert("请选择要分配的权限");			} else {								$('#to_persission').submit();							}				}				</script>	<script>$('#user_admin').addClass('li_active');</script>	</div></div></div></body></html>
 |