Package CT-ChurchCore
Classes summary
| CTAbstractModule | Base class for API Calls for Modules. This will be called when URL with ajax will be requested. All API calls will be made through ?q=MODULENAME/ajax&func=FUNCTIONNAME¶m1=bla like ?q=login/ajax&func=login&username=bla |
| CTDBInterface | Interface for easy db access when data comes from Ajax. |
| CTFileUploader | |
| CTJSend | description |
| JSONResultObject | not used anywhere |
| PDF, extends FPDF | |
| qqFileUploader | Fileuploader |
| qqUploadedFileForm | Handle file uploads via regular form post (uses the $_FILES array) |
| qqUploadedFileXhr | Handle file uploads via XMLHttpRequest |
| TranslationBundle | One of many I18N implementation out there... Author: Bo Maryniuk bo@suse.de |
Exceptions summary
| CTException | Exception for handling application exceptions |
| CTNoPermission | Exception for handling missed permissions |
| CTWarnException | Exception for handling lightweight errors, like DB record already exists |
| SQLException | Exceptions for Database errors |
Functions summary
| __autoload | autoloads needed classes TODO: need module home to be handled separate? can we identify core classes without file_exists? look at http://php.net/manual/en/function.spl-autoload.php if we should use this instead |
| _churchcore_savePidUserSetting | Save User Setting to table cc_usersetting. If $val == null delete setting |
| _implantAuth | |
| _simulateUser | |
| about__ajax | For footer e-mail function |
| about_main | about main function |
| addAuth | TODO: maybe use $auth_arr as reference, no return needed. |
| addCSS | |
| addErrorMessage | Add error div with message to $content |
| addFilter | |
| addHeader | |
| addHttpHeader | |
| addInfoMessage | Add info div with message to $content |
| addJS | |
| addSuccessMessage | Add info div with message to $content |
| admin__ajax | |
| admin__dump | |
| admin__uploadfile | |
| admin_main | main function for admin |
| admin_saveSettings | save admin settings and reload config |
| ajax | |
| applyFilter | |
| array_in_array | looks up if one number of array1 exists in array2 |
| check_cal_entries | |
| check_constraint | check constraint |
| check_db_constraints | check constraints in database |
| checkForDBUpdates | if DB update is needed, update! |
| churchadmin_validateAdminForm | |
| churchcore__filedownload | Return a CT file for download |
| churchcore__logviewer | view log |
| churchcore_CCEventData2String | Convert array or object of typical cc event data to string list with < ul> |
| churchcore_copyFileToOtherDomainId | copy file to other domain id |
| churchcore_createOnTimeLoginKey | create one time login string for emails and save it into DB |
| churchcore_delFile | delete file |
| churchcore_getAge | get age for date |
| churchcore_getAuth | Hook function for getting the authoriziation |
| churchcore_getAvatarUrl | Returns the complete url to load the avator of one person |
| churchcore_getCompleteUserByCMSId | TODO: sql is the only difference to churchcore_getUserByCMSId, use one for both? not used anywhere! |
| churchcore_getDateField | description used from getBookingFields() //TODO nearly the same as getTextField - use one for both with parameter type |
| churchcore_getDBNow | Get current time of mysql server for polling |
| churchcore_getFieldChanges | Returns a readable list with all changes or NULL TODO: is != null needed or is if $oldVal sufficient? |
| churchcore_getFiles | FIXME: maybe always return an array to prevent problems with foreach on the results. (occured on deleting song) |
| churchcore_getFilesAsDomainIdArr | Holt sich die Dateien als Array per DomainId |
| churchcore_getInfosForDomain | Get information to a domain in database domain_type like person, event |
| churchcore_getMasterDataEntry | TODO: need $desc to be an object? Maybe the using code can be changed to Field/Type rather? |
| churchcore_getMyNotifications | Notifications for mailing on updates Optional parameters are $domain_type, $domain_id and $person_id |
| churchcore_getPersonByEMail | get person by email |
| churchcore_getPersonById | get person independently of authorisazion |
| churchcore_getTableData | read data from DB |
| churchcore_getTextField | |
| churchcore_getUserByCMSId | get user ids from DB TODO: is empty $CMSID allowed? If not, how can you get more then one user? |
| churchcore_getUserById | TODO: whats the main difference to the function above??? only one time used |
| churchcore_getUserSettings | read user settings from DB TODO: add example how advanced settings may look |
| churchcore_icalToDate | |
| churchcore_isModuleActivated | Is the module acticated |
| churchcore_isSameDay | Return if s1 and s2 are the same day |
| churchcore_mail | Thats the current mail methode! |
| churchcore_personalizeTemplate | insert person data into template TODO: use eval or output buffering to personalize templates |
| churchcore_pollForNews | get log news newer then $last_id log Each module has to make sure to save change infos to the table cc_poll The best way is to use cdb_log with write_yn = 1 so it will be inserted in the cc_poll automatically |
| churchcore_renameFile | rename file |
| churchcore_renderFile | |
| churchcore_renderImage | get html image tag for churchcore image |
| churchcore_saveReminder | Saves the reminder or delete if no reminddate is given. used by AJAX call |
| churchcore_saveUserSetting | Save user settings |
| churchcore_sendEMailToPersonIDs | send emails to persons with given id(s) |
| churchcore_sendMails | send mails per PHP |
| churchcore_sendReminders | Send all pending reminders. Will be called by cron job |
| churchcore_sendSystemMessage | Send System Message to user, when telegram is connected it will be used telegram. Otherwise it will be send a typical email message |
| churchcore_sort | sort $array by values in $array[$key] |
| churchcore_stringToDateDe | get formated Date from string TODO: maybe rename? Use constants for formats? Not for de only but for any local date format? |
| churchcore_stringToDateICal | get ical formated Date from string TODO: maybe rename? Use constants for formats? |
| churchcore_systemmail | System plain email with sender from admin and info attachement |
| churchtools_app | Main entry point for churchtools. This will be called from /index.php Function loads i18n, configuration, check data security. If everything is ok, it calls churchtools_processRequest() |
| churchtools_main | Main entry point for churchtools. This will be called from /index.php Function load constants and simple functions and have a try and catch for the whole application It calls churchtools_app(). |
| churchtools_processRequest | calls churchservice => churchservice_main or churchservice/ajax => churchservice_ajax |
| cleanDir | Delete all files in folder $dir |
| cleanICal | |
| convertMacToUtf8 | |
| convertUtf8ToUtf8 | |
| convertWindowsToUtf8 | |
| createAnonymousUser | |
| createI18nFile | Get file name for i18n javascript file. |
| cron_do_dbdump | |
| cron_main | main cron function called by - page load (through footer.php), if (getConf("cronjob_delay") > 0) => default: every 3600 seconds => only, if somebody uses churchtools - viewing mails (through embeeded hidden pixel) => but only if image is loaded! (unreliable) - manual execution (through admin menu: excute planned tasks) - real system cron job (if configured by system admin) - functions.php: startSendingMailsInBackground(), with parameter sendmail=true |
| ct_checkUserMail | check if a new email should be send, write something into DB |
| ct_cleanDatabase | Delete old poll temp and old person login token from database |
| ct_createSettingsStatement | Create the setting statement for JS |
| ct_createUserToken | Creates a token for user login |
| ct_deleteOldTmpFiles | Delete all temp files older than 7 days |
| ct_getLicense | Return license or default value |
| ct_getLicenseKey | get the license key form CT Licence server and return Object of resultset or false if error occurs |
| ct_getMyReminders | Get reminders for person person_id |
| ct_log | Write user actions to log table |
| ct_logError | |
| ct_logTimer | |
| ct_notify | log $txt into cdb_log and call ct_sendPendingNotifications |
| ct_printTimer | |
| ct_saveConf | |
| ct_sendPendingNotifications | Send pending notifications. |
| ct_startTimer | |
| current_date | TODO: why not use date('Y-m-d H:i:s') rather then this function and put 'Y-m-d H:i:s' into a constant? |
| datesInConflict | check if two dates conflict with each other TODO: seems like $_enddate/$_enddate2 is not really needed |
| do_cron | execute cron job for all modules called by cron_main below |
| endsWith | |
| file_get_contents_curl | |
| file_get_contents_curl_post | |
| formatCTDateArrToICal | |
| getAboutProText | |
| getAboutText | |
| getAllDatesWithRepeats | get all repeating events/bookings? TODO: change function name, in a distinct view bookings are events too use constants for repeat ids (better readable) |
| getAllowedStations | Get all allowed stations as array |
| getAuthArrayForAuthidsAndDomainTypes | Get Auths as array |
| getAuthTable | |
| getBaseUrl | Get the base url in form of http(s)://subdomain.churchtools.de/ or http(s)://server.de/churchtools/ |
| getConf | Read var from $config or $mapping and return the value or default. |
| getContrastYIQ | get black or white color, depending on contrast to $hexcolor used for nice, readable calendar colors |
| getCTModulesSorted | Get array with sorted modules from content of dir system |
| getCurrentUser | Give access to global $user without using global. Necessary for extract() |
| getDivSet | |
| getHeader | |
| getMimeTypes | |
| getModulesMenuEntries | Get all menu entries for module as an array Array contains content and modulename. |
| getTemplateContent | Get html or txt template. If no data is specified, return content (to eval later). Otherwise replace variables with data and return eval'ed content |
| getTemplateContentTemp | TODO: not finished function, maybe not needed |
| getUserAuthorization | Returns an array of all authorization in the form Array ( [churchdb] => Array ( [view birthdaylist] => 1 [view] => 1 [view memberliste] => 1 [security level person] => Array ( [1] => 1 [2] => 2 [3] => 3 [4] => 4 ) ... |
| getUserForLogin | Look for login user to save in Session |
| getUserLanguage | Load the user setting |
| getUserMenuEntries | Get all User Menu Entries |
| getUserSetting | Load the user setting |
| getVar | Read var from $_REQUEST or from any other array and return the value or default. $_REQUEST as default array doesnt work. |
| handleShutdown | Shutdown function, if an error happened, an error message is displayed. FIXME: need to be changed - this errors are corrupting json answers |
| htmlize | Replaces links and linebreaks with and |
| includePlugins | |
| isAllowed | Check group permission set through group or groupmemberstatus auto perm |
| isAllowedForPerson | Returns if I have the permission to do perm for person pId. It will prove the group relation and there automatic permissions. |
| isFullDay | |
| isStationVisible | Check if station $station_id is visible It is visible when station_id is null (no station given) or if currentStation = station_id |
| isStrongEnough | |
| jsend | shorthand for CTJsend-Class |
| json_last_error_msg | |
| jsonOutput | Echo $mixed as JSON |
| l | Create html link |
| ldapBindUser | |
| ldapFindUser | |
| loadConfig | Load config from file while checking for multisite installation. |
| loadDBConfig | Loads all config data from the db |
| loadMapping | Load url mappings for each module and merge them together module map path like like system/churchdb/churchdb.mapping |
| loadUserObjectInSession | Loads the user object in the session. |
| login__ajax | |
| login__newpwd | |
| login_main | Login a user. |
| login_user | |
| logout_current_user | logout current user |
| logout_main | |
| logParams | Log all input params to files |
| maintainGroupMemberstatus | Maintain group memberstatus. This table is only to have IDs for cc_auth_domain |
| pleaseAcceptDatasecurity | For accept data security |
| profile_main | |
| prooveEMail | |
| prooveOldPassword | TODO: set some password requirements - setting something like aa as password shouldnt be allowed. TODO: On changing password i will be asked which user i want to change - cmsid or email (of the same user!) |
| public__filedownload | |
| random_string | get a random string |
| renderHelpIcon | module icons |
| renderIcon | Create html for icons using symbol font + css. To find the right icons this may be useful: http://fontawesome.bootstrapcheatsheets.com/ |
| renderIconStack | |
| renderModulIcon | for easily change the help icon only |
| replaceSpecialCharsToUnderscore | |
| rrmDir | Recursively delete all files and directories in folder $dir |
| run_db_updates | update DB for new versions of CT |
| sanitizePathComponent | |
| saveHistoricalData | Saves historical data e.g. old growpath_id |
| scramble_password | scramble password |
| sendTelegram | Send telegram message |
| setBuildVersion | set Vuild Version in DB |
| shorten_string | trim $str. to $l characters and add .. if needed |
| simulate_main | |
| startSendingMailsInBackground | |
| stripCSSFromHTML | |
| surroundWithVCALENDER | |
| t | get translation of $txt, insert $data into placeholders like {0} changed to use more then one placeholder by passing all args to getText. |
| t2 | Same as t() but here you have to set an language. This is espescially for email purpose. |
| telegram_main | |
| user_access | check if user can access module $modulename and look for $auth |
| user_check_password | |
| userLoggedIn | |
| validateChangeUser | |
| validateLogin | validate login form TODO: is there a difference between returning false or null? |