2010-12-07 20:19:27 +01:00
< ? php
class ScheduleController extends Zend_Controller_Action
{
2011-02-09 20:12:07 +01:00
2011-01-28 06:23:39 +01:00
protected $sched_sess = null ;
2010-12-07 20:19:27 +01:00
public function init ()
{
2011-02-09 20:12:07 +01:00
$ajaxContext = $this -> _helper -> getHelper ( 'AjaxContext' );
2010-12-07 20:19:27 +01:00
$ajaxContext -> addActionContext ( 'event-feed' , 'json' )
2011-02-01 23:41:19 +01:00
-> addActionContext ( 'make-context-menu' , 'json' )
2010-12-08 06:47:51 +01:00
-> addActionContext ( 'add-show-dialog' , 'json' )
2010-12-09 23:02:37 +01:00
-> addActionContext ( 'add-show' , 'json' )
2010-12-10 21:44:36 +01:00
-> addActionContext ( 'move-show' , 'json' )
2010-12-10 23:59:57 +01:00
-> addActionContext ( 'resize-show' , 'json' )
2010-12-16 00:53:47 +01:00
-> addActionContext ( 'delete-show' , 'json' )
2010-12-16 04:33:45 +01:00
-> addActionContext ( 'schedule-show' , 'json' )
2011-01-15 20:59:41 +01:00
-> addActionContext ( 'schedule-show-dialog' , 'json' )
2011-02-03 00:08:22 +01:00
-> addActionContext ( 'show-content-dialog' , 'json' )
2010-12-22 00:28:17 +01:00
-> addActionContext ( 'clear-show' , 'json' )
-> addActionContext ( 'get-current-playlist' , 'json' )
2011-01-28 00:38:02 +01:00
-> addActionContext ( 'find-playlists' , 'json' )
2011-01-15 19:10:10 +01:00
-> addActionContext ( 'remove-group' , 'json' )
2011-02-09 20:12:07 +01:00
-> addActionContext ( 'edit-show' , 'json' )
2011-02-10 21:00:55 +01:00
-> addActionContext ( 'add-show' , 'json' )
2011-02-12 23:21:37 +01:00
-> addActionContext ( 'cancel-show' , 'json' )
2010-12-07 20:19:27 +01:00
-> initContext ();
2011-01-15 20:59:41 +01:00
$this -> sched_sess = new Zend_Session_Namespace ( " schedule " );
2010-12-07 20:19:27 +01:00
}
public function indexAction ()
{
2011-02-10 21:00:55 +01:00
$this -> view -> headScript () -> appendFile ( '/js/contextmenu/jjmenu.js' , 'text/javascript' );
2011-01-28 00:38:02 +01:00
$this -> view -> headScript () -> appendFile ( '/js/datatables/js/jquery.dataTables.js' , 'text/javascript' );
2011-01-28 06:23:39 +01:00
$this -> view -> headScript () -> appendFile ( '/js/fullcalendar/fullcalendar.min.js' , 'text/javascript' );
2011-01-29 00:24:52 +01:00
$this -> view -> headScript () -> appendFile ( '/js/timepicker/jquery.ui.timepicker-0.0.6.js' , 'text/javascript' );
2011-01-28 17:34:57 +01:00
$this -> view -> headScript () -> appendFile ( '/js/colorpicker/js/colorpicker.js' , 'text/javascript' );
$this -> view -> headScript () -> appendFile ( '/js/airtime/schedule/full-calendar-functions.js' , 'text/javascript' );
$this -> view -> headScript () -> appendFile ( '/js/airtime/schedule/add-show.js' , 'text/javascript' );
2011-02-10 06:17:07 +01:00
$this -> view -> headScript () -> appendFile ( '/js/airtime/schedule/schedule.js' , 'text/javascript' );
2011-01-28 17:34:57 +01:00
2011-01-31 02:11:18 +01:00
$this -> view -> headLink () -> appendStylesheet ( '/css/jquery-ui-timepicker.css' );
2011-01-29 00:24:52 +01:00
$this -> view -> headLink () -> appendStylesheet ( '/css/fullcalendar.css' );
2011-01-28 17:34:57 +01:00
$this -> view -> headLink () -> appendStylesheet ( '/css/colorpicker/css/colorpicker.css' );
$this -> view -> headLink () -> appendStylesheet ( '/css/add-show.css' );
2011-02-10 06:20:03 +01:00
$this -> view -> headLink () -> appendStylesheet ( '/css/contextmenu.css' );
2011-01-28 17:34:57 +01:00
$request = $this -> getRequest ();
$formWhat = new Application_Form_AddShowWhat ();
$formWhat -> removeDecorator ( 'DtDdWrapper' );
$formWho = new Application_Form_AddShowWho ();
$formWho -> removeDecorator ( 'DtDdWrapper' );
$formWhen = new Application_Form_AddShowWhen ();
$formWhen -> removeDecorator ( 'DtDdWrapper' );
$formRepeats = new Application_Form_AddShowRepeats ();
$formRepeats -> removeDecorator ( 'DtDdWrapper' );
$formStyle = new Application_Form_AddShowStyle ();
$formStyle -> removeDecorator ( 'DtDdWrapper' );
2011-02-10 21:00:55 +01:00
$this -> view -> what = $formWhat ;
2011-01-28 17:34:57 +01:00
$this -> view -> when = $formWhen ;
$this -> view -> repeats = $formRepeats ;
$this -> view -> who = $formWho ;
$this -> view -> style = $formStyle ;
2011-02-10 17:25:28 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
$user = new User ( $userInfo -> id );
$this -> view -> isAdmin = $user -> isAdmin ();
2010-12-08 06:47:51 +01:00
}
2011-02-10 06:17:07 +01:00
public function eventFeedAction ()
{
$start = $this -> _getParam ( 'start' , null );
$end = $this -> _getParam ( 'end' , null );
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
$user = new User ( $userInfo -> id );
if ( $user -> isAdmin ())
$editable = true ;
else
$editable = false ;
$this -> view -> events = Show :: getFullCalendarEvents ( $start , $end , $editable );
}
2010-12-09 20:33:34 +01:00
public function moveShowAction ()
2010-12-08 06:47:51 +01:00
{
2010-12-09 20:33:34 +01:00
$deltaDay = $this -> _getParam ( 'day' );
2011-01-28 17:34:57 +01:00
$deltaMin = $this -> _getParam ( 'min' );
2011-02-05 22:00:05 +01:00
$showInstanceId = $this -> _getParam ( 'showInstanceId' );
2011-01-28 17:34:57 +01:00
2011-02-06 02:39:35 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
2011-02-09 19:03:46 +01:00
$user = new User ( $userInfo -> id );
2011-02-06 02:39:35 +01:00
if ( $user -> isAdmin ()) {
$show = new ShowInstance ( $showInstanceId );
$error = $show -> moveShow ( $deltaDay , $deltaMin );
}
2011-01-28 17:34:57 +01:00
2011-02-05 23:19:54 +01:00
if ( isset ( $error ))
$this -> view -> error = $error ;
2010-12-09 20:33:34 +01:00
}
public function resizeShowAction ()
{
2010-12-10 18:15:17 +01:00
$deltaDay = $this -> _getParam ( 'day' );
2011-01-28 17:34:57 +01:00
$deltaMin = $this -> _getParam ( 'min' );
2011-02-05 22:00:05 +01:00
$showInstanceId = $this -> _getParam ( 'showInstanceId' );
2011-01-28 17:34:57 +01:00
2011-02-06 02:39:35 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
2011-02-09 19:03:46 +01:00
$user = new User ( $userInfo -> id );
2011-02-06 02:39:35 +01:00
if ( $user -> isAdmin ()) {
$show = new ShowInstance ( $showInstanceId );
$error = $show -> resizeShow ( $deltaDay , $deltaMin );
}
2011-01-28 17:34:57 +01:00
2011-02-05 23:19:54 +01:00
if ( isset ( $error ))
$this -> view -> error = $error ;
2010-12-07 20:19:27 +01:00
}
2010-12-10 23:59:57 +01:00
public function deleteShowAction ()
{
2011-02-06 02:39:35 +01:00
$showInstanceId = $this -> _getParam ( 'id' );
2011-02-12 23:21:37 +01:00
2011-01-28 17:34:57 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
2011-02-09 19:03:46 +01:00
$user = new User ( $userInfo -> id );
2011-02-06 02:39:35 +01:00
if ( $user -> isAdmin ()) {
$show = new ShowInstance ( $showInstanceId );
$show -> deleteShow ();
}
2010-12-10 23:59:57 +01:00
}
2010-12-14 20:58:34 +01:00
public function makeContextMenuAction ()
{
2011-02-01 23:41:19 +01:00
$id = $this -> _getParam ( 'id' );
$today_timestamp = date ( " Y-m-d H:i:s " );
2011-02-03 00:08:22 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
2011-02-09 19:03:46 +01:00
$user = new User ( $userInfo -> id );
2011-02-03 00:08:22 +01:00
2011-02-06 01:10:34 +01:00
$show = new ShowInstance ( $id );
$params = '/format/json/id/#id#' ;
2011-02-01 23:41:19 +01:00
2011-02-14 13:30:52 +01:00
if ( strtotime ( $today_timestamp ) < strtotime ( $show -> getShowStart ())) {
if ( $user -> isHost ( $show -> getShowId ()) || $user -> isAdmin ()) {
$menu [] = array ( 'action' => array ( 'type' => 'ajax' , 'url' => '/Schedule/schedule-show-dialog' . $params , 'callback' => 'window["buildScheduleDialog"]' ), 'title' => 'Add Content' );
}
}
$menu [] = array ( 'action' => array ( 'type' => 'ajax' , 'url' => '/Schedule/show-content-dialog' . $params , 'callback' => 'window["buildContentDialog"]' ),
'title' => 'Show Content' );
2011-03-10 04:25:02 +01:00
if ( strtotime ( $show -> getShowStart ()) <= strtotime ( $today_timestamp ) &&
strtotime ( $today_timestamp ) < strtotime ( $show -> getShowEnd ())) {
$menu [] = array ( 'action' => array ( 'type' => 'fn' ,
//'url' => '/Schedule/cancel-current-show'.$params,
'callback' => " window['confirmCancelShow']( $id ) " ),
'title' => 'Cancel Current Show' );
}
2011-02-14 13:30:52 +01:00
if ( strtotime ( $today_timestamp ) < strtotime ( $show -> getShowStart ())) {
if ( $user -> isAdmin ()) {
2011-02-14 13:05:22 +01:00
$menu [] = array ( 'action' => array ( 'type' => 'ajax' , 'url' => '/Schedule/delete-show' . $params , 'callback' => 'window["scheduleRefetchEvents"]' ), 'title' => 'Delete This Instance' );
$menu [] = array ( 'action' => array ( 'type' => 'ajax' , 'url' => '/Schedule/cancel-show' . $params , 'callback' => 'window["scheduleRefetchEvents"]' ), 'title' => 'Delete This Instance and All Following' );
2011-02-06 02:39:35 +01:00
}
2011-02-14 13:30:52 +01:00
if ( $user -> isHost ( $show -> getShowId ()) || $user -> isAdmin ()) {
$menu [] = array ( 'action' => array ( 'type' => 'ajax' , 'url' => '/Schedule/clear-show' . $params , 'callback' => 'window["scheduleRefetchEvents"]' ), 'title' => 'Remove All Content' );
2011-02-03 00:08:22 +01:00
}
2011-02-01 23:41:19 +01:00
}
2011-02-03 00:08:22 +01:00
2011-02-01 23:41:19 +01:00
//returns format jjmenu is looking for.
die ( json_encode ( $menu ));
2010-12-14 20:58:34 +01:00
}
2010-12-16 00:53:47 +01:00
public function scheduleShowAction ()
2011-02-03 00:08:22 +01:00
{
2011-02-09 20:12:07 +01:00
$showInstanceId = $this -> sched_sess -> showInstanceId ;
2011-01-14 00:27:44 +01:00
$search = $this -> _getParam ( 'search' , null );
2011-01-15 20:59:41 +01:00
$plId = $this -> _getParam ( 'plId' );
2011-01-14 00:27:44 +01:00
if ( $search == " " ) {
$search = null ;
}
2010-12-16 00:53:47 +01:00
2011-01-13 22:24:10 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
2011-02-09 19:03:46 +01:00
$user = new User ( $userInfo -> id );
2011-02-06 01:10:34 +01:00
$show = new ShowInstance ( $showInstanceId );
2010-12-16 04:33:45 +01:00
2011-02-11 06:10:56 +01:00
if ( $user -> isHost ( $show -> getShowId ()) || $user -> isAdmin ()) {
2011-02-06 01:10:34 +01:00
$show -> scheduleShow ( array ( $plId ));
2011-02-06 00:20:51 +01:00
}
2011-01-12 21:47:44 +01:00
2011-02-06 01:10:34 +01:00
$this -> view -> showContent = $show -> getShowContent ();
$this -> view -> timeFilled = $show -> getTimeScheduled ();
2011-03-06 06:08:02 +01:00
$this -> view -> percentFilled = $show -> getPercentScheduled ();
2011-01-16 00:23:15 +01:00
2011-01-13 22:24:10 +01:00
$this -> view -> chosen = $this -> view -> render ( 'schedule/scheduled-content.phtml' );
unset ( $this -> view -> showContent );
2010-12-16 00:53:47 +01:00
}
2010-12-16 04:33:45 +01:00
public function clearShowAction ()
{
2011-02-06 01:10:34 +01:00
$showInstanceId = $this -> _getParam ( 'id' );
2011-01-28 06:23:39 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
2011-02-09 19:03:46 +01:00
$user = new User ( $userInfo -> id );
2011-02-06 01:10:34 +01:00
$show = new ShowInstance ( $showInstanceId );
2011-02-11 06:10:56 +01:00
if ( $user -> isHost ( $show -> getShowId ()) || $user -> isAdmin ())
2011-02-06 01:10:34 +01:00
$show -> clearShow ();
2010-12-16 04:33:45 +01:00
}
2010-12-22 00:28:17 +01:00
public function getCurrentPlaylistAction ()
{
$this -> view -> entries = Schedule :: GetPlayOrderRange ();
}
2010-12-07 20:19:27 +01:00
2011-01-10 19:24:21 +01:00
public function findPlaylistsAction ()
{
2011-02-09 20:12:07 +01:00
$post = $this -> getRequest () -> getPost ();
2011-02-12 23:21:37 +01:00
2011-02-06 01:10:34 +01:00
$show = new ShowInstance ( $this -> sched_sess -> showInstanceId );
$playlists = $show -> searchPlaylistsForShow ( $post );
2011-01-28 00:38:02 +01:00
//for datatables
die ( json_encode ( $playlists ));
2011-01-15 19:10:10 +01:00
}
public function removeGroupAction ()
{
2011-02-06 01:10:34 +01:00
$showInstanceId = $this -> sched_sess -> showInstanceId ;
2011-01-15 19:10:10 +01:00
$group_id = $this -> _getParam ( 'groupId' );
$search = $this -> _getParam ( 'search' , null );
2011-02-06 02:39:35 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
2011-02-09 19:03:46 +01:00
$user = new User ( $userInfo -> id );
2011-02-06 02:39:35 +01:00
$show = new ShowInstance ( $showInstanceId );
2011-02-11 06:10:56 +01:00
if ( $user -> isHost ( $show -> getShowId ()) || $user -> isAdmin ()) {
2011-02-06 02:39:35 +01:00
$show -> removeGroupFromShow ( $group_id );
}
2011-01-15 19:10:10 +01:00
2011-02-06 01:10:34 +01:00
$this -> view -> showContent = $show -> getShowContent ();
$this -> view -> timeFilled = $show -> getTimeScheduled ();
2011-03-06 06:08:02 +01:00
$this -> view -> percentFilled = $show -> getPercentScheduled ();
2011-01-15 19:10:10 +01:00
$this -> view -> chosen = $this -> view -> render ( 'schedule/scheduled-content.phtml' );
unset ( $this -> view -> showContent );
2011-01-10 19:24:21 +01:00
}
2011-01-15 19:10:10 +01:00
2011-01-15 20:59:41 +01:00
public function scheduleShowDialogAction ()
{
2011-02-09 20:12:07 +01:00
$showInstanceId = $this -> _getParam ( 'id' );
2011-02-06 01:42:03 +01:00
$this -> sched_sess -> showInstanceId = $showInstanceId ;
2011-02-06 01:10:34 +01:00
$show = new ShowInstance ( $showInstanceId );
2011-02-06 01:42:03 +01:00
$start_timestamp = $show -> getShowStart ();
$end_timestamp = $show -> getShowEnd ();
2011-02-07 05:58:58 +01:00
//check to make sure show doesn't overlap.
if ( Show :: getShows ( $start_timestamp , $end_timestamp , array ( $showInstanceId ))) {
$this -> view -> error = " cannot schedule an overlapping show. " ;
return ;
}
2011-02-06 01:42:03 +01:00
2011-02-02 21:39:25 +01:00
$start = explode ( " " , $start_timestamp );
$end = explode ( " " , $end_timestamp );
$startTime = explode ( " : " , $start [ 1 ]);
$endTime = explode ( " : " , $end [ 1 ]);
2011-02-08 21:06:31 +01:00
$dateInfo_s = getDate ( strtotime ( $start_timestamp ));
$dateInfo_e = getDate ( strtotime ( $end_timestamp ));
2011-01-28 17:34:57 +01:00
2011-02-06 01:42:03 +01:00
$this -> view -> showContent = $show -> getShowContent ();
$this -> view -> timeFilled = $show -> getTimeScheduled ();
2011-02-01 17:43:52 +01:00
$this -> view -> showName = $show -> getName ();
2011-02-06 01:42:03 +01:00
$this -> view -> showLength = $show -> getShowLength ();
2011-03-06 06:08:02 +01:00
$this -> view -> percentFilled = $show -> getPercentScheduled ();
2011-01-28 17:34:57 +01:00
2011-02-08 21:06:31 +01:00
$this -> view -> s_wday = $dateInfo_s [ 'weekday' ];
$this -> view -> s_month = $dateInfo_s [ 'month' ];
$this -> view -> s_day = $dateInfo_s [ 'mday' ];
$this -> view -> e_wday = $dateInfo_e [ 'weekday' ];
$this -> view -> e_month = $dateInfo_e [ 'month' ];
$this -> view -> e_day = $dateInfo_e [ 'mday' ];
2011-02-02 21:39:25 +01:00
$this -> view -> startTime = sprintf ( " %d:%02d " , $startTime [ 0 ], $startTime [ 1 ]);
$this -> view -> endTime = sprintf ( " %d:%02d " , $endTime [ 0 ], $endTime [ 1 ]);
2011-01-28 17:34:57 +01:00
$this -> view -> chosen = $this -> view -> render ( 'schedule/scheduled-content.phtml' );
$this -> view -> dialog = $this -> view -> render ( 'schedule/schedule-show-dialog.phtml' );
unset ( $this -> view -> showContent );
2011-01-28 06:23:39 +01:00
}
2011-01-15 20:59:41 +01:00
2011-02-03 00:08:22 +01:00
public function showContentDialogAction ()
2011-01-28 06:23:39 +01:00
{
2011-02-09 20:12:07 +01:00
$showInstanceId = $this -> _getParam ( 'id' );
2011-02-06 01:47:04 +01:00
$show = new ShowInstance ( $showInstanceId );
2011-01-15 20:59:41 +01:00
2011-02-06 01:47:04 +01:00
$this -> view -> showContent = $show -> getShowListContent ();
2011-02-03 00:08:22 +01:00
$this -> view -> dialog = $this -> view -> render ( 'schedule/show-content-dialog.phtml' );
unset ( $this -> view -> showContent );
2011-01-15 20:59:41 +01:00
}
2011-02-09 20:12:07 +01:00
public function editShowAction ()
{
2011-02-10 00:10:46 +01:00
$showInstanceId = $this -> _getParam ( 'id' );
$showInstance = new ShowInstance ( $showInstanceId );
2011-02-09 20:12:07 +01:00
2011-02-10 00:10:46 +01:00
$show = new Show ( $showInstance -> getShowId ());
2011-02-09 20:12:07 +01:00
}
2011-02-10 21:00:55 +01:00
public function addShowAction ()
{
2011-02-12 23:21:37 +01:00
$js = $this -> _getParam ( 'data' );
2011-02-10 21:00:55 +01:00
$data = array ();
2011-02-10 23:12:05 +01:00
2011-02-10 21:00:55 +01:00
//need to convert from serialized jQuery array.
foreach ( $js as $j ){
$data [ $j [ " name " ]] = $j [ " value " ];
}
2011-02-10 23:12:05 +01:00
$data [ 'add_show_hosts' ] = $this -> _getParam ( 'hosts' );
2011-02-11 00:40:30 +01:00
$data [ 'add_show_day_check' ] = $this -> _getParam ( 'days' );
2011-02-10 21:00:55 +01:00
$formWhat = new Application_Form_AddShowWhat ();
$formWho = new Application_Form_AddShowWho ();
$formWhen = new Application_Form_AddShowWhen ();
$formRepeats = new Application_Form_AddShowRepeats ();
$formStyle = new Application_Form_AddShowStyle ();
$formWhat -> removeDecorator ( 'DtDdWrapper' );
$formWho -> removeDecorator ( 'DtDdWrapper' );
$formWhen -> removeDecorator ( 'DtDdWrapper' );
$formRepeats -> removeDecorator ( 'DtDdWrapper' );
$formStyle -> removeDecorator ( 'DtDdWrapper' );
2011-02-12 23:21:37 +01:00
$this -> view -> what = $formWhat ;
$this -> view -> when = $formWhen ;
$this -> view -> repeats = $formRepeats ;
$this -> view -> who = $formWho ;
$this -> view -> style = $formStyle ;
2011-02-10 21:00:55 +01:00
$what = $formWhat -> isValid ( $data );
$when = $formWhen -> isValid ( $data );
if ( $when ) {
$when = $formWhen -> checkReliantFields ( $data );
}
if ( $data [ " add_show_repeats " ]) {
$repeats = $formRepeats -> isValid ( $data );
if ( $repeats ) {
2011-02-12 23:21:37 +01:00
$repeats = $formRepeats -> checkReliantFields ( $data );
2011-02-10 21:00:55 +01:00
}
}
else {
$repeats = 1 ; //make it valid, results don't matter anyways.
}
$who = $formWho -> isValid ( $data );
$style = $formStyle -> isValid ( $data );
if ( $what && $when && $repeats && $who && $style ) {
2011-02-10 23:12:05 +01:00
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
$user = new User ( $userInfo -> id );
2011-02-10 21:00:55 +01:00
if ( $user -> isAdmin ()) {
Show :: addShow ( $data );
}
2011-02-10 23:12:05 +01:00
//send back a new form for the user.
2011-02-12 23:21:37 +01:00
$formWhat -> reset ();
$formWho -> reset ();
$formWhen -> reset ();
$formWhen -> populate ( array ( 'add_show_start_date' => date ( " Y-m-d " ),
'add_show_start_time' => '0:00' ,
'add_show_duration' => '1:00' ));
$formRepeats -> reset ();
$formRepeats -> populate ( array ( 'add_show_end_date' => date ( " Y-m-d " )));
$formStyle -> reset ();
2011-02-10 23:12:05 +01:00
$this -> view -> newForm = $this -> view -> render ( 'schedule/add-show-form.phtml' );
2011-02-10 21:00:55 +01:00
}
else {
$this -> view -> form = $this -> view -> render ( 'schedule/add-show-form.phtml' );
2011-02-12 23:21:37 +01:00
}
2011-02-10 21:00:55 +01:00
}
2011-02-09 20:12:07 +01:00
2011-02-12 23:21:37 +01:00
public function cancelShowAction ()
{
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
$user = new User ( $userInfo -> id );
if ( $user -> isAdmin ()) {
$showInstanceId = $this -> _getParam ( 'id' );
$showInstance = new ShowInstance ( $showInstanceId );
$show = new Show ( $showInstance -> getShowId ());
$show -> cancelShow ( $showInstance -> getShowStart ());
}
}
2011-03-10 04:25:02 +01:00
public function cancelCurrentShowAction ()
{
$userInfo = Zend_Auth :: getInstance () -> getStorage () -> read ();
$user = new User ( $userInfo -> id );
if ( $user -> isAdmin ()) {
$showInstanceId = $this -> _getParam ( 'id' );
$show = new ShowInstance ( $showInstanceId );
$show -> clearShow ();
$show -> deleteShow ();
}
}
2010-12-07 20:19:27 +01:00
}
2011-02-03 00:08:22 +01:00
2011-02-09 20:12:07 +01:00
2011-02-10 21:00:55 +01:00
2011-02-12 23:21:37 +01:00