<!--<?php print <<<EOT
-->
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<style>
td {font-size: 9pt;line-height: 1.5;}
body {font-size: 9pt;line-height: 1.5;}
a:link { font-size: 9pt; color: #000000; text-decoration: none }
a:visited{ font-size: 9pt; color: #000000; text-decoration: none }
a:hover {font-size: 9pt;color: red}
</style>
<table width="100%"  border="0" cellpadding="4" cellspacing="1" bgcolor="#A5D0F1">
  <tr>
    <td background="images/wbg.gif" bgcolor="#F0F3F8" colspan="12"><b>管理员列表</b></td>
  </tr>
<tr bgcolor="#F0F3F8" height="25" align="center">
<td width="10">ID</td>
<td width="60">帐号</td>
<td width="80">信箱</td>
<td width="39">等级</td>
<td width="39">状态</td>
<td width="39">姓名</td>
<td width="100">添加时间</td>
<td width="100">最后登录</td>
<td width="80">登录IP</td>
<td width="50">添加人</td>
<td width="100">备注</td>
<td width="80">操作</td>
</tr>
<!--
EOT;
if($admins != ""){
foreach($admins as $admn){
$bgcolor =($bgcolor == '#FFFFFF')?'#F0F3F8':'#FFFFFF';
$admn[first_login] = get_date($admn[first_login]);
$admn[last_login] = get_date($admn[last_login]);

$typetxt = ($admn[admintype] == "Y")?"超级":"普通";
$statustxt = ($admn[status] == "Y")?"开启":"关闭";
print <<<EOT
-->
<tr bgcolor="$bgcolor" align="center">
<td>$admn[aid]</td>
<td align="left"><a href="ng_admin.php?adminid=$admn[aid]&mode=update"><B>$admn[ngadmin]</B></a></td>
<td>$admn[email]</td>
<td>$typetxt</td>
<td>$statustxt</td>
<td>$admn[realname]</td>
<td>$admn[first_login]</td>
<td>$admn[last_login]</td>
<td>$admn[loginip]</td>
<td>$admn[referer]</td>
<td>$admn[admintxt]</td>
<td><a href="ng_admin.php?adminid=$admn[aid]&mode=update">修改</a>
<a href="ng_admin.php?adminid=$admn[aid]&action=del">删除</a></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
<tr bgcolor="#FFFFFF">
<td colspan="12" style="padding-left:10px;">普通管理员不能进入后台会员管理页面查看管理员
</td>
</tr>
<!--
EOT;
}else{print <<<EOT
-->
<tr>
<td colspan="12" align="center" bgcolor="#FFFFFF">没有相关记录</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<br />
<table width="100%"  border="0" cellpadding="4" cellspacing="1" bgcolor="#A5D0F1">
  <tr>
    <td background="images/wbg.gif" bgcolor="#F0F3F8" colspan="4"><b><a href="ng_admin.php">添加</a>/修改管理员</b></td>
  </tr>
<FORM action="ng_admin.php" method="POST" name="addadmin">
<INPUT type="hidden" name="adminid" value="$adminid">
<!--
EOT;
if($mode == 'update')
	$action = 'update';
else
	$action = 'add';
print <<<EOT
-->
<INPUT type="hidden" name="action" value="$action">
  <tr>
    <td height="30" colspan="4" bgcolor="#F0F3F8">&nbsp;&nbsp;<B>会员名密码</B></td>
  </tr>
  <tr height="25" bgcolor="#FFFFFF">
    <td align="right">会员名：</td>
    <td width="39%"><INPUT type="text" id="nglogin" name="nglogin" size="32" maxlength="32" value="$edit_admin[ngadmin]" /></td>
    <td>电子信箱：</td>
    <td width="39%"><input type="text" id="email" name="email" size="32" maxlength="128" value="$edit_admin[email]" /></td>
  </tr>
  <tr height="25" bgcolor="#F0F3F8">
    <td align="right">密　码：</td>
    <td><INPUT type="password" id="passwd1" name="passwd1" size="35" maxlength="32" /></td>
    <td>确认密码：</td>
    <td><input type="password" id="passwd2" name="passwd2" size="35" maxlength="32" /></td>
  </tr>
  <tr height="25" bgcolor="#FFFFFF">
    <td align="right">姓　名：</td>
    <td><input type="text" id="realname" name="realname" size="32" maxlength="128" value="$edit_admin[realname]" /></td>
    <td>电话号码：</td>
    <td><input type="text" id="phone" name="phone" size="32" maxlength="128" value="$edit_admin[phone]" /></td>
  </tr>
  <tr height="25" bgcolor="#F0F3F8">
    <td align="right">MSN/QQ：</td>
    <td><input type="text" id="msnqq" name="msnqq" size="32" maxlength="128" value="$edit_admin[msnqq]" /></td>
    <td>手机号码：</td>
    <td><input type="text" id="cellphone" name="cellphone" size="32" maxlength="128" value="$edit_admin[cellphone]" /></td>
  </tr>
  <tr height="25" bgcolor="#FFFFFF">
    <td align="right">等　级：</td>
    <td><select name="admintype">
      <!--
EOT;
$yselected = ($edit_admin[admintype] == "Y")?"selected":"";
$nselected = ($edit_admin[admintype] == "N")?"selected":"";
print <<<EOT
-->	  <option value='Y' $yselected>超级</option>
      <option value='N' $nselected>普通</option>
	  
    </select></td>
    <td rowspan="2">管理备注：</td>
    <td rowspan="2"><textarea cols="31" rows="3" name="admintxt">$edit_admin[admintxt]</textarea></td>
  </tr>
  <tr height="25" bgcolor="#F0F3F8">
    <td align="right">状　态：</td>
    <td><select name="status">
      <!--
EOT;
$yselected = ($edit_admin[status] == "Y")?"selected":"";
$nselected = ($edit_admin[status] == "N")?"selected":"";
print <<<EOT
-->	  <option value='Y' $yselected>开启</option>
	  <option value='N' $nselected>关闭</option>
      
    </select></td>
    </tr>
  <tr height="25" bgcolor="#FFFFFF">
    <td colspan="4" style="padding-left:30px;">
<!--
EOT;
$adminpermission = explode(',',$edit_admin[adminsion]);

$qx1checked = in_array('1', $adminpermission)?"checked":"";

$qx11checked = in_array('11', $adminpermission)?"checked":"";
$qx12checked = in_array('12', $adminpermission)?"checked":"";
$qx13checked = in_array('13', $adminpermission)?"checked":"";
$qx14checked = in_array('14', $adminpermission)?"checked":"";
$qx15checked = in_array('15', $adminpermission)?"checked":"";
$qx16checked = in_array('16', $adminpermission)?"checked":"";
$qx17checked = in_array('17', $adminpermission)?"checked":"";
$qx18checked = in_array('18', $adminpermission)?"checked":"";

$qx21checked = in_array('21', $adminpermission)?"checked":"";
$qx22checked = in_array('22', $adminpermission)?"checked":"";
$qx23checked = in_array('23', $adminpermission)?"checked":"";
$qx24checked = in_array('24', $adminpermission)?"checked":"";
$qx25checked = in_array('25', $adminpermission)?"checked":"";
$qx26checked = in_array('26', $adminpermission)?"checked":"";
$qx27checked = in_array('27', $adminpermission)?"checked":"";
$qx28checked = in_array('28', $adminpermission)?"checked":"";

$qx31checked = in_array('31', $adminpermission)?"checked":"";
$qx32checked = in_array('32', $adminpermission)?"checked":"";
$qx33checked = in_array('33', $adminpermission)?"checked":"";
$qx34checked = in_array('34', $adminpermission)?"checked":"";
$qx35checked = in_array('35', $adminpermission)?"checked":"";
$qx36checked = in_array('36', $adminpermission)?"checked":"";
$qx37checked = in_array('37', $adminpermission)?"checked":"";
$qx38checked = in_array('38', $adminpermission)?"checked":"";

$qx51checked = in_array('51', $adminpermission)?"checked":"";
$qx52checked = in_array('52', $adminpermission)?"checked":"";
$qx53checked = in_array('53', $adminpermission)?"checked":"";
$qx54checked = in_array('54', $adminpermission)?"checked":"";
$qx55checked = in_array('55', $adminpermission)?"checked":"";
$qx56checked = in_array('56', $adminpermission)?"checked":"";
$qx57checked = in_array('57', $adminpermission)?"checked":"";
$qx58checked = in_array('58', $adminpermission)?"checked":"";

$qx61checked = in_array('61', $adminpermission)?"checked":"";
$qx62checked = in_array('62', $adminpermission)?"checked":"";
$qx63checked = in_array('63', $adminpermission)?"checked":"";
$qx64checked = in_array('64', $adminpermission)?"checked":"";
$qx65checked = in_array('65', $adminpermission)?"checked":"";
$qx66checked = in_array('66', $adminpermission)?"checked":"";
$qx67checked = in_array('67', $adminpermission)?"checked":"";
$qx68checked = in_array('68', $adminpermission)?"checked":"";

$qx81checked = in_array('81', $adminpermission)?"checked":"";
$qx82checked = in_array('82', $adminpermission)?"checked":"";
$qx83checked = in_array('83', $adminpermission)?"checked":"";
$qx84checked = in_array('84', $adminpermission)?"checked":"";
$qx85checked = in_array('85', $adminpermission)?"checked":"";
$qx86checked = in_array('86', $adminpermission)?"checked":"";
$qx87checked = in_array('87', $adminpermission)?"checked":"";
$qx88checked = in_array('88', $adminpermission)?"checked":"";

$qx91checked = in_array('91', $adminpermission)?"checked":"";
$qx92checked = in_array('92', $adminpermission)?"checked":"";
$qx93checked = in_array('93', $adminpermission)?"checked":"";
$qx94checked = in_array('94', $adminpermission)?"checked":"";
$qx95checked = in_array('95', $adminpermission)?"checked":"";
$qx96checked = in_array('96', $adminpermission)?"checked":"";
$qx97checked = in_array('97', $adminpermission)?"checked":"";
$qx98checked = in_array('98', $adminpermission)?"checked":"";


print <<<EOT
-->
		<strong>商品管理</strong>
		<input name="qx1" type="checkbox" id="qx1" value="1" $qx1checked>商城订单管理
        <input name="qx11" type="checkbox" id="qx11" value="11" $qx11checked>搜索编辑商品
        <input name="qx12" type="checkbox" id="qx12" value="12" $qx12checked>添加新的商品
		<input name="qx13" type="checkbox" id="qx13" value="13" $qx13checked>商品分类管理
		<input name="qx14" type="checkbox" id="qx14" value="14" $qx14checked>商品品牌管理
		<input name="qx15" type="checkbox" id="qx15" value="15" $qx15checked>商品评论管理
		<input name="qx16" type="checkbox" id="qx16" value="16" $qx16checked>商品评级管理
		<input name="qx17" type="checkbox" id="qx17" value="17" $qx17checked>商品附加字段
		<input name="qx18" type="checkbox" id="qx18" value="18" $qx18checked>供货商管理

		
		<br><strong>会员管理</strong>
		<input name="qx21" type="checkbox" id="qx21" value="21" $qx21checked>前台会员管理 
		<input name="qx22" type="checkbox" id="qx22" value="22" $qx22checked>后台会员管理 
        <input name="qx23" type="checkbox" id="qx23" value="23" $qx23checked>会员等级管理
        <input name="qx24" type="checkbox" id="qx24" value="24" $qx24checked>会员搜索记录
		<input name="qx25" type="checkbox" id="qx25" value="25" $qx25checked>会员登录记录
        <input name="qx26" type="checkbox" id="qx26" value="26" $qx26checked>会员积分记录
        <input name="qx27" type="checkbox" id="qx27" value="27" $qx27checked>预存款记录

		<br><strong>信息管理</strong>
		<input name="qx31" type="checkbox" id="qx31" value="31" $qx31checked>添加新的新闻
        <input name="qx32" type="checkbox" id="qx32" value="32" $qx32checked>新闻编辑修改
        <input name="qx33" type="checkbox" id="qx33" value="33" $qx33checked>新闻分类管理
		<input name="qx34" type="checkbox" id="qx34" value="34" $qx34checked>网站留言管理
		<input name="qx35" type="checkbox" id="qx35" value="35" $qx35checked>网站广告管理
		<input name="qx36" type="checkbox" id="qx36" value="36" $qx36checked>友情链接管理
		<input name="qx37" type="checkbox" id="qx37" value="37" $qx37checked>顶部菜单管理
		<input name="qx38" type="checkbox" id="qx38" value="38" $qx38checked>底部菜单管理


		<br><strong>常规管理</strong>
		<input name="qx51" type="checkbox" id="qx51" value="51" $qx51checked>更新网站缓存
        <input name="qx52" type="checkbox" id="qx52" value="52" $qx52checked>商城运行概况
        <input name="qx53" type="checkbox" id="qx53" value="53" $qx53checked>商城核心设置
		<input name="qx54" type="checkbox" id="qx54" value="54" $qx54checked>数据备份恢复
		<input name="qx55" type="checkbox" id="qx55" value="55" $qx55checked>订单折扣管理
		<input name="qx56" type="checkbox" id="qx56" value="56" $qx56checked>商城红包管理
		<input name="qx57" type="checkbox" id="qx57" value="57" $qx57checked>商城优惠券

		<br><strong>配送折扣</strong>
		<input name="qx61" type="checkbox" id="qx61" value="61" $qx61checked>商城国家管理
        <input name="qx62" type="checkbox" id="qx62" value="62" $qx62checked>商城省份管理
        <input name="qx63" type="checkbox" id="qx63" value="63" $qx63checked>配送区域管理
		<input name="qx64" type="checkbox" id="qx64" value="64" $qx64checked>配送费用管理
        <input name="qx65" type="checkbox" id="qx65" value="65" $qx65checked>配送方式管理
        <input name="qx66" type="checkbox" id="qx66" value="66" $qx66checked>支付方式管理


		<br><strong>高级管理</strong>
		<input name="qx81" type="checkbox" id="qx81" value="81" $qx81checked>商城数据统计
        <input name="qx82" type="checkbox" id="qx82" value="82" $qx82checked>商城模板管理
        <input name="qx83" type="checkbox" id="qx83" value="83" $qx83checked>商城文件管理
		<input name="qx84" type="checkbox" id="qx84" value="84" $qx84checked>图片位置管理
        <input name="qx85" type="checkbox" id="qx85" value="85" $qx85checked>生成静态页面
        <input name="qx86" type="checkbox" id="qx86" value="86" $qx86checked>导出商品数据</td>
    </tr>
  <tr>
    <td colspan="4" align="center" height="30" bgcolor="#F0F3F8">
	<input type="checkbox" name="checkbox" value="Check All" onClick="CheckAll(this.form)">反选
	<INPUT type="submit" value=" 提 交" ></td>
  </tr>
</FORM>
</table>
<script language=JavaScript1.2>
function CheckAll(form){
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		e.checked == true ? e.checked = false : e.checked = true;
	}
}
</script>
<!--
EOT;
?>-->