Exemplo n.º 1
0
 public static function __static()
 {
     self::$calendar_events_table = PREFIX . 'calendar_events';
     self::$calendar_events_content_table = PREFIX . 'calendar_events_content';
     self::$calendar_cats_table = PREFIX . 'calendar_cats';
     self::$calendar_users_relation_table = PREFIX . 'calendar_users_relation';
 }
Exemplo n.º 2
0
 public static function getSetupHiddenDays($uid)
 {
     $hiddenDays = CalendarSetup::model()->getHiddenDaysByUid($uid);
     return implode(",", $hiddenDays);
 }
Exemplo n.º 3
0
 private function setup()
 {
     if (EnvUtil::submitCheck("formhash")) {
         $interval = EnvUtil::getRequest("interval");
         $hiddenDays = EnvUtil::getRequest("hiddenDays");
         $startTime = isset($interval[0]) ? $interval[0] : "8";
         $endTime = isset($interval[1]) ? $interval[1] : "18";
         CalendarSetup::model()->updataSetup(Ibos::app()->user->uid, $startTime, $endTime, $hiddenDays);
         $this->ajaxReturn(array("isSuccess" => true));
     } else {
         $alias = "application.modules.calendar.views.schedule.setup";
         $uid = Ibos::app()->user->uid;
         $data["workTime"] = CalendarSetup::model()->getWorkTimeByUid($uid);
         $data["hiddenDays"] = CalendarSetup::model()->getHiddenDaysByUid($uid);
         $view = $this->renderPartial($alias, $data, true);
         $this->ajaxReturn(array("isSuccess" => true, "view" => $view));
     }
 }