<?php widget("fhead");include($path_cache.DS."mod_agent_Shared_fhead.php"); ?>
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="<?php echo $vd['root']; ?>index.php?m=mod_b2b&a=Home">直销商管理系统</a> >> 帐户管理 >> 帐户资料修改</span></div>
	
	<div id="tabs5">
		<ul class="menu5" id="menu5">
		<li onclick="location.href='index.php?m=mod_agent&c=Home';"><span class="xg">帐户信息</span></li>
		<li onclick="location.href='index.php?m=mod_agent&c=Home&a=Self';" class=hover><span class="xg">个性设置</span></li>
		<li onclick="location.href='index.php?m=mod_agent&c=Home&a=Bank';" ><span class="xg">银行帐号</span></li>
	  </ul>
	</div>
	<div class="main5" id="main5">
	
	<form name="modify2" method="post" action="index.php?m=mod_agent&c=Home&a=SelfSave">
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<?php $temp = explode('|', $vd['data']['websetting']);$cout=count($temp); ?>
	<input type="hidden" id="websetting" name="websetting" value="<?php echo $vd['data']['websetting']; ?>"/>
	<td class="tableleft">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" rowspan="11" align="right" class="tableleft1">个性设置：</td>
		<td width="78%" class="tableright1"><input type="checkbox" value="0" <?php if($cout > 0){ToggleCheck($temp[0]);} ?> onclick="set(this)"/>
    	购买点卡的时候显示进货价格</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="1" <?php if($cout > 1){ToggleCheck($temp[1]);} ?> onclick="set(this)"/>
    	显示账户余额</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="9" <?php if($cout > 9){ToggleCheck($temp[9]);} ?> onclick="set(this)"/>
      显示当前欠款</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="10" <?php if($cout > 10){ToggleCheck($temp[10]);} ?> onclick="set(this)"/>
      显示信用额度</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="2" <?php if($cout > 2){ToggleCheck($temp[2]);} ?> onclick="set(this)"/>
    	显示我的上级经销商</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="3" <?php if($cout > 3){ToggleCheck($temp[3]);} ?> onclick="set(this)"/>
    	允许建立员工销售账号</td></tr>
    <tr><td class="tableright1">
    	<span style="display:none"><input type="checkbox" value="4" <?php if($cout > 4){ToggleCheck($temp[4]);} ?> onclick="set(this)"/>
    允许员工售卡时修改零售价格</span>
    	<input type="checkbox" value="5" <?php if($cout > 5){ToggleCheck($temp[5]);} ?> onclick="set(this)"/>
    	允许使用网站登录方式</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="6" <?php if($cout > 6){ToggleCheck($temp[6]);} ?> onclick="set(this)"/>
    	允许使用登录器登录</td></tr>
    <tr><td class="tableright1" style="display:none"><input type="checkbox" value="7" <?php if($cout > 7){ToggleCheck($temp[7]);} ?> onclick="set(this)"/>
      收到新的短消息弹出提醒框</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="8" <?php if($cout > 8){ToggleCheck($temp[8]);} ?> onclick="set(this)"/>
      购卡时候输入交易密码</td></tr>
    <tr><td class="tableright1"><input type="checkbox" value="11" <?php if($cout > 11){ToggleCheck($temp[11]);} ?> onclick="set(this)"/>
      允许总帐号售卡时修改零售价格</td></tr>

		<tr>
		<td align="right" class="tableleft1">输入超级密码：</td>
		<td class="tableright1"><input type="password" name="superpwd" size="30" class='input'/></td>
		</tr>
		
		<tr>
		<td align="right" class="tableleft1">&nbsp;</td>
		<td class="tableright1"><input type="submit" name="submit" value="完成修改" class="button"> <input type="reset" name="reset" value="重新填写" class="button" tabindex="10"></td>
		</tr>
		</table>
	</td>
	</tr>
	</table>
	</form>
	</div>
	<script type="text/javascript">
	function implode(str, myarray)
  {
  	var thisstr = "";
  	for(i=0;i<myarray.length;i++)
  	{
  		thisstr = thisstr + myarray[i] + "|";
  	}
  	return thisstr;
  }
	var mywebsetting = new Array(<?php array_pop($temp);echo implode(',', $temp);if(count($temp)==0){echo '0,0,0,0,0,0,0,0,0,0,0,0';} if(count($temp)<12){ ?>,0,0,0,0,0,0<?php } ?>);
	function set(obj)
  {
  	mywebsetting[obj.value] = obj.checked ? 1 : 0;
  	document.getElementById("websetting").value = implode("|", mywebsetting);
  }
	</script>
</body>
</html>
