You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
3.2 KiB

3 years ago
<!-- $Id: user_info.htm 16854 2009-12-07 06:20:09Z sxc_shop $ -->
{include file="pageheader.htm"}
<div class="main-div">
<form method="post" action="merchants_users_list.php" name="theForm" onsubmit="return validate()">
<table width="100%" >
<tr>
<td class="label">登录名称:</td>
<td><input name="login_name" type="text" value="{$user_name}" /></td>
</tr>
<tr>
<td class="label">&nbsp;&nbsp;码:</td>
<td><input name="login_password" type="password" id="password_val" value="{$password}" /></td>
</tr>
</table>
<table cellspacing='1' id="list-table">
{foreach from=$priv_arr item=priv}
{if $priv.priv}
<tr>
<td width="18%" valign="top" class="first-cell" style="font-weight:bold;">
<input name="chkGroup" type="checkbox" value="checkbox" onclick="check('{$priv.priv_list}',this);" class="checkbox">{$lang[$priv.action_code]}
</td>
<td>
{foreach from=$priv.priv key=priv_list item=list}
<div style="width:200px;float:left;">
<label for="{$priv_list}"><input type="checkbox" name="action_code[]" value="{$priv_list}" id="{$priv_list}" class="checkbox" {if $list.cando eq 1} checked="true" {/if} onclick="checkrelevance('{$list.relevance}', '{$priv_list}')" title="{$list.relevance}"/>
{$lang[$list.action_code]}</label>
</div>
{/foreach}
</td>
</tr>
{/if}
{/foreach}
<tr>
<td colspan="2" align="center">
<input type="checkbox" name="checkall" value="checkbox" onclick="checkAll(this.form, this);" class="checkbox" />{$lang.check_all}
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" value="{$lang.button_submit}" class="button" />
<input type="reset" value="{$lang.button_reset}" class="button" />
<input type="hidden" name="act" value="{$form_action}" />
<input type="hidden" name="admin_id" value="{$admin_id}" />
<input type="hidden" name="user_id" value="{$user_id}" />
</td>
</tr>
</table>
</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
<!--
onload = function(){
document.getElementById('password_val').value = '';
}
function checkAll(frm, checkbox)
{
for (i = 0; i < frm.elements.length; i++)
{
if (frm.elements[i].name == 'action_code[]' || frm.elements[i].name == 'chkGroup')
{
frm.elements[i].checked = checkbox.checked;
}
}
}
function check(list, obj)
{
var frm = obj.form;
for (i = 0; i < frm.elements.length; i++)
{
if (frm.elements[i].name == "action_code[]")
{
var regx = new RegExp(frm.elements[i].value + "(?!_)", "i");
if (list.search(regx) > -1) frm.elements[i].checked = obj.checked;
}
}
}
function checkrelevance(relevance, priv_list)
{
if(document.getElementById(priv_list).checked && relevance != '')
{
document.getElementById(relevance).checked=true;
}
else
{
var ts=document.getElementsByTagName("input");
for (var i=0; i<ts.length;i++)
{
var text=ts[i].getAttribute("title");
if( text == priv_list)
{
document.getElementById(ts[i].value).checked = false;
}
}
}
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}