Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aboutazhang
221900239
提交
07e1d5c8
221900239
项目概览
aboutazhang
/
221900239
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
221900239
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
07e1d5c8
编写于
2月 14, 2022
作者:
aboutazhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Initial commit
上级
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
85 addition
and
0 deletion
+85
-0
main.php
main.php
+85
-0
未找到文件。
main.php
0 → 100644
浏览文件 @
07e1d5c8
<?php
/* @var $this \yii\web\View */
/* @var $content string */
use
backend\assets\AppAsset
;
use
yii\helpers\Html
;
use
yii\bootstrap\Nav
;
use
yii\bootstrap\NavBar
;
use
yii\widgets\Breadcrumbs
;
use
common\widgets\Alert
;
use
common\models\Comment
;
AppAsset
::
register
(
$this
);
?>
<?php
$this
->
beginPage
()
?>
<!DOCTYPE html>
<html
lang=
"
<?=
Yii
::
$app
->
language
?>
"
>
<head>
<meta
charset=
"
<?=
Yii
::
$app
->
charset
?>
"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<?=
Html
::
csrfMetaTags
()
?>
<title>
<?=
Html
::
encode
(
$this
->
title
)
?>
</title>
<?php
$this
->
head
()
?>
</head>
<body>
<?php
$this
->
beginBody
()
?>
<div
class=
"wrap"
>
<?php
NavBar
::
begin
([
'brandLabel'
=>
'MyBlog'
,
'brandUrl'
=>
Yii
::
$app
->
homeUrl
,
'options'
=>
[
'class'
=>
'navbar-inverse navbar-fixed-top'
,
],
]);
if
(
Yii
::
$app
->
user
->
isGuest
)
{
$menuItems
[]
=
[
'label'
=>
'登录'
,
'url'
=>
[
'/site/login'
]];
}
else
{
$menuItems
=
[
[
'label'
=>
'文章管理'
,
'url'
=>
[
'/post/index'
]],
[
'label'
=>
'评论管理'
,
'url'
=>
[
'/comment/index'
]],
'<li><span class="badge badge-inverse">'
.
Comment
::
getPengdingCommentCount
()
.
'</span></li>'
,
[
'label'
=>
'用户管理'
,
'url'
=>
[
'/user/index'
]],
[
'label'
=>
'管理员'
,
'url'
=>
[
'/adminuser/index'
]],
];
$menuItems
[]
=
'<li>'
.
Html
::
beginForm
([
'/site/logout'
],
'post'
)
.
Html
::
submitButton
(
'注销 ('
.
Yii
::
$app
->
user
->
identity
->
username
.
')'
,
[
'class'
=>
'btn btn-link'
]
)
.
Html
::
endForm
()
.
'</li>'
;
}
echo
Nav
::
widget
([
'options'
=>
[
'class'
=>
'navbar-nav navbar-right'
],
'items'
=>
$menuItems
,
]);
NavBar
::
end
();
?>
<div
class=
"container"
>
<?=
Breadcrumbs
::
widget
([
'links'
=>
isset
(
$this
->
params
[
'breadcrumbs'
])
?
$this
->
params
[
'breadcrumbs'
]
:
[],
])
?>
<?=
Alert
::
widget
()
?>
<?=
$content
?>
</div>
</div>
<footer
class=
"footer"
>
<div
class=
"container"
>
<p
class=
"pull-left"
>
©
061900408龚嘉怡_221900239张书旖的博客系统
<?=
date
(
'Y'
)
?>
</p>
<p
class=
"pull-right"
>
<?=
Yii
::
powered
()
?>
</p>
</div>
</footer>
<?php
$this
->
endBody
()
?>
</body>
</html>
<?php
$this
->
endPage
()
?>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录