Index.php
1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
use Action\AbstractAction;
use Plugin\Helpers;
/**
* 频道选择
*/
class IndexController extends AbstractAction
{
/**
* 频道选择页
*/
public function indexAction()
{
if (null !== $this->get('go')) {
// 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
Index\HomeModel::goSwitchChannel();
} else {
// 设置客户端浏览器1小时内不改变,
$this->setLastModified(mktime(date('H'), 0, 0, date('n'), date('j'), date('Y')));
// 设置浏览器缓存5分钟
$this->setExpires(300);
}
// 渲染模板
$this->_view->display('index', array(
'background' => Index\HomeModel::getBgImage(),
'channelPage' => true,
'showDownloadApp'=>true,
'searchUrl' => Helpers::url('', null, 'search'),
'pageFooter' => true,
));
}
/**
* 设置升级公告路由
*
*/
public function systemUpdate()
{
$this->_view->display('systemUpdate','');
}
}