<?php
/****************************************/
/*                                      */
/*  百信卡盟平台联系QQ:84945491         */
/*  淘宝店 http://shop70674652.taobao.com  */
/*  百信卡盟 http://www.caipiaobus.com  */
/*                                      */
/****************************************/

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"/>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"";
echo $vd['sc'];
echo "css/main.css\"/>\r\n</head>\r\n<body>\r\n";
$item = $vd['item'];
echo "<div id=\"titleDiv\">\r\n<div style=\"float:left\"><a href=\"index.php?a=home\"><img src=\"";
echo $vd['sc'];
echo "images/home.png\" style=\"vertical-align:middle\" border=\"0\"/></a></div><div style=\"float:left;padding-top:8px;padding-left:3px;\"><a href=\"index.php?a=home\" title=\"回到后台首页\"><font color=\"#000\">桌面</font></a> ";
echo "<s";
echo "pan style=\"font-size:7px;\">>></span> <a href=\"index.php?m=mod_b2b&c=Agent&a=index\" title=\"用户列表\"><font color=\"#000\">用户列表</font></a> ";
echo "<s";
echo "pan style=\"font-size:7px;\">>></span> ";
echo "<s";
echo "pan style=\"font-size:12px;\">用户信息修改</span>(<a href=\"index.php?m=mod_b2b&c=Agent&a=detail&aid=";
echo $item['aid'];
echo "\">刷新</a>)</div>\r\n<div style=\"float:right;\"><a href=\"index.php\" onFocus=\"this.blur()\" title=\"查看用户相关帮助\"><img src=\"";
echo $vd['sc'];
echo "images/help.gif\" style=\"vertical-align:middle\" border=\"0\"/></a></div>\r\n</div>\r\n<form id=\"cform\" method=\"post\" action=\"index.php?m=mod_b2b&c=agent&a=update\">\r\n<div id=\"content\" class=\"cwarpper\">\r\n<div class=\"cbodyHead\"></div>\r\n<div class=\"cwarpper1\">\r\n<div class=\"ctitle\">用户信息修改</div>\r\n<table border=\"1\" id=\"ctable1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n  <tr>\r\n    <td class=\"tablelt\">商家名：</td>\r\n    <td";
echo " class=\"tablert\">";
echo $item['aname'];
echo "</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">当前帐上余额：</td>\r\n    <td class=\"tablert\">";
echo $item['aremain'];
echo $vd['lang']['moneyunit'];
echo "</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">用户积分：</td>\r\n    <td class=\"tablert\">";
echo $item['scored'];
echo " 点</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">状态：</td>\r\n    <td class=\"tablert\">\r\n    ";
echo "<s";
echo "elect name=\"frozen\"  size=\"1\">\r\n      ";
option( $vd['frozen'], $item['frozen'] );
echo "    </select>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">修改登录密码：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"password\" style=\"font-weight:normal;background:#EAEAEA;width:147px;\" id=\"staffpwd\" name=\"staffpwd\" readonly /> <input type=\"checkbox\" onclick=\"enable(this)\" style=\"vertical-align:middle;\" class=\"checkbox\" onFocus=\"this.blur()\"/> 修改密码(谨慎使用)</td>\r\n  </tr>\r\n  <tr>\r\n    <td cla";
echo "ss=\"tablelt\">确认登录密码：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"password\" style=\"font-weight:normal;background:#EAEAEA;width:147px\" id=\"restaffpwd\" name=\"restaffpwd\" readonly />";
echo "<s";
echo "pan id=\"spanrestaffpwd\"></span></td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">修改超级密码：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"password\" style=\"font-weight:normal;background:#EAEAEA;width:147px;\" id=\"superpwd\" name=\"superpwd\" readonly /> <input type=\"checkbox\" onclick=\"enable1(this)\" style=\"vertical-align:middle;\" class=\"checkbox\" onFocus=\"this.blur()\"/> 修改密码(谨慎使用)</td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">确认超级密码：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"password\" style=\"font-weight:normal;background:#EAEAEA;width:147px\" id=\"resuperpwd\" name=\"resuperpwd\" readonly />";
echo "<s";
echo "pan id=\"spanrestaffpwd\"></span></td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">修改交易密码：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"password\" style=\"font-weight:normal;background:#EAEAEA;width:147px;\" id=\"tradepwd\" name=\"tradepwd\" readonly /> <input type=\"checkbox\" onclick=\"enable2(this)\" style=\"vertical-align:middle;\" class=\"checkbox\" onFocus=\"this.blur()\"/> 修改密码(谨慎使用)</td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">确认交易密码：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"password\" style=\"font-weight:normal;background:#EAEAEA;width:147px\" id=\"retradepwd\" name=\"retradepwd\" readonly />";
echo "<s";
echo "pan id=\"spanrestaffpwd\"></span></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">真实姓名：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"hidden\" name=\"ubzaname\" size=\"24\" value=\"";
echo $item['aname'];
echo "\"/>\r\n    <input type=\"text\" name=\"ubzarealname\" size=\"24\" value=\"";
echo $item['arealname'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">省市：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"prv\" size=\"10\" value=\"";
echo $item['prv'];
echo "\"/> 省/市\r\n    <input type=\"text\" name=\"city\" size=\"10\" value=\"";
echo $item['city'];
echo "\"/> 市\r\n    </td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">公司：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"company\" size=\"24\" value=\"";
echo $item['company'];
echo "\"/></td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">网店地址 ：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"eshop\" size=\"24\" value=\"";
echo $item['eshop'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">身份证号：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"idcard\" size=\"24\" value=\"";
echo $item['idcard'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">地址：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"ubzaaddr\" size=\"24\" value=\"";
echo $item['aaddr'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">邮编：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"ubzzip\" size=\"24\" value=\"";
echo $item['zip'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">邮箱：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"ubzamail\" size=\"24\" value=\"";
echo $item['amail'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">电话：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"ubzatel\" size=\"24\" value=\"";
echo $item['atel'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">手机：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"mobile\" size=\"24\" value=\"";
echo $item['mobile'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">QQ：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"ubzaqq\" size=\"24\" value=\"";
echo $item['aqq'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">备注：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"remarks\" size=\"24\" value=\"";
echo $item['remarks'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">用户级别：</td>\r\n    <td class=\"tablert\">\r\n    ";
echo "<s";
echo "elect name=\"ubzalv\"  size=\"1\">\r\n      ";
option( $vd['rank'], $item['alv'], "name", "id" );
echo "    </select>\r\n    </td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">自有商品上限：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"canadd\" size=\"24\" value=\"";
echo $item['canadd'];
echo "\"/> 不限制的话，填 -1 即可</td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">开通自有商品：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"radio\" name=\"custom\" value=\"-1\" class=\"checkbox\" onFocus=\"this.blur()\" ";
if ( $item['custom'] == -1 )
{
				echo "checked";
}
echo " > 不开通\r\n    <input type=\"radio\" name=\"custom\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\" ";
if ( $item['custom'] == 1 )
{
				echo "checked";
}
echo " > 开通</td>\r\n  </tr>\r\n  ";
$rights = explode( ",", $item['rights'].",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" );
echo "  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">用户上级编号：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"parentid\" size=\"24\" value=\"";
echo $item['parentid'];
echo "\"/> 如果写0则表示上级为系统</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">最低充值数额：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"lowczfunds\" size=\"24\" value=\"";
echo $rights[3];
echo "\"/> 0表示不限制</td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 || $vd['tbcz'] == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">开通淘宝自动充值：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"radio\" name=\"tbcz\" value=\"-1\" class=\"checkbox\" onFocus=\"this.blur()\" ";
if ( $rights[4] == 0 )
{
				echo "checked";
}
echo " > 不开通\r\n    <input type=\"radio\" name=\"tbcz\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\"  ";
if ( $rights[4] == 1 )
{
				echo "checked";
}
echo " > 开通</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">权限设置：</td>\r\n    <td class=\"tablert\">\r\n      <input type=\"checkbox\" value=\"1\" name=\"yktcz\" onFocus=\"this.blur()\" ";
togglecheck( $rights[0] );
echo " class=\"checkbox\"/> 允许一卡通充值 \r\n      ";
echo "<s";
echo "pan ";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo "><input type=\"checkbox\" value=\"1\" name=\"selfcz\" onFocus=\"this.blur()\" ";
togglecheck( $rights[1] );
echo " class=\"checkbox\"/> 允许自行把利润转入余额</span>\r\n    </td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">初始化个性设置：</td>\r\n    <td class=\"tablert\">\r\n      <input type=\"checkbox\" value=\"1\" name=\"initpersonfile\" onFocus=\"this.blur()\" class=\"checkbox\"/> 当用户的设置导致无法登录或者操作的时候，才需要您初始化，否则慎用 \r\n    </td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">解除绑定：</td>\r\n    <td class=\"tablert\">\r\n      <input type=\"checkbox\" value=\"1\" name=\"gotobindaid\" onFocus=\"this.blur()\" class=\"checkbox\" onclick=\"loadDisp(1);window.location.href='?m=mod_b2b&c=Security&a=Bind&aid=";
echo $item['aid'];
echo "&staffid=0'\"/> 解除用户设置的相关绑定（如硬件绑定，密保邦定，随机密码绑定等） \r\n    </td>\r\n  </tr>\r\n  <tr";
if ( $vd['vipshop'] == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">VIP连锁店：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"checkbox\" value=\"1\" name=\"vipshop\" onFocus=\"this.blur()\"    ";
if ( $item['vipshop'] == 1 )
{
				echo "checked";
}
echo " class=\"checkbox\"/> \r\n    </td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">是否测试号：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"checkbox\" value=\"1\" name=\"istest\" onFocus=\"this.blur()\"    ";
if ( $item['istest'] == 1 )
{
				echo "checked";
}
echo " class=\"checkbox\"/> 批发平台有效,如果测试号的话,不允许购卡,其它功能正常\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">经销商名录：</td>\r\n    <td class=\"tablert\">\r\n      ";
echo "<s";
echo "pan";
if ( UB_YKT == 0 )
{
				echo " style=\"display:none\"";
}
echo "><input type=\"checkbox\" value=\"1\" name=\"forykt\" onFocus=\"this.blur()\" ";
togglecheck( $item['forykt'] );
echo " class=\"checkbox\"/> 加入一卡通类经销商名录 </span>\r\n      ";
echo "<s";
echo "pan";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo "><input type=\"checkbox\" value=\"1\" name=\"forb2b\" onFocus=\"this.blur()\" ";
togglecheck( $item['forb2b'] );
echo " class=\"checkbox\"/> 加入批发类经销商名录 </span>\r\n      ";
echo "<s";
echo "pan";
if ( UB_B2C == 0 )
{
				echo " style=\"display:none\"";
}
echo "><input type=\"checkbox\" value=\"1\" name=\"forb2c\" onFocus=\"this.blur()\" ";
togglecheck( $item['forb2c'] );
echo " class=\"checkbox\"/> 加入零售类经销商名录 </span>\r\n    </td>\r\n  </tr>\r\n  <tr style=\"display:none\">\r\n    <td class=\"tablelt\">一卡通卡密生成：</td>\r\n    <td class=\"tablert\">\r\n      <input type=\"checkbox\" value=\"1\" name=\"yktcreate\" onFocus=\"this.blur()\" ";
togglecheck( $rights[2] );
echo " class=\"checkbox\" onclick=\"javascript:alert('打勾后，请务必同时勾选经销商名录处的加入一卡通类经销商名录，同时经销商功能处的一卡通功能也要打勾方可使用')\"/> 允许前台自行生成一卡通，一卡通被使用后自动扣除客户的钱\r\n    </td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">开户行：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"AccountBranch\" size=\"24\" value=\"";
echo $item['AccountBranch'];
echo "\"/></td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">银行帐号：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"AccountNo\" size=\"24\" value=\"";
echo $item['AccountNo'];
echo "\"/></td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">户名：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"AccountName\" size=\"24\" value=\"";
echo $item['AccountName'];
echo "\"/></td>\r\n  </tr>\r\n  <tr";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n    <td class=\"tablelt\">开户所在地：</td>\r\n    <td class=\"tablert\">\r\n    <input type=\"text\" name=\"BankAddress\" size=\"24\" value=\"";
echo $item['BankAddress'];
echo "\"/></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">最后登陆IP：</td>\r\n    <td class=\"tablert\">";
echo $item['lastip'];
echo "</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">最后登陆时间：</td>\r\n    <td class=\"tablert\">";
echo $item['lastdate'];
echo "</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">注册IP：</td>\r\n    <td class=\"tablert\">";
echo $item['regip'];
echo "</td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">注册时间：</td>\r\n    <td class=\"tablert\">";
echo $item['regdate'];
echo "</td>\r\n  </tr>\r\n</table>\r\n<input type=\"hidden\" value=\"";
echo $item['leftrights'];
echo "\" id=\"thisright\"/>\r\n<input type=\"hidden\" value=\"0\" name=\"bindchange\" id=\"bindchange\"/>\r\n<input type=\"hidden\" value=\"";
echo $item['aid'];
echo "\" name=\"aid\" id=\"aid\"/>\r\n</div>\r\n<div class=\"cwarpper1\">\r\n<div class=\"ctitle\">按时间段冻结用户</div>\r\n<table border=\"1\" id=\"ctable1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n\t<tr>\r\n    <td class=\"tablelt\">冻结时间段：</td>\r\n    <td class=\"tablert\">\r\n      ";
echo "<s";
echo "elect name=\"frozenline\" onchange=\"setfrozendate(this)\">\r\n      \t<option value=\"0\">不操作</option>\r\n      \t<option value=\"1\">1小时</option>\r\n      \t<option value=\"3\">3小时</option>\r\n      \t<option value=\"12\">12小时</option>\r\n      \t<option value=\"24\">24小时</option>\r\n      \t<option value=\"48\">48小时</option>\r\n      \t<option value=\"72\">3天</option>\r\n      \t<option value=\"360\">15天</option>\r\n      \t<option value=\"720";
echo "\">1个月</option>\r\n      \t<option value=\"1440\">2个月</option>\r\n      \t<option value=\"4320\">6个月</option>\r\n      </select>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">起始时间：</td>\r\n    <td class=\"tablert\">\r\n      <input type=\"text\" class=\"myinput\" style=\"font-weight:normal\" name=\"fromdate\" id=\"t1\" size=\"20\" value=\"";
echo $item['fromdate'];
echo "\"/><img src=\"";
echo $vd['sc'];
echo "images/calender.gif\" onclick=\"dateDialog('t1')\" style=\"vertical-align:middle;cursor:pointer;margin-left:0px;\"/>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">结束时间：</td>\r\n    <td class=\"tablert\">\r\n      <input type=\"text\" class=\"myinput\" style=\"font-weight:normal\" name=\"todate\" id=\"t2\" size=\"20\" value=\"";
echo $item['todate'];
echo "\"/><img src=\"";
echo $vd['sc'];
echo "images/calender.gif\" onclick=\"dateDialog('t2')\" style=\"vertical-align:middle;cursor:pointer;margin-left:0px;\"/>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"tablelt\">原因：</td>\r\n    <td class=\"tablert\">\r\n      <input type=\"text\" class=\"myinput\" style=\"font-weight:normal\" name=\"frozereason\" size=\"20\" value=\"";
echo $item['frozereason'];
echo "\"/>小于125个字\r\n    </td>\r\n  </tr>\r\n</table>\r\n</div>\r\n";
$auright1 = array(
				array( 0, "购卡售用户", 1 ),
				array( 1, "进货记录查询", 1 ),
				array( 34, "销售记录查询", 0 ),
				array( 3, "给账户充值", 0 ),
				array( 5, "查看账户资金变动", 0 ),
				array( 6, "资金锁定", 0 ),
				array( 26, "借款管理", 0 ),
				array( 12, "操作日志", 0 ),
				array( 16, "在线投诉系统", 1 ),
				array( 18, "平台内部短信", 1 ),
				array( 19, "汇款通知书", 0 ),
				array( 23, "员工帐户管理", 0 ),
				array( 11, "员工零售利润报表", 0 ),
				array( 35, "员工零售价设定", 0 ),
				array( 38, "员工结帐管理", 1 ),
				array( 20, "帐户密码设定", 1 ),
				array( 15, "账户安全检查", 1 ),
				array( 39, "IP及所在地安全绑定", 1 ),
				array( 40, "硬件信息安全绑定", 1 ),
				array( 41, "手机令牌安全绑定", 1 ),
				array( 42, "密保产品安全绑定", 1 ),
				array( 52, "积分管理", 1 )
);
if ( $vd['tbcz'] == 1 )
{
				$auright1[] = array( 64, "淘宝小店列表/挂机", 0 );
				$auright1[] = array( 65, "淘宝小店添加", 0 );
				$auright1[] = array( 66, "淘宝订单记录", 0 );
}
$auright2 = array(
				array( 51, "管理经销商系统", 0 ),
				array( 4, "账户余额详细", 0 ),
				array( 2, "修改下家进价", 0 ),
				array( 9, "划款给下级客户", 0 ),
				array( 13, "代注册下级帐号", 0 ),
				array( 14, "下级客户档案管理", 0 ),
				array( 28, "自有商品发布与管理", 0 ),
				array( 29, "自有商品添加", 0 ),
				array( 45, "自有商品定价", 0 ),
				array( 31, "自有商品库存", 0 ),
				array( 56, "自有商品充值管理", 0 ),
				array( 44, "商品销售报表查询", 0 ),
				array( 32, "销售收入入帐记录", 0 ),
				array( 30, "下级客户价格管理", 0 ),
				array( 46, "下级客户购卡权限", 0 ),
				array( 47, "下级客户消费记录", 0 ),
				array( 48, "下级汇款通知书", 0 ),
				array( 49, "业务员帐户管理", 0 ),
				array( 50, "业务员业绩查询", 0 ),
				array( 57, "代理一卡通列表", 0 ),
				array( 58, "代理一卡通换购记录", 0 ),
				array( 59, "换购商品返点费率", 0 ),
				array( 60, "一卡通返点明细", 0 )
);
if ( $vd['vipshop'] == 1 )
{
				$auright2[] = array( 53, "VIP平台设置", 0 );
				$auright2[] = array( 62, "VIP风格选择", 0 );
				$auright2[] = array( 63, "VIP风格自定义", 0 );
				$auright2[] = array( 54, "VIP平台广告", 0 );
				$auright2[] = array( 55, "VIP平台公告", 0 );
}
echo "<div class=\"cwarpper1\"";
if ( UB_B2B == 0 )
{
				echo " style=\"display:none\"";
}
echo ">\r\n<div class=\"ctitle\">用户权限设置</div>\r\n<div>\r\n<table border=\"1\" id=\"ctable1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n  <tr><td colspan=\"4\" style=\"background:#f8f8f8\"><b>直销商功能：</b></td></tr>\r\n  ";
$i = 0;
foreach ( $auright1 as $item )
{
				echo "  ";
				if ( $i == 0 )
				{
								echo "  <tr>\r\n  ";
				}
				++$i;
				echo "    <td width=\"25%\"><input type=\"checkbox\" class=\"checkbox\" value=\"1\" id=\"rights_";
				echo $item[0];
				echo "\" name=\"rights_";
				echo $item[0];
				echo "\" /><label for=\"rights_";
				echo $item[0];
				echo "\">";
				echo $item[1];
				echo "</label></td>\r\n  ";
				if ( $i == 4 )
				{
								echo "  </tr>\r\n  ";
								$i = 0;
				}
				echo "  ";
}
echo "  \r\n  ";
if ( 0 < $i )
{
				echo "  ";
				$j = 0;
				for ( ;	$j < 4 - $i;	++$j	)
				{
								echo "  <td width=\"25%\" class=stline>&nbsp;</td>\r\n  ";
				}
				echo "  </tr>\r\n  ";
}
echo "</table>\r\n<table border=\"1\" id=\"ctable1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n  <tr><td colspan=\"4\" style=\"background:#f8f8f8\"><b>经销商功能：</b></td></tr>\r\n  ";
$i = 0;
foreach ( $auright2 as $item )
{
				echo "  ";
				if ( $i == 0 )
				{
								echo "  <tr>\r\n  ";
				}
				++$i;
				echo "    <td width=\"25%\"><input type=\"checkbox\" class=\"checkbox\" value=\"1\" id=\"rights_";
				echo $item[0];
				echo "\" name=\"rights_";
				echo $item[0];
				echo "\" /><label for=\"rights_";
				echo $item[0];
				echo "\">";
				echo $item[1];
				echo "</label></td>\r\n  ";
				if ( $i == 4 )
				{
								echo "  </tr>\r\n  ";
								$i = 0;
				}
				echo "  ";
}
echo "  \r\n  ";
if ( 0 < $i )
{
				echo "  ";
				$j = 0;
				for ( ;	$j < 4 - $i;	++$j	)
				{
								echo "  <td width=\"25%\" class=stline>&nbsp;</td>\r\n  ";
				}
				echo "  </tr>\r\n  ";
}
echo "</table>\r\n</div>\r\n</div>\r\n<div id=\"cdiv\" style=\"position:absolute;bottom:45px;left:30px;;width:480px;display:none\">\r\n  <div style=\"padding:20px;background:#F1F5FA;border:5px #75BCD7 solid\">\r\n  <div style=\"font-size:14px;font-weight:bold;padding:5px;float:left\">请输入后台充值密码</div>\r\n  <div style=\"float:right;\"><img src=\"";
echo $vd['sc'];
echo "images/destroy.gif\" onclick=\"disp('cdiv')\" style=\"cursor:pointer\"/></div>\r\n    <table id=\"checktable\" width=\"100%\" style=\"border-collapse: collapse;\">\r\n      <tr>\r\n        <td width=\"25%\"\">后台充值密码</td>\r\n        <td width=\"75%\"><input type=\"password\" id=\"mytradepwd\" name=\"mytradepwd\" value=\"\"/></td>\r\n      </tr>\r\n      <tr>\r\n        <td width=\"25%\"\">提示</td>\r\n        <td width=\"75%\" style=\"font-size:12px\"";
echo ">输入充值密码后，才可以修改用户的相关信息</td>\r\n      </tr>\r\n      <tr>\r\n        <td width=\"25%\" style=\"height:50px;\"></td>\r\n        <td width=\"75%\">\r\n          <input type=\"submit\" value=\"我知道，确认提交\" class=\"button\"/> <input type=\"button\" value=\"取消\" class=\"button\" onclick=\"disp('cdiv')\"/>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n  </div>\r\n</div>\r\n<div class=\"cbodyFoot\"></div>\r\n</div>\r\n<div id=\"opcontent\"";
echo ">\r\n  <div class=\"optxt\">\r\n    <input type=\"button\" value=\"修 改 &gt;&gt;\" name=\"b1\" class=\"btn\" onclick=\"disp('cdiv')\" />\r\n    <input type=\"reset\" value=\"重 置 &gt;&gt;\" name=\"b1\" class=\"btn\"/>\r\n  </div>\r\n</div>\r\n</form>\r\n";
echo "<s";
echo "cript type=\"text/javascript\">\r\n  var ctablenum = 1;\r\n  sc = \"";
echo $vd['sc'];
echo "\";\r\n</script>\r\n";
echo "<s";
echo "cript src=\"";
echo $vd['sc'];
echo "js/content.js\" type=\"text/javascript\"></script>\r\n";
echo "<s";
echo "cript type=\"text/javascript\">\r\n  var thisright = \$(\"thisright\").value;\r\n  var tmp = thisright.split(\",\");\r\n  for(var i = 0; i < tmp.length; i++)\r\n  {\r\n    if(\$(\"rights_\" + i) != null)\r\n    {\r\n      \$(\"rights_\" + i).checked = tmp[i]==1 ? true : false;\r\n    }\r\n  }\r\n  \r\n  function enable(obj)\r\n  {\r\n    state   = obj.checked ? false : true;\r\n    bck     = obj.checked ? \"#ffffff\" : \"#EAEAEA\";\r\n    \r\n   ";
echo " \$(\"staffpwd\").readOnly   = state;\r\n    \$(\"restaffpwd\").readOnly = state;\r\n    \r\n    \$(\"staffpwd\").style.background = bck;\r\n    \$(\"restaffpwd\").style.background = bck;\r\n    \r\n    \$(\"staffpwd\").value = \"\";\r\n    \$(\"restaffpwd\").value = \"\";\r\n  }\r\n  \r\n  function enable1(obj)\r\n  {\r\n    state   = obj.checked ? false : true;\r\n    bck     = obj.checked ? \"#ffffff\" : \"#EAEAEA\";\r\n    \r\n    \$(\"superpwd\").rea";
echo "dOnly   = state;\r\n    \$(\"resuperpwd\").readOnly = state;\r\n    \r\n    \$(\"superpwd\").style.background = bck;\r\n    \$(\"resuperpwd\").style.background = bck;\r\n    \r\n    \$(\"superpwd\").value = \"\";\r\n    \$(\"resuperpwd\").value = \"\";\r\n  }\r\n  \r\n  function enable2(obj)\r\n  {\r\n    state   = obj.checked ? false : true;\r\n    bck     = obj.checked ? \"#ffffff\" : \"#EAEAEA\";\r\n    \r\n    \$(\"tradepwd\").readOnly   = state;\r\n";
echo "    \$(\"retradepwd\").readOnly = state;\r\n    \r\n    \$(\"tradepwd\").style.background = bck;\r\n    \$(\"retradepwd\").style.background = bck;\r\n    \r\n    \$(\"tradepwd\").value = \"\";\r\n    \$(\"retradepwd\").value = \"\";\r\n  }\r\n  \r\n  function setbind(val)\r\n  {\r\n    \$(\"bindchange\").value = val;\r\n  }\r\n  \r\n  function reasondisp(obj)\r\n  {\r\n    \$(\"reason\").style.display = obj.value==0 ? \"none\" : \"\";\r\n  }\r\n  setTableInput(";
echo ");\r\n  \r\n  function setCustom(val)\r\n  {\r\n    \$(\"remarks_custom\").style.display = val == 1 ? \"\" : \"none\";\r\n  }\r\n  \r\n  function setArea(obj)\r\n  {\r\n    if(obj.innerHTML == \"请输入原因\")\r\n    {\r\n      obj.innerHTML = \"\";\r\n    }\r\n  }\r\n  \r\n  function setBlur(obj)\r\n  {\r\n    if(obj.innerHTML == \"\")\r\n    {\r\n      obj.innerHTML = \"请输入原因\";\r\n    }\r\n  }\r\n  \r\n  function setfrozendate(obj)\r\n  {\r\n  \tv = obj.o";
echo "ptions[obj.selectedIndex].value;\r\n  \td = new Date();\r\n  \td1 = date2str(d);\r\n  \t\r\n  \tif(v == 0)\r\n  \t{\r\n  \t\t\$(\"t1\").value = \"1970-01-01 00:00:00\";\r\n  \t  \$(\"t2\").value = \"1970-01-01 00:00:00\";\r\n  \t  return;\r\n  \t}\r\n  \telse if(v < 24)\r\n  \t{\r\n  \t\tv = v / 1;\r\n  \t\tv = d.getHours() + v;\r\n  \t\t\r\n  \t\td.setHours(v);\r\n\r\n  \t}\r\n  \telse if(v < 361)\r\n  \t{\r\n  \t\tv1 = v / 24;\r\n  \t\td.setDate(d.getDate() + v1);\r\n  \t}\r\n   ";
echo " else\r\n    {\r\n    \tv1 = v / 720;\r\n    \td.setMonth(d.getMonth() + v1);\r\n    }\r\n  \t\r\n  \td2 = date2str(d);\r\n  \t\r\n  \t\$(\"t1\").value = d1;\r\n  \t\$(\"t2\").value = d2;\r\n  }\r\n  \r\n  function date2str(d)\r\n  {   \r\n    var ret=d.getFullYear()+\"-\"   \r\n    ret+=(\"00\"+(d.getMonth()+1)).slice(-2)+\"-\"   \r\n    ret+=(\"00\"+d.getDate()).slice(-2)+\" \"   \r\n    ret+=(\"00\"+d.getHours()).slice(-2)+\":\"   \r\n    ret+=(\"00\"+d.getM";
echo "inutes()).slice(-2)+\":\"   \r\n    ret+=(\"00\"+d.getSeconds()).slice(-2)   \r\n    return ret;  \r\n  }   \r\n\r\n</script>\r\n</body>\r\n</html>\r\n";
?>
