<aside class="lyear-layout-sidebar">
      <!-- logo -->
      <div id="logo" class="sidebar-header" style="background: #fff;height: 68px;line-height: 68px;">
        <a href="./"><img src="../media/<?php echo $C_logo?>" title="<?php echo $C_title?>" alt="<?php echo $C_title?>" style="left: 0px;margin: 0px;max-height: 100%;max-height: 100%" /></a>
      </div>
      <div class="lyear-layout-sidebar-scroll"> 
        
        <nav class="sidebar-main">
          <ul class="nav nav-drawer">
            <li class="nav-item "> <a href="index.php"><i class="mdi mdi-home"></i> 后台首页</a> </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i class="mdi mdi-settings"></i> 系统设置</a>
              <ul class="nav nav-subnav">
                <li> <a href="config.php">基本设置</a> </li>
                <li> <a href="pay.php">接口设置</a> </li>
                <li> <a href="ad.php">广告设置</a> </li>
                <li> <a href="domain.php">自定义域名</a> </li>
              </ul>
            </li>

            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i class="mdi mdi-link"></i> 生成短链</a>
              <ul class="nav nav-subnav">
                <li> <a href="creat.php">单个生成</a> </li>
                <li> <a href="urls.php">批量生成</a> </li>
              </ul>
            </li>

            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i class="mdi mdi-web"></i> 短链管理</a>
              <ul class="nav nav-subnav">
                <li> <a href="url.php">短链列表</a> </li>
                <li> <a href="statistics.php">短链统计</a> </li>
              </ul>
            </li>

            <li class="nav-item nav-item-has-subnav">
              <a href="member.php"><i class="mdi mdi-account-multiple"></i> 会员管理</a>
              
            </li>
            <!--
            <li class="nav-item nav-item-has-subnav">
              <a href="javascript:void(0)"><i class="mdi mdi-brightness-auto"></i> 广告管理</a>
              <ul class="nav nav-subnav">
                <li> <a href="ad.php">广告管理</a> </li>
              </ul>
            </li>
          -->
            <li class="nav-item nav-item-has-subnav">
              <a href="orders.php"><i class="mdi mdi-cart"></i> 订单管理</a>
            </li>
            <li class="nav-item nav-item-has-subnav">
              <a href="link.php"><i class="mdi mdi-link-variant"></i> 友链管理</a>
              
            </li>
            <li class="nav-item"> <a href="update.php"><i class="mdi mdi-update"></i> 检测更新</a> </li>
          </ul>
        </nav>
      </div>
    </aside>
    <!--End 左侧导航-->
    
    <!--头部信息-->
    <header class="lyear-layout-header">
      
      <nav class="navbar navbar-default">
        <div class="topbar">
          
          <div class="topbar-left">
            <div class="lyear-aside-toggler">
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
              <span class="lyear-toggler-bar"></span>
            </div>
            <?php if(!checkauth()){?>
          <div class="input-group">
                    <input type="text" class="form-control" placeholder="授权码" id="authcode">
                    <span class="input-group-btn">
                        <button class="btn btn-info" type="button" onclick="auth()"><i class="mdi mdi-check"></i></button>
                    </span>
                </div>
<?php 
}else{
  echo "<div class=\"search-element\"><a href=\"javascript:;\" onclick=\"checkauth()\">已授权</a> <a href=\"javascript:;\" onclick=\"reauth()\"><i class=\"mdi mdi-refresh\" style=\"margin-left:10px;\"></i></a></div>";
}
?>
          </div>
          
          <ul class="topbar-right">
            <li class="dropdown dropdown-profile">
              <a href="javascript:void(0)" data-toggle="dropdown">
                <img class="img-avatar img-avatar-48 m-r-10" src="images/admin.png" alt="管理员" />
                <span>管理员 <span class="caret"></span></span>
              </a>
              <ul class="dropdown-menu dropdown-menu-right">
                <li> <a href="../" target="_blank"><i class="mdi mdi-account"></i> 前往首页</a> </li>
                <li> <a href="login.php?action=unlogin"><i class="mdi mdi-logout-variant"></i> 退出登录</a> </li>
              </ul>
            </li>
          </ul>
        </div>
      </nav>
    </header>

