Index.php
885 Bytes
<?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')));
}
// 渲染模板
$this->_view->display('index', array(
'background' => Index\HomeModel::getBgImage(),
'channelPage' => true,
'showDownloadApp'=>true,
'searchUrl' => Helpers::url('', null, 'search'),
'pageFooter' => true,
));
}
}