adding zend project folders into old campcaster.
This commit is contained in:
parent
56abfaf28e
commit
7ef0c18b26
4045 changed files with 1054952 additions and 0 deletions
53
application/controllers/ScheduleController.php
Normal file
53
application/controllers/ScheduleController.php
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
class ScheduleController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
if(!Zend_Auth::getInstance()->hasIdentity())
|
||||
{
|
||||
$this->_redirect('login/index');
|
||||
}
|
||||
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('event-feed', 'json')
|
||||
->addActionContext('add-show-dialog', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/campcaster/schedule/schedule.js','text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/schedule.css');
|
||||
}
|
||||
|
||||
public function eventFeedAction()
|
||||
{
|
||||
$start = $this->_getParam('start', null);
|
||||
$end = $this->_getParam('end', null);
|
||||
$weekday = $this->_getParam('weekday', null);
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$show = new Show($userInfo->type);
|
||||
$this->view->events = $show->getFullCalendarEvents($start, $end, $weekday);
|
||||
}
|
||||
|
||||
public function addShowDialogAction()
|
||||
{
|
||||
$user = new User();
|
||||
|
||||
$this->view->hosts = $user->getHosts();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue