<?php
/*
* 项目: iOrange(橘子)
* 作者: 离家出走(yzxh24)
* Email: yzxh24@gmail.com
* 主页: www.iorange.cc
*/
/* vim: set ts=4 sw=4: */
class DefaultController extends BaseController
{
    public $actionMap = array(
        'index' => 'IndexAction',
        'detail' => 'DetailAction',
        'join' => 'JoinAction',
        'joinlist' => 'JoinListAction',
        'history' => 'HistoryAction',
        'append' => 'AppendAction',
    );
    
    public function begin()
    {
        return (date('N') > 1) ? date('Y-m-d', strtotime('last Monday')) . ' 00:00:00' : date('Y-m-d', strtotime('Monday')) . ' 00:00:00';
    }
    
    public function end()
    {
        return date('Y-m-d', strtotime('Sunday')) . ' 23:59:59';
    }
}