<!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>
  <title> new document </title>
  <meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
  <link href="admin/styles/general.css" rel="stylesheet" type="text/css" />
  {script src="ecmall,ajax,validator,ui.datagrid"}
  <script type="text/javascript" src="?app=storeapply&act=jslang"></script>
  <script type="text/javascript">
    Event.observe(window, 'load', function() {
      var grid = new ui.DataGrid($("data-grid"));
      grid.action = "modify";
    });
  </script>
 </head>

 <body>
  <ul id="container">
    <li id="header">
      <h1>{$lang.store_apply}</h1>
      <div class="link"></div>
      <div id="desc">
        <div id="page-selector">
          {$lang.goto_page}{page_selector from=$list.info url=$url_format}
        </div>
        <span>{$stats}</span>
      </div>
    </li>
    <li id="tips" class="search-bar">
      <form method="get" action="admin.php">
        {$lang.keywords}: <input type="text" name="keywords" value="{$smarty.get.keywords}" />
        <select name="status">
          {html_options options=$lang.apply_status selected=$smarty.get.status}
        </select>
        <input type="submit" value="{$lang.button_search}" />
        <input type="hidden" name="app" value="storeapply"/>
        <input type="hidden" name="act" value="view"/>
      </form>
    </li>
    <li id="wrapper">
      <table class="grid" cellspacing="0" id="data-grid">
        <tr>
          <th class="first-cell"><input type="checkbox" class="checkAll" /> {sort_link by=owner_name text=$lang.owner_name}</th>
          <th>{sort_link by=owner_idcard text=$lang.owner_idcard}</th>
          <th>{sort_link by=owner_phone text=$lang.owner_phone}</th>
          <th>{sort_link by=owner_address text=$lang.owner_address}</th>
          <th>{sort_link by=status text=$lang.status}</th>
          <th>{sort_link by=add_time text=$lang.add_time}</th>
          <th>{$lang.handler}</th>
        </tr>
        {foreach from=$list.data item=apply}
        <tr id="{$store.store_id}">
          <td class="first-cell"><input type="checkbox" name="id" value="{$apply.apply_id}" /> {$apply.owner_name|escape}</td>
          <td><span>{$apply.owner_idcard|escape}</span></td>
          <td><span>{$apply.owner_phone|escape}</span></td>
          <td><span>{$apply.owner_address|escape}</span></td>
          <td>{$lang.apply_status[$apply.status]}</td>
          <td>{$apply.add_time}</td>
          <td>
            <a href="admin.php?app=storeapply&amp;act=detail&amp;id={$apply.apply_id}">{if $apply.status eq 0}{$lang.verify}{else}{$lang.view}{/if}</a>
            <a href="admin.php?app=storeapply&amp;act=drop&amp;id={$apply.apply_id}" onclick="return confirm('{$lang.confirm_delete}')">{$lang.delete}</a>
          </td>
        </tr>
        {foreachelse}
        <tr><td colspan="7" class="no-records">{$lang.no_records}</td></tr>
        {/foreach}
        <tr>
          <td colspan="12">
            <ul id="batch-links">
              <li class="batch-link last" action="batch" param="drop">{$lang.delete}</li>
            </ul>
          </td>
        </tr>
      </table>
      <div id="page-list">{page_links from=$list.info url=$url_format}</div>
    </li>
    {include file="admin/templates/footer.html"}
  </ul>
 </body>
</html>