<div class="modal fade" id="largeModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog  modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">授权信息</h4>
      </div>
      <div class="modal-body" id="auth_pay">
        <div class="row">
                <div class="col-lg-4">
                <div class="card">
                  <div class="card-header bg-primary">
                    <h3>免费版</h3>
                  </div>
          <ul class="list-group">
              <li class="list-group-item"><span style="font-size: 20px;color: #f00;font-weight: bold;">0元</span>/月</li>
              <li class="list-group-item"><img src="images/tec_b.png"> 短链接条数1000条</li>
              <li class="list-group-item"><img src="images/tec_b.png"> 仅支持本站生成</li>
              <li class="list-group-item"><img src="images/tec_x.png"> 无会员中心</li>
              <li class="list-group-item"><img src="images/tec_x.png"> 不支持设置跳转页广告</li>
              <li class="list-group-item"><img src="images/tec_x.png"> 无技术支持</li>
              <li class="list-group-item"><img src="images/tec_x.png"> 带有版权文字</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 支持批量生成短链</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 支持自定义后缀短链</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 支持API生成短链</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 适用于购买前测试功能</li>
              <li class="list-group-item"><a class="btn btn-danger" href="https://dwz.s-cms.cn" target="_blank">免费下载</a></li>
          </ul>
                  </div>
                </div>
                
                <div class="col-lg-4">
                  <div class="card">
                    <div class="card-header bg-info">
                    <h3>授权版<span style="font-size: 12px;">（单用户）</span></h3>
                  </div>

                  <ul class="list-group">
              <li class="list-group-item"><span style="font-size: 20px;color: #f00;font-weight: bold;">398元</span>/永久</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 短链接条数不限制</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 支持本站及第三方API</li>
              <li class="list-group-item"><img src="images/tec_x.png"> 无会员中心</li>
              <li class="list-group-item"><img src="images/tec_x.png"> 不支持设置跳转页广告</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 提供技术支持</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 自动去除版权文字</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 支持批量生成短链</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 支持自定义后缀短链</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 支持API生成短链</li>
              <li class="list-group-item"><img src="images/tec_s.png"> 适用于搭建平台自用</li>
              <li class="list-group-item"><a class="btn btn-danger" href="https://item.taobao.com/item.htm?ft=t&id=651652581392" target="_blank">购买授权</a></li>
          </ul>
                  </div>
                </div>

                <div class="col-lg-4">
                  <div class="card">
                    <div class="card-header bg-danger">
                    <h3>授权版<span style="font-size: 12px;">（多用户）</span></h3>
                  </div>

            <ul class="list-group">
                <li class="list-group-item"><span style="font-size: 20px;color: #f00;font-weight: bold;">598元</span>/永久</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 短链接条数不限制</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 支持本站及第三方API</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 有会员中心</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 支持设置跳转页广告</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 提供技术支持</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 自动去除版权文字</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 支持批量生成短链</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 支持自定义后缀短链</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 支持API生成短链</li>
                <li class="list-group-item"><img src="images/tec_s.png"> 适用于搭建平台自用及营利</li>
                <li class="list-group-item"><a class="btn btn-danger" href="https://item.taobao.com/item.htm?ft=t&id=651652581392" target="_blank">购买授权</a></li>
            </ul>
                      
                  </div>
                </div>
              </div>

              购买授权版请联系QQ：450245869 微信：shanling1706
      </div>
      
    </div>
  </div>
</div>

<script type="text/javascript">
function auth(){
  lightyear.loading('show');
  $.post("auth.php?action=getauth", {
      authcode: $("#authcode").val(),
  },
  function(data) {
      if(data == "success") {
          lightyear.loading('hide');
          lightyear.notify('授权成功', 'success', 100);
          setTimeout("location.reload();", 2000 )
      }else{
        lightyear.notify('授权码错误', 'danger', 100);
          lightyear.loading('hide');
        $('#largeModal').modal('show');
      }
  });
}
function reauth(){
  $(".search-element").html('<div class="input-group"><input type="text" class="form-control" placeholder="授权码" id="authcode"><span class="input-group-btn"><button class="btn btn-info" type="button" onclick="auth()"><i class="mdi mdi-check"></i></button></span></div>');
}
function checkauth(){
  $.ajax({
    url:'auth.php?action=checkauth',
    type:'get',
    success:function (data) {
      data=JSON.parse(data);
      if(data.msg=="success"){
          $("#auth_pay").html("<div style='padding:10px;'><p>授权状态：已授权</p><p>授权域名："+data.A_domain+"</p><p>授权时间："+data.A_time+"</p><p>授权时长：永久</p><p>授权版本："+data.A_type+"</p></div>");
          $('#largeModal').modal('show');
      }else{
            lightyear.notify('未查询到授权信息', 'danger', 100);
      }
    }
  });
}
      document.getElementsByTagName("body")[0].setAttribute("data-logobg","color_8");
      document.getElementsByTagName("body")[0].setAttribute("data-headerbg","color_8");
      document.getElementsByTagName("body")[0].setAttribute("data-sidebarbg","color_8");
</script>