<?php 
	include './head.php';
  $viewCount=$DB->getColumn("SELECT count(*) FROM `pre_view`");
  $classCount=$DB->getColumn("SELECT count(*) FROM `pre_class`");
  $viewPvCount = $DB->getColumn("SELECT sum(pvAll) FROM `pre_view`");
?>
<div class="layui-row layui-col-space15">
        <div class="layui-col-md8 layui-col-md-offset2">
            <div class="layui-card" style="border-radius: 20px;">
              <div class="layui-card-header">
                <h3 style="padding-top: 3px;color: hsl(230,10%,40%);"><b>模板列表 <button id="mubanGet" class="layui-btn layui-btn-xs">新模板添加教程</button></b></h3>
              </div>
               <div class="layui-card-body">
                <div class="layui-form layui-form-pane">
                  <div class="layui-form-item">
                    <?php 
                      foreach(getMuban() as $v){
                        echo ' <div class="layui-col-md6 layui-col-xs6 layui-col-sm6">
                          <img width="90%" src="../view/muban/'.$v.'/show.png"><br>
                          <center><span class="layui-badge layui-bg-green">'.$v.'</span></center>
                        </div>';
                      }
                    ?> 
                </div>
                </div>
                </div>
                </div> 

<script src="../public/static/layuiadmin/layui/layui.all.js"></script>
  <script>
  layui.config({
      base: '../public/static/layuiadmin/' //静态资源所在路径
    }).extend({
      index: 'lib/index' //主入口模块
    }).use('index');

    $('#mubanGet').click(function(){
      layer.alert('1.模板存放位置：/view/muban/<br>index.php（模板页面文件）<br>show.png（模板后台展示图片）<hr>2.静态资源存放位置：/public/assets/<hr>相应变量放在自己模板想要的位置即可');
    });
  </script>
<?php 
	include 'foot.php';
?>