<?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';" ><span class="xg">个性设置</span></li>
		<li onclick="location.href='index.php?m=mod_agent&c=Home&a=Bank';" class=hover><span class="xg">银行帐号</span></li>
	  </ul>
	</div>
	<div class="main5" id="main5">
	
	<script language="JavaScript">
	function selectbanktype(i)
	{
	var kk,vv,jj;
	vv="BankType"+i;
	kk=eval('document.modify3.BankType'+i+'.value')
	if(kk=='自定义类型')
	{
	document.getElementById("banktypeselect" + i).style.display="none";
	document.getElementById("banknameedit" + i).style.display="block";
	}
	else
	{
	document.getElementById("banktypeselect" + i).style.display="block";
	document.getElementById("banknameedit" + i).style.display="none";
	document.getElementById("AccountBranch" + i).value = kk;
	}
	}
	</script>
	<form name="modify3" method="post" action="index.php?m=mod_agent&c=Home&a=BankSave">
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
		<tr>
		<td width="22%" align="right" class="tableleft1">汇款帐户：</td>
		<td width="78%">
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
		<td width="35%" class="heardertop1">银行类型</td>
		<td width="15%" class="heardertop1">开户地</td>
		<td width="35%" class="heardertop1">银行帐号</td>
		<td width="15%" class="heardertop1">持卡人</td>
		</tr>
		<?php
		$tbanks = '农业银行,工商银行,建设银行,招商银行,交通银行,中国银行,兴业银行,华夏银行,民生银行,邮政储蓄,商业银行,广发银行,深发银行,浦发银行,光大银行,中信银行,北京银行,上海银行,南京银行,鄞州银行,浙商银行,宁波银行,信用社,支付宝,财付通,自定义类型';
		$banks = explode(',', $tbanks);
		?>
		<?php $i=0;foreach($vd['items'] as $item){ ?>
		<tr>
		<td height="30" class="table5">
		<div id="banktypeselect<?php echo $i; ?>"<?php if(strpos($tbanks,$item['AccountBranch']) === false){ ?> style="display:none;"<?php } ?>><select id="BankType<?php echo $i; ?>" onchange="javascrip:selectbanktype('<?php echo $i; ?>');">
		<?php foreach($banks as $bank){ ?>
		<option value="<?php echo $bank; ?>"<?php if($bank == $item['AccountBranch']){ ?> selected<?php } ?>><?php echo $bank; ?></option>
		<?php } ?>
		</select>
		</div>
		<div id="banknameedit<?php echo $i; ?>" <?php if(strpos($tbanks,$item['AccountBranch']) !== false){ ?> style="display:none;"<?php } ?>><input type="text" class='input' id="AccountBranch<?php echo $i; ?>" name="AccountBranch[]" value="<?php echo $item['AccountBranch']; ?>" size="11" maxlength="10" value="农业银行" require="false" datatype="LimitB" min="1" max="10" msg="自定义银行名称填写必须小于5个汉字" onfocus="javascript:this.value='';"></div>
		</td>
		<td class="table5"><input type="hidden" value="<?php echo $item['id']; ?>" name="id[]"/><input type="text" class='input' name="Address[]" value="<?php echo $item['Address']; ?>" size="10" maxlength="20" require="false" datatype="LimitB" min="1" max="20" msg="开户地必须填写"></td>
		<td class="table5"><input type="text" class='input' name="AccountNO[]" value="<?php echo $item['AccountNO']; ?>" size="35" maxlength="30" require="false" datatype="LimitB" min="1" max="30" msg="帐号必须填写"></td>
		<td class="table5"><input type="text" class='input' name="AccountName[]" value="<?php echo $item['AccountName']; ?>" size="10" maxlength="10" require="false" datatype="LimitB" min="2" max="10" msg="持卡人姓名必须填写"></td>
		</tr>
		<?php $i++;} ?>
		
		<?php for($j=$i; $j<5; $j++){ ?>
		<tr>
		<td height="30" class="table5">
		<div id="banktypeselect<?php echo $j; ?>"><select id="BankType<?php echo $j; ?>" onchange="javascrip:selectbanktype('<?php echo $j; ?>');">
		<?php foreach($banks as $bank){ ?>
		<option value="<?php echo $bank; ?>"><?php echo $bank; ?></option>
		<?php } ?>
		</select>
		</div>
		<div id="banknameedit<?php echo $j; ?>" style="display:none;"><input type="text" class='input' id="AccountBranch<?php echo $j; ?>" name="AccountBranch[]" size="11" maxlength="10" value="农业银行" require="false" datatype="LimitB" min="1" max="10" msg="自定义银行名称填写必须小于5个汉字" onfocus="javascript:this.value='';"></div>
		</td>
		<td class="table5"><input type="hidden" value="0" name="id[]"/><input type="text" class='input' name="Address[]" size="10" maxlength="20" require="false" datatype="LimitB" min="1" max="20" msg="开户地必须填写"></td>
		<td class="table5"><input type="text" class='input' name="AccountNO[]" size="35" maxlength="30" require="false" datatype="LimitB" min="1" max="30" msg="帐号必须填写"></td>
		<td class="table5"><input type="text" class='input' name="AccountName[]" size="10" maxlength="10" require="false" datatype="LimitB" min="2" max="10" msg="持卡人姓名必须填写"></td>
		</tr>
		<?php } ?>
		
		
		</table>
		</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="27"></td>
		</tr>
		</table>
	</td>
	</tr>
	</table>
	</form>
	</div>
</body>
</html>
