<!--{include file="<!--{$oetplpath}-->block_head.tpl"}-->

<!--{if $a == "run"}-->
<div class="layui-fluid oe_fluid">

  <form class="layui-form" id="mysearch" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post">
  <div class="oe_breadcrumb_box clearfix">
    <div class="layui-breadcrumb fl" lay-filter="breadcrumb" style="visibility: visible;">
      <a href="javascript:;">站点管理</a><span lay-separator="">/</span>
      <a href="javascript:;">服务套餐</a><span lay-separator="">/</span>
      <a><cite>等级特权</cite></a>
    </div>
  </div>
  <!--//Top End -->
  
  <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 type="text" name="sname" id="sname" class="layui-input" value="<!--{$sname}-->" />
        </div>
      </div>
      <div class="layui-inline">
        <div class="layui-form-label">启用状态：</div>
        <div class="layui-input-inline">
          <select name="sflag" id="sflag">
            <option value="">不限</option>
            <option value="1"<!--{if $sflag == '1'}--> selected<!--{/if}-->>启用</option>
            <option value="2"<!--{if $sflag == '2'}--> selected<!--{/if}-->>未启用</option>
          </select>
        </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>
      
      <br />
      <b>温馨提示：</b>
      <font color="red">会员注册默认为普通会员，VIP1及以上需要设定对应的套餐进行购买开通。不设置标识为使用默认图标</font>
    </div>
  </div>
  <!--//search End -->
  </form>

  <div class="oe_table_wrap layui-form">
    
    <form class="layui-form" id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post">
    <input type="hidden" name="a" id="a" value="del" />
    <table class="layui-table">
      <thead>
        <tr>
          <th width="10%">ID</th>
          <th width="15%">等级名称</th>
          <th width="15%">别名</th>
          <th width="10%">男标识</th>
          <th width="10%">女标识</th>
          <th width="10%">排序</th>
          <th width="10%">启用</th>
          <th width="10%">推荐</th>
          <th>操作</th>
        </tr> 
      </thead>
      
      <!--{if empty($group)}-->
      <tr>
        <td colspan="9" class="text_center">没有符合条件的信息</td>
      </tr>
      <!--{else}-->
      <!--{foreach $group as $volist}-->
      <tr>
        <td class="text_center">
          <!--{$volist.groupid}-->
        </td>
        <td class="text_center"><!--{$volist.groupname}--></td>
        <td class="text_center"><!--{$volist.asname}--></td>
        <td class="text_center">
          <!--{if !empty($volist.img1)}-->
          <img src="<!--{$volist.img1}-->" f="viewimg" />
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{if !empty($volist.img2)}-->
          <img src="<!--{$volist.img2}-->" f="viewimg" />
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{$volist.orders}-->
        </td>
        <td class="text_center">
          <!--{if $volist.groupid > 1}-->
          <input type="checkbox" name="flag" lay-skin="primary" value="1" lay-filter="updatestatus" data-id="<!--{$volist.groupid}-->" data-type="flag"<!--{if $volist.flag == '1'}--> checked<!--{/if}--> />
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center">
          <!--{if $volist.groupid > 1}-->
          <input type="checkbox" name="elite" lay-skin="primary" value="1" lay-filter="updatestatus" data-id="<!--{$volist.groupid}-->" data-type="elite"<!--{if $volist.elite == '1'}--> checked<!--{/if}--> />
          <!--{else}-->
          --
          <!--{/if}-->
        </td>
        <td class="text_center">
          <div class="btn_box">
            <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edit&id=<!--{$volist.groupid}-->&<!--{$comeurl}-->" class="layui-btn layui-btn-xs layui-btn-normal">设置特权</a>
          </div>
        </td>
      </tr>
      <!--{/foreach}-->
      <!--{/if}-->
    </table>
    </form>
    <div class="oe_page_box"><!--{$showpage}--></div>

  </div>
</div>
<!--{/if}-->


