<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->
<div class="layui-fluid oe_fluid" style="padding-top: 65px;">

  <div class="oe_navbar clearfix">
    <a href="<!--{$oefile}-->&c=useraudit" class="item">审核资料</a>
    <a href="<!--{$oefile}-->&c=useraudit&a=headimg&sflag=1" class="item current">审核头像</a>
    <a href="<!--{$oefile}-->&c=useraudit&a=dubai&sflag=1" class="item">审核独白</a>
  </div>
  <!--//menu nav End -->


  <!--{if $a == "headimg"}-->
  <form class="layui-form" id="mysearch" action="<!--{$oefile}-->&c=<!--{$c}-->&a=headimg" method="post">
  
  <div class="oe_searchbar layui-form">
    <div class="more_search_open"></div>
    <div class="layui-form-item">
      <div class="layui-inline">
        <div class="layui-form-label">所在地区：</div>
        <div class="layui-input-inline input-120">
          <!--//9.10.12 -->
          <!--{assign var="distlist" value=vo_list("mod={area0} where={v.parentid='0'} orderby={v.orders ASC}")}-->
          <select name="sdist1" id="sdist1" lay-filter="area" data-depth="1" data-name="sdist" data-text="=请选择=">
            <option value="">=请选择=</option>
            <!--{foreach $distlist as $val}-->
            <option value="<!--{$val.areaid}-->"<!--{if $sdist1 == $val.areaid}--> selected<!--{/if}-->><!--{$val.areaname}--></option>
            <!--{/foreach}-->
          </select>
        </div>
        <div class="layui-input-inline input-120" id="json_sdist2">
          <!--{if $sdist1 > 0}-->
          <!--{assign var="distlist2" value=vo_list("mod={area} where={v.parentid='<!--{$sdist1}-->'}")}-->
          <select name="sdist2" id="sdist2" lay-filter="area" data-depth="2" data-name="sdist" data-text="=请选择=">
            <option value="">=请选择=</option>
            <!--{foreach $distlist2 as $val}-->
            <option value="<!--{$val.areaid}-->"<!--{if $sdist2 == $val.areaid}--> selected<!--{/if}-->><!--{$val.areaname}--></option>
            <!--{/foreach}-->
          </select>
          <!--{else}-->
          <select name="sdist2" id="sdist2" lay-filter="area">
            <option value="">=请选择=</option>
          </select>
          <!--{/if}-->
        </div>
        <div class="layui-input-inline input-120" id="json_sdist3">
          <!--{if $sdist2 > 0}-->
          <!--{assign var="distlist3" value=vo_list("mod={area} where={v.parentid='<!--{$sdist2}-->'}")}-->
          <select name="sdist3" id="sdist3" lay-filter="area" data-depth="3" data-name="sdist" data-text="=请选择=">
            <option value="">=请选择=</option>
            <!--{foreach $distlist3 as $val}-->
            <option value="<!--{$val.areaid}-->"<!--{if $sdist3 == $val.areaid}--> selected<!--{/if}-->><!--{$val.areaname}--></option>
            <!--{/foreach}-->
          </select>
          <!--{else}-->
          <select name="sdist3" id="sdist3" lay-filter="area">
            <option value="">=请选择=</option>
          </select>
          <!--{/if}-->
        </div>
      </div>
      
      <div class="layui-inline">
        <div class="layui-form-label">性别：</div>
        <div class="layui-input-inline input-100">
          <!--{hook mod="var" item="gender" name="sgender" type="select" text="不限" value=$sgender}-->
        </div>
      </div>    
    </div>
    <div class="layui-form-item">
      <div class="layui-inline">
        <div class="layui-form-label">会&nbsp;员UID：</div>
        <div class="layui-input-inline input-120">
          <input type="text" name="suserid" id="suserid" class="layui-input" value="<!--{if $suserid>0}--><!--{$suserid}--><!--{/if}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">&nbsp;用&nbsp;户&nbsp;名：</div>
        <div class="layui-input-inline input-120">
          <input type="text" name="susername" id="susername" class="layui-input" value="<!--{$susername}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">姓名：</div>
        <div class="layui-input-inline input-120">
          <input type="text" name="struename" id="struename" class="layui-input" value="<!--{$struename}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">手机：</div>
        <div class="layui-input-inline input-120">
          <input type="text" name="smobile" id="smobile" class="layui-input" value="<!--{$smobile}-->" />
        </div>
      </div>
      
      <div class="layui-inline">
        <button class="layui-btn layui-btn-sm search" id="but_submit_search2" lay-submit lay-filter="searchform2">
          <i class="layui-icon layui-icon-search"></i>
          搜索
          <span class="oe_btn_loading layui-anim layui-icon layui-anim-rotate layui-anim-loop" style="display:none;">&#xe63d;</span>
        </button>
      </div>
    </div>
    
    <div class="layui-form-item">
      <div class="layui-form-label">头像状态：</div>
      <div class="label_box">
        <input type="hidden" name="sflag" id="sflag" value="<!--{$sflag}-->" />        
        <span f="but_search_cat" data-val="0" data-input="sflag"<!--{if $sflag == '0'}--> style="color:red;"<!--{/if}-->>全部</span>
        <span f="but_search_cat" data-val="1" data-input="sflag"<!--{if $sflag == '1'}--> style="color:red;"<!--{/if}-->>待审核</span>
        <span f="but_search_cat" data-val="2" data-input="sflag"<!--{if $sflag == '2'}--> style="color:red;"<!--{/if}-->>已审核</span>
        <span f="but_search_cat" data-val="3" data-input="sflag"<!--{if $sflag == '3'}--> style="color:red;"<!--{/if}-->>未通过</span>
      </div>
    </div>
    
    
  </div>
  </form>

  <div class="oe_table_wrap layui-form">
  
    <div class="oe_tbl_tool clearfix">
      <div class="oe_gnbar clearfix">
        <div class="select btn fl">
          <input type="checkbox" name="allid[]" lay-skin="primary" title="全选" lay-filter="selectAll">
        </div>
        <div class="btn del fl" f="handle-audit" data-form="myform" data-type="pass">
          <i class="iconfont icon-tongguo"></i>
          <span>批量通过</span>
        </div>
        <div class="btn del fl del_line" f="handle-audit" data-form="myform" data-type="unpass">
          <i class=" iconfont icon-butongguo"></i>
          <span>批量不通过</span>
        </div>
      </div>
      <div class="oe_tongji_bar clearfix current">
        <span><b><!--{$total}--></b> 条记录</span>
      </div>
      
    </div>
    
    <form class="layui-form" id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->" method="post">
    <input type="hidden" name="a" id="a" value="saveheadimg" />
    <input type="hidden" name="lotact" id="lotact" value="" />
    <table class="layui-table">
      <thead>
        <tr>
          <th width="2%">选</th>
          <th width="8%">UID</th>
          <th width="7%">头像</th>
          <th width="10%">用户名</th>
          <th width="7%">姓名</th>
          <th width="5%">性别</th>
          <th width="5%">年龄</th>
          <th width="5%">身高</th>
          <th width="7%">婚况</th>
          <th width="10%">所在地</th>
          <th width="14%">上传时间</th>
          <th>审核</th>
        </tr> 
      </thead>
      
      <!--{if empty($user)}-->
      <tr>
        <td colspan="13" class="text_center">没有符合条件的信息</td>
      </tr>
      <!--{else}-->
      <!--{foreach $user as $volist}-->
      <tr>
        <td class="check text_center">
          <input type="checkbox" name="id[]" lay-skin="primary" value="<!--{$volist.userid}-->" />
        </td>
        <td class="check text_center drop">
          <a href="<!--{$urlpath}-->index.php?c=home&a=detail&id=<!--{$volist.userid}-->" target="_blank"><!--{$volist.userid}--></a>
        </td>
        <td class="text_center drop">
          <div class="down">
            <div>
              <img src="<!--{$urlpath}-->tpl/static/images/loading_img.png" data-src="<!--{$volist.headimgurl_0}-->" width="20px" height="20px" preload="0" f="zoom_avatar" />
            </div>
            <div class="sub">
              <img src="<!--{$urlpath}-->tpl/static/images/loading_img.png" data-src="<!--{$volist.headimgurl}-->" f="viewimg" />
            </div>
          </div>
          <span class="oe_addfortb" title="点击修改头像" style="margin-top:0px;" f="pop_edit_avatar" data-id="<!--{$volist.userid}-->">
            <!--{if $volist.headflag != '1'}-->
            <font color="#009688">修改</font>
            <!--{else}-->
            修改
            <!--{/if}-->
          </span>
        </td>
        <td class="text_center">
          <a href="<!--{$oefile}-->&c=user&a=view&id=<!--{$volist.userid}-->"><!--{$volist.username}--></a> 
        </td>
        <td class="text_center">
          <!--{if !empty($volist.truename)}-->
          <!--{$volist.truename}-->
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{if $volist.gender=='1'}-->
          <i class="iconfont icon-nan" title="男"></i>
          <!--{else}-->
          <i class="iconfont icon-nv" title="女"></i>
          <!--{/if}-->
          <!--{hook mod="var" item="gender" type="text" value=$volist.gender}-->
        </td>
        <td class="text_center"><!--{$volist.age}--></td>
        <td class="text_center">
          <!--{if $volist.height > 0}-->
          <!--{$volist.height}-->
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{if $volist.marry > 0}-->
          <!--{hook mod="var" item="marry" type="text" value=$volist.marry}-->
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center"><!--{$volist.province}--> <!--{$volist.city}--></td>
        <td class="text_center"><!--{$volist.addtime|date_format:"%Y/%m/%d %H:%M:%S"}--></td>
        <td class="text_center" id="status_<!--{$volist.userid}-->">
        
          <a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-warm" f="but_flip_image" data-id="<!--{$volist.userid}-->">旋转</a>
          
          <!--{if $volist.headflag == '1'}-->
          &nbsp;<font color="green">已通过</font>
          <!--{elseif $volist.headflag == '3'}-->
          &nbsp;<font color="red">未通过</font>
          <!--{else}-->
          <a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-normal btn_green" f="but_post_audit" data-id="<!--{$volist.userid}-->" data-type="pass"> <i class="layui-icon layui-icon-ok"></i>通过</a>
          <a href="javascript:;" class="layui-btn layui-btn-xs layui-btn-normal btn_red" f="but_post_audit" data-id="<!--{$volist.userid}-->" data-type="unpass"><i class="layui-icon layui-icon-close"></i>不通过</a>
          <!--{/if}-->
        </td>
      </tr>
      <!--{/foreach}-->
      <!--{/if}-->
    </table>
    </form>
    
    <div class="oe_page_box"><!--{$showpage}--></div>
    
  </div>
  <script type="text/javascript">
  $(function(){
      //渲染...
      layui.use(['element', 'form'], function(){
          
      });
      layui.use('form', function(){
          $form = layui.form;
          //选择...
          $form.on('checkbox(sendmsg)', function(data){
              $sel = data.elem.checked;
              if ($sel == true) {
                  $("#send_msg").val("1");
              }
              else {
                  $("#send_msg").val("0");
              }
          });   
      });
      
      //ajax 审核
      $(document).on("click", "[f='but_post_audit']", function(){
          $id = $(this).attr("data-id");
          $type = $(this).attr("data-type");
          $url = "<!--{$oefile}-->&c=<!--{$c}-->&a=saveheadimg&id="+$id+"&lotact="+$type+"&datatype=ajax";
          oelove_do_ajax($url, function(){
              if ($type == "pass") {
                  $("#status_"+$id).html("<font color='green'>已通过</font>");
              }
              else {
                  $("#status_"+$id).html("<font color='red'>未通过</font>");
              }
          });
          
      });
      
      
      //旋转图片 9.10.10
      $(document).on("click", "[f='but_flip_image']", function(){
          
          $id = $(this).attr("data-id");
          $.ajax({
            type: "POST",
            url: _OECPFILE+"&c=useraudit",
            cache: false,
            data: {
                a:"fliphead", id:$id, r:get_rndnum(8)
            },
            dataType: "json",
            success: function(data) {
              $json = eval(data);
              $response = $json.response;
              $result = $json.result;
              if ($response == '1') {
                  
                  $("#headimg_"+$id).attr("src", $result+"?r="+get_rndnum(6));
                  $("#preimg_"+$id).attr("src", $result+"?r="+get_rndnum(6));
                  
              }
            },
            error: function() {
              layer.msg("系统繁忙，请稍后再试！");
            }
          });
      });
      
      //预载图片 9.10.12
      preload_img();
      
  });
  </script>
  <!--{/if}-->
</div>
<script type="text/javascript">
  jQuery(".drop").slide({ type:"menu", titCell:".down", targetCell:".sub",effect:"slideDown",delayTime:100,triggerTime:0,returnDefault:true});
</script>
</body>
</html>