调整基础模板结构

This commit is contained in:
邹景立 2017-02-15 17:02:16 +08:00
parent 3c2cb947fc
commit 90f5a26642
2 changed files with 17 additions and 1 deletions

View File

@ -58,7 +58,14 @@ class Index extends BasicAdmin {
$version = Db::query('select version() as ver');
$version = array_pop($version);
$this->assign('mysql_ver', $version['ver']);
$this->assign('title', '系统信息');
if (session('user.username') === 'admin' && session('user.password') === '662af1cd1976f09a9f8cecc868ccc0a2') {
$alert = [
'type' => 'danger',
'title' => '安全提示',
'content' => '超级管理员默认密码未修改,建议马上修改!'
];
$this->assign('alert', $alert);
}
return view();
}

View File

@ -6,6 +6,15 @@
</div>
{/if}
<div class="ibox-content fadeInUp animated">
{if isset($alert)}
<div class="alert alert-{$alert.type} alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
{if isset($alert['title'])}<strong>{$alert.title}</strong><br/>{/if}
{if isset($alert['content'])}<p>{$alert.content}</p>{/if}
</div>
{/if}
{block name="content"}
{/block}
</div>