Index.php
1.98 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
use Action\WebAction;
use Index\HomeModel;
/**
* 默认控制器
*/
class IndexController extends WebAction
{
/**
* 男生首页
*/
public function indexAction()
{
if (null !== $this->get('go')) {
// 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
HomeModel::goSwitchChannel();
} else {
// 设置客户端浏览器1分钟内不改变
$this->setLastModified(mktime(date('H'), date('i'), 0, date('n'), date('j'), date('Y')));
// 设置浏览器缓存1分钟
$this->setExpires(60);
}
// 传递模板数据,渲染模板
$this->setWebNavHeader(HomeModel::COOKIE_NAME_BOYS);
$data = array(
'boysHomePage' => true,
'footerTop'=> true,
'boys' => HomeModel::getChannelResource(HomeModel::COOKIE_NAME_BOYS, HomeModel::CODE_BOYS_CHANNEL)
);
$this->_view->display('index', $data);
}
public function settledAction()
{
$this->_view->display('../about/settled', array('settledPage' => true));
}
public function applyAction()
{
$this->_view->display('../about/settled-apply', array('settledPage' => true));
}
public function yohobuyAction()
{
$this->_view->display('../about/yohobuy');
}
public function newpowerAction()
{
$this->_view->display('../about/newpower');
}
public function contactAction()
{
$this->_view->display('../about/contact');
}
public function linkAction()
{
$this->_view->display('../about/link');
}
public function privacyAction()
{
$this->_view->display('../about/privacy');
}
/**
* 四个导航
*/
public function guideAction()
{
$list = HomeModel::getIndexGuide();
$this->_view->display('guide', array('list' => $list));
}
}