<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>云业内容管理系统-YUNYECMS <?php echo YUNYECMS_VERSION; ?></title>
  <!-- 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">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI; ?>plugins/fontawesome-free/css/all.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI; ?>plugins/iCheck/all.css">
  <link rel="stylesheet" href="<?php echo 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="<?php echo YUNYECMS_UI; ?>dist/css/skins/_all-skins.min.css">
  <link href="<?php echo YUNYECMS_UI; ?>plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI; ?>dist/css/admin.css">
  <link rel="stylesheet" href="<?php echo YUNYECMS_UI; ?>dist/css/plugins.css">
  <link rel="shortcut icon" href="<?php echo YUNYECMS_UI; ?>dist/img/favicon.ico" />
  <!-- 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-blue sidebar-mini" onload="changeHeight()">
  <div class="wrapper">
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
      <!-- Sidebar toggle button-->
      <ul class="navbar-nav">
        <li class="nav-item">
          <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
        </li>
        <li class="nav-item d-none d-sm-inline-block">
          <a href="#" class="nav-link" id="yysystem" onClick="showsidermenu(this);">
            <i class="fa fa-cog" aria-hidden="true"></i> 系统
          </a>
        </li>
        <li class="nav-item d-none d-sm-inline-block">
          <a href="#" class="nav-link" id="yyinfo" onClick="showsidermenu(this);">
            <i class="fa fa-info" aria-hidden="true"></i> 内容
          </a>
        </li>
        <li class="nav-item d-none d-sm-inline-block">
          <a href="#" class="nav-link" id="yymember" onClick="showsidermenu(this);">
            <i class="fa fa-user-circle"></i> 用户
          </a>
        </li>
        <li class="nav-item d-none d-sm-inline-block">
          <a href="#" class="nav-link" id="yyapps" onClick="showsidermenu(this);">
            <i class="fa  fa-th-large"></i> 应用
          </a>
        </li>
      </ul>

      <ul class="navbar-nav ml-auto">
        <!-- User Account: style can be found in dropdown.less -->
        <li class="nav-item dropdown user user-menu tipright">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">
            <img src="<?php echo YUNYECMS_UI; ?>dist/img/user.png" class="user-image" alt="User Image">
            <span class="hidden-xs"><?php echo $this->admuser['username']; ?></span>
          </a>
          <ul class="dropdown-menu">
            <!-- User image -->
            <li class="user-header">
              <img src="<?php echo YUNYECMS_UI; ?>dist/img/user.png" class="img-circle" alt="User Image">
              <p class="text-white">
                <?php if (!empty($admrealname)) {
                  echo $admrealname . '-';
                } ?> <?php echo $admrolename; ?> <?php if (!empty($admpartment)) {
                                                    echo '-' . $admpartment;
                                                  } ?>
                <small>上次登录：<?php echo $prelgtime; ?></small>
              </p>
            </li>
            <!-- Menu Footer-->
            <li class="user-footer">
              <div class="float-left">
                <a href="<?php echo url_admin('user_add', 'user', array('userid' => $this->admuser['userid']), $this->hashurl['usvg']); ?>" class="btn btn-info btn-flat" target="maincontent"><i class="fa fa-user"></i> 个人资料</a>
              </div>
              <div class="float-right">
                <a href="<?php echo url_admin('logout', 'main', '', $this->hashurl['usvg']); ?>" class="btn btn-danger btn-flat"><i class="fa fa-close"></i> 退 出</a>
              </div>
            </li>
          </ul>
        </li>
        <!-- Notifications: style can be found in dropdown.less -->
        <?php if ($msgpower) : ?>
          <li class="nav-item dropdown">
            <a href="#" class="nav-link" data-toggle="dropdown">
              <i class="far fa-bell"></i>

              <span class="badge badge-warning navbar-badge"> <?php echo $msgnum; ?></span>
            </a>
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
              <span class="dropdown-item dropdown-header">您有<span class="text-danger"> <?php echo $msgnum; ?></span> 条待处理的通知消息</span>
              <?php foreach ($msgto as $key => $vo) : ?>
                <div class="dropdown-divider"></div>
                <a href="<?php echo $vo['url']; ?>" target="maincontent" class="dropdown-item" style="white-space:normal;">
                  <?php echo $vo['icon']; ?></i> <?php echo strcut($vo['title'], 75); ?>
                  <span class="float-right text-muted text-sm"><?php echo yytime($vo['addtime']); ?></span>
                </a>
              <?php endforeach ?>

              <div class="dropdown-divider"></div>
              <a href="<?php echo url_admin('init', 'msg'); ?>" class="dropdown-item dropdown-footer" target="maincontent">查看全部</a>
            </div>
          </li>
        <?php endif; ?>
        <li class="nav-item dropdown">
          <a class="nav-link" data-toggle="dropdown" href="#">
            <i class="far fa-comments"></i>
            <span class="badge badge-danger navbar-badge"><?php echo $customfromnum; ?></span>
          </a>
          <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
            <span class="dropdown-item dropdown-header">您有<span class="text-danger"> <?php echo $customfromnum; ?></span>条新的消息</span>
            <?php foreach ($customfromto as $key => $vo) : ?>
              <a href="<?php echo url_admin('customform_view', 'content', array('catid' => $vo["catid"], 'id' => $vo["id"])); ?>" class="dropdown-item">
                <!-- Message Start -->
                <div class="media">
                  <div class="media-body">
                    <h3 class="dropdown-item-title">
                      <?php echo $vo['name']; ?>
                      <span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span>
                    </h3>
                    <p class="text-sm"><?php echo strcut($vo['remark'], 50); ?></p>
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> <?php echo yytime($vo['addtime']); ?></p>
                  </div>
                </div>
                <!-- Message End -->
              </a>
              <div class="dropdown-divider"></div>
            <?php endforeach ?>
            <?php if ($formurl) : ?>
              <a href="<?php echo $formurl; ?>" class="dropdown-item dropdown-footer" target="maincontent">查看全部</a>
            <?php endif; ?>
          </div>
        </li>
        <li class="nav-item">
          <a class="nav-link" data-widget="fullscreen" href="#" role="button">
            <i class="fas fa-expand-arrows-alt"></i>
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
            <i class="fas fa-th-large"></i>
          </a>
        </li>
      </ul>
    </nav>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar sidebar-dark-primary">
      <!-- sidebar: style can be found in sidebar.less -->
      <a href="http://www.yunyecms.com" class="brand-link" target="_blank">
        <img src="<?php echo YUNYECMS_UI; ?>dist/img/logo-mini.png" alt="云业内容管理系统" class="brand-image img-circle elevation-3" style="opacity: .8">
        <span class="brand-text font-weight-light">云业CMS</span>
      </a>
      <div class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel mt-3 pb-3 mb-3 d-flex">
          <div class="info">
            <i class="fa fa-circle text-success"></i> <?php echo $this->admuser['username']; ?> <a href="<?php echo url_admin('user_add', 'user', array('userid' => $this->admuser['userid']), $this->hashurl['usvg']); ?>" target="maincontent"><?php echo $admrolename; ?></a> &nbsp;

          </div>
        </div>
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <nav class="mt-2">
          <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" id="yymenu">
          </ul>
        </nav>
      </div>
      <!-- /.sidebar -->
    </aside>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper" id="content-wapper">
      <!-- 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_admin('home', 'main'); ?>" target="maincontent"> <i class="fa fa-home"></i> 主页</a></li>
                <li class="breadcrumb-item active"><a href="<?php echo url_admin('home', 'main'); ?>" target="maincontent">控制面板</a></li>
              </ol>
            </div>
            <div class="col-sm-6">
              <div class="fastmenu float-sm-right">
                <a href="<?php echo url_admin('cacheclear', 'main'); ?>" target="maincontent" class="btn bg-olive btn-xs btn-flat"><i class="fa fa-refresh" aria-hidden="true"></i> 清理缓存 </a>
                <a href="<?php echo ROOT; ?>" class="btn btn-primary btn-xs btn-flat" target="_blank"><i class="fa fa-home " aria-hidden="true"></i> 站点首页</a>
              </div>
            </div>
          </div>
        </div>
      </div>
      <iframe src="<?php echo url_admin('home', 'main', '', $this->hashurl['usvg']); ?>" id="maincontent" name="maincontent" scrolling="auto" width="100%" height="1080" frameborder="0"></iframe>
    </div>
    <!-- /.content-wrapper -->
    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">

      <!-- Tab panes -->
      <div class="tab-content">
        <!-- Settings tab content -->
        <div class="tab-pane active" id="control-sidebar-settings-tab">
          <h3 class="control-sidebar-heading">系统基本设置</h3>
          <form id="form1" class="form-horizontal" method="post" enctype="multipart/form-data" target="maincontent" action="<?php echo url_admin('savetop', 'config'); ?>">
            <ul class="list-items borderless">
              <li>关闭网站
                <input type="checkbox" class="make-switch" value="1" name="isclose" <?php if ($config['isclose'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-1color="success" data-on-text="&nbsp;&nbsp;是&nbsp;&nbsp;" data-off-color="default" data-off-text="&nbsp;&nbsp;否&nbsp;&nbsp;">
              </li>
              <li> 在线客服
                <input type="checkbox" class="make-switch" name="iskefu" value="1" <?php if ($config['iskefu'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="info" data-on-text="显示" data-off-color="default" data-off-text="关闭">
              </li>
              <li> 商城
                <input type="checkbox" class="make-switch" name="ismall" value="1" <?php if ($config['ismall'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="danger" data-on-text="开启" data-off-color="default" data-off-text="关闭">
              </li>
              <li style="display: none;"> 云邮件
                <input type="checkbox" class="make-switch" name="ismailsub" value="1" <?php if ($config['ismailsub'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="success" data-on-text="开启" data-off-color="default" data-off-text="关闭">
              </li>
              <li> 注册会员邮件认证
                <input type="checkbox" class="make-switch" name="ismailreg" value="1" <?php if ($config['ismailreg'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="success" data-on-text="开启" data-off-color="default" data-off-text="关闭">
              </li>
              <li> 表单发送到邮箱
                <input type="checkbox" class="make-switch" name="isfeedbackmail" value="1" <?php if ($config['isfeedbackmail'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="success" data-on-text="开启" data-off-color="default" data-off-text="关闭">
              </li>
              <li style="display: none;"> 生成静态HTML
                <input type="checkbox" class="make-switch" name="ishtml" value="1" <?php if ($config['ishtml'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="danger" data-on-text="开启" data-off-color="default" data-off-text="关闭">
              </li>
              <li> 验证方式
                <input type="checkbox" class="make-switch" name="verifymode" value="1" <?php if ($config['verifymode'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="warning" data-on-text="邮箱" data-off-color="default" data-off-text="手机">
              </li>
              <li style="display: none;"> 是否生成缩略图
                <input type="checkbox" class="make-switch" name="upload[isthumb]" value="1" <?php if ($config['upload']['isthumb'] == 1) : ?> checked <?php endif; ?> data-size="small" data-on-color="warning" data-on-text="是" data-off-color="default" data-off-text="否">
              </li>
              <li> 上传文件最大限制
                <input name="upload[maxsize]" class="form-control input-inline input-sm input-small" value="<?php echo $config['upload']['maxsize']; ?>" />
              </li>
            </ul>
            <div class="inner-content">
              <button class="btn btn-success">
                <?php if (!empty($config)) : ?>
                  <input type="hidden" name="id" value="<?php echo $config['id']; ?>">
                <?php endif; ?>
                <?php echo $this->hashurl['svp']; ?>
                <input name="yyact" type="hidden" value="edit">
                <i class="icon-settings"></i> 保存 </button>
            </div>
          </form>
        </div>

      </div>
    </aside>
    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
       immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
  </div>
  <!-- ./wrapper -->
  <!-- jQuery 2.2.3 -->
  <script src="<?php echo YUNYECMS_UI; ?>plugins/jQuery/jquery-3.6.1.min.js"></script>
  <!-- Bootstrap 3.3.6 -->
  <script src="<?php echo YUNYECMS_UI; ?>bootstrap/js/bootstrap.min.js"></script>
  <!-- FastClick -->
  <script src="<?php echo YUNYECMS_UI; ?>plugins/fastclick/fastclick.js"></script>
  <script src="<?php echo YUNYECMS_UI; ?>plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
  <!-- AdminLTE App -->
  <script src="<?php echo YUNYECMS_UI; ?>dist/js/adminlte.js"></script>
  <!-- AdminLTE for demo purposes -->
  <script src="<?php echo YUNYECMS_UI; ?>dist/js/admin.js"></script>
  <script src="<?php echo url_admin('getmenu', 'menu'); ?>"></script>
  <script language="javascript">
    $('.nav-sidebar').html(menu_yyinfo);
    // menuclick();
    $("#yyinfo").parent().addClass("active");
    $('.make-switch').bootstrapSwitch();
  </script>
</body>

</html>