<!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>ECMall</title>
  <meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
  <link href="admin/styles/general.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="?act=jslang"></script>
  {script src="ecmall,ui.utils,ui.calendar"}
  <script type="text/javascript">
  Event.observe(window, "load", function() {
   $("start_date").onclick = function() {
     if(!$("start_date").calendar) {
       $("start_date").calendar = new ui.calendar(this, $('start_date'));
     } else {
       $("start_date").calendar.show();
     }
   }
   $("end_date").onclick = function() {
     if(!$("end_date").calendar) {
       $("end_date").calendar = new ui.calendar(this, $('end_date'));
     } else {
       $("end_date").calendar.show();
     }
   }
  });
  </script>
</head>
<body>
<ul id="container">
  <li id="header">
    <h1>{$lang.user_order}</h1>
    <div class="link">[<a href="admin.php?app=statistics&act=user_order&do=downxls&start_date={$condition.start_time|date:Y-m-d}&end_date={$condition.end_time|date:Y-m-d}{if $smarty.get.sort}&sort={$smarty.get.sort}{/if}{if $smarty.get.order}&order={$smarty.get.order}{/if}">{$lang.downxls}</a>]</div>
    <div id="desc">
      <div id="page-selector"> {$lang.goto_page}{page_selector from=$list.info} </div>
      <span>{$user_order_stats}</span> </div>
  </li>
  <li id="tips">
    <form method="get">
      <input type="hidden" name="app" value="statistics" />
      <input type="hidden" name="act" value="user_order" />
      {$lang.start_date}:<input name="start_date" value="{$condition.start_time|date:Y-m-d}" size="20" type="text" id="start_date" />
      {$lang.end_date}:<input name="end_date" value="{$condition.end_time|date:Y-m-d}" size="20" type="text" id="end_date" />
      <input type="submit" value="{$lang.button_search}">
    </form>
  </li>
  <li id="wrapper">
   <table class="grid" cellspacing="0" cellpadding="4" id="DataGrid">
      <tr>
        <th class="first-cell">{$lang.order_num}</th>
        <th>{$lang.user_name}</th>
        <th>{sort_link by=order_total text=$lang.order_total}</th>
        <th>{sort_link by=order_amount text=$lang.order_amount}</th>
      </tr>
      {foreach from=$list.data item=row}
      <tr>
        <td class="first-cell">{$row.order_num}</td>
        <td>{if $row.uchome_url}<a href="{$row.uchome_url}" target="_blank">{$row.user_name|escape}</a>{else}{$row.user_name|escape}{/if}</td>
        <td>{$row.order_total}</td>
        <td>{$row.order_amount|price}</td>
      </tr>
      {foreachelse}
      <tr><td colspan="5" class="no-records">{$lang.no_records}</td></tr>
      {/foreach}
    </table>
    <div id="page-list" style="clear:both">{page_links from=$list.info url=$url_format}</div>
  </li>
  {include file="admin/templates/footer.html"}
</ul>
</body>
</html>
