/**
  *
  * @see CTModuleInterface::getMasterData()
  */
 public function getMasterData()
 {
     global $user, $base_url, $files_dir, $config;
     include_once CHURCHCAL . '/churchcal_db.php';
     $auth = churchservice_getAuthorization();
     $res = $this->getMasterDataTables();
     $res["masterDataTables"] = $this->getMasterDataTablenames();
     $res["auth"] = $auth;
     $res["modulespath"] = churchservice_getModulesPath();
     $res["base_url"] = $base_url;
     $res["files_url"] = $base_url . $files_dir;
     $res["files_dir"] = $files_dir;
     $res["modulename"] = "churchservice";
     $res["adminemail"] = variable_get('site_mail', '');
     $res["user_pid"] = $user->id;
     $res["user_name"] = $user->vorname . " " . $user->name;
     $res["userid"] = $user->cmsuserid;
     $res["settings"] = churchservice_getUserSettings($user->id);
     $res["notification"] = churchcore_getMyNotifications();
     $res["notificationtype"] = churchcore_getTableData("cc_notificationtype");
     $res["lastLogId"] = churchservice_getLastLogId();
     $res["eventtemplate"] = churchcore_getTableData("cs_eventtemplate", "sortkey");
     $res["category"] = churchcal_getAllowedCategories(false);
     $res["eventtemplate_services"] = churchservice_getEventtemplateServices($auth);
     $res["churchcal_name"] = $config["churchcal_name"];
     $res["songwithcategoryasdir"] = variable_get("churchservice_songwithcategoryasdir", "0");
     $res["songcategory"] = churchcore_getTableData("cs_songcategory", "sortkey");
     return $res;
 }
 /**
  *
  * @see CTModuleInterface::getMasterData()
  */
 public function getMasterData()
 {
     global $user, $base_url, $files_dir, $config;
     include_once CHURCHCAL . '/churchcal_db.php';
     $auth = churchservice_getAuthorization();
     $res = $this->getMasterDataTables();
     $res["masterDataTables"] = $this->getMasterDataTablenames();
     $res["auth"] = $auth;
     $res["modulespath"] = churchservice_getModulesPath();
     $res["base_url"] = $base_url;
     $res["files_url"] = $base_url . $files_dir;
     $res["files_dir"] = $files_dir;
     $res["modulename"] = "churchservice";
     $res["adminemail"] = getConf('site_mail', '');
     $res["user_pid"] = $user->id;
     $res["user_name"] = $user->vorname . " " . $user->name;
     $res["userid"] = $user->cmsuserid;
     $res["settings"] = churchservice_getUserSettings($user->id);
     $res["notification"] = churchcore_getMyNotifications();
     $res["notificationtype"] = churchcore_getTableData("cc_notificationtype");
     $res["lastLogId"] = churchservice_getLastLogId();
     $res["eventtemplate"] = churchcore_getTableData("cs_eventtemplate", "sortkey");
     $res["category"] = churchcal_getAllowedCategories(false);
     $res["repeat"] = churchcore_getTableData("cc_repeat");
     $res["eventtemplate_services"] = churchservice_getEventtemplateServices($auth);
     $res["churchcal_name"] = $config["churchcal_name"];
     $res["churchservice_name"] = $config["churchservice_name"];
     $res["songwithcategoryasdir"] = getConf("churchservice_songwithcategoryasdir", "0");
     $res["songcategory"] = churchcore_getTableData("cs_songcategory", "sortkey");
     $res["views"] = array("ListView" => array("filename" => "cs_listview"), "SettingsView" => array("filename" => "cs_settingsview"), "CalView" => array("filename" => "cs_calview"), "SongView" => array("filename" => "cs_songview"), "AgendaView" => array("filename" => "cs_agendaview"), "FactView" => array("filename" => "cs_factview"), "MaintainView" => array("filename" => "cs_maintainview"));
     return $res;
 }
 /**
  * get getMasterData
  */
 public function getMasterData()
 {
     global $user, $base_url;
     $ret = array();
     $ret["modulename"] = "churchcal";
     $ret["modulespath"] = CHURCHCAL;
     $ret["churchservice_name"] = getConf("churchservice_name");
     $ret["churchcal_name"] = getConf("churchcal_name");
     $ret["churchresource_name"] = getConf("churchresource_name");
     $ret["maincal_name"] = getConf("churchcal_maincalname", "Gemeindekalender");
     $ret["firstDayInWeek"] = getConf("churchcal_firstdayinweek", 1);
     $ret["notification"] = churchcore_getMyNotifications();
     $ret["notificationtype"] = churchcore_getTableData("cc_notificationtype");
     $ret["reminder"] = ct_getMyReminders($user->id, "event");
     $ret["base_url"] = $base_url;
     $ret["user_pid"] = $user->id;
     if (user_access("view", "churchdb")) {
         $ret["cdb_bereich"] = churchcore_getTableData("cdb_bereich");
         $ret["cdb_status"] = churchcore_getTableData("cdb_status");
         $ret["cdb_station"] = churchcore_getTableData("cdb_station");
         $ret["absent_reason"] = churchcore_getTableData("cs_absent_reason");
         foreach ($ret["absent_reason"] as $key => $reason) {
             if (isset($reason->color)) {
                 $ret["absent_reason"][$key]->textColor = getContrastYIQ($reason->color);
             }
         }
     }
     if (user_access("view", "churchresource") || user_access("create bookings", "churchresource")) {
         $ret["resources"] = churchcore_getTableData("cr_resource");
         $ret["resourceTypes"] = churchcore_getTableData("cr_resourcetype");
         $ret["bookingStatus"] = churchcore_getTableData("cr_status");
     }
     $ret["category"] = churchcal_getAllowedCategories(true);
     $ret["settings"] = churchcore_getUserSettings("churchcal", $user->id);
     $ret["repeat"] = churchcore_getTableData("cc_repeat");
     if (count($ret["settings"]) == 0) {
         $arr["checkboxEvents"] = "true";
         $ret["settings"] = $arr;
     }
     $ret["auth"] = churchcal_getAuthForAjax();
     $ret["views"] = array("WeekView" => array("filename" => "../churchresource/cr_weekview"));
     return $ret;
 }