<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{$seo.title}</title>
  <meta name="keywords" content="{$seo.keywords}" />
  <meta name="description" content="{$seo.description}" />
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

  <link href="{YUNYECMS_PUBLIC}plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" />
  <!-- Font Awesome -->
  <link rel="stylesheet" href="{YUNYECMS_UI}plugins/fontawesome-free/css/all.min.css"> <!-- Theme style -->
  <link rel="stylesheet" href="{YUNYECMS_UI}plugins/iCheck/all.css">
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/AdminLTE.min.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/skins/_all-skins.min.css">
  <link href="{YUNYECMS_UI}plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/plugins.css">
  <link rel="stylesheet" href="{YUNYECMS_UI}dist/css/member.css">
  <link rel="stylesheet" href="{TPL}static/css/buy.css">
  <link rel="shortcut icon" href="{YUNYECMS_UI}dist/img/favicon.ico" />

  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>plugins/iCheck/all.css">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>dist/css/admin.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI;?>validator/dist/css/bootstrapValidator.css" />

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body class="hold-transition skin-green sidebar-mini fixed">
  <div class="wrapper">
    {tpl "left","member"}
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <div class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6">
              <ol class="breadcrumb float-sm-left">
                <li class="breadcrumb-item" id="homeitem"><a href="{php echo url('member/member/index');}"
                    target="maincontent"> <i class="fa fa-home"></i>
                    首页</a></li>
                {yy:breadcumb catid=$catid}
                {loop}
                {if $v['id']!=$catid }
                <li class="breadcrumb-item"><a href="{$v.url}">{$v.title}</a></li>
                {else}
                <li class="breadcrumb-item active">{$v.title}</li>
                {/if}
                {/loop}
                {/yy}
              </ol>
            </div>
            <div class="col-sm-6">
              {tpl "fast","member"}
            </div>
          </div>
        </div>
      </div>
      <div class="container-fluid" id="mainwrap">
        <!-- Main content -->
        <section class="content">
          <div class="row">
            <!-- left column -->
            <div class="col-md-12">
              <div class="card card-primary card-outline">
                <div class="card-header">
                  <div class="row">
                    <div class="col-xs-12 col-sm-12 col-md-8 pb10">
                      <h3 class="card-title">
                        <?php echo $this->cat["title"];?>列表
                      </h3> &nbsp;
                      <a href="<?php echo url('member/ucontent/infolist_add' ,array('catid'=>$this->cat['id']));?>"
                        class="btn bg-blue btn-sm btn-flat"><i class="fa fa-plus" aria-hidden="true"> </i> 添加信息</a>
                      &nbsp;
                    </div>
                    <div class="col-xs-12 col-sm-12 col-md-4">
                      <div class="card-tools">
                        <form class="form-search" method="post" action="<?php echo url(" member/ucontent/lists");?>">
                          <input type="hidden" name="catid" value="<?php echo $this->cat['id'];?>">
                          <div class="col-xs-12 col-md-12">
                            <input type="text" name="searchkey" class="form-control"
                              value="<?php if(!empty($searchkey)) echo $searchkey;?>"
                              style="width: 150px; float:left; margin-left: 5px;" placeholder="请输入关键词">
                            <button type="submit" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                          </div>
                        </form>
                      </div>
                    </div>
                  </div>
                </div> <!-- /.box-header -->
                <?php  if(!empty($list)):?>
                <form class="form-horizontal" method="post" id="form_infolist" name="form_infolist">
                  <div class="card-body">
                    <table class="table table-bordered table-striped ">
                      <thead>
                        <tr>
                          <th width="30" title="全选">
                            <input type="checkbox" title="全选" name="selectall" id="selectall" class="minimal-blue">
                          </th>
                          <th width="65">编号</th>
                          <th width="128">栏目</th>
                          <th width="320">标题</th>
                          <th width="70">图片</th>
                          <th width="154">时间</th>
                          <th width="106">排序</th>
                          <th width="50">访问</th>
                          <th width="50">状态</th>
                          <th width="260">操作</th>
                        </tr>
                      </thead>
                      <tbody id="catlist">
                        <?php foreach($list as $key=>$vo):?>
                        <tr>
                          <td><input type="checkbox" name="id[]" value="<?php echo $vo[" id"];?>" class="minimal-blue" >
                          </td>
                          <td>
                            <?php echo $vo["id"];?>
                          </td>
                          <td>
                            <?php echo  getcatbyid($vo["catid"]);?>
                          </td>
                          <td align="left" style="text-align:left;">
                            <a href="<?php echo url('content/index/show',array('id'=>$vo['id'],'catid'=>$vo['catid']));?>"
                              target="_blank">
                              <?php echo $vo["title"];?>
                            </a>
                            <?php if( $vo["isgood"]==1):?>
                            <font color="#FF0000">(首页推荐)</font>
                            <?php endif;?>
                          </td>
                          <td>
                            <?php if(!empty($vo["pic"])):?><img src="<?php echo $vo[" pic"];?>" width="50">
                            <?php endif;?>
                          </td>
                          <td align="left">
                            <?php echo udate($vo['addtime']);?>
                          </td>
                          <td>
                            <?php echo $vo["ordernum"];?>
                          </td>
                          <td>
                            <?php if($vo['ispower']==1):?><span class="badge bg-success">注册会员</span>
                            <?php elseif($vo['ispower']==2):?><span class="badge bg-danger"> VIP会员</span>
                            <?php elseif($vo['ispower']==3):?><span class="label label-warning"> 游客</span>
                            <?php else:?><span class="label label-primary"> 其他</span>
                            <?php endif;?>
                          </td>
                          <td>
                            <?php if($vo['status']==1):?><span class="badge bg-success"><i
                                class="fa fa-check"></i>已审</span>
                            <?php else:?><span class="badge bg-danger"><i class="fa fa-lock"></i> 未审核</span>
                            <?php endif;?>
                          </td>
                          <td>
                            <a href="<?php echo url('member/ucontent/infolist_add',array("
                              id"=>$vo["id"],"catid"=>$vo["catid"]));?>" class="btn btn-xs bg-green btn-flat"><i
                                class="fa fa-pencil-square-o icon-white"></i> 编辑</a>
                            <a href="javascript:void(0);" class="btn btn-danger btn-xs btn-flat"
                              onClick="javsacript:ConfirmDel('categoryid','<?php echo url('member/ucontent/finaldelete',array("
                              id"=>$vo["id"],"catid"=>$vo["catid"]));?>','删除确认','您确定要删除栏目
                              <?php echo $vo["title"];?>吗?','delmodal');"><i class="fa fa-remove"></i> 删除
                            </a>
                          </td>
                        </tr>
                        <?php endforeach; ?>
                      </tbody>
                    </table>
                  </div>
                  <!-- /.box-body -->
                  <div class="card-footer clearfix">
                    <input type="checkbox" title="全选" name="selectall_foot" id="selectall_foot" class="minimal-blue">
                    &nbsp; &nbsp;选中全部
                    <input type="hidden" name="catid" value="<?php echo $this->cat[" id"];?>">
                    <button type="button" class="btn bg-red btn-flat" id="batchdel"><i class="fa fa-remove"></i> 批量删除
                    </button> &nbsp;
                    <button type="button" class="btn bg-blue btn-flat" id="batchcheck"><i class="fa fa-check"></i> 批量审核
                    </button> &nbsp;
                    <button type="button" class="btn btn-default btn-flat" id="batchnocheck"><i class="fa fa-reply"></i>
                      取消审核 </button> &nbsp; <ul class="pagination pagination-sm no-margin float-right">
                      <?php echo $pages;?>
                    </ul>
                  </div>
                </form>
                <div class="modal modal-info" id="delmodal">
                  <div class="modal-dialog">
                    <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">删除确认</h4>
                      </div>
                      <div class="modal-body">
                        <p>您确定要删除该信息吗？</p>
                      </div>
                      <div class="modal-footer  justify-content-between">
                        <button type="button" class="btn btn-outline-light" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-outline-light"
                          onClick="javsacript:CloseAndJump('categoryid');">确认</button>
                      </div>
                    </div>
                    <!-- /.modal-content -->
                  </div>
                  <!-- /.modal-dialog -->
                </div>
                <!-- /.modal -->
                <div class="modal modal-warning" id="delallmodal">
                  <div class="modal-dialog">
                    <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">删除确认</h4>
                      </div>
                      <div class="modal-body">
                        <p>您确定要删除该用户吗？</p>
                      </div>
                      <div class="modal-footer  justify-content-between">
                        <button type="button" class="btn btn-outline-light" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-outline-light"
                          onClick="javsacript:CloseAndSubmit('categoryid','delallmodal','form_infolist');">确认</button>
                      </div>
                    </div>
                    <!-- /.modal-content -->
                  </div>
                  <!-- /.modal-dialog -->
                </div>
                <!-- /.modal -->
                <div class="modal" id="alertmodal">
                  <div class="modal-dialog">
                    <div class="modal-content">
                      <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                          <span aria-hidden="true">×</span></button>
                        <h4 class="modal-title">提示信息</h4>
                      </div>
                      <div class="modal-body">
                        <p>您至少要选定一条记录！</p>
                      </div>
                      <div class="modal-footer  justify-content-between">
                        <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
                      </div>
                    </div>
                    <!-- /.modal-content -->
                  </div>
                  <!-- /.modal-dialog -->
                </div>
                <!-- /.modal -->
                <?php else: ?>
                <div class="container">
                  <div class="callout callout-info">
                    <h4><i class="icon fa fa-info"></i> 提示信息：</h4>
                    <?php echo $messagetip;?>
                  </div>
                </div>
                <?php endif;?>
              </div>
              <!-- /.box -->
            </div>
            <!--/.col (left) -->
          </div>
          <!-- /.row -->
        </section>
        <!-- /.content -->
      </div>

    </div>
    <!-- /.content-wrapper -->
    {tpl "foot","member"}

    <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->

  </div>
  <!-- ./wrapper -->
  <!-- jQuery 2.2.3 -->
  <script src="{YUNYECMS_UI}plugins/jQuery/jquery-3.6.1.min.js"></script>
  <!-- Bootstrap 3.3.6 -->
  <script src="{YUNYECMS_UI}bootstrap/js/bootstrap.min.js"></script>
  <!-- AdminLTE App -->
  <script src="{YUNYECMS_UI}dist/js/adminlte.js"></script>

  <script src="<?php echo YUNYECMS_UI;?>dist/js/admin.js"></script>
  <script src="<?php echo YUNYECMS_UI;?>dist/js/modal.js"></script>
  <script src="<?php echo YUNYECMS_UI;?>plugins/iCheck/icheck.min.js"></script>

  <script>

    $(function () {
      //iCheck for checkbox and radio inputs
      $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
      });
      //Red color scheme for iCheck
      $('input[type="checkbox"].minimal-red, input[type="radio"].minimal-red').iCheck({
        checkboxClass: 'icheckbox_minimal-red',
        radioClass: 'iradio_minimal-red'
      });
      //Flat red color scheme for iCheck
      $('input[type="checkbox"].flat-blue, input[type="radio"].flat-blue').iCheck({
        checkboxClass: 'icheckbox_flat-blue',
        radioClass: 'iradio_flat-blue'
      });
      $('input[type="checkbox"].minimal-blue, input[type="radio"].minimal-blue').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
      });
    });
  </script>
  <script type="text/javascript">
    $(document).ready(function () {
      //使用ON绑定事件
      var checkAll = $('#selectall');
      var checkboxes = $('#catlist input');
      checkAll.on('ifChecked ifUnchecked', function (event) {
        if (event.type == 'ifChecked') {
          checkboxes.iCheck('check');
        } else {
          checkboxes.iCheck('uncheck');
        }
      });
      var checkAll_foot = $('#selectall_foot');
      checkAll_foot.on('ifChecked ifUnchecked', function (event) {
        if (event.type == 'ifChecked') {
          checkboxes.iCheck('check');
        } else {
          checkboxes.iCheck('uncheck');
        }
      });
    });

    $(document).ready(function () {
      $('#batchdel').click(function () {
        if ($("input[name='id[]']").is(':checked')) {
          $("#form_infolist").attr("action", "<?php echo url('member/ucontent/finaldelete');?>");
          ConfirmDel('categoryid', '', '删除确认', '您确定要删除所选信息吗,删除后将不能恢复！', 'delallmodal');
        } else {
          AlertModal('提示信息', '您至少应该选择一条记录！');
          return false;
        }
        //alert($("input[name='cat_id']:checked").val());
      });

      $('#batchcheck').click(function () {
        if ($("input[name='id[]']").is(':checked')) {
          $("#form_infolist").attr("action", "<?php echo url('member/ucontent/check');?>");
          ConfirmDel('categoryid', '', '提示信息', '你确定要审核所选中的信息吗！', 'delallmodal');
        } else {
          AlertModal('提示信息', '您至少应该选择一条记录！');
          return false;
        }
      });

      $('#batchnocheck').click(function () {
        if ($("input[name='id[]']").is(':checked')) {
          $("#form_infolist").attr("action", "<?php echo url('member/ucontent/nocheck');?>");
          ConfirmDel('categoryid', '', '提示信息', '你确定要取消审核所选中的信息吗！', 'delallmodal');
        } else {
          AlertModal('提示信息', '您至少应该选择一条记录！');
          return false;
        }
      });
    })	 
  </script>


</body>

</html>