<!--if($vd['table']==0){-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<link rel="stylesheet" type="text/css" href="{$vd['sc']}css/main.css"/>
<style>
.search_select {
  width: 154px;
  color: #555;
  height:24px;
  margin: -1px;
  border: 0px solid #B5B8C8;
  font-size: 14px;
  background: #FFF;
}
.search_s {
   width: 152px;
   height:20px;
   float:left;
   padding: 2px;
   margin: 6px 0 0 0px;
   overflow: hidden;
   border: 1px solid #80CCFF;
   background: #fff;
}
.search_s1 {
   width: 152px;
   height:20px;
   float:left;
   margin: 0;
   overflow: hidden;
   background: #fff;
}
</style>
</head>
<body>
<div class="titleDiv" id="titleList">
<div style="float:left"><a href="index.php?a=Home"><img src="{$vd['sc']}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> <span style="font-size:7px;">>></span> <font color="#000">兑换类列表</font> (共 <b><span id="tol1">{$vd['totlerow']}</span></b> 个)
  <strong onmouseover="showhide(this);" onmouseout="showhide(this);" style="cursor:pointer">[?]</strong><p style="display:none">
    兑换类用途:<br/>
    这里的列表主要显示在兑换平台中，客户可以使用这些卡来兑换其他类型的卡或者使用这些卡来给自己账号冲值<br/>
  </p>
</div>
<div id="contentTip" style="display:none;"></div>
<div style="float:right"><a href="index.php?m=mod_home&a=Help&t=admin_b2b_Category_index" onFocus="this.blur()" title="查看分类相关帮助"><img src="{$vd['sc']}images/help.gif" style="vertical-align:middle" border="0"/></a></div>
</div>
<div class="mytitle" id="mytitle">
  <div class="titleOp4" onmouseover="this.className='iconbg4'" onmouseout="this.className='titleOp4'" onclick="delAllSubmit('destroyitems')"><samp title="先选择您要销毁的行,再点此按钮">
    <div style="padding-top:10px;padding-left:3px;">批量销毁</div></samp>
  </div>
  <div class="titleOp2" onmouseover="this.className='iconbg2'" onmouseout="this.className='titleOp2'" onclick="tableRefresh()"><samp title="点击刷新本页刷新数据,并保持原来勾选状态">
    <div style="padding-top:10px;padding-left:9px;">刷新</div></samp>
  </div>
  <div class="titleOp4" onmouseover="this.className='iconbg4'" onmouseout="this.className='titleOp4'" onclick="disp('adddiv')"><samp title="点击刷新本页刷新数据,并保持原来勾选状态">
    <div style="padding-top:7px;padding-left:9px;"><img src="{$vd['sc']}images/add.gif" style="vertical-align:middle"/> 添加</div></samp>
  </div>
  <div class="titleOp4"  onmouseover="if(editRealtime) return;this.className='iconbg4'" onmouseout="if(editRealtime) return;this.className='titleOp4'" onclick="batchEdit(this)"><samp title="按下按钮后，您可以即时修改蓝色标记的列">
    <div style="padding-top:10px;padding-left:8px;">实时修改</div></samp>
  </div>
  <div style="float:right;padding-top:4px;">
    上级分类列表：
    <select name="cat" disabled onchange="javascript:location.href='index.php?m=mod_b2b&c=category&grandfatherid={$vd['grandfatherid']}&parentid=' + this.options[selectedIndex].value;" style="vertical-align:middle;font-size:14px;width:200px;">
    <option value="">选择您要进入上级分类</option>
    {#option($vd['cat'], $vd['parentid'], 'name', 'id')}
    </select>
  </div>
</div>
<div id="adddiv" style="position:absolute;top:50px;left:230px;;width:380px;display:none">
  <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['sc']}images/destroy.gif" onclick="disp('adddiv')" style="cursor:pointer"/></div>
  <form name="form1" method="post" action="index.php?m=mod_b2b&c=Category&a=Save" id="tform" style="clear:both">
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
    <tr>
      <td width="25%">卡类名称</td>
      <td width="75%"><input type="hidden" name="coupon" value="1"/><input type="text" name="name" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">排列序号</td>
      <td width="75%">
        <input type="text" name="ordering" size="25"/>
      </td>
    </tr>
    <tr>
      <td width="25%">费率</td>
      <td width="75%"><input type="text" name="fee" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">编码</td>
      <td width="75%"><input type="text" name="code" size="25"/></td>
    </tr>
    <tr> 
      <td width="25%">对应图标</td>
      <td width="75%">
         <div class="search_s">
           <span class="search_s1">
              <select name="pics" class="search_select">
                <option value="pay_yd.gif">神州行充值卡</option>
                <option value="pay_sd.gif">盛大游戏卡</option>
                <option value="pay_5173.gif">5173充值卡</option>
                <option value="pay_rx.gif">热血传奇卡</option>
                <option value="pay_lt.gif">联通充值卡</option>
                <option value="pay_sh.gif">搜狐一卡通</option>
                <option value="pay_ms.gif">魔兽世界卡</option>
                <option value="pay_qq.gif">QQ币卡</option>
                <option value="pay_jw.gif">骏网一卡通</option>
                <option value="pay_9y.gif">久游一卡通</option>
                <option value="pay_wm.gif">完美一卡通</option>
                <option value="pay_sx.gif">声讯支付</option>
                <option value="pay_zt.gif">征途游戏卡</option>
                <option value="pay_wy.gif">网易一卡通</option>
                <option value="pay_mb.gif">目标一卡通</option>
                <option value="bank_no.gif">添加后自行上传..</option>
              </select>
           </span>
         </div>
      </td>
    </tr>
    <tr>
      <td width="25%">是否可用</td>
      <td width="75%">
      <input type="hidden" name="forb2b" value="0"/>
      <input type="hidden" name="forb2c" value="0"/>
      <input type="hidden" name="forykt" value="0"/>
      <input type="checkbox" name="fork2k" value="1" class="checkbox" checked />换卡站
      </td>
    </tr>
    <tr>
      <td width="25%">使用网关</td>
      <td width="75%">
      <input type="radio" name="gateway" value="1" class="checkbox" checked onclick="setct(1)"/>网关
      <input type="radio" name="gateway" value="2" class="checkbox" onclick="setct(2)"/>手动
      <input type="radio" name="gateway" value="3" class="checkbox" onclick="setct(3)"/>自定义
      </td>
    </tr>
    <tr style="display:none" id="cttr">
      <td width="25%">充值账号</td>
      <td width="75%"><input type="text" name="czaccount" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">相关说明：</td>
      <td width="75%">
      <textarea type="text" name="abst" style="width:149px;height:60px" value=""></textarea>
      </td>
    </tr>
    <tr>
      <td width="25%"></td>
      <td width="75%">
        <input type="hidden" name="grandfatherid" value="{$vd['grandfatherid']}" />
        <input type="hidden" name="parentid" size="16" value="{$vd['parentid']}"/>
        <input type="submit" value="添 加" class="button"/>
        <input type="button" value="取 消" onclick="disp('adddiv')" class="button"/>
      </td>
    </tr>
  </table>
  </form>
  </div>
</div>

<div id="menuMask" class="menuMask" style="display:none">
  <form action="?m=mod_b2b&c=Tpl&tpl=category&v=Coupon" method="post" style="margin:0px">
  <div class="menuContent">
  <input type="checkbox" name="id[]" value="tid" id="tid" class="checkbox" onFocus='this.blur()'/> 编号<br/>
  <input type="checkbox" name="id[]" value="tordering" id="tordering" class="checkbox" onFocus='this.blur()'/> 排序<br/>
  <input type="checkbox" name="id[]" value="tpics" id="tpics" class="checkbox" onFocus='this.blur()'/> 图标<br/>
  <input type="checkbox" name="id[]" value="tname" id="tname" class="checkbox" onFocus='this.blur()'/> 卡类名称<br/>
  <input type="checkbox" name="id[]" value="tabst" id="tabst" class="checkbox" onFocus='this.blur()'/> 卡类简介<br/>
  <input type="checkbox" name="id[]" value="tfee" id="tfee" class="checkbox" onFocus='this.blur()'/> 费率<br/>
  <input type="checkbox" name="id[]" value="tcode" id="tcode" class="checkbox" onFocus='this.blur()'/> 编码<br/>
  <input type="checkbox" name="id[]" value="tfork2k" id="tfork2k" class="checkbox" onFocus='this.blur()'/> 换卡站可见<br/>
  <input type="checkbox" name="id[]" value="tsys" id="tsys" class="checkbox" onFocus='this.blur()'/> 是否系统自带<br/>
  </div>
  <div class="menuOp">
  <input type="submit" value="保存" class="button"/>
  <input type="button" value="重置" class="button" onclick="tInfoReset()"/>
  <input type="button" value="取消" class="button" onclick="setMenuMask()"/>
  </div>
  </form>
</div>

<table id="thead" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="30px">
      <input name="chkall" id="chkall" type="checkbox" class="checkbox" onclick="CheckAll(this)" onFocus='this.blur()'/></td>
<!--//thead-->
<td width="35px"><b>编号</b></td>
<td width="35px"><span class="canedit">排序</span></td>
<td width="50px"><span class="canedit">图片</span></td>
<td width="150px"><span class="canedit">分类名称</span></td>
<td width="200px"><span class="canedit">简介</span></td>
<td width="35px"><span class="canedit">费率</span></td>
<td width="60px"><span class="canedit">编码</span></td>
<td width="22px"><span class="canedit">换</span></td>
<td width="35px"><b>系统</b></td>
<!--//endthead-->
    <td width="35px">
      <b>面值</b>
    </td>
    <td width="22px">
      <img src="{$vd['sc']}images/icon_edit.gif"/>
    </td>
    <td width="22px">
      <img src="{$vd['sc']}images/destroy.gif"/>
    </td>
    <td class="endtd">
      <div class="infoicon" onclick="setMenuMask()"><b><u>>></u></b></div>
    </td>
  </tr>
</table>
<div id="tip" style="display:none">
  <span id="tiptable">此页中所有 <b><span id="ncheck"><!--echo $vd['nrows'] < $vd['totlerow'] ? $vd['nrows'] : $vd['totlerow']--></span></b> 条记录已选中 </span> 
  <span id="tipspan">
    <a href="javascript:CheckTotle({$vd['totlerow']},0)">点此选择当前列表中所有 <b>{$vd['totlerow']}</b> 条记录>></a>
  </span>
</div>
<div id="content">
<!--}-->
  <!--if($vd['totlerow'] == 0) {-->
  <table  width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="right" colspan="20">无任何记录</td>
  </tr>
  </table>
  <!--}-->
  <form id="cform" name="form" method="post" action="index.php?m=mod_b2b&c=Category&a=ItemDeal" onsubmit="return Check();">
  <table id="tbody"  border="0" cellspacing="0" cellpadding="0">
  
  <!--foreach($vd['items'] as $item) {-->
  <tr onmouseover="setoverbg(this)" onmouseout="setoutbg(this)">
    <td width="30px">
      <input type="checkbox" name="id[]" id="idchk_{$item['id']}" class="checkbox" value="{$item['id']}" onclick="CheckThis(this)" onFocus='this.blur()'></input>
    </td>
<!--//tbody-->
<td width="35px">{$item['id']}</td>
<td width="35px"><nobr><span onclick="toInput(this,{$item['id']},'ordering')">{$item['ordering']}</span></nobr></td>
<td width="50px"><img src="{$vd['root']}content/mod_shared/skins/upload/{$item['pics']}" height="28px"/></td>
<td width="150px"><span onclick="toInput(this,{$item['id']},'name')">{$item['name']}</span></td>
<td width="200px"><nobr><span onclick="toInput(this,{$item['id']},'abst')"><!--echo $item['abst']==''?'---' : $item['abst'];--></span></nobr></td>
<td width="35px"><nobr><span onclick="toInput(this,{$item['id']},'fee')"><!--echo $item['fee']==''?'---' : $item['fee'];--></span></nobr></td>
<td width="60px"><nobr><span onclick="toInput(this,{$item['id']},'code')"><!--echo $item['code']==''?'---' : $item['code'];--></span></nobr></td>
<td width="22px"><img src="{$vd['sc']}{#ToggleImgSrc($item['fork2k'])}" onclick="toToggle(this,{$item['id']},'fork2k')" alt="点击此图片即可修改状态" onFocus="this.blur()" class="mousehand"/></td>
<td width="35px"><div style="padding-left:8px;"><img src="{$vd['sc']}{#ToggleImgSrc($item['issys'])}"  onFocus="this.blur()" border="0"/></div></td>
<!--//endtbody-->
    <td width="35px">
      <a href="index.php?m=mod_b2b&c=coupon&catid={$item['id']}">
      管理
      </a>
    </td>
    <td width="22px">
      <a href="index.php?m=mod_b2b&c=Category&a=Detail&id={$item['id']}" title="编辑分类" onclick="loadDisp(1)"><img src="{$vd['sc']}images/icon_edit.gif"/></a>
    </td>
    <td width="22px">
      <img src="{$vd['sc']}images/destroy.gif" onclick="delSubmit({$item['id']},'destroyitems')" alt="销毁分类记录后,是无法恢复的,只能重新添加" style="cursor:pointer"/>
    </td>
    <td class="endtd"></td>
  </tr>
  <!--}-->
  
