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'; }
public static function getSetupHiddenDays($uid) { $hiddenDays = CalendarSetup::model()->getHiddenDaysByUid($uid); return implode(",", $hiddenDays); }
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)); } }