<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:39:"template/index/default/Index_index.html";i:1554774226;s:43:"./template/index/default/Public_header.html";i:1554613563;s:43:"./template/index/default/Public_footer.html";i:1554716162;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>        <?php
                $name = think\Db::name('system')->where(['name'=> 'site_title'])->value('value');
                echo $name;
                ?></title>
<meta name="keywords" content="<?php if(isset($keywords)): ?><?php echo $keywords; else: 
                $name = think\Db::name('system')->where(['name'=> 'site_keywords'])->value('value');
                echo $name;
                endif; ?>" />
<meta name="description" content="<?php if(isset($description)): ?><?php echo $description; else: 
                $name = think\Db::name('system')->where(['name'=> 'site_description'])->value('value');
                echo $name;
                endif; ?>" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/jumbotron.css">
</head>
<body>
<!--header--> 
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">切换导航</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="<?php echo url('index/index'); ?>">MyCMS</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
			<ul class="nav navbar-nav">
                        <?php
               $__LIST__ = getAllCategory("0","","0");

                foreach($__LIST__ as $key => $nav):
                ?>
				<li><a href="<?php echo $nav['url']; ?>" title="<?php echo $nav['ename']; ?>"><?php echo $nav['name']; ?></a></li>
				<?php endforeach; ?>
			</ul>
        </div>
      </div>
    </nav> 
<!--main-->
<div class="jumbotron">
  <div class="container">
    <h2>AQBox for Web集成环境</h2>
    <p>AQBox for Web开发集成环境（AQ取意安全、Box取意开箱即用）。AQBox集成了Nginx 1.15.8、MySQL 5.7.25、PHP 5.6.40、FileZilla server 0.941等开源软件，结合明易科技自主开发的WebSockets通信管理模块和MyCMS内容管理系统，致力于给用户打造一个零技术门槛，开箱即用的安全服务器开发生产环境。</p>
    <p><a class="btn btn-primary btn-lg" href="/index/show/index/cid/3/id/2.html" role="button">下载试用 &raquo;</a></p>
  </div>
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
  <div class="col-md-4">
    <h2>关于我们</h2>
	<a href="#" class="thumbnail"><img src="/uploads/ueditor/php/upload/image/20190408/1554714901315250.jpg" width="350"> </a>
    <p>        <?php
                $content = think\Db::name('category')->where(['id'=> 4])->value('description');
                if ("200" > 0){
                    $content = msubstr(strip_tags($content),0,200);
                }
                echo $content;
                ?></p>
    <p><a class="btn btn-default" href="/index/listing/index/cid/4.html" role="button">查看更多 &raquo;</a></p>
  </div>
  <div class="col-md-4">
    <h2>最新动态</h2>
    <p>
    <ul class="list-group">
		        <?php
                $condition['status'] = 0;

                /*存在子类，则获取子类下的文章*/
                if(0){
                    $condition['cid'] = 0;
                    $children_ids = think\Db::name('category')->field('id')->where('pid',$condition['cid'])->select();
                    $children_ids = array_column($children_ids,'id');
                }
                $list = think\Db::name('article')->where($condition);
                if(isset($children_ids) && $children_ids){
                     $list = $list->whereor(['cid' => ['in',$children_ids], 'status' => 0]);
                 }

                if("" != ''){
                    $list=$list->field("");
                }

                if("" != ''){
                    $list=$list->order("");
                }

                if(0 > 0){
                    $list=$list->paginate(0);
                    $page = $list->render();
                }else{
                    if(7 != 0){
                        $list=$list->limit(7);
                    }
                    $list=$list->select();

                }

                $__LIST__ = $list;
                foreach($__LIST__ as $key => $article):
                $article['url'] = url('index/show/index',['cid' => $article['cid'],'id' => $article['id']]);
                ?>
      <li class="list-group-item"><a href="<?php echo $article['url']; ?>"><?php echo $article['title']; ?></a>  [<?php echo date('m-d',$article['publishtime']); ?>]</li>
		 <?php endforeach;?>
    </ul>
    </p>
    <p><a class="btn btn-default" href="/index/listing/index/cid/1.html" role="button">查看更多 &raquo;</a></p>
  </div>
  <div class="col-md-4">
    <h2>最新产品</h2>
    <p>
		        <?php
                $list = think\Db::name('product')->where(['status' => 0]);
                if (0 != 0){
                    $list=$list->where(['cid'=> 0]);
                }
                if("" != ''){
                    $list=$list->field("");
                }

                if("" != ''){
                    $list=$list->order("");
                }

                if(0 > 0){
                    $list=$list->paginate(0);
                    $page = $list->render();
                }else{
                    if(10 != 0){
                        $list=$list->limit(10);
                    }
                    $list=$list->select();

                }

                $__LIST__ = $list;
                foreach($__LIST__ as $key => $product):
                    $product['url'] = url('index/show/index',['cid' => $product['cid'],'id' => $product['id']]);
                ?>
		<div class="media">
            <a href="<?php echo $product['url']; ?>" class="media-left media-middle media-bottom">
                <img width="64" class="thumbnail" src="<?php echo $product['litpic']; ?>" alt="<?php echo $product['title']; ?>" />
            </a>
            <div class="media-body">
                <h4 class="media-heading"><?php echo $product['title']; ?></h4>
                <p>KM盒子是一款支持图文表格、音频视频混合排版的APP制作软件。</p>
            </div>
        </div>
	   <?php endforeach; ?>
    </p>
    <p><a class="btn btn-default" href="/index/listing/index/cid/2.html" role="button">查看更多 &raquo;</a></p>
  </div>
</div>
<!--footer--> 
<div class="footer">
  <p align="center"> 友情链接： 
            <?php
               $__LIST__ = think\Db::name('flink')->where(['type'=> 1,'status' => 0]);
               if("5" != ''){
                        $__LIST__=$__LIST__->limit(5);
                    }
                $__LIST__=$__LIST__->select();

                foreach($__LIST__ as $key => $anlink):
                ?><a href="<?php echo $anlink['url']; ?>"><?php echo $anlink['title']; ?></a> <?php endforeach; ?> </p>
	<hr>
  <div class="container">版权所有 &copy; 2019 明易科技 QQ763809988 </div>
</div>
<div id="gotop"><a class="gotop"></a></div>
</div>
<!-- /container --> 
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
<script>
$("#gotop").hide();
$(window).scroll(function () {
    if ($(window).scrollTop() > 100) {
        $("#gotop").fadeIn();
    } else {
        $("#gotop").fadeOut();
    }
});
$("#gotop").click(function () {
    $('html,body').animate({
        'scrollTop': 0
    }, 500);
});
</script>
</body>
</html>