<!-- $Id: gift_type_list.htm 8228 2007-04-18 06:46:42Z scottye $ -->
{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<!-- 赠品类型搜索 -->
<div class="form-div">
  <form action="javascript:searchGoods()" name="searchForm">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    {$lang.gift_type_name} <input type="text" name="gift_type_name" size="30" />
    <input type="submit" value="{$lang.button_search}" class="button" />
  </form>
</div>

<!-- 赠品类型列表 -->
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}
  <table cellpadding="3" cellspacing="1">
    <tr>
      <th>
        <input onclick='listTable.selectAll(this, "checkboxes[]")' type="checkbox">
        <a href="javascript:listTable.sort('gift_type_id'); ">{$lang.record_id}</a>{$sort_gift_type_id}      </th>
      <th><a href="javascript:listTable.sort('gift_type_name'); ">{$lang.gift_type_name}</a>{$sort_gift_type_name}</th>
      <th>{$lang.amount_range}</th>
      <th><a href="javascript:listTable.sort('start_date'); ">{$lang.lab_start_date}</a>{$sort_start_date}</th>
      <th><a href="javascript:listTable.sort('end_date'); ">{$lang.lab_end_date}</a>{$sort_end_date}</th>
      <th>{$lang.lab_max_count}</th>
      <th>{$lang.handler}</th>
    </tr>
    {foreach from=$gift_type_list item=gift_type}
    <tr>
      <td>
        <input value="{$gift_type.gift_type_id}" name="checkboxes[]" type="checkbox">{$gift_type.gift_type_id}</span></td>
      <td><span onclick="listTable.edit(this, 'edit_type_name', {$gift_type.gift_type_id})">{$gift_type.gift_type_name}</span></td>
      <td>{$gift_type.amount_range}</td>
      <td align="center">{$gift_type.start_date}</td>
      <td align="center">{$gift_type.end_date}</td>
      <td align="right"><span onclick="listTable.edit(this, 'edit_max_count', {$gift_type.gift_type_id})">1</span></td>
      <td align="center">
        <a href="gift.php?act=gift_list&amp;gift_type_id={$gift_type.gift_type_id}" title="{$lang.gift_list}"><img src="images/icon_view.gif" border="0" height="16" width="16"></a>
        <a href="gift.php?act=edit&amp;gift_type_id={$gift_type.gift_type_id}" title="{$lang.edit}"><img src="images/icon_edit.gif" border="0" height="16" width="16" /></a>
        <a href="javascript:;" onclick="listTable.remove({$gift_type.gift_type_id}, '{$lang.drop_gift_type_confirm}')" title="{$lang.remove}"><img src="images/icon_drop.gif" border="0" height="16" width="16"></a>      </td>
    </tr>
    {foreachelse}
    <tr><td class="no-records" colspan="10">{$lang.no_records}</td></tr>
    {/foreach}
    <tr>
      <td>
        <input type="hidden" name="act" value="batch" />
        <input type="submit" id="btnSubmit" name="drop" value="{$lang.drop}" disabled="true" class="button" onclick="return confirm('{$lang.batch_drop_confirm}')" />      </td>
      <td colspan="6" align="right" nowrap="true">{include file="page.htm"}</td>
      </tr>
  </table>
{if $full_page}
</div>
</form>
<script language="JavaScript">
  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}
  {literal}
  onload = function()
  {
    // 开始检查订单
    startCheckOrder();
  }
  /**
   * 搜索赠品类型
   */
  function searchGoods()
  {
      listTable.filter.gift_type_name = Utils.trim(document.forms['searchForm'].elements['gift_type_name'].value);
      listTable.filter.page = 1;
      listTable.loadList();
  }
  {/literal}
</script>
{include file="pagefooter.htm"}
{/if}