<!--{if $a == "edit"}-->
<div class="layui-fluid oe_fluid">

  <div class="oe_breadcrumb_box clearfix">
    <div class="layui-breadcrumb fl" lay-filter="breadcrumb" style="visibility: visible;">
      <a href="javascript:;">站点管理</a><span lay-separator="">/</span>
      <a href="javascript:;">服务套餐</a><span lay-separator="">/</span>
      <a><cite>设置等级特权</cite></a>
    </div>
    <div class="oe_tool_bar ft">
      <button class="layui-btn layui-btn-sm layui-btn-radius" id="but_submit_post2" lay-submit lay-filter="editform">
        编辑保存
        <span class="oe_btn_loading layui-anim layui-icon layui-anim-rotate layui-anim-loop" style="display:none;">&#xe63d;</span>
      </button>
      <span class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius"><a href="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->">返回列表</a></span>
    </div> 
  </div>
  
  <form class="layui-form" id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->&<!--{$comeurl}-->" method="post">
  <input type="hidden" name="a" id="a" value="saveedit" />
	<input type="hidden" name="id" id="id" value="<!--{$id}-->" />
  <div class="layui-card">
    <div class="layui-card-header">编辑等级特权</div>
    <div class="layui-card-body">
      <table class="oe_tbl_form layui-form">
        <tr>
          <th><font color="red"></font> 等级名称：</th>
          <td ><!--{$group.groupname}--></td>
        </tr>
        
        <tr>
          <th width="15%"><font color="red"></font> 男会员标识：</th>
          <td width="35%">
            <div class="layui-btn">
              <i class="layui-icon layui-icon-upload"></i>
              点击上传
              <input type="file" name="upimg1" id="upimg1" f="but_upload_image" data-forbidcom="1" data-forbidwater="1" />
            </div>
            <div class="upload_loading" id="uplogo_loading" style="display:none;"></div>
            <input type="hidden" id="upimg1_thumb" name="upimg1_thumb" value="" />
            <input type="hidden" id="upimg1_url" name="img1" value="<!--{$group.img1}-->" />
        
            <div class="tblform_tips normal">&nbsp;&nbsp;&nbsp;预览：</div>
            <div class="upload_pic upload_pic_md" style="width:30px;height:30px;">
              <img src="<!--{$urlpath}--><!--{if !empty($group.img1)}--><!--{$group.img1}--><!--{else}-->tpl/static/images/nopic.jpg<!--{/if}-->" id="upimg1_preview" f="viewimg" />
            </div>
            <a href="javascript:;" class="oe_deluploadimg" f="removeimg" data-preview="upimg1" data-input="upimg1">移除</a>
          </td>
          <th width="15%"><font color="red"></font> 女会员标识：</th>
          <td width="35%">
            <div class="layui-btn">
              <i class="layui-icon layui-icon-upload"></i>
              点击上传
              <input type="file" name="upimg2" id="upimg2" f="but_upload_image" data-forbidcom="1" data-forbidwater="1" />
            </div>
            <div class="upload_loading" id="uplogo_loading" style="display:none;"></div>
            <input type="hidden" id="upimg2_thumb" name="upimg2_thumb" value="" />
            <input type="hidden" id="upimg2_url" name="img2" value="<!--{$group.img2}-->" />
        
            <div class="tblform_tips normal">&nbsp;&nbsp;&nbsp;预览：</div>
            <div class="upload_pic upload_pic_md" style="width:30px;height:30px;">
              <img src="<!--{$urlpath}--><!--{if !empty($group.img2)}--><!--{$group.img2}--><!--{else}-->tpl/static/images/nopic.jpg<!--{/if}-->" id="upimg2_preview" f="viewimg" />
            </div>
            <a href="javascript:;" class="oe_deluploadimg" f="removeimg" data-preview="upimg2" data-input="upimg2">移除</a>
          </td>
        </tr>
        
        <tr>
          <th><font color="red"></font> 等级别名：</th>
          <td>
            <input type="text" name="asname" id="asname" class="layui-input input-200" value="<!--{$group.asname}-->" />
            <br />
            <span class="text_tip_inline">不填写使用等级默认名称</span>
          </td>
          <th>排序：</th>
          <td>
            <input type="text" name="orders" id="orders" class="layui-input input-200" value="<!--{$group.orders}-->" />
          </td>
        </tr>
        
        <tr>
          <th>是否启用：</th>
          <td>
            <input type="radio" name="flag" title="是" value="1"<!--{if $group.flag == '1'}--> checked<!--{/if}--> />
            <input type="radio" name="flag" title="否" value="0"<!--{if $group.flag == '0'}--> checked<!--{/if}--> />
            <br />
            <span class="text_tip_inline">(ID为1的是普通会员，必须启用)</span>
          </td>
          <th>是否推荐：</th>
          <td>
            <input type="radio" name="elite" title="是" value="1"<!--{if $group.elite == '1'}--> checked<!--{/if}--> />
            <input type="radio" name="elite" title="否" value="0"<!--{if $group.elite == '0'}--> checked<!--{/if}--> />
          </td>
        </tr>
        <tr>
          <th>备注说明：</th>
          <td colspan="3"><textarea name="intro" id="intro" class="layui-textarea" style="width:50%;height:80px;"><!--{$group.intro}--></textarea></td>
        </tr>
      </table>
    </div>
    <div class="layui-card-header">&#12288;特权设置</div>
    <div class="layui-card-body">
      <table class="oe_tbl_form layui-form">
        <tr>
          <td style="line-height:35px;">
          
            <table class="oe_tbl_form layui-form">
              <tr>
                <th width="15%">上传相册(照片)：</th>
                <td>
                  <input type="radio" name="limitphoto" title="不限制" value="0"<!--{if $group.power.limitphoto == '0'}--> checked<!--{/if}--> />
                  <input type="radio" name="limitphoto" title="限制" value="1"<!--{if $group.power.limitphoto == '1'}--> checked<!--{/if}--> />
                  ->&#12288;<input type="text" name="photo_nums" id="photo_nums" class="layui-input input-80" value="<!--{$group.power.photo_nums}-->" />&nbsp;张
                </td>
              </tr>

              <tr>
                <th>添加好友：</th>
                <td>
                  <input type="radio" name="limitfriend" title="不限制" value="0"<!--{if $group.power.limitfriend == '0'}--> checked<!--{/if}--> />
                  <input type="radio" name="limitfriend" title="限制" value="1"<!--{if $group.power.limitfriend == '1'}--> checked<!--{/if}--> />
                  ->&#12288;<input type="text" name="friend_nums" id="friend_nums" class="layui-input input-80" value="<!--{$group.power.friend_nums}-->" />&nbsp;人
                </td>
              </tr>
              
              <tr>
                <th>联系方式：</th>
                <td>
                  <input type="checkbox" name="view_contact" id="view_contact" lay-skin="primary" title="查看联系方式" value="1"<!--{if $group.power.view_contact == '1'}--> checked<!--{/if}--> />-> （拥有查看会员的联系方式权限）<br />
                  每天查看联系方式次数：
                   <input type="radio" name="view_contact_day_limit" title="不限制" value="0"<!--{if $group.power.view_contact_day_limit == '0'}--> checked<!--{/if}--> />
                   <input type="radio" name="view_contact_day_limit" title="限制" value="1"<!--{if $group.power.view_contact_day_limit == '1'}--> checked<!--{/if}--> />->
                   <input type="text" name="view_contact_day_nums" id="view_contact_day_nums" class="layui-input input-80" value="<!--{$group.power.view_contact_day_nums}-->" /> 人
                   
                   <br />
                  查看费用：<input type="text" name="fee_view_contact" id="fee_view_contact" class="layui-input input-100" value="<!--{$group.power.fee_view_contact}-->" /> 元
                  <span class="text_tip_inline">（拥有查看权限之后费用，0表示免费）</span>
                  <br />
                  <!--//9.12.18-->
                  赠送免费查看次数：<input type="text" name="free_view_contact_times" id="free_view_contact_times" class="layui-input input-100" value="<!--{$group.power.free_view_contact_times}-->" /> 次
                  
                  <!--{if $group.groupid > 1}-->
                  &#12288;->&#12288;
                  VIP到期自动清零赠送次数&nbsp;<input type="checkbox" name="cleartimes" id="cleartimes" lay-skin="primary"  value="1"<!--{if $group.cleartimes == '1'}--> checked<!--{/if}--> />
                  <!--{/if}-->
                  
                  <br /><font color="red">（如果会员没免费查看次数，则按照单次查看付费）</font>
                </td>
              </tr>
              <tr>
                <th>发信数</th>
                <td>
                  每天发信条数：
                  <input type="radio" name="msg_daysend_limit" title="不限制" value="0"<!--{if $group.power.msg_daysend_limit == '0'}--> checked<!--{/if}--> />
                  <input type="radio" name="msg_daysend_limit" title="限制" value="1"<!--{if $group.power.msg_daysend_limit == '1'}--> checked<!--{/if}--> />->
                  <input type="text" name="msg_daysend_nums" id="msg_daysend_nums" class="layui-input input-80" value="<!--{$group.power.msg_daysend_nums}-->" />
                  条 <span class="text_tip_inline">（对未解锁的通信，限制每天发私信条数）</span>
                  <br />
                </td>
              </tr>
              
              <tr>
                <th>发送/接收礼物</th>
                <td>
                  免费礼物福利：
                  <input type="text" name="gift_free_times" id="gift_free_times" class="layui-input input-80" value="<!--{$group.power.gift_free_times}-->" /> 个 
                  <span class="text_tip_inline">(用户使用该福利可免费送礼物)</span>
                  <br />
                </td>
              </tr>

              <tr>
                <th>其他：</th>
                <td>
                  <!--//0.05.22 -->
                  <input type="checkbox" name="msg_freelock" id="msg_freelock" lay-skin="primary" title="发信自动解锁" value="1"<!--{if $group.power.msg_freelock == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（发信双方自动解锁，不受限制）</span><br />

                  <input type="checkbox" name="msg_send_free" id="msg_send_free" lay-skin="primary" title="发信对方免费看" value="1"<!--{if $group.power.msg_send_free == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（发信对方免费查看）</span><br />
                  <input type="checkbox" name="msg_receive_free" id="msg_receive_free" lay-skin="primary" title="收信免费看 " value="1"<!--{if $group.power.msg_receive_free == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（会员发来的信件免费查看）</span><br />
                  <input type="checkbox" name="user_advsearch" id="user_advsearch" lay-skin="primary" title="会员高级搜索" value="1"<!--{if $group.power.user_advsearch == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（拥有更多会员搜索条件）</span><br />
                  <input type="checkbox" name="view_logintime" id="view_logintime" lay-skin="primary" title="查看会员登录情况" value="1"<!--{if $group.power.view_logintime == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（拥有查看某个会员的登录时间）</span><br />
                  <input type="checkbox" name="view_visitme" id="view_visitme" lay-skin="primary" title="查看谁看过我" value="1"<!--{if $group.power.view_visitme == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（查看最近浏览过自己的会员，从中筛选心仪之人）</span><br />
                  <input type="checkbox" name="view_myfans" id="view_myfans" lay-skin="primary" title="查看谁喜欢我" value="1"<!--{if $group.power.view_myfans == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（查看最近谁喜欢我）</span><br />
                  <input type="checkbox" name="view_credit" id="view_credit" lay-skin="primary" title="诚信查询" value="1"<!--{if $group.power.view_credit == '1'}--> checked<!--{/if}--> /><span class="text_tip_inline">（查询某个会员的资料诚信情况）</span><br />
                <td>
              </tr>
              
            </table>
          </td>
        </tr>
      </table>
    </div>
    
  </div>
  </form>
  
  <div class="oe_kong"></div>
  <div class="oe_tbl_form_btn current">
    <button class="layui-btn" id="but_submit_post" lay-submit lay-filter="editform">
      编辑保存
      <span class="oe_btn_loading layui-anim layui-icon layui-anim-rotate layui-anim-loop" style="display:none;">&#xe63d;</span>
    </button>
  </div>
  
</div>
<script type="text/javascript">
$(function(){

    layui.use('form', function(){
        $form = layui.form;
        //保存...
        $form.on('submit(editform)', function(data){
            $obj_id = data.elem.getAttribute("id");
            if (!$("#"+$obj_id).hasClass("forbid_submit")) {

                $("#"+$obj_id).addClass("forbid_submit");
                if ($("#"+$obj_id).find("span").length > 0) {
                    $("#"+$obj_id).find("span").show();
                }
                $("#myform").submit();
            }
        });   
    });
    
});
</script>
<!--{/if}-->
</body>
</html>