{load(fhead)}
</head>
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&c=Dealer&a=home">经销商管理系统</a> >> 一卡通经销管理 >> 代理一卡通列表</span></div>
	
	<div id="type">
		<ul>
			<li><a href="index.php?m=mod_b2b&c=product&a=ykt"><span class="type">一卡通进货</span></a></li>
      <li><span class="type">代理一卡通列表</span></li>
      <li><a href="index.php?m=mod_agent&c=Ykt&a=PayTrade"><span class="type">在线付费记录</span></a></li>
		</ul>
	</div>
	<div id="hearder"><span>代理一卡通列表</span></div>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<form id="searchform" name="searchform" method="get" action="index.php">
    <table class="contentTable">
    	<tr>
		  <td width="22%" height="30" class="tableleft1"><input type="radio" name="stype1" value="1" checked id="s1"><label for="s1">方式一：</label></td>
		  <td width="78%" class="tableright1">卡号段：<input type="text" name="cardnumberstart" size="16" value="" class="input" style="vertical-align:middle;" /> 至 <input type="text" name="cardnumberend" size="16" value="" style="vertical-align:middle;" class="input" /></td>
		  </tr>
		  <tr>
		  <td height="30" class="tableleft1"><input TYPE="radio" name="stype1" value="2"  id="s2"><label for="s2">方式二：</label></td>
		  <td class="tableright1">关键字：<input type="text" name="keywords" size="16" value="{$vd['keywords']}"  class="input"/> <select name="stype" >{#Option($vd['sarray'], $vd['stype'])}</select></td>
		  </tr>
      <tr>
        <td width="22%" class="tableleft1">
        </td>
        <td width="78%" align="left" class="tableright1">
          <input type="hidden" name="m" value="mod_agent">
          <input type="hidden" name="c" value="ykt">
          <input type="hidden" name="nrows" value="100">
          <input type="submit" value="确认查询" class="button"/> <input type="reset" name="reset" value="重置查询" class="button">
        </td>
      </tr>
    </table>
    </form>
	</td>
	</tr>
	</table>
	<br>
	<table width="98%" border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<table class="table" width="100%" cellspacing="0" cellpadding="0" border="0">
		<tr>
    <td width="4%" class="heardertop1">&nbsp;</td>
    <td width="5%" class="heardertop1">批次</td>
    <td width="25%" class="heardertop1">名称</td>
    <td width="20%" class="heardertop1">卡号</td>
    <td width="8%" class="heardertop1">面值</td>
    <td width="8%" class="heardertop1">余额</td>
    <td width="8%" class="heardertop1">您的价格</td>
    <td width="8%" class="heardertop1">生效状态</td>
    <td width="8%" class="heardertop1">付款状态</td>
    <td width="6%" class="heardertop1">生成者</td>
    </tr>
    <form name="okform" id="okform"  method="post" Action="index.php?m=mod_agent&c=Ykt&a=MakeOk">
		<!--foreach($vd['items'] as $item) {-->
		<tr class="stline" onmouseover="this.className='nd'" onmouseout="this.className='stline'">
    <td><!--if( $item['okbyaid'] == 1 ) {--><input type="checkbox" name="id[]" value="{$item['id']}"><!--}--></td>
    <td>{$item['cardgroup']}</td>
    <td style="padding-left:3px;text-align:left">{$item['pname']}</td>
    <td>{$item['cardnumber']}</td>
    <td>{$item['price']}</td>
    <td>{$item['money']}</td>
    <td>{$item['cprice']}</td>
    <td>
      <!--if( $item['cardok'] == 1 ) {-->
      <font color=#0000ff>已生效</font>
      <!--}else{-->
      <font color=#ff0000>未生效</font>
      <!--}-->
    </td>
    <td>
    	<!--if( $item['okbyaid'] == 1 ) {-->
      <!--if( $item['ispay'] == 1 ) {-->
      <font color=#0000ff>已付款</font>
      <!--}else{-->
      <font color=#ff0000>未付款</font>
      <!--}-->
      <!--}else{-->
      <font color=#ff00ff>线下付款</font>
      <!--}-->
    </td>
    <td><!--if( $item['admname'] == '' ) {--><!--if($item['addedbystaffid'] > 0){-->员工({$item['addedbystaffid']})<!--}else{--><font color="#0000ff">总帐号</font><!--}--><!--}else{--><font color="#ff0000">系统</font><!--}--></td>
    </tr>
		<!--}-->
		<tr>
      <td height="35" colspan="12"  style="text-align:left;padding-left:5px">
      	<div id="adddiv" style="100px;left:530px;;width:380px;display:none;margin:15px 0">
          <div style="padding:20px;background:#F1F5FA;border:5px #75BCD7 solid">
          <div style="font-size:14px;font-weight:bold;padding:5px;float:left">输入密码确认</div>
          <div style="float:right;"><img src="{$vd['content']}images/destroy.gif" onclick="disp('adddiv')" style="cursor:pointer"/></div>
          <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>
              <td width="25%" height="35px" align="center">交易密码</td>
              <td width="75%"><input type="password" class="myinput" style="font-weight:normal" name="tradepwd" size="24"/></td>
            </tr>
            <tr>
              <td width="25%"></td>
              <td width="75%">
                <input type="hidden" name="makeok" id="makeok" value="" />
                <input type="submit" value="提 交" class="button"/>
                <input type="button" value="取 消" onclick="disp('adddiv', '-1')" class="button"/>
              </td>
            </tr>
          </table>
          </div>
        </div>
        <input type="hidden" name="SearchString" value=""><input name="button1" type="button" class="buttonadd" value="生效" onclick="disp('adddiv', '1');"> <input name="button0" type="button" class="buttondel" value="撤销" onclick="disp('adddiv', '0');"> <input name="selectall" type="button" class="buttonnor" value="全选" onClick=CheckAll(this.form)> <input name="selectother" type="button" class="buttonnor" value="反选" onClick=CheckOthers(this.form)>
      </td>
    </tr>
		</table>
		</form>
	</td>
	</tr>
	</table>
	<div id="page" align="right">
		{load(fpage)}
	</div>
	
	<div style="display:none">
	<input type="submit" name="Submit" value="更新序号" class="button2"> <input type="reset" name="reset" value="重新填写" class="button2"> <input type="button" name="autotomanual" class="button2" value="充值切换" onclick="javascript:openScript('#','autosavesetup',600,400);"> <input type="button" name="nosaletime" class="button2" value="手工禁售" onclick="javascript:openScript('#','setuptime',600,220);">
  </div>
	
	<br>
	<br>
</body>
</html>
<script type="text/javascript"> 
function CheckOthers(form)
{
  for (var i=0;i<form.elements.length;i++)
  {
    var e = form.elements[i];
    if(e)
    {
      if (e.checked==false)
      {
        e.checked = true;
      }
      else
      {
        e.checked = false;
      }
    }
  }
}

function CheckAll(form)
{
  for (var i=0;i<form.elements.length;i++)
  {
    var e = form.elements[i];
    if(e)
      e.checked = true
  }
}

function disp(idx, mok)
{
	if(mok != "-1")
	{
	  $("makeok").value = mok;
	}
  $(idx).style.display = ($(idx).style.display == "") ? "none" : "";
}
</script>  
