{include file="public/header" /}
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>积分管理</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示" class="arrow"></span>
        </div>
        <ul>
            <li>积分明细，展示了被操作人员（会员）、操作人员（管理员）、操作积分数（积分值，“-”表示减少，无符号表示增加）、操作时间（添加时间）等信息</li>
        </ul>
    </div>
    
    
    <form method="get" name="formSearch" id="formSearch">
    <table class="search-form">
      <tbody>
        <tr>
          <th><label>{$Think.lang.admin_points_membername}</label></th>
          <td><input type="text" name="mname" class="txt" value='{$Think.get.mname}'></td><th>{$Think.lang.admin_points_addtime}</th>
          <td><input type="text" id="stime" name="stime" class="txt date" value="{$Think.get.stime}" >
            <label>~</label>
            <input type="text" id="etime" name="etime" class="txt date" value="{$Think.get.etime}" ></td><td><select name="stage">
              <option value="" {notempty name="$Think.get.stage"}selected=selected{/empty}>{$Think.lang.admin_points_stage}</option>
              <option value="regist" {if condition="$Think.get.stage eq 'regist'"}selected=selected{/if}>{$Think.lang.admin_points_stage_regist}</option>
              <option value="login" {if condition="$Think.get.stage eq 'login'"}selected=selected{/if}>{$Think.lang.admin_points_stage_login}</option>
              <option value="comments" {if condition="$Think.get.stage eq 'comments'"}selected=selected{/if}>{$Think.lang.admin_points_stage_comments}</option>
              <option value="order" {if condition="$Think.get.stage eq 'order'"}selected=selected{/if}>{$Think.lang.admin_points_stage_order}</option>
              <option value="system" {if condition="$Think.get.stage eq 'system'"}selected=selected{/if}>{$Think.lang.admin_points_stage_system}</option>
              <option value="pointorder" {if condition="$Think.get.stage eq 'pointorder'"}selected=selected{/if}>{$Think.lang.admin_points_stage_pointorder}</option>
              <option value="app" {if condition="$Think.get.stage eq 'app'"}selected=selected{/if}>{$Think.lang.admin_points_stage_app}</option>
          </select></td>
          </tr><tr><th><label>{$Think.lang.admin_points_adminname}</label></th><td><input type="text" name="aname" class="txt" value='{$Think.get.aname}'></td>

          <th>{$Think.lang.admin_points_pointsdesc}</th>
          <td><input type="text" id="description" name="description" class="txt2" value="{$Think.get.description}" ></td>
          <td>
              <a href="javascript:document.formSearch.submit();" class="btn-search " title="{$Think.lang.ds_query}"></a>
          </td>
        </tr>
      </tbody>
    </table>
  </form>
    
    <table class="ds-default-table">
        <thead>
            <tr>
                <th>{$Think.lang.member_name}</th>
                <th>{$Think.lang.admin_name}</th>
                <th>{$Think.lang.points_num}</th>
                <th>{$Think.lang.addtime}</th>
                <th class="align-center">{$Think.lang.admin_points_stage}</th>
                <th>{$Think.lang.points_desc}</th>
            </tr>
        </thead>
        <tbody>
            {notempty  name="pointslog"}
            {volist name="pointslog" id="log"}
            <tr>
                <td>{$log.pl_membername}</td>
                <td>{$log.pl_adminname}</td>
                <td>{$log.pl_points}</td>
                <td>{$log.pl_addtime|date="Y-m-d H:i:s",###}</td>
                <td class="align-center">
                   <?php
                   $lang='admin_points_stage_'.$log['pl_stage'];
                   echo lang($lang);?>
                   </td>
                <td>{$log.pl_desc}</td>
            </tr>
            {/volist}
            {else /}
            <tr class="no_data">
                <td colspan="20">{$Think.lang.no_record}</td>
            </tr>
            {/notempty}
        </tbody>
    </table>
    {$page}
</div>
<script language="javascript">
$(function(){
	$('#stime').datepicker({dateFormat: 'yy-mm-dd'});
	$('#etime').datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
