<!--if($vd['table']==0){-->
{load(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/>由于点卡类商品的分类一般不是直接使用游戏名称，而是多个游戏名称的组合，相比比较长，放在首页会影响页面的美观，所以特设了类目这个功能，当用户点击类目后，将根据设置的关键进入对应的项<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_catalog_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;">
    <form action="index.php?m=mod_b2b&c=Catalog" method="post" style="margin:0px 0px 0px 0px;" onsubmit="return searchSubmit()">
    <input type="text" name="keywords" size="25" value="{$vd['keywords']}" style="vertical-align:middle;" class="custsearch" onMouseOver="iEvent('mouseover',this)" onFocus="iEvent('focus',this)" onBlur="iEvent('blur',this)" onMouseOut="iEvent('mouseout',this)" />
    <select name="stype" style="vertical-align:middle;font-size:14px;">
      {#Option($vd['sarray'], $vd['stype'])}
    </select>
    <input type="submit" value="类目搜索 &gt;&gt;" style="vertical-align:middle;" class="button"/>
    </form>
  </div>
</div>
<div id="adddiv" style="position:absolute;top:100px;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=Catalog&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="text" name="name" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">类目颜色</td>
      <td width="75%">
        <div style="float:left"><input type="text" name="color" id="textcolor0" size="25" value="#000000"/></div>
        <div onclick="pickcolor(0)" id="colorexample0" 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="ordering" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">对应关键词</td>
      <td width="75%"><input type="text" name="keyword" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">首字母</td>
      <td width="75%"><input type="text" name="pinyin" size="25"/></td>
    </tr>
    <tr>
      <td width="25%">是否热门</td>
      <td width="75%"><input type="checkbox" name="hot" size="25" value="1" class="checkbox"/></td>
    </tr>
    <tr>
      <td width="25%"></td>
      <td width="75%">
        <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=catalog" method="post" style="margin:0px">
  <div class="menuContent">
  <input type="checkbox" name="id[]" value="tordering" id="tordering" class="checkbox" onFocus='this.blur()'/> 排序<br/>
  <input type="checkbox" name="id[]" value="tcolor" id="tcolor" 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="tmykey" id="tmykey" class="checkbox" onFocus='this.blur()'/> 关键词<br/>
  <input type="checkbox" name="id[]" value="tpinyin" id="tpinyin" class="checkbox" onFocus='this.blur()'/> 首字母<br/>
  <input type="checkbox" name="id[]" value="thot" id="thot" 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"><span class="canedit">排序</span></td>
<td width="30px"><img src="{$vd['sc']}images/16.gif" align="absmiddle"/></td>
<td width="150px"><span class="canedit">分类名称</span></td>
<td width="200px"><span class="canedit">关键词</span></td>
<td width="50px"><span class="canedit">首字母</span></td>
<td width="22px"><span class="canedit">热</span></td>
<!--//endthead-->
    <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=Catalog&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"><nobr><span onclick="toInput(this,{$item['id']},'ordering')">{$item['ordering']}</span></nobr></td>
<td width="30px"><div onclick="toColor(this,{$item['id']},'color')" style="cursor:pointer;width:23px;height:16px;border:0px #fff solid;background:<!--echo $item['color']==''?'#6c6c6c' : $item['color']-->"/></div></td>
<td width="150px"><span onclick="toInput(this,{$item['id']},'name')">{$item['name']}</span></td>
<td width="200px"><span onclick="toInput(this,{$item['id']},'keyword')">{$item['keyword']}</span></td>
<td width="50px"><nobr><span onclick="toInput(this,{$item['id']},'pinyin')">{$item['pinyin']}</span></nobr></td>
<td width="22px"><img src="{$vd['sc']}{#ToggleImgSrc($item['hot'])}" onclick="toToggle(this,{$item['id']},'hot')" alt="点击此图片即可修改状态" onFocus="this.blur()" class="mousehand"/></td>
<!--//endtbody-->
    <td width="22px">
      <a href="index.php?m=mod_b2b&c=Catalog&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=Catalog&a=Deals&{$vd['op']}" id="op"/>
<input type="hidden" value="index.php?m=mod_b2b&c=Catalog&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=Catalog&{$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(2,58);
totleRows = {$vd['totlerow']};
deltxt  = "销毁类目后,是无法恢复的,只能重新添加,您确定进行销毁操作吗？";
thisaction = "销毁";
thisdel = 0;
statistics = 0;
var resizeidx = 3;
</script>
<script type="text/javascript">
//当前表格配置
<!--//tinfo-->
 tInfo = Array('tordering','tcolor','tname','tmykey','tpinyin','thot');
<!--//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>
</html>
<!--}-->