</table>
</form>
<input type="hidden" value="{$vd['totlepage']}" id="totlePage"/>
<input type="hidden" value="{$vd['thispage']}" id="thisPage"/>
<!--if($vd['table']==0){-->
</div>

<input type="hidden" value="index.php?m=mod_b2b&c=Category&a=Deals&{$vd['op']}" id="op"/>
<input type="hidden" value="index.php?m=mod_b2b&c=Category&a=coupon&istable=1&{$vd['op']}" id="url"/>
<input type="hidden" value="{$vd['op']}" id="params"/>
<div style="position:absolute;bottom:0px">
  <div class="tbBottom" id="tbBottom">
    <div style="float:left;padding-top:8px;">
      <strong> 总计 <font color="#ff0000"><span id="tol2">{$vd['totlerow']}</span></font> 条</strong>
    </div>
    <div style="float:right;text-align:right;">
    <form id="actionform" method="post" action="index.php?m=mod_b2b&c=Category&{$vd['op']}" style="margin:0px;" onsubmit="loadDisp(1)">
    <div id="page"></div>
    <div style="float:left;margin-top:3px">
      每页显示<input type="text" name="nrows" size="2" value="{$vd['nrows']}" class="pagetxt" onMouseOver="iEvent('mouseover',this)" onFocus="iEvent('focus',this)" onBlur="iEvent('blur',this)" onMouseOut="iEvent('mouseout',this)" /> 个 
      到第<input type="text" name="page" size="2" value="{$vd['thispage']}" class="pagetxt" onMouseOver="iEvent('mouseover',this)" onFocus="iEvent('focus',this)" onBlur="iEvent('blur',this)" onMouseOut="iEvent('mouseout',this)" />页<input type="submit" value=" 确 定 &gt;&gt;" class="pagesub" />
    </div>
    </form>
    </div>
  </div>
</div>
<div id="load" style="display:none;">
  <div id="loadcontent" >页面加载中请稍等...</div>
</div>
</body>
<script type="text/javascript">
//第一参数，后边保留显示的列数
//第二参数，除最后一个参数外的保留参数的总宽度
tRows   = <!--echo $vd['nrows'] < $vd['totlerow'] ? $vd['nrows'] : $vd['totlerow']-->;
tInfoA  = Array(3,100);
totleRows = {$vd['totlerow']};
deltxt  = "销毁分类后,是无法恢复的,只能重新添加,您确定进行销毁操作吗？";
thisaction = "销毁";
thisdel = 0;
statistics = 0;
var resizeidx = 4;
</script>
<script type="text/javascript">
//当前表格配置
<!--//tinfo-->
 tInfo = Array('tid','tordering','tpics','tname','tabst','tfee','tcode','tfork2k','tsys');
<!--//endtinfo-->
function pickcolor(id) 
{
  var color = showModalDialog("{$vd['sc']}tools/colorselect.htm", "", "font-family:Verdana; font-size:12; status:no; dialogWidth:21em; dialogHeight:21em");
  if (color != null) 
  {
    $("colorexample"+id).style.backgroundColor = color;
    $("textcolor"+id).value = color;
  }
}

</script>
<script src="{$vd['sc']}js/tools.js" type="text/javascript"></script>
<script type="text/javascript">
function setct(val)
{
  $("cttr").style.display = val == 3 ? "" : "none";
}
</script>
</html>
<!--}-->