Пример #1
0
 /**
  * Set the refresh status of a screen.
  */
 public function actionScreenRefresh()
 {
     if (isset($_POST['screen_id'])) {
         $result = ScreenAjax::model()->updateByPk($_POST['screen_id'], array('refresh' => 1));
     }
     echo $result;
     Yii::app()->end();
 }
Пример #2
0
 public function actionHoliday()
 {
     date_default_timezone_set('Asia/Jerusalem');
     $holiday = Holiday::model()->find(array('condition' => 'end_date >= :now && start_date <= :now', 'params' => array(':now' => date('Y-m-d H:i:s', strtotime('now')))));
     if ($holiday) {
         ScreenAjax::model()->updateAll(array('refresh' => 1));
     }
 }
Пример #3
0
 /**
  * Ask the screens to refresh
  */
 public function actionScreenRefresh()
 {
     ScreenAjax::model()->setAllRefresh();
     Yii::app()->user->setFlash('success', Yii::t('site', 'All screens will refresh.'));
     $this->redirect(array('screen/index'));
 }