function init()
 {
     parent::init();
     view_minify(Comm::config('admin_minify') ?: false);
     $t = $_GET['AdminThemeTryChange'];
     $t1 = Comm::config('admin_theme');
     if ($t) {
         $t1 = $t;
     }
     theme($t1 ?: 'admin');
 }
</div>  
<?php 
$this->end();
?>
  
  <?php 
return;
?>
<div class="blog-header">
      <div class="container">
        <h1 class="blog-title"><?php 
echo Comm::config('blog-title');
?>
</h1>
        <p class="lead blog-description"><?php 
echo Comm::config('blog-title-small');
?>
.</p>
      </div>
    </div>
    


<?php 
$this->start('body');
?>




<?php

$t1 = microtime(true);
use Cls\Comm;
?>
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title><?php 
echo Comm::config('front_title') . $title;
?>
</title>
		<meta name="description" content="">
		
		<link rel="shortcut icon" href="<?php 
echo url('favicon.png');
?>
">
		<link rel="stylesheet" href="<?php 
echo url('misc/bootstrap4/css/bootstrap.css');
?>
">
		<link rel="stylesheet" href="<?php 
echo theme_url('style.css');
?>
">
	    <meta name="viewport" content="width=device-width">
	    <meta name="generator" content="CMS">
	</head>
	<body>
<?php

use Cls\Comm;
?>
    

<header class="am-topbar am-topbar-fixed-top">
  <div class="am-container">
    <h1 class="am-topbar-brand">
      <a href="/"><?php 
echo Comm::config('front_title_logo');
?>
</a>
    </h1>

    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-secondary am-show-sm-only"
            data-am-collapse="{target: '#collapse-head'}"><span class="am-sr-only">导航切换</span> <span
        class="am-icon-bars"></span></button>

    <div class="am-collapse am-topbar-collapse" id="collapse-head">
      <ul class="am-nav am-nav-pills am-topbar-nav">
      
       <?php 
$menu = ['首页' => '/', '视频' => '/posts/video|video', '文章' => '/posts/default|default', '学拳指南' => '/guid|guid', '关于我们' => '/about|about'];
$uri = substr($_SERVER['REQUEST_URI'], 1);
foreach ($menu as $label => $v) {
    $ar = explode('|', $v);
    $murl = $ar[0];
    $select = explode(',', $ar[1]);
    if (!$select[0]) {
        $select = [''];
?>
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title><?php 
echo Cls\Comm::config('admin_title') ?: "admin_title at admin";
?>
</title>
		<meta name="description" content="">
		 <link rel="stylesheet" href="<?php 
echo url('misc/Font-Awesome/css/font-awesome.css');
?>
">
		<link rel="stylesheet" href="<?php 
echo theme_url('/css/' . (Comm::config('admin_bootstrap_css') ?: 'cerulean') . '.bootstrap.min.css');
?>
">
		<link rel="shortcut icon" href="<?php 
echo url('favicon.png');
?>
">
		<link rel="stylesheet" href="<?php 
echo theme_url('/css/style.css');
?>
">
	    <meta name="viewport" content="width=device-width">
	    <meta name="generator" content="CMS">
	</head>
	<body >
	
$this->layout('main');
$v = theme_get_post('home');
$this->start('body');
?>

<div class="get">
  <div class="am-g">
    <div class="am-u-lg-12">
      <h1 class=""><?php 
echo Comm::config('home_index') ?: 'config home_index key';
?>
</h1>

      <p>
        <?php 
echo Comm::config('home_index_value') ?: 'config home_index_value key';
?>
      </p>

      
    </div>
  </div>
</div>

<div class='am-container top' >
		 
        
</div> 

 
 
?>
		
	</select>
</form>

<form id='choiceTheme2' action="" method="get">
	<small>选择主题&nbsp;</small>
	<select name="AdminThemeTryChange" id="AdminThemeTryChange">
		<?php 
$css = config('app.admin_theme');
?>
		<?php 
foreach ($css as $v) {
    ?>
			<option <?php 
    if ($v == Comm::config('admin_theme')) {
        ?>
 selected<?php 
    }
    ?>
 value="<?php 
    echo $v;
    ?>
"><?php 
    echo $v;
    ?>
</option>
		<?php 
}
?>
		
<?php

use Cls\Comm;
?>
 <footer class="blog-footer">
      <p>
      
      <?php 
echo Comm::config('footer');
?>
      </p>
    </footer>
<?php

use Cls\Comm;
Comm::set_admin_theme_css();
?>

        

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" 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">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭窗口</button>
      </div>
    </div>
  </div>
</div>



<!-- Modal -->
<div class="modal fade" id="myModalRemove" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog " role="document">
 function _log($str)
 {
     $str .= "IP: " . Comm::ip() . " User ID:" . cookie('adminId') . " UserName:" . cookie('adminUser');
     log_sys($str);
 }
		 
		      <?php 
foreach ($datas as $v) {
    $i++;
    ?>
		      <li class="am-g">
		          <a href="/post/<?php 
    echo $v->slug;
    ?>
" class="am-list-item-hd "><?php 
    echo $v->title;
    ?>
</a>
		
					<div class="am-list-item-text"><?php 
    echo Cls\Comm::b($v->body, 1000);
    ?>
</div>
		
		      </li>
		      <?php 
}
?>
		  </ul>
		  </div>

</div>
    
	 
        
        
<?php

use Cls\Comm;
$ip = Comm::ip();
if (in_array($ip, ['127.0.0.1', '::1'])) {
    $c['host'] = '127.0.0.1';
    $c['db'] = 'aaa';
    $c['cmd'] = "/Library/WebServer/Documents/mongo/";
} else {
    error_reporting(0);
    $c['host'] = '127.0.0.1:12722';
    $c['db'] = 'demo';
    $c['cmd'] = "/data/mongodb/bin/";
}
return $c;