<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<link rel="stylesheet" type="text/css" href="{$vd['sc']}css/main.css"/>
</head>
<body>
<div class="titleDiv">
<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> <span style="font-size:12px;"><a href="index.php?m=mod_b2b&c=category" title="点击重新获取卡密列表资料" onclick="loadDisp(1)"><font color="#000">卡密列表</font></a></span></div>
<div style="float:right"><a href="index.php" onFocus="this.blur()" title="查看卡密相关帮助"><img src="{$vd['sc']}images/help.gif" style="vertical-align:middle" border="0"/></a></div>
</div>
<div class="mytitle">
  <div class="titleOp4" onmouseover="this.className='iconbg4'" onmouseout="this.className='titleOp4'" onclick="disp('adddiv')"><samp title="点击刷新本页刷新数据,并保持原来勾选状态">
    <div style="padding-top:10px;padding-left:9px;"><img src="{$vd['sc']}images/add.gif" style="vertical-align:middle"/> 添加</div></samp>
  </div>  
  <div style="float:right;padding-top:4px;">
    上级分类列表：
    <select name="cat" onchange="javascript:location.href='index.php?m=mod_b2b&c=category&a=cat&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'], 'catname', 'catid')}
    </select>
  </div>
</div>
<div id="adddiv" style="position:absolute;top:120px;left:230px;width:320px;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&optype=1" id="cform">
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
    <tr>
      <td width="25%">分类名称</td>
      <td width="75%"><input type="text" name="catname" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">分类颜色</td>
      <td width="75%">
        <div style="float:left"><input type="text" name="catcolor" size="25" value="#000000"/></div>
        <div style="float:left;cursor:pointer;height:22px;margin-left:5px;margin-top:1px;width:16px;border:0px #fff solid;background:#000000"/></div>
      </td>
    </tr>
    <tr>
      <td width="25%">排列序号</td>
      <td width="75%"><input type="text" name="catorder" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">首字母</td>
      <td width="75%"><input type="text" name="initialletter" size="25"/></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" name="Submit" value="添 加" class="button"/>
        <input type="button" name="Submit" value="取 消" onclick="disp('adddiv')" class="button"/>
      </td>
    </tr>
  </table>
  </form>
  </div>
</div>
<table id="thead" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="35px"><b>排序</b></td>
    <td width="30px"><img src="{$vd['sc']}images/16.gif" align="absmiddle"/></td>
    <td width="200px"><b>分类名称</b></td>
    <td width="50px"><b>首字母</b></td>
    <td width="250px"><b></b></td>
    <td class="endtd"><div class="infoicon" style="color:#ccc"><b><u>>></u></b></div></td>
  </tr>
</table>

<div id="content">
  <table id="tbody"  border="0" cellspacing="0" cellpadding="0">
  <!--foreach($vd['items'] as $item) {-->
  <tr onmouseover="setoverbg(this)" onmouseout="setoutbg(this)">
    <td width="35px">{$item['catorder']}</td>
    <td width=30px">
      <div style="cursor:pointer;width:23px;height:16px;border:0px #fff solid;background:<!--echo $item['catcolor']==''?'#6c6c6c' : $item['catcolor']-->"/></div>
    </td>
    <td width="200px"><font color="{$item['catcolor']}">{$item['catname']}</font></td>
    <td width="50px">{$item['initialletter']}</td>
    <td width="250px">
      <a href="index.php?m=mod_b2b&c=category&a=del&optype=2&catid={$item['catid']}&parentid={$item['parentid']}" onclick="return confirm('如果删除了二级分类,和二级级分类关联的商品/商品进货信息也都会被删除,您确定进行删除操作吗？')">
      删除
      </a>
      <a href="index.php?m=mod_b2b&c=category&a=cat&optype=2&grandfatherid={$item['parentid']}&parentid={$item['catid']}">
      管理下级分类
      </a>
      <a href="index.php?m=mod_b2b&c=category&a=cat&optype=2&grandfatherid={$item['parentid']}&parentid={$vd['grandfatherid']}">
      管理上级分类
      </a>
    </td>
    <td class="endtd"></td>
  </tr>
  <!--}-->
</table>
<input type="hidden" value="1" id="totlePage"/>
<input type="hidden" value="1" id="thisPage"/>
</div>
<input type="hidden" value="index.php?m=mod_b2b&c=ykt&a=table" id="url"/>
<div style="position:absolute;bottom:0px">
  <div class="tbBottom" colspan="20">
    <div style="float:left;padding-top:8px;">
      
    </div>
    <div style="float:right;text-align:right;">
    <div id="page"></div>
    </div>
  </div>
</div>
<div id="load" style="display:none;">
  <div id="loadcontent" >页面加载中请稍等...</div>
</div>
<script type="text/javascript">
  var resizeidx = 2;
</script>
<script src="{$vd['sc']}js/table.js" type="text/javascript"></script>
</body>
</html>