From 4b5f501d3ef327cf8b848a43d3af3643e22ea356 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 8 Oct 2008 10:58:32 +0000 Subject: [PATCH] Dummy admin area added, HTML code in PHP scripts rewritten to CSS classes, CSS ids fixed --- .gitattributes | 49 ++++ application/admin/.htaccess | 1 + application/admin/class_ApplicationHelper.php | 246 ++++++++++++++++++ application/admin/config.php | 245 +++++++++++++++++ application/admin/data.php | 51 ++++ application/admin/debug.php | 61 +++++ application/admin/exceptions.php | 85 ++++++ application/admin/exceptions/.htaccess | 1 + application/admin/init.php | 53 ++++ application/admin/interfaces/.htaccess | 1 + application/admin/loader.php | 39 +++ application/admin/main/.htaccess | 1 + application/admin/main/class_ | 41 +++ application/admin/main/commands/.htaccess | 1 + application/admin/main/commands/web/.htaccess | 1 + .../web/class_WebAdminUserLoginCommand.php | 124 +++++++++ application/admin/main/login/.htaccess | 1 + .../admin/main/login/class_AdminUserLogin.php | 150 +++++++++++ application/admin/main/login/helper/.htaccess | 1 + .../login/helper/class_AdminLoginHelper.php | 114 ++++++++ application/admin/starter.php | 53 ++++ application/admin/templates/.htaccess | 1 + application/admin/templates/de/.htaccess | 1 + .../templates/de/code/action_login_logout.ctp | 30 +++ .../de/code/action_login_profile.ctp | 117 +++++++++ .../de/code/action_login_status_problem.ctp | 61 +++++ .../de/code/action_login_welcome.ctp | 3 + .../admin/templates/de/code/admin_main.ctp | 19 ++ .../templates/de/code/block_persona_data.ctp | 24 ++ .../templates/de/code/captch_graphic_code.ctp | 16 ++ .../admin/templates/de/code/footer.ctp | 4 + .../admin/templates/de/code/header.ctp | 20 ++ application/admin/templates/de/code/home.ctp | 3 + .../admin/templates/de/code/login_failed.ctp | 41 +++ .../admin/templates/de/code/login_form.ctp | 75 ++++++ .../admin/templates/de/code/login_main.ctp | 56 ++++ .../admin/templates/de/code/logout_done.ctp | 19 ++ .../admin/templates/de/code/mail_debug.ctp | 25 ++ .../admin/templates/de/code/register_form.ctp | 115 ++++++++ .../admin/templates/de/emails/.htaccess | 1 + .../templates/de/emails/text_resend_link.tpl | 30 +++ application/admin/templates/de/html/.htaccess | 1 + .../admin/templates/de/html/nav_advert.tpl | 1 + .../templates/de/html/selector_ship-simu.tpl | 17 ++ application/admin/templates/images/.htaccess | 1 + .../admin/templates/images/_cache/.htaccess | 1 + .../admin/templates/images/de/.htaccess | 1 + .../admin/templates/images/de/image/.htaccess | 1 + .../templates/images/de/image/base_code.itp | 28 ++ .../images/de/image/code_captcha.itp | 78 ++++++ application/blog/exceptions.php | 6 +- application/blog/starter.php | 6 +- application/selector/starter.php | 8 +- application/ship-simu/exceptions.php | 6 +- .../class_BirthdayInvalidException.php | 2 +- .../class_ContractAllreadySignedException.php | 2 +- ...class_ContractPartnerMismatchException.php | 2 +- .../class_ItemNotInPriceListException.php | 2 +- .../class_MissingSimulatorIdException.php | 2 +- .../class_NoShippingCompanyOwnedException.php | 2 +- .../class_NoShipyardsConstructedException.php | 2 +- ...lass_ShipPartNotConstructableException.php | 2 +- .../class_StructuresOutOfBoundsException.php | 2 +- ...ass_UnsupportedLimitationPartException.php | 2 +- .../class_WrongGenderSpecifiedException.php | 2 +- application/ship-simu/starter.php | 6 +- application/shoutbox/exceptions.php | 6 +- application/shoutbox/starter.php | 6 +- application/todo/exceptions.php | 6 +- application/todo/starter.php | 6 +- inc/classes.php | 8 +- .../actions/class_InvalidActionException.php | 2 +- .../auth/class_UserAuthorizationException.php | 2 +- .../exceptions/class_FrameworkException.php | 4 +- .../class_MismatchingCompressorsException.php | 2 +- .../class_InvalidControllerException.php | 2 +- .../database/general/class_SqlException.php | 2 +- .../class_SavePathIsNoDirectoryException.php | 2 +- .../class_SavePathReadProtectedException.php | 2 +- .../class_SavePathWriteProtectedException.php | 2 +- ...class_WrapperUserNameNotFoundException.php | 2 +- .../helper/class_FormClosedException.php | 2 +- .../helper/class_FormGroupClosedException.php | 2 +- ...elperNoPreviousOpenedSubGroupException.php | 2 +- .../helper/class_NoGroupOpenedException.php | 2 +- .../class_UserInstanceMissingException.php | 2 +- .../io/class_DirPointerNotOpenedException.php | 2 +- .../io/class_FileNotFoundException.php | 2 +- .../class_FilePointerNotOpenedException.php | 2 +- .../io/class_FileReadProtectedException.php | 2 +- .../io/class_InvalidDataLengthException.php | 2 +- .../io/class_InvalidMD5ChecksumException.php | 2 +- .../io/class_PathIsNoDirectoryException.php | 2 +- .../io/class_PathReadProtectedException.php | 2 +- ...ass_InvalidLanguagePathStringException.php | 2 +- ...ass_LanguagePathIsNoDirectoryException.php | 2 +- ...ass_LanguagePathReadProtectedException.php | 2 +- .../main/class_ClassMismatchException.php | 2 +- .../main/class_ClassNotFoundException.php | 2 +- .../class_ConfigEntryNotFoundException.php | 2 +- .../class_DimNotFoundInArrayException.php | 2 +- .../main/class_EmptyVariableException.php | 2 +- .../main/class_ExceptionNotFoundException.php | 2 +- .../main/class_GetterNotFoundException.php | 2 +- .../main/class_InvalidArrayCountException.php | 2 +- .../main/class_InvalidCommandException.php | 2 +- .../class_InvalidCommandInstanceException.php | 2 +- .../main/class_InvalidInterfaceException.php | 2 +- .../class_MissingArrayElementsException.php | 2 +- .../main/class_NoArrayCreatedException.php | 2 +- .../main/class_NoArrayException.php | 2 +- .../main/class_NoObjectException.php | 2 +- .../main/class_VariableIsNotSetException.php | 2 +- .../class_InvalidDatabaseResultException.php | 2 +- .../class_BasePathIsNoDirectoryException.php | 2 +- .../class_BasePathReadProtectedException.php | 2 +- .../class_InvalidBasePathStringException.php | 2 +- .../class_UnexpectedTemplateTypeException.php | 2 +- .../class_ViewHelperNotFoundException.php | 2 +- .../user/class_UserEmailMissingException.php | 2 +- .../class_UserPasswordMismatchException.php | 2 +- .../user/class_UsernameMissingException.php | 2 +- .../main/class_BaseFrameworkSystem.php | 4 +- .../main/console/class_ConsoleTools.php | 4 +- .../template/class_BaseTemplateEngine.php | 2 +- inc/database.php | 12 +- inc/database/lib-local.php | 10 +- inc/language.php | 8 +- templates/de/code/emergency_exit.ctp | 4 +- templates/de/code/footer_msg.ctp | 2 +- templates/de/code/header.ctp | 2 +- 131 files changed, 2228 insertions(+), 119 deletions(-) create mode 100644 application/admin/.htaccess create mode 100644 application/admin/class_ApplicationHelper.php create mode 100644 application/admin/config.php create mode 100644 application/admin/data.php create mode 100644 application/admin/debug.php create mode 100644 application/admin/exceptions.php create mode 100644 application/admin/exceptions/.htaccess create mode 100644 application/admin/init.php create mode 100644 application/admin/interfaces/.htaccess create mode 100644 application/admin/loader.php create mode 100644 application/admin/main/.htaccess create mode 100644 application/admin/main/class_ create mode 100644 application/admin/main/commands/.htaccess create mode 100644 application/admin/main/commands/web/.htaccess create mode 100644 application/admin/main/commands/web/class_WebAdminUserLoginCommand.php create mode 100644 application/admin/main/login/.htaccess create mode 100644 application/admin/main/login/class_AdminUserLogin.php create mode 100644 application/admin/main/login/helper/.htaccess create mode 100644 application/admin/main/login/helper/class_AdminLoginHelper.php create mode 100644 application/admin/starter.php create mode 100644 application/admin/templates/.htaccess create mode 100644 application/admin/templates/de/.htaccess create mode 100644 application/admin/templates/de/code/action_login_logout.ctp create mode 100644 application/admin/templates/de/code/action_login_profile.ctp create mode 100644 application/admin/templates/de/code/action_login_status_problem.ctp create mode 100644 application/admin/templates/de/code/action_login_welcome.ctp create mode 100644 application/admin/templates/de/code/admin_main.ctp create mode 100644 application/admin/templates/de/code/block_persona_data.ctp create mode 100644 application/admin/templates/de/code/captch_graphic_code.ctp create mode 100644 application/admin/templates/de/code/footer.ctp create mode 100644 application/admin/templates/de/code/header.ctp create mode 100644 application/admin/templates/de/code/home.ctp create mode 100644 application/admin/templates/de/code/login_failed.ctp create mode 100644 application/admin/templates/de/code/login_form.ctp create mode 100644 application/admin/templates/de/code/login_main.ctp create mode 100644 application/admin/templates/de/code/logout_done.ctp create mode 100644 application/admin/templates/de/code/mail_debug.ctp create mode 100644 application/admin/templates/de/code/register_form.ctp create mode 100644 application/admin/templates/de/emails/.htaccess create mode 100644 application/admin/templates/de/emails/text_resend_link.tpl create mode 100644 application/admin/templates/de/html/.htaccess create mode 100644 application/admin/templates/de/html/nav_advert.tpl create mode 100644 application/admin/templates/de/html/selector_ship-simu.tpl create mode 100644 application/admin/templates/images/.htaccess create mode 100644 application/admin/templates/images/_cache/.htaccess create mode 100644 application/admin/templates/images/de/.htaccess create mode 100644 application/admin/templates/images/de/image/.htaccess create mode 100644 application/admin/templates/images/de/image/base_code.itp create mode 100644 application/admin/templates/images/de/image/code_captcha.itp diff --git a/.gitattributes b/.gitattributes index fb12de8..7ed6550 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,55 @@ * text=auto !eol /Doxyfile -text application/.htaccess -text +application/admin/.htaccess -text +application/admin/class_ApplicationHelper.php -text +application/admin/config.php -text +application/admin/data.php -text +application/admin/debug.php -text +application/admin/exceptions.php -text +application/admin/exceptions/.htaccess -text +application/admin/init.php -text +application/admin/interfaces/.htaccess -text +application/admin/loader.php -text +application/admin/main/.htaccess -text +application/admin/main/class_ -text +application/admin/main/commands/.htaccess -text +application/admin/main/commands/web/.htaccess -text +application/admin/main/commands/web/class_WebAdminUserLoginCommand.php -text +application/admin/main/login/.htaccess -text +application/admin/main/login/class_AdminUserLogin.php -text +application/admin/main/login/helper/.htaccess -text +application/admin/main/login/helper/class_AdminLoginHelper.php -text +application/admin/starter.php -text +application/admin/templates/.htaccess -text +application/admin/templates/de/.htaccess -text +application/admin/templates/de/code/action_login_logout.ctp -text +application/admin/templates/de/code/action_login_profile.ctp -text +application/admin/templates/de/code/action_login_status_problem.ctp -text +application/admin/templates/de/code/action_login_welcome.ctp -text +application/admin/templates/de/code/admin_main.ctp -text +application/admin/templates/de/code/block_persona_data.ctp -text +application/admin/templates/de/code/captch_graphic_code.ctp -text +application/admin/templates/de/code/footer.ctp -text +application/admin/templates/de/code/header.ctp -text +application/admin/templates/de/code/home.ctp -text +application/admin/templates/de/code/login_failed.ctp -text +application/admin/templates/de/code/login_form.ctp -text +application/admin/templates/de/code/login_main.ctp -text +application/admin/templates/de/code/logout_done.ctp -text +application/admin/templates/de/code/mail_debug.ctp -text +application/admin/templates/de/code/register_form.ctp -text +application/admin/templates/de/emails/.htaccess -text +application/admin/templates/de/emails/text_resend_link.tpl -text +application/admin/templates/de/html/.htaccess -text +application/admin/templates/de/html/nav_advert.tpl -text +application/admin/templates/de/html/selector_ship-simu.tpl -text +application/admin/templates/images/.htaccess -text +application/admin/templates/images/_cache/.htaccess -text +application/admin/templates/images/de/.htaccess -text +application/admin/templates/images/de/image/.htaccess -text +application/admin/templates/images/de/image/base_code.itp -text +application/admin/templates/images/de/image/code_captcha.itp -text application/blog/.htaccess -text application/blog/class_ApplicationHelper.php -text application/blog/config.php -text diff --git a/application/admin/.htaccess b/application/admin/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/class_ApplicationHelper.php b/application/admin/class_ApplicationHelper.php new file mode 100644 index 0000000..35888cd --- /dev/null +++ b/application/admin/class_ApplicationHelper.php @@ -0,0 +1,246 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplication { + /** + * The version number of this application + */ + private $appVersion = ""; + + /** + * The human-readable name for this application + */ + private $appName = ""; + + /** + * The short uni*-like name for this application + */ + private $shortName = ""; + + /** + * The name of the master template + */ + private $masterTemplate = "admin_main"; + + /** + * An instance of a controller + */ + private $controllerInstance = null; + + /** + * An instance of this class + */ + private static $thisInstance = null; + + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Tidy up a little + $this->removeSystemArray(); + $this->removeNumberFormaters(); + } + + /** + * Getter for an instance of this class + * + * @return $thisInstance An instance of this class + */ + public final static function getInstance () { + // Is the instance there? + if (is_null(self::$thisInstance)) { + self::$thisInstance = new ApplicationHelper(); + } + + // Return the instance + return self::$thisInstance; + } + + /** + * Getter for the version number + * + * @return $appVersion The application's version number + */ + public final function getAppVersion () { + return $this->appVersion; + } + + /** + * Setter for the version number + * + * @param $appVersion The application's version number + * @return void + */ + public final function setAppVersion ($appVersion) { + // Cast and set it + $appVersion = (string) $appVersion; + $this->appVersion = $appVersion; + } + + /** + * Getter for human-readable name + * + * @return $appName The application's human-readable name + */ + public final function getAppName () { + return $this->appName; + } + + /** + * Setter for human-readable name + * + * @param $appName The application's human-readable name + * @return void + */ + public final function setAppName ($appName) { + // Cast and set it + $appName = (string) $appName; + $this->appName = $appName; + } + + /** + * Getter for short uni*-like name + * + * @return $shortName The application's short uni*-like name + */ + public final function getAppShortName () { + return $this->shortName; + } + + /** + * Setter for short uni*-like name + * + * @param $shortName The application's short uni*-like name + * @return void + */ + public final function setAppShortName ($shortName) { + // Cast and set it + $shortName = (string) $shortName; + $this->shortName = $shortName; + } + + /** + * Getter for master template name + * + * @return $masterTemplate Name of the master template + */ + public final function getMasterTemplate () { + return $this->masterTemplate; + } + + /** + * Launches the admin area + * + * @return void + */ + public final function entryPoint () { + // Create a new request object + $requestInstance = ObjectFactory::createObjectByName('HttpRequest'); + + // Default response is HTTP (HTML page) and type is "Web" + $response = "http"; + $responseType = "web"; + + // Do we have another response? + if ($requestInstance->isRequestElementSet('request')) { + // Then use it + $response = strtolower($requestInstance->getRequestElement('request')); + $responseType = $response; + } // END - if + + // ... and a new response object + $responseInstance = ObjectFactory::createObjectByName(ucfirst($response)."Response", array($this)); + + // Remember both in this application + $this->setRequestInstance($requestInstance); + $this->setResponseInstance($responseInstance); + + // Get the parameter from the request + $commandName = $requestInstance->getRequestElement('page'); + + // If it is null then get default command + if (is_null($commandName)) { + $commandName = $responseInstance->getDefaultCommand(); + } // END - if + + // Get a resolver + $resolverInstance = ObjectFactory::createObjectByName(ucfirst($responseType)."ControllerResolver", array($commandName, $this)); + + // Get a controller instance as well + $this->controllerInstance = $resolverInstance->resolveController(); + + // Handle the request + $this->controllerInstance->handleRequest($requestInstance, $responseInstance); + } + + /** + * Handle the indexed array of fatal messages and puts them out in an + * acceptable fasion + * + * @param $messageList An array of fatal messages + * @return void + */ + public function handleFatalMessages (array $messageList) { + // Walk through all messages + foreach ($messageList as $message) { + print("MSG:".$message."
\n"); + } // END - if + } + + /** + * Assigns application-depending data + * + * @param $templateInstance An instance of a template engine + * @return void + */ + public function assignExtraTemplateData (CompileableTemplate $templateInstance) { + // Assign charset + $templateInstance->assignConfigVariable('header_charset'); + } +} + +// [EOF] +?> diff --git a/application/admin/config.php b/application/admin/config.php new file mode 100644 index 0000000..31c0846 --- /dev/null +++ b/application/admin/config.php @@ -0,0 +1,245 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Get a configuration instance for shorter lines +$cfg = FrameworkConfiguration::getInstance(); + +// CFG: HEADER-CHARSET +$cfg->setConfigEntry('header_charset', "utf-8"); + +// CFG: DEFAULT-WEB-COMMAND +$cfg->setConfigEntry('default_web_command', "home"); + +// CFG: DEFAULT-IMAGE-COMMAND +$cfg->setConfigEntry('default_image_command', "build"); + +// CFG: PAGE-WITH-NEWS +$cfg->setConfigEntry('page_with_news', "home"); + +// CFG: FORM-ACTION +$cfg->setConfigEntry('form_action', "index.php?app={?app_short_name?}&page=do_form"); + +// CFG: FORM-METHOD +$cfg->setConfigEntry('form_method', "post"); + +// CFG: FORM-TARGET +$cfg->setConfigEntry('form_target', "_self"); + +// CFG: REGISTER-REQUIRES-EMAIL +$cfg->setConfigEntry('register_requires_email', "Y"); + +// CFG: REGISTER-INCLUDES-PROFILE +$cfg->setConfigEntry('register_includes_profile', "Y"); + +// CFG: REGISTER-PERSONAL-DATA +$cfg->setConfigEntry('register_personal_data', "Y"); + +// CFG: REGISTER-EMAIL-UNIQUE +$cfg->setConfigEntry('register_email_unique', "Y"); + +// CFG: CHAT-ENABLED-ICQ +$cfg->setConfigEntry('chat_enabled_icq', "Y"); + +// CFG: CHAT-ENABLED-JABBER +$cfg->setConfigEntry('chat_enabled_jabber', "Y"); + +// CFG: CHAT-ENABLED-YAHOO +$cfg->setConfigEntry('chat_enabled_yahoo', "Y"); + +// CFG: CHAT-ENABLED-AOL +$cfg->setConfigEntry('chat_enabled_aol', "Y"); + +// CFG: CHAT-ENABLED-MSN +$cfg->setConfigEntry('chat_enabled_msn', "Y"); + +// CFG: USER-REGISTRATION +$cfg->setConfigEntry('user_registration_class', "AdminRegistration"); + +// CFG: USER-LOGIN-CLASS +$cfg->setConfigEntry('user_login_class', "AdminUserLogin"); + +// CFG: GUEST-LOGIN-CLASS +$cfg->setConfigEntry('guest_login_class', "AdminGuestLogin"); + +// CFG: USER-STATUS-REGISTER +$cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED"); + +// CFG: USER-STATUS-GUEST +$cfg->setConfigEntry('user_status_guest', "GUEST"); + +// CFG: USER-STATUS-CONFIRMED +$cfg->setConfigEntry('user_status_confirmed', "CONFIRMED"); + +// CFG: LOGIN-HELPER-CLASS +$cfg->setConfigEntry('login_helper_class', "AdminLoginHelper"); + +// CFG: AUTH-METHOD-CLASS +$cfg->setConfigEntry('auth_method_class', "CookieAuth"); + +// CFG: APP-LOGIN-URL +$cfg->setConfigEntry('app_login_url', "index.php?app={?app_short_name?}&page=login_area"); + +// CFG: LOGIN-FAILED-URL +$cfg->setConfigEntry('login_failed_url', "index.php?app={?app_short_name?}&page=login_failed"); + +// CFG: LOGOUT-DONE-URL +$cfg->setConfigEntry('logout_done_url', "index.php?app={?app_short_name?}&page=logout_done"); + +// CFG: LOGIN-USER-STATUS-URL +$cfg->setConfigEntry('login_user_status_url', "index.php?app={?app_short_name?}&page=login_area&action=status_problem"); + +// CFG: USER-NOT-UNCONFIRMED-URL +$cfg->setConfigEntry('user_not_unconfirmed_url', "index.php?app={?app_short_name?}&page=status&status=unconfirmed_problem"); + +// CFG: USER-UNCONFIRMED-EMAIL-MISSING-URL +$cfg->setConfigEntry('user_unconfirmed_email_missing_url', "index.php?app={?app_short_name?}&page=status&status=unconfirmed_email_missing"); + +// CFG: CONFIRM-CODE-INVALID-URL +$cfg->setConfigEntry('confirm_code_invalid_url', "index.php?app={?app_short_name?}&page=status&status=confirm_code_invalid"); + +// CFG: USER-NOT-FOUND-URL +$cfg->setConfigEntry('user_not_found_url', "index.php?app={?app_short_name?}&page=status&status=user_not_found"); + +// CFG: LOGIN-DEFAULT-ACTION +$cfg->setConfigEntry('login_default_action', "welcome"); + +// CFG: NEWS-READER-CLASS +$cfg->setConfigEntry('news_reader_class', "DefaultNewsReader"); + +// CFG: NEWS-DOWNLOAD-FILTER +$cfg->setConfigEntry('news_download_filter', "NewsDownloadFilter"); + +// CFG: NEWS-PROCESS-FILTER +$cfg->setConfigEntry('news_process_filter', "NewsProcessFilter"); + +// CFG: USER-AUTH-FILTER +$cfg->setConfigEntry('user_auth_filter', "UserAuthFilter"); + +// CFG: USER-UPDATE-FILTER +$cfg->setConfigEntry('user_update_filter', "UserUpdateFilter"); + +// CFG: USER-STATUS-CONFIRMED-FILTER +$cfg->setConfigEntry('user_status_confirmed_filter', "UserStatusConfimedUpdateFilter"); + +// CFG: CAPTCHA-ENCRYPT-VALIDATOR-FILTER +$cfg->setConfigEntry('captcha_encrypt_validator_filter', "CaptchaEncryptFilter"); + +// CFG: CAPTCHA-GUEST-VERIFIER-FILTER +$cfg->setConfigEntry('captcha_guest_verifier_filter', "GraphicalCodeCaptchaVerifierFilter"); + +// CFG: CAPTCHA-USER-VERIFIER-FILTER +$cfg->setConfigEntry('captcha_user_verifier_filter', "GraphicalCodeCaptchaVerifierFilter"); + +// CFG: CAPTCHA-REGISTER-VERIFIER-FILTER +$cfg->setConfigEntry('captcha_register_verifier_filter', "GraphicalCodeCaptchaVerifierFilter"); + +// CFG: CONFIRM-CODE-VALIDATOR-FILTER +$cfg->setConfigEntry('confirm_code_verifier_filter', "ConfirmCodeVerifierFilter"); + +// CFG: NEWS-HOME-LIMIT +$cfg->setConfigEntry('news_home_limit', 10); + +// CFG: NEWS-LOGIN-AREA-LIMIT +$cfg->setConfigEntry('news_login_area_limit', 15); + +// CFG: LOGIN-ENABLED +$cfg->setConfigEntry('login_enabled', "Y"); + +// CFG: CONFIRM-EMAIL-ENABLED +$cfg->setConfigEntry('confirm_email_enabled', "Y"); + +// CFG: LOGIN-DISABLED-REASON +$cfg->setConfigEntry('login_disabled_reason', "Loginbereich befindet sich noch im Aufbau."); + +// CFG: LOGIN-TYPE +$cfg->setConfigEntry('login_type', "username"); // username, email, both + +// CFG: EMAIL-CHANGE-ALLOWED +$cfg->setConfigEntry('email_change_allowed', "N"); + +// CFG: EMAIL-CHANGE-CONFIRMATION +$cfg->setConfigEntry('email_change_confirmation', "Y"); + +// CFG: GUEST-LOGIN-ALLOWED +$cfg->setConfigEntry('guest_login_allowed', "N"); + +// CFG: GUEST-LOGIN-USERNAME +$cfg->setConfigEntry('guest_login_user', "guest"); + +// CFG: GUEST-LOGIN-PASS +$cfg->setConfigEntry('guest_login_passwd', "guest"); + +// CFG: LOGIN-WELCOME-ACTION-CLASS +$cfg->setConfigEntry('login_welcome_action_class', "AdminLoginAction"); + +// CFG: LOGIN-LOGOUT-ACTION-CLASS +$cfg->setConfigEntry('login_logout_action_class', "AdminLogoutAction"); + +// CFG: LOGIN-PROFILE-ACTION-CLASS +$cfg->setConfigEntry('login_profile_action_class', "AdminProfileAction"); + +// CFG: ADMIN-REGISTER-CAPTCHA +$cfg->setConfigEntry('admin_register_captcha', "GraphicalCodeCaptcha"); + +// CFG: ADMIN-USER-LOGIN-CAPTCHA +$cfg->setConfigEntry('admin_user_login_captcha', "GraphicalCodeCaptcha"); + +// CFG: ADMIN-GUEST-LOGIN-CAPTCHA +$cfg->setConfigEntry('admin_guest_login_captcha', "GraphicalCodeCaptcha"); + +// CFG: CAPTCHA-STRING-LENGTH +$cfg->setConfigEntry('captcha_string_length', 5); + +// CFG: CAPTCHA-SEARCH-CHARS +$cfg->setConfigEntry('captcha_search_chars', "+/="); + +// CFG: RANDOM-STRING-LENGTH +$cfg->setConfigEntry('random_string_length', 100); + +// CFG: ADMIN-REGISTER-CAPTCHA-SECURED +$cfg->setConfigEntry('admin_register_captcha_secured', "Y"); + +// CFG: ADMIN-USER-LOGIN-CAPTCHA-SECURED +$cfg->setConfigEntry('admin_user_login_captcha_secured', "Y"); + +// CFG: ADMIN-GUEST-LOGIN-CAPTCHA-SECURED +$cfg->setConfigEntry('admin_guest_login_captcha_secured', "Y"); + +// CFG: BLOCK-SHOWS-REGISTRATION +$cfg->setConfigEntry('block_shows_registration', "Y"); + +// CFG EMAIl-TPL-RESEND-LINK +$cfg->setConfigEntry('email_tpl_resend_link', "text"); + +// CFG: MAIL-TEMPLATE-ENGINE +$cfg->setConfigEntry('mail_template_class', "MailTemplateEngine"); + +// CFG: IMAGE-TEMPLATE-ENGINE +$cfg->setConfigEntry('image_template_class', "ImageTemplateEngine"); + +// CFG: ADMIN-EMAIL +$cfg->setConfigEntry('admin_email', "you@some-hoster.invalid"); + +// [EOF] +?> diff --git a/application/admin/data.php b/application/admin/data.php new file mode 100644 index 0000000..c20f064 --- /dev/null +++ b/application/admin/data.php @@ -0,0 +1,51 @@ +isClass("ApplicationSelector"))) { return; } + * + * isset() is required to prevent a warning and is_object() is highly required + * when the application itself is requested in URL (hint: index.php?app=your_app) + * + * @author Roland Haeder + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Get config instance +$cfg = FrameworkConfiguration::getInstance(); + +// Get an instance of the helper +$app = call_user_func_array( + array($cfg->readConfig('app_helper_class'), "getInstance"), + array() +); + +// Set application name and version +$app->setAppName("Administrationsbereich"); +$app->setAppVersion("0.0.0"); +$app->setAppShortName("admin"); + +// [EOF] +?> diff --git a/application/admin/debug.php b/application/admin/debug.php new file mode 100644 index 0000000..f5da828 --- /dev/null +++ b/application/admin/debug.php @@ -0,0 +1,61 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Reederei-Objekt debuggen +//define('DEBUG_COMPANY_OBJ', true); +// Hafen-Objekt debuggen +//define('DEBUG_HARBOR_OBJ', true); +// Schiff-Objekt debuggen +//define('DEBUG_SHIP_OBJ', true); +// Auftrag-Objekt debuggen +//define('DEBUG_CONTRACT_OBJ', true); +// Haendler-Objekt debuggen +//define('DEBUG_MERCHANT_OBJ', true); +// Personal-Objekt debuggen +//define('DEBUG_PERSONELL_OBJ', true); +// Personal debuggen +//define('DEBUG_PERSONELL', true); +// Reederei debuggen +//define('DEBUG_COMPANY', true); +// Mitarbeiter debuggen +//define('DEBUG_COMPANY_EMPLOYEE', true); +// Hafen debuggen +//define('DEBUG_HARBOR', true); +// Werft debuggen +//define('DEBUG_SHIPYARD', true); +// Schiff debuggen +//define('DEBUG_SHIP', true); +// Schiffstruktur debuggen +//define('DEBUG_STRUCTURE', true); +// Kabinen debuggen +//define('DEBUG_CABIN', true); +// Decks debuggen +//define('DEBUG_DECK', true); +// Bauauftraege debuggen +//define('DEBUG_CONTRACT', true); +// Haendler debuggen +//define('DEBUG_MERCHANT', true); + +// [EOF] +?> diff --git a/application/admin/exceptions.php b/application/admin/exceptions.php new file mode 100644 index 0000000..f463a9c --- /dev/null +++ b/application/admin/exceptions.php @@ -0,0 +1,85 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Our own exception handler +function __exceptionHandler (FrameworkException $e) { + // Call the app_die() method + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", + ApplicationHelper::getInstance()->getAppName(), + ApplicationHelper::getInstance()->getAppShortName(), + $e->__toString(), + $e->getHexCode(), + $e->getMessage(), + $e->getPrintableBackTrace() + ), + $e->getHexCode(), + $e->getExtraData() + ); +} // END - function + +// Set the new handler +set_exception_handler('__exceptionHandler'); + +// Error handler +function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { + // Construct the message + $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", + basename($errfile), + $errline, + $errno, + $errstr + ); + + // Throw an exception here + throw new FatalErrorException($message, BaseFrameworkSystem::EXCEPTION_FATAL_ERROR); +} // END - function + +// Set error handler +set_error_handler('__errorHandler'); + +// Assertion handler +function __assertHandler ($file, $line, $code) { + // Empty code? + if ($code === "") $code = "Unknown"; + + // Create message + $message = sprintf("File: %s, Line: %s, Code: %s", + basename($file), + $line, + $code + ); + + // Throw an exception here + throw new AssertionException($message, BaseFrameworkSystem::EXCEPTION_ASSERTION_FAILED); +} // END - function + +// Init assert handling +assert_options(ASSERT_ACTIVE, 1); +assert_options(ASSERT_WARNING, 0); +assert_options(ASSERT_BAIL, 0); +assert_options(ASSERT_QUIET_EVAL, 0); +assert_options(ASSERT_CALLBACK, '__assertHandler'); + +// [EOF] +?> diff --git a/application/admin/exceptions/.htaccess b/application/admin/exceptions/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/exceptions/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/init.php b/application/admin/init.php new file mode 100644 index 0000000..39c5bed --- /dev/null +++ b/application/admin/init.php @@ -0,0 +1,53 @@ +isClass("ApplicationSelector"))) { return; } + * + * isset() is required to prevent a warning and is_object() is highly required + * when the application itself is requested in URL (hint: index.php?app=your_app) + * + * @author Roland Haeder + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Get config instance +$cfg = FrameworkConfiguration::getInstance(); + +// Initialize output system +require($cfg->readConfig('base_path') . 'inc/output.php'); + +// Initialize file i/o system +require($cfg->readConfig('base_path') . 'inc/file_io.php'); + +// Include the language sub-system +require($cfg->readConfig('base_path') . 'inc/language.php'); + +// This application needs a database connection then we have to simply include +// the inc/database.php script +require($cfg->readConfig('base_path') . 'inc/database.php'); + +// [EOF] +?> diff --git a/application/admin/interfaces/.htaccess b/application/admin/interfaces/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/interfaces/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/loader.php b/application/admin/loader.php new file mode 100644 index 0000000..12b388b --- /dev/null +++ b/application/admin/loader.php @@ -0,0 +1,39 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Get config instance +$cfg = FrameworkConfiguration::getInstance(); + +// Load all classes for the application +foreach ($lowerClasses as $className) { + // Load the application classes + ClassLoader::getInstance()->loadClasses(sprintf("%s/%s/%s", $cfg->readConfig('application_path'), $cfg->readConfig('app_name'), $className)); +} // END - if + +// Clean up the global namespace +unset($lowerClasses); +unset($className); + +// [EOF] +?> diff --git a/application/admin/main/.htaccess b/application/admin/main/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/main/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/class_ b/application/admin/main/class_ new file mode 100644 index 0000000..df22004 --- /dev/null +++ b/application/admin/main/class_ @@ -0,0 +1,41 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class extends BaseFrameworkSystem { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Clean up a little + $this->removeNumberFormaters(); + $this->removeSystemArray(); + } +} + +// [EOF] +?> diff --git a/application/admin/main/commands/.htaccess b/application/admin/main/commands/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/main/commands/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/commands/web/.htaccess b/application/admin/main/commands/web/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/main/commands/web/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/commands/web/class_WebAdminUserLoginCommand.php b/application/admin/main/commands/web/class_WebAdminUserLoginCommand.php new file mode 100644 index 0000000..c84d158 --- /dev/null +++ b/application/admin/main/commands/web/class_WebAdminUserLoginCommand.php @@ -0,0 +1,124 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class WebAdminUserLoginCommand extends BaseCommand implements Commandable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Clean up a little + $this->removeNumberFormaters(); + $this->removeSystemArray(); + } + + /** + * Creates an instance of this command and sets the resolver instance + * + * @param $resolverInstance An instance of a command resolver + * @return $commandInstance The created command instance + */ + public final static function createWebAdminUserLoginCommand (CommandResolver $resolverInstance) { + // Get a new instance + $commandInstance = new WebAdminUserLoginCommand(); + + // Set the resolver instance + $commandInstance->setResolverInstance($resolverInstance); + + // Return the prepared instance + return $commandInstance; + } + + /** + * Executes the command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + // First get a UserLogin instance + $loginInstance = ObjectFactory::createObjectByConfiguredName('user_login_class'); + + // First set request and response instance + $loginInstance->setRequestInstance($requestInstance); + + // Encrypt the password + $loginInstance->encryptPassword('pass'); + + // Do the login here + $loginInstance->doLogin($requestInstance, $responseInstance); + + // Was the login fine? Then redirect here + if ($loginInstance->ifLoginWasSuccessfull()) { + // Try to redirect here + try { + $responseInstance->redirectToConfiguredUrl('app_login_url'); + } catch (FrameworkException $e) { + // Something went wrong here! + $responseInstance->addFatalMessage($e->getMessage()); + } + } else { + // Attach error message to the response + $responseInstance->addFatalMessage('failed_user_login'); + } + } + + /** + * Adds extra filters to the given controller instance + * + * @param $controllerInstance A controller instance + * @param $requestInstance An instance of a class with an Requestable interface + * @return void + * @todo Add more filters + */ + public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { + // Which login type do we have? + switch ($this->getConfigInstance()->readConfig('login_type')) { + case "username": // Login via username + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_filter')); + break; + + case "email": // Login via email + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_verifier_filter')); + break; + + default: // Wether username or email is set + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_email_verifier_filter')); + break; + } + + // Password verifier filter + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_verifier_filter')); + + // Add filter for CAPTCHA + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_user_verifier_filter')); + } +} + +// [EOF] +?> diff --git a/application/admin/main/login/.htaccess b/application/admin/main/login/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/main/login/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/login/class_AdminUserLogin.php b/application/admin/main/login/class_AdminUserLogin.php new file mode 100644 index 0000000..a314269 --- /dev/null +++ b/application/admin/main/login/class_AdminUserLogin.php @@ -0,0 +1,150 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AdminUserLogin extends BaseFrameworkSystem implements LoginableUser { + /** + * The hashed password + */ + private $hashedPassword = ""; + + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Clean up a little + $this->removeNumberFormaters(); + $this->removeSystemArray(); + } + + /** + * Creates an instance of this login class + * + * @return $loginInstance An instance of this login class + */ + public final static function createAdminUserLogin () { + // Get a new instance + $loginInstance = new AdminUserLogin(); + + // Return the instance + return $loginInstance; + } + + /** + * Logins the user with the given request containing the credential. The + * result of the login can be thrown by exception or, if prefered stored + * in a boolean attribute which is then readable by a matching getter. + * + * @param $requestInstance An instance of a Requestable class + * @param $responseInstance An instance of a Responseable class + * @return void + * @throws UserPasswordMismatchException If the supplied password did not + * match with the stored password + * @todo We need to add something here which will make more than one + * @todo guest logins, users who are online but based on the same + * @todo user account. + */ + public function doLogin (Requestable $requestInstance, Responseable $responseInstance) { + // By default no method is selected + $method = null; + $data = ""; + + // Get a instance of the registry + $userInstance = Registry::getRegistry()->getInstance('user'); + + // Is there an instance? + if (is_null($userInstance)) { + // Get member class + $userClass = $this->getConfigInstance()->readConfig('user_class'); + + // Get a user instance + $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); + + // Remember this new instance in registry + Registry::getRegistry()->addInstance($userInstance); + } // END - if + + // Is the password correct? + if (!$userInstance->ifPasswordHashMatches($requestInstance)) { + // Mismatching password + throw new UserPasswordMismatchException(array($this, $userInstance), BaseUser::EXCEPTION_USER_PASS_MISMATCH); + } // END - if + + // ToDo place + + // Now do the real login. This can be cookie- or session-based login + // which depends on the admins setting then on the user's taste. + // 1) Get a login helper instance + $helperInstance = ObjectFactory::createObjectByConfiguredName('login_helper_class', array($requestInstance)); + + // 2) Execute the login. This will now login... + $helperInstance->executeLogin($responseInstance); + } + + /** + * Determines wether the login was fine. This is done by checking if the 'login' instance is in registry + * + * @return $loginDone Wether the login was fine or not + */ + public function ifLoginWasSuccessfull () { + // Is the registry key there? + $loginDone = (Registry::getRegistry()->getInstance('login') instanceof Registerable); + + // Return the result + return $loginDone; + } + + /** + * Encrypt the given request key or throw an exception if the key was not + * found in the request + * + * @param $requestKey Key in request class + * @return void + */ + public function encryptPassword ($requestKey) { + // Check if the password is found in the request + if ($this->getRequestInstance()->isRequestElementSet($requestKey)) { + // So encrypt the password and store it for later usage in + // the request: + + // Get the plain password + $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey); + + // Get user instance + $userInstance = Registry::getRegistry()->getInstance('user'); + + // Get a crypto helper and hash the password + $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword, $userInstance->getPasswordHash()); + + // Store the hash back in the request + $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword); + } // END - if + } +} + +// [EOF] +?> diff --git a/application/admin/main/login/helper/.htaccess b/application/admin/main/login/helper/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/main/login/helper/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/login/helper/class_AdminLoginHelper.php b/application/admin/main/login/helper/class_AdminLoginHelper.php new file mode 100644 index 0000000..eb67fa4 --- /dev/null +++ b/application/admin/main/login/helper/class_AdminLoginHelper.php @@ -0,0 +1,114 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class AdminLoginHelper extends BaseLoginHelper implements HelpableLogin { + /** + * The login method we shall choose + */ + private $authMethod = ""; + + // Exception constants + const EXCEPTION_INVALID_USER_INSTANCE = 0x190; + + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this class by given request instance + * + * @param $requestInstance An instance of a Requestable class + * @return $helperInstance An instance of this helper class + * @throws UserInstanceMissingException If the user instance in registry + * is missing or invalid + */ + public final static function createAdminLoginHelper (Requestable $requestInstance) { + // Get a new instance first + $helperInstance = new AdminLoginHelper(); + + // Get a user instance from registry + $userInstance = Registry::getRegistry()->getInstance('user'); + + // Is this instance valid? + if (!$userInstance instanceof ManageableAccount) { + // Thrown an exception here + throw new UserInstanceMissingException (array($helperInstance, 'user'), self::EXCEPTION_INVALID_USER_INSTANCE); + } // END - if + + // Set default login method from config + $helperInstance->setDefaultAuthMethod(); + + // Set request instance + $helperInstance->setRequestInstance($requestInstance); + + // Return the prepared instance + return $helperInstance; + } + + /** + * Setter for default login method from config + * + * @return void + */ + protected function setDefaultAuthMethod () { + $this->authMethod = $this->getConfigInstance()->readConfig('auth_method_class'); + } + + /** + * Execute the login request by given response instance. This instance can + * be used for sending cookies or at least the session id out. + * + * @param $responseInstance An instance of a Responseable class + * @return void + */ + public function executeLogin (Responseable $responseInstance) { + // Get an instance from the login method + $loginInstance = ObjectFactory::createObjectByName($this->authMethod, array($responseInstance)); + + // Set user cookie + $loginInstance->setUserAuth($this->getRequestInstance()->getRequestElement('username')); + + // Set password cookie + $loginInstance->setPasswordAuth($this->getRequestInstance()->getRequestElement('pass_hash')); + + // Remember this login instance for later usage + Registry::getRegistry()->addInstance('login', $loginInstance); + } +} + +// +?> diff --git a/application/admin/starter.php b/application/admin/starter.php new file mode 100644 index 0000000..b128839 --- /dev/null +++ b/application/admin/starter.php @@ -0,0 +1,53 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Is there an application helper instance? We need the method main() for +// maining the application +$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readConfig('app_helper_class'), "getInstance"), array()); + +// Some sanity checks +if ((empty($app)) || (is_null($app))) { + // Something went wrong! + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", + $application, + FrameworkConfiguration::getInstance()->readConfig('app_helper_class') + )); +} elseif (!is_object($app)) { + // No object! + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", + $application + )); +} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) { + // Method not found! + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", + $application, + FrameworkConfiguration::getInstance()->readConfig('entry_method') + )); +} + +// Call user function +call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array()); + +// [EOF] +?> diff --git a/application/admin/templates/.htaccess b/application/admin/templates/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/de/.htaccess b/application/admin/templates/de/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/de/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/de/code/action_login_logout.ctp b/application/admin/templates/de/code/action_login_logout.ctp new file mode 100644 index 0000000..07431f5 --- /dev/null +++ b/application/admin/templates/de/code/action_login_logout.ctp @@ -0,0 +1,30 @@ +addLinkWithTextById('logout_now_link_text'); + +// Flush the content +$helper->flushContent(); + +// Get helper instance +$helper = WebLinkHelper::createWebLinkHelper($this, 'return_login_link', 'index.php?app={?app_short_name?}&page=login_area'); + +// Set link text +$helper->addLinkWithTextById('return_login_link_text'); + +// Flush the content +$helper->flushContent(); + +// [EOF] +?> +
+
+ Willst du dich wirklich aus dem {?app_full_name?} aussloggen? +
+ + +
diff --git a/application/admin/templates/de/code/action_login_profile.ctp b/application/admin/templates/de/code/action_login_profile.ctp new file mode 100644 index 0000000..7e7fd47 --- /dev/null +++ b/application/admin/templates/de/code/action_login_profile.ctp @@ -0,0 +1,117 @@ +prefetchValueInstance('user'); + +// Password can only be changed when the old one is entered and new one twice! +$helper->addFormGroup('pass', "Neues Passwort einrichten:"); +$helper->addFormSubGroup('pass', "Bitte gebe zum Ändern deines Passwortes zweimal das gewünschte neue Passwort ein."); +$helper->addFieldText('pass1', "Neues Passwort:"); +$helper->addInputPasswordField('pass1'); +$helper->addFieldText('pass2', "Neues Passwort, Wiederholung:"); +$helper->addInputPasswordField('pass2'); + +// Display current email +$helper->addFormNote('current_email', "Derzeitige Email-Adresse: ".$helper->getValueField('email').""); + +// Only for changing email address +if ($helper->ifEmailChangeAllowed()) { + $helper->addFormGroup('email', "Änderung deiner Email-Addresse:"); + $helper->addFormSubGroup('email', "Gebe nur deine Email-Adresse zweimal ein, wenn du diese ändern möchtest!"); + $helper->addFieldText('email1', "Email-Adresse:"); + $helper->addInputTextField('email1'); + $helper->addFieldText('email2', "Wiederholung Email-Adresse:"); + $helper->addInputTextField('email2'); + + if ($helper->ifEmailMustBeUnique()) { + $helper->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im {?app_full_name?} verwendet worden sein."); + } // END - Unique email addresses + + if ($helper->ifEmailChangeRequireConfirmation()) { + $helper->addFormNote('confirm_link', "Es wird ein Bestätigungslink an deine neue Email-Adresse gesendet. Bitte klicke diesen dann möglichst schnell an."); + } // END - Change requires confirmation +} // END - email change allowed + +$helper->addFormGroup('profile', "Hier kannst du deine Profildaten ändern."); + +// Persoenliche Daten mit in der Anmeldung abfragen? +if ($helper->ifRegisterIncludesPersonaData()) { + $helper->addFormSubGroup('persona', "Wenn du magst, dann vervollständige deine komplette Adresse mit deinem Namen."); + $helper->addFieldText('surname', "Dein Vorname:"); + $helper->addInputTextFieldWithDefault('surname'); + $helper->addFieldText('family', "Dein Nachname:"); + $helper->addInputTextFieldWithDefault('family'); + $helper->addFieldText('street', "Strasse und Hausnummer:"); + $helper->addInputTextFieldWithDefault('street'); + $helper->addFieldText('city', "Wohnort:"); + $helper->addInputTextFieldWithDefault('city'); +} // END - Persona data + +$helper->addFormSubGroup('zip', "Magst du uns auch deine Postleitzahl verraten?"); +$helper->addFieldText('zip', "Postleitzahl:"); +$helper->addInputTextFieldWithDefault('zip'); + +$helper->addFormSubGroup('chat', "Gebe hier deine Nicknames bzw. Nummern an:"); + +if ($helper->ifChatEnabled('icq')) { + $helper->addFieldText('icq', "ICQ-Nummer:"); + $helper->addInputTextFieldWithDefault('icq'); +} // END - if + +if ($helper->ifChatEnabled('jabber')) { + $helper->addFieldText('jabber', "Jabber:"); + $helper->addInputTextFieldWithDefault('jabber'); +} // END - if + +if ($helper->ifChatEnabled('yahoo')) { + $helper->addFieldText('yahoo', "Yahoo!:"); + $helper->addInputTextFieldWithDefault('yahoo'); +} // END - if + +if ($helper->ifChatEnabled('aol')) { + $helper->addFieldText('aol', "AOL-Screenname:"); + $helper->addInputTextFieldWithDefault('aol'); +} // END - if + +if ($helper->ifChatEnabled('msn')) { + $helper->addFieldText('msn', "MSN:"); + $helper->addInputTextFieldWithDefault('msn'); +} // END - if + +if (!$helper->ifRegisterRequiresEmailVerification()) { + $helper->addFormExtraNote(1, "Die Benachrichtigungen per sind im Loginbereich verfeinerbar, welche du genau haben willst."); +} // END - Extra note + +// Rules already accepted? +if ($helper->ifRulesHaveChanged()) { + $helper->addFormGroup('rules', "Bitte lese dir die Administrationsregeln gut durch und kreuze dann "Ja, ich akzeptiere die aktuellen Administrationsregeln" an."); + $helper->addFieldText('rules', "Ja, ich akzeptiere die aktuellen Administrationsregeln:"); + $helper->addInputCheckboxField('rules', false); +} else { + $helper->addFormNote('rules_accepted', "Du hast die aktuellen Administrationsregeln akzeptiert. Vielen Dank!"); + $helper->addInputHiddenField('rules', "1"); +} + +// Ask again for current account password +$helper->addFormGroup('pass_old', "Bitte gebe zur Bestätigung der Änderungen dein derzeitiges Passwort ein."); +$helper->addFieldText('pass_old', "Altes Passwort:"); +$helper->addInputPasswordField('pass_old'); + +// Abschliessender Hinweis und Abschluss des Formulars +$helper->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!"); +$helper->addInputResetButton("Alles nochmal eingeben"); +$helper->addInputSubmitButton("Accountdaten aktualisieren"); +$helper->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzten gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz"."); +$helper->flushContent(); +?> +
+ Deine Profildaten bearbeiten +
+ +
+ {?admin_profile?} +
diff --git a/application/admin/templates/de/code/action_login_status_problem.ctp b/application/admin/templates/de/code/action_login_status_problem.ctp new file mode 100644 index 0000000..4c57125 --- /dev/null +++ b/application/admin/templates/de/code/action_login_status_problem.ctp @@ -0,0 +1,61 @@ +prefetchValueInstance('user'); + +// Add submit button or notice +if ($helper->ifUserAccountUnconfirmed()) { + // Add submit button + $helper->addInputHiddenFieldWithDefault('email'); + $helper->addInputSubmitButton("Bestätigungslink erneut aussenden"); +} elseif ($helper->ifUserAccountLocked()) { + // Account is locked + $helper->addFormNote('status_locked', "Dein Account wurde gesperrt! Grund der Sperre: + ".$helper->getValueField('lock_reason')." + Bitte melde dich beim Support, damit dieser dir weiterhelfen kann." + ); +} + +// Flush content and automatically close the form +$helper->flushContent(); + +if ($helper->ifUserAccountUnconfirmed()) { + // Build the form for confirmation + $helper = WebFormHelper::createWebFormHelper($this, "confirm_code"); + + // Add code box + $helper->addFormGroup('code', "Bitte gebe hier den Bestätigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen."); + $helper->addFieldText('code', "Bestätigungscode aus der Mail:"); + $helper->addInputTextField('code'); + + // Add submit button + $helper->addFormGroup('buttons', "Bitte einmal abschicken und das Ergebnis abwarten!"); + $helper->addInputResetButton("Nochmal eingeben"); + $helper->addInputSubmitButton("Bestätigungscode absenden"); + + // Flush content and automatically close the form + $helper->flushContent(); +} // END - if +?> +
+ Problem mit deinem Account gefunden: +
+ +
+ Du bist möglicherweise für deine ausgewählte Aktion nicht + berechtigt oder du hast noch deine Email-Adresse nicht bestätigt. Du + kannst dir nun den Bestätigungslink erneut aussenden lassen, oder den + Bestätigungscode unten eingeben. + + + +
+ {?confirm_code?} +
+
diff --git a/application/admin/templates/de/code/action_login_welcome.ctp b/application/admin/templates/de/code/action_login_welcome.ctp new file mode 100644 index 0000000..df64eaf --- /dev/null +++ b/application/admin/templates/de/code/action_login_welcome.ctp @@ -0,0 +1,3 @@ +
+ {?admin_login_news?} +
diff --git a/application/admin/templates/de/code/admin_main.ctp b/application/admin/templates/de/code/admin_main.ctp new file mode 100644 index 0000000..256f91e --- /dev/null +++ b/application/admin/templates/de/code/admin_main.ctp @@ -0,0 +1,19 @@ +{?header?} + +
+ {?admin_header?} +
+ + + +
+ {?content?} +
+ + + +{?footer?} diff --git a/application/admin/templates/de/code/block_persona_data.ctp b/application/admin/templates/de/code/block_persona_data.ctp new file mode 100644 index 0000000..e92df8a --- /dev/null +++ b/application/admin/templates/de/code/block_persona_data.ctp @@ -0,0 +1,24 @@ +prefetchValueInstance('user'); + +// Flush the content out +$helperInstance->flushContent(); + +// End of PHP commands +?> +
+ Nickname: {?block_username?} +
+
+ Account-Status: {?block_user_status?} +
+ +
+ Angemeldet seit: {?block_registered?} +
diff --git a/application/admin/templates/de/code/captch_graphic_code.ctp b/application/admin/templates/de/code/captch_graphic_code.ctp new file mode 100644 index 0000000..210db8f --- /dev/null +++ b/application/admin/templates/de/code/captch_graphic_code.ctp @@ -0,0 +1,16 @@ +addFieldText('captcha_code', "Bitte wiederhole den Code:"); +$captchaHelper->addInputTextField('c_code'); +$captchaHelper->addInputHiddenField('hash', $this->readVariable('captcha_hash')); +$captchaHelper->flushContent(); + +// [EOF] +?> +
+ CAPTCHA-Bild +
+
+ {?captcha_code?} +
diff --git a/application/admin/templates/de/code/footer.ctp b/application/admin/templates/de/code/footer.ctp new file mode 100644 index 0000000..aa82e68 --- /dev/null +++ b/application/admin/templates/de/code/footer.ctp @@ -0,0 +1,4 @@ + + + + diff --git a/application/admin/templates/de/code/header.ctp b/application/admin/templates/de/code/header.ctp new file mode 100644 index 0000000..1c92a39 --- /dev/null +++ b/application/admin/templates/de/code/header.ctp @@ -0,0 +1,20 @@ + + + + + {?app_full_name?} - {?title?} + + + + + + + + + + + + + + +
diff --git a/application/admin/templates/de/code/home.ctp b/application/admin/templates/de/code/home.ctp new file mode 100644 index 0000000..16060c8 --- /dev/null +++ b/application/admin/templates/de/code/home.ctp @@ -0,0 +1,3 @@ +
+ Willkommen zum {?app_full_name?}! +
diff --git a/application/admin/templates/de/code/login_failed.ctp b/application/admin/templates/de/code/login_failed.ctp new file mode 100644 index 0000000..e7f7d75 --- /dev/null +++ b/application/admin/templates/de/code/login_failed.ctp @@ -0,0 +1,41 @@ +addLinkWithTextById('login_retry_link_text'); + +// Flush the content +$helper->flushContent(); + +// [EOF] +?> +
+ Du bist nicht mehr im {?app_full_name?} eingeloggt! +
+ +
+ Du bist nicht mehr im {?app_full_name?} eingeloggt. Dies kann verschiedene Gründe haben: + +
    +
  1. Dein Browser nimmt keine Cookies an.
  2. +
  3. Du hast den Loginbereich aus deinen Bookmarks/Favoriten aufgerufen + und die Cookies sind gelöscht.
  4. +
  5. Es besteht ein Problem mit dem Server, wofür du meistens nichts + kannst. Bitte kontaktiere den Support, falls dieses Problem + weiterhin besteht.
  6. +
+ + Wenn du den Support kontaktierst, halte bitte sämtliche relevante + Informationen - nicht aber dein Passwort + - bereit. Du kannst auch einen Screenshot dieser Seite anfertigen und dem + Support diesen senden! +
+ + diff --git a/application/admin/templates/de/code/login_form.ctp b/application/admin/templates/de/code/login_form.ctp new file mode 100644 index 0000000..afdf7b0 --- /dev/null +++ b/application/admin/templates/de/code/login_form.ctp @@ -0,0 +1,75 @@ +ifLoginIsEnabled()) { + // Formular ist aktiv + $helper->addFormGroup('login', "Gebe hier deine Logindaten ein:"); + + // Welches Loginverfahren wurde konfiguriert? + if ($helper->ifLoginWithUsername()) { + // Login mit Username + $helper->addFormSubGroup('username', "Bitte mit deinem Nickname einloggen."); + $helper->addFieldText('username', "Dein Nickname:"); + $helper->addInputTextField('username'); + } elseif ($helper->ifLoginWithEmail()) { + // Login mit Email + $helper->addFormSubGroup('email', "Bitte mit deiner Email-Adresse einloggen."); + $helper->addFieldText('email', "Deine Email-Addresse:"); + $helper->addInputTextField('email'); + } else { + // Login mit Email/Username + $helper->addFormSubGroup('user_email', "Bitte mit deinem Nickname oder Email-Adresse einloggen."); + $helper->addFieldText('user_email', "Dein Nickname/Email:"); + $helper->addInputTextField('user_email'); + } + + $helper->addFormSubGroup('pass', "Gebe dein Passwort von der Anmeldung ein."); + $helper->addFieldText('pass', "Dein Passwort:"); + $helper->addInputPasswordField('pass'); + + // CAPTCHA enabled? + if ($helper->ifFormSecuredWithCaptcha()) { + $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helper->addCaptcha(); + } // END - if + + // Submit buttons + $helper->addFormGroup('buttons_user', "Alles richtig eingegeben?"); + $helper->addInputResetButton("Formular leeren"); + $helper->addInputSubmitButton("Zum {?app_full_name?} einloggen"); +} else { + // Formular deaktiviert + $helper->addFormNote('form_deactivated', "Einloggen in den {?app_full_name?} ist deaktiviert worden. Bitte komme später noch mal wieder."); + $helper->addFormNote('admin_notice', "Nachricht vom Admin: ".$this->getConfigInstance()->readConfig('login_disabled_reason').""); +} + +// Formular schliessen +$helper->flushContent(); + +// Get helper instance +$helper = WebLinkHelper::createWebLinkHelper($this, 'register_login_form_link', 'index.php?app={?app_short_name?}&page=register'); + +// Set link text +$helper->addLinkWithTextById('register_login_form_link_text'); + +// Flush the content +$helper->flushContent(); + +?> +
+ Einloggen zu {?app_full_name?} +
+ +
+
+ {?admin_user_login?} +
+
+ + diff --git a/application/admin/templates/de/code/login_main.ctp b/application/admin/templates/de/code/login_main.ctp new file mode 100644 index 0000000..fecb5d1 --- /dev/null +++ b/application/admin/templates/de/code/login_main.ctp @@ -0,0 +1,56 @@ +prefetchValueInstance('user'); + +// Assign fields with template variables +$blockInstance->assignField('username'); +$blockInstance->assignFieldWithFilter('user_status', "user_status_translator"); + +// Shall we include registration date? +if ($blockInstance->ifIncludeRegistrationStamp()) { + // Then assign it as well! + $blockInstance->assignFieldWithFilter('registered', 'formatTimestamp'); +} // END - if + +// Flush the content out to a template variable +$blockInstance->flushContent(); + +// Get helper instance +$helper = WebLinkHelper::createWebLinkHelper($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'); + +// Add action +$helper->addActionLink('logout', "Ausloggen"); + +// Flush the content +$helper->flushContent(); + +// End of all PHP commands +?> +
+ Willkommen im Loginbereich zum {?app_full_name?}! +
+ +
+ {?login_content?} +
+ +
+
+ Account-Infos: +
+ +
+ {?persona_data?} +
+ + +
diff --git a/application/admin/templates/de/code/logout_done.ctp b/application/admin/templates/de/code/logout_done.ctp new file mode 100644 index 0000000..63798fd --- /dev/null +++ b/application/admin/templates/de/code/logout_done.ctp @@ -0,0 +1,19 @@ +addLinkWithTextById('relogin_link_text'); + +// Flush the content +$helper->flushContent(); + +// [EOF] +?> +
+ Du bist jetzt aus dem {?app_full_name!} ausgeloggt! +
+ +
+ Du kannst dich nun {?relogin_link}? oder weiter auf unseren Seiten bleiben. ;-) +
diff --git a/application/admin/templates/de/code/mail_debug.ctp b/application/admin/templates/de/code/mail_debug.ctp new file mode 100644 index 0000000..e62dd07 --- /dev/null +++ b/application/admin/templates/de/code/mail_debug.ctp @@ -0,0 +1,25 @@ +
+ Mail-Debug-Ausgabe: +
+ +
+
+ Von: {?sender?} +
+
+ An: {?recipient?} +
+
+ Betreff: {?subject?} +
+
+ +
+
+ Nachricht: +
+ +
+ {?message?} +
+
diff --git a/application/admin/templates/de/code/register_form.ctp b/application/admin/templates/de/code/register_form.ctp new file mode 100644 index 0000000..4ba36c1 --- /dev/null +++ b/application/admin/templates/de/code/register_form.ctp @@ -0,0 +1,115 @@ +addFormGroup('login', "Bitte gebe hier gewünschten Nickname und dein Zugangspasswort ein."); +$helper->addFormSubGroup('username', "Dein Nickname wird erst nach Absenden des Formulares geprüft. Später bauen wir dann einen automatischen Test ein, der dir sofort zeigt, ob der Nickname bereits vergeben ist."); +$helper->addFieldText('username', "Nickname im {?app_full_name?}:"); +$helper->addInputTextField('username'); +$helper->addFormSubGroup('pass', "Dein Passwort sollte nicht zu leicht erratbar sein. Später bauen wir hier noch einen automatischen Test ein, der dir sofort die Passwortstärke anzeigt."); +$helper->addFieldText('pass1', "Passwort:"); +$helper->addInputPasswordField('pass1'); +$helper->addFieldText('pass2', "Passwortwiederholung:"); +$helper->addInputPasswordField('pass2'); + +if ($helper->ifRegisterRequiresEmailVerification()) { + $helper->addFormGroup('email', "Bitte gebe deine Email zweimal (ein zweites Mal zur Bestätigung) ein, damit wir dir deinen Freischaltlink zusenden können."); + $helper->addFieldText('email1', "Email-Adresse:"); + $helper->addInputTextField('email1'); + $helper->addFieldText('email2', "Wiederholung Email-Adresse:"); + $helper->addInputTextField('email2'); + + if ($helper->ifEmailMustBeUnique()) { + $helper->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im {?app_full_name?} verwendet worden sein."); + } // END - Unique email addresses + +} // END - email verification + +if ($helper->ifRegisterIncludesProfile()) { + $helper->addFormGroup('profile', "Hier kannst du zusätzlich deine Profildaten vorweg eingeben, du kannst sie aber auch nach dem Login vervollständigen!"); + + if (!$helper->ifRegisterRequiresEmailVerification()) { + $helper->addFormSubGroup('email', "Die Angabe deiner Email-Adresse ist nur dann nötig, wenn du auch Email-Benachrichtigungen (*1) haben möchtest."); + $helper->addFieldText('email1', "Email-Adresse:"); + $helper->addInputTextField('email1'); + } // END - No email verification + + // Persoenliche Daten mit in der Anmeldung abfragen? + if ($helper->ifRegisterIncludesPersonaData()) { + $helper->addFormSubGroup('persona', "Wenn du magst, dann vervollständige deine komplette Adresse mit deinem Namen."); + $helper->addFieldText('surname', "Dein Vorname:"); + $helper->addInputTextField('surname'); + $helper->addFieldText('family', "Dein Nachname:"); + $helper->addInputTextField('family'); + $helper->addFieldText('street', "Strasse und Hausnummer:"); + $helper->addInputTextField('street'); + $helper->addFieldText('city', "Wohnort:"); + $helper->addInputTextField('city'); + } // END - Persona data + + $helper->addFormSubGroup('zip', "Magst du uns auch deine Postleitzahl verraten?"); + $helper->addFieldText('zip', "Postleitzahl:"); + $helper->addInputTextField('zip'); + + $helper->addFormSubGroup('chat', "Gebe hier deine Nicknames bzw. Nummern an:"); + + if ($helper->ifChatEnabled('icq')) { + $helper->addFieldText('icq', "ICQ-Nummer:"); + $helper->addInputTextField('icq'); + } // END - if + + if ($helper->ifChatEnabled('jabber')) { + $helper->addFieldText('jabber', "Jabber:"); + $helper->addInputTextField('jabber'); + } // END - if + + if ($helper->ifChatEnabled('yahoo')) { + $helper->addFieldText('yahoo', "Yahoo!:"); + $helper->addInputTextField('yahoo'); + } // END - if + + if ($helper->ifChatEnabled('aol')) { + $helper->addFieldText('aol', "AOL-Screenname:"); + $helper->addInputTextField('aol'); + } // END - if + + if ($helper->ifChatEnabled('msn')) { + $helper->addFieldText('msn', "MSN:"); + $helper->addInputTextField('msn'); + } // END - if + + if (!$helper->ifRegisterRequiresEmailVerification()) { + $helper->addFormExtraNote(1, "Die Benachrichtigungen per sind im Loginbereich verfeinerbar, welche du genau haben willst."); + } // END - Extra note + +} // END - ask profile data + +// Posting-/Kommentarregeln abfragen +$helper->addFormGroup('rules', "Bitte lese dir die Administrationsregeln gut durch und kreuze dann "Ja, ich akzeptiere die aktuellen Administrationsregeln" an."); +$helper->addFieldText('rules', "Ja, ich akzeptiere die aktuellen Administrationsregeln:"); +$helper->addInputCheckboxField('rules', false); + +// Add CAPTCHA? +if ($helper->ifFormSecuredWithCaptcha()) { + $helper->addFormGroup('captcha', "Bitte wiederhole den angezeigten Code damit die Anmeldung abgeschlossen werden kann."); + $helper->addCaptcha(); +} // END - if + +// Final note and submit buttons +$helper->addFormGroup('buttons', "Wenn du alle benötigten Felder korrekt ausgefüt hast, kannst du die Anmeldung abschliessen."); + +$helper->addInputResetButton("Alles nochmal eingeben"); +$helper->addInputSubmitButton("Anmeldung zum {?app_full_name?} abschliessen"); +$helper->addFormNote('data_protection', "Deine Daten werden nach den gültigen Datenschutzgesetzten gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz"."); +$helper->flushContent(); +?> +
+ Anmeldung bei {?app_full_name?} +
+ +
+ {?admin_register?} +
diff --git a/application/admin/templates/de/emails/.htaccess b/application/admin/templates/de/emails/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/de/emails/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/de/emails/text_resend_link.tpl b/application/admin/templates/de/emails/text_resend_link.tpl new file mode 100644 index 0000000..e764146 --- /dev/null +++ b/application/admin/templates/de/emails/text_resend_link.tpl @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/application/admin/templates/de/html/.htaccess b/application/admin/templates/de/html/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/de/html/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/de/html/nav_advert.tpl b/application/admin/templates/de/html/nav_advert.tpl new file mode 100644 index 0000000..22da43b --- /dev/null +++ b/application/admin/templates/de/html/nav_advert.tpl @@ -0,0 +1 @@ + diff --git a/application/admin/templates/de/html/selector_ship-simu.tpl b/application/admin/templates/de/html/selector_ship-simu.tpl new file mode 100644 index 0000000..b96640e --- /dev/null +++ b/application/admin/templates/de/html/selector_ship-simu.tpl @@ -0,0 +1,17 @@ +
+
+ Gründen Sie eine virtuelle Reederei an den bedeutestens + Welthäfen! Oder treten Sie einer Reederei als Angestellter bei und + arbeiten Sie sich bis in die Chef-Etagge hoch! +
+ +
+ Oder fangen Sie als Matrose auf einem Passagierschiff (virtuell) an zu + arbeiten und werden Sie nach wenigen Kreuzfahrten bald Kapitän! +
+ +
+ Oder buchen Sie eine virtuelle Kreuzfahrt durch die bekannten Meeren in + {!POINTS!} in einer Luxus-Suite! +
+
diff --git a/application/admin/templates/images/.htaccess b/application/admin/templates/images/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/images/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/images/_cache/.htaccess b/application/admin/templates/images/_cache/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/images/_cache/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/images/de/.htaccess b/application/admin/templates/images/de/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/images/de/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/images/de/image/.htaccess b/application/admin/templates/images/de/image/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/templates/images/de/image/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/templates/images/de/image/base_code.itp b/application/admin/templates/images/de/image/base_code.itp new file mode 100644 index 0000000..6501b56 --- /dev/null +++ b/application/admin/templates/images/de/image/base_code.itp @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/admin/templates/images/de/image/code_captcha.itp b/application/admin/templates/images/de/image/code_captcha.itp new file mode 100644 index 0000000..2e28522 --- /dev/null +++ b/application/admin/templates/images/de/image/code_captcha.itp @@ -0,0 +1,78 @@ +setImageName("code_captcha"); +$helper->setBaseImage("base_code"); + +// Set image dimensions +$helper->setWidth(100); +$helper->setHeight(50); + +// Get random number +$rand = $helper->getRngInstance()->randomNumber(0, 6); + +// Background and foreground color +switch ($rand) { + case 1: + // First varriant + $helper->setBackgroundColorRedGreenBlue('rand', 0x90 , 0x00 ); + $helper->setForegroundColorRedGreenBlue(0x00 , 0xff , 'rand'); + break; + + case 2: + // Second varriant + $helper->setBackgroundColorRedGreenBlue(0x90 , 'rand', 0x00 ); + $helper->setForegroundColorRedGreenBlue(0xff , 0x00 , 'rand'); + break; + + case 3: + // Third varriant + $helper->setBackgroundColorRedGreenBlue('rand', 0x00 , 0x90 ); + $helper->setForegroundColorRedGreenBlue(0x00 , 'rand', 0xff ); + break; + + case 4: + // Forth varriant + $helper->setBackgroundColorRedGreenBlue(0x00 , 0x90 , 'rand'); + $helper->setForegroundColorRedGreenBlue(0x00 , 'rand', 0xa0 ); + break; + + case 5: + // Fith varriant + $helper->setBackgroundColorRedGreenBlue('rand', 0x00 , 0x90 ); + $helper->setForegroundColorRedGreenBlue(0x00 , 0xe0 , 'rand'); + break; + + default: + // Last varriant + $helper->setBackgroundColorRedGreenBlue(0x00 , 'rand', 0x90 ); + $helper->setForegroundColorRedGreenBlue(0xff , 0x00 , 'rand'); + break; +} + +// Random X/Y factors... +$xRand = $helper->getRngInstance()->randomNumber(0, 45); +$yRand = $helper->getRngInstance()->randomNumber(0, 25); + +// Add code +$helper->addTextLine("code"); +$helper->setCoord((5 + $xRand), (5 + $yRand)); +$helper->setFontSize('rand'); +$helper->setImageString("{?decrypted_code?}"); + +// Only for debug! +/* +$helper->addTextLine("debug"); +$helper->setCoord(90, 35); +$helper->setFontSize(3); +$helper->setImageString($rand); +*/ + +// Flush content to the template engine +$helper->flushContent(); + +// Comment this out if image is done +//$this->debugInstance(); + +// [EOF] +?> diff --git a/application/blog/exceptions.php b/application/blog/exceptions.php index c6310a3..f463a9c 100644 --- a/application/blog/exceptions.php +++ b/application/blog/exceptions.php @@ -25,7 +25,7 @@ // Our own exception handler function __exceptionHandler (FrameworkException $e) { // Call the app_die() method - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", ApplicationHelper::getInstance()->getAppName(), ApplicationHelper::getInstance()->getAppShortName(), $e->__toString(), @@ -44,7 +44,7 @@ set_exception_handler('__exceptionHandler'); // Error handler function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message - $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", + $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", basename($errfile), $errline, $errno, @@ -64,7 +64,7 @@ function __assertHandler ($file, $line, $code) { if ($code === "") $code = "Unknown"; // Create message - $message = sprintf("File: %s, Line: %s, Code: %s", + $message = sprintf("File: %s, Line: %s, Code: %s", basename($file), $line, $code diff --git a/application/blog/starter.php b/application/blog/starter.php index b1530f7..b128839 100644 --- a/application/blog/starter.php +++ b/application/blog/starter.php @@ -29,18 +29,18 @@ $app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readCon // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, FrameworkConfiguration::getInstance()->readConfig('app_helper_class') )); } elseif (!is_object($app)) { // No object! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) { // Method not found! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, FrameworkConfiguration::getInstance()->readConfig('entry_method') )); diff --git a/application/selector/starter.php b/application/selector/starter.php index 0d189dc..7fd2509 100644 --- a/application/selector/starter.php +++ b/application/selector/starter.php @@ -29,18 +29,18 @@ $app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readCon // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, FrameworkConfiguration::getInstance()->readConfig('app_helper_class') )); } elseif (!is_object($app)) { // No object! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) { // Method not found! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, FrameworkConfiguration::getInstance()->readConfig('entry_method') )); @@ -51,7 +51,7 @@ try { // Call user function call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array()); } catch (FrameworkException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s has been terminated due to a thrown exception: %s - %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s has been terminated due to a thrown exception: %s - %s", $application, $e->__toString(), $e->getMessage() diff --git a/application/ship-simu/exceptions.php b/application/ship-simu/exceptions.php index c6310a3..f463a9c 100644 --- a/application/ship-simu/exceptions.php +++ b/application/ship-simu/exceptions.php @@ -25,7 +25,7 @@ // Our own exception handler function __exceptionHandler (FrameworkException $e) { // Call the app_die() method - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", ApplicationHelper::getInstance()->getAppName(), ApplicationHelper::getInstance()->getAppShortName(), $e->__toString(), @@ -44,7 +44,7 @@ set_exception_handler('__exceptionHandler'); // Error handler function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message - $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", + $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", basename($errfile), $errline, $errno, @@ -64,7 +64,7 @@ function __assertHandler ($file, $line, $code) { if ($code === "") $code = "Unknown"; // Create message - $message = sprintf("File: %s, Line: %s, Code: %s", + $message = sprintf("File: %s, Line: %s, Code: %s", basename($file), $line, $code diff --git a/application/ship-simu/exceptions/class_BirthdayInvalidException.php b/application/ship-simu/exceptions/class_BirthdayInvalidException.php index 9b8add3..4816e32 100644 --- a/application/ship-simu/exceptions/class_BirthdayInvalidException.php +++ b/application/ship-simu/exceptions/class_BirthdayInvalidException.php @@ -24,7 +24,7 @@ class BirthdayInvalidException extends FrameworkException { public function __construct (array $birthArray, $code) { // Add a message around the missing class - $message = sprintf("Das Geburtsdatum %s ist leider falsch.", + $message = sprintf("Das Geburtsdatum %s ist leider falsch.", date("d.m.Y", mktime( 0, 0, 0, $birthArray[1], diff --git a/application/ship-simu/exceptions/class_ContractAllreadySignedException.php b/application/ship-simu/exceptions/class_ContractAllreadySignedException.php index 699b2ae..8198ce0 100644 --- a/application/ship-simu/exceptions/class_ContractAllreadySignedException.php +++ b/application/ship-simu/exceptions/class_ContractAllreadySignedException.php @@ -24,7 +24,7 @@ class ContractAllreadySignedException extends FrameworkException { public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:] Die Vertragsparteien %s und %s haben den Vertrag bereits unterzeichnet!", + $message = sprintf("[%s:] Die Vertragsparteien %s und %s haben den Vertrag bereits unterzeichnet!", $classArray[0]->__toString(), $classArray[1]->getCompanyName(), $classArray[2]->getCompanyName() diff --git a/application/ship-simu/exceptions/class_ContractPartnerMismatchException.php b/application/ship-simu/exceptions/class_ContractPartnerMismatchException.php index 6840fb7..a012ca7 100644 --- a/application/ship-simu/exceptions/class_ContractPartnerMismatchException.php +++ b/application/ship-simu/exceptions/class_ContractPartnerMismatchException.php @@ -24,7 +24,7 @@ class ContractPartnerMismatchException extends FrameworkException { public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:] Der Vertragspartner von %s ist ungütig (%s) und darf diesen Vertrag nicht unterzeichnen!", + $message = sprintf("[%s:] Der Vertragspartner von %s ist ungütig (%s) und darf diesen Vertrag nicht unterzeichnen!", $classArray[0]->__toString(), $classArray[1]->getCompanyName(), $classArray[2]->getCompanyName() diff --git a/application/ship-simu/exceptions/class_ItemNotInPriceListException.php b/application/ship-simu/exceptions/class_ItemNotInPriceListException.php index 798e18c..03268ee 100644 --- a/application/ship-simu/exceptions/class_ItemNotInPriceListException.php +++ b/application/ship-simu/exceptions/class_ItemNotInPriceListException.php @@ -24,7 +24,7 @@ class ItemNotInPriceListException extends FrameworkException { public function __construct (FrameworkInterface $class, $code) { // Add a message around the missing class - $message = sprintf("[Merchant:] Preis für den Artikel %s nicht gefunden.", + $message = sprintf("[Merchant:] Preis für den Artikel %s nicht gefunden.", $class->__toString() ); diff --git a/application/ship-simu/exceptions/class_MissingSimulatorIdException.php b/application/ship-simu/exceptions/class_MissingSimulatorIdException.php index 469a616..ae0d885 100644 --- a/application/ship-simu/exceptions/class_MissingSimulatorIdException.php +++ b/application/ship-simu/exceptions/class_MissingSimulatorIdException.php @@ -24,7 +24,7 @@ class MissingSimulatorIdException extends FrameworkException { public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:] Die Simulator-ID %s scheint ungültig zu sein.", + $message = sprintf("[%s:] Die Simulator-ID %s scheint ungültig zu sein.", $classArray[0]->__toString(), $classArray[1] ); diff --git a/application/ship-simu/exceptions/class_NoShippingCompanyOwnedException.php b/application/ship-simu/exceptions/class_NoShippingCompanyOwnedException.php index b1428c8..19fc829 100644 --- a/application/ship-simu/exceptions/class_NoShippingCompanyOwnedException.php +++ b/application/ship-simu/exceptions/class_NoShippingCompanyOwnedException.php @@ -31,7 +31,7 @@ class NoShippingCompanyOwnedException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Current user (class %s) does not own any shipping companies.", + $message = sprintf("[%s:%d] Current user (class %s) does not own any shipping companies.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1]->__toString() diff --git a/application/ship-simu/exceptions/class_NoShipyardsConstructedException.php b/application/ship-simu/exceptions/class_NoShipyardsConstructedException.php index 03245b3..50d6feb 100644 --- a/application/ship-simu/exceptions/class_NoShipyardsConstructedException.php +++ b/application/ship-simu/exceptions/class_NoShipyardsConstructedException.php @@ -24,7 +24,7 @@ class NoShipyardsConstructedException extends FrameworkException { public function __construct (FrameworkInterface $class, $code) { // No class given - $message = sprintf("Please provide a class for %s", __CLASS__); + $message = sprintf("Please provide a class for %s", __CLASS__); if (is_object($class)) { // Add a message around the missing class $message = sprintf("[%s:] Keine Werften gefunden!", diff --git a/application/ship-simu/exceptions/class_ShipPartNotConstructableException.php b/application/ship-simu/exceptions/class_ShipPartNotConstructableException.php index ecda833..e02c561 100644 --- a/application/ship-simu/exceptions/class_ShipPartNotConstructableException.php +++ b/application/ship-simu/exceptions/class_ShipPartNotConstructableException.php @@ -24,7 +24,7 @@ class ShipPartNotConstructableException extends FrameworkException { public function __construct (array $partArray, $code) { // Add a message around the missing class - $message = sprintf("Schiffteil %s ist nicht constrierbar!", + $message = sprintf("Schiffteil %s ist nicht constrierbar!", $partArray[0] ); diff --git a/application/ship-simu/exceptions/class_StructuresOutOfBoundsException.php b/application/ship-simu/exceptions/class_StructuresOutOfBoundsException.php index 0399bad..86e5e08 100644 --- a/application/ship-simu/exceptions/class_StructuresOutOfBoundsException.php +++ b/application/ship-simu/exceptions/class_StructuresOutOfBoundsException.php @@ -24,7 +24,7 @@ class StructuresOutOfBoundsException extends FrameworkException { public function __construct ($idx, $code) { // Add a message around the missing class - $message = sprintf("Der Index %s liegt ausserhalb des gütigen Bereiches! Schiffsteil nicht auffindbar.", $idx); + $message = sprintf("Der Index %s liegt ausserhalb des gütigen Bereiches! Schiffsteil nicht auffindbar.", $idx); // Call parent constructor parent::__construct($message, $code); diff --git a/application/ship-simu/exceptions/class_UnsupportedLimitationPartException.php b/application/ship-simu/exceptions/class_UnsupportedLimitationPartException.php index 55d29fe..fc0f89a 100644 --- a/application/ship-simu/exceptions/class_UnsupportedLimitationPartException.php +++ b/application/ship-simu/exceptions/class_UnsupportedLimitationPartException.php @@ -24,7 +24,7 @@ class UnsupportedLimitationPartException extends FrameworkException { public function __construct ($str, $code) { // Add a message around the missing class - $message = sprintf("Limitierungsinformation %s wird derzeit nicht unterstützt.", $str); + $message = sprintf("Limitierungsinformation %s wird derzeit nicht unterstützt.", $str); // Call parent constructor parent::__construct($message, $code); diff --git a/application/ship-simu/exceptions/class_WrongGenderSpecifiedException.php b/application/ship-simu/exceptions/class_WrongGenderSpecifiedException.php index 873a00e..f9cb916 100644 --- a/application/ship-simu/exceptions/class_WrongGenderSpecifiedException.php +++ b/application/ship-simu/exceptions/class_WrongGenderSpecifiedException.php @@ -24,7 +24,7 @@ class WrongGenderSpecifiedException extends FrameworkException { public function __construct ($gender, $code) { // Add a message around the missing class - $message = sprintf("Das Geschlecht %s Ist nicht M (Männlich) oder F (Weiblich).", $gender); + $message = sprintf("Das Geschlecht %s Ist nicht M (Männlich) oder F (Weiblich).", $gender); // Call parent constructor parent::__construct($message, $code); diff --git a/application/ship-simu/starter.php b/application/ship-simu/starter.php index b1530f7..b128839 100644 --- a/application/ship-simu/starter.php +++ b/application/ship-simu/starter.php @@ -29,18 +29,18 @@ $app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readCon // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, FrameworkConfiguration::getInstance()->readConfig('app_helper_class') )); } elseif (!is_object($app)) { // No object! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) { // Method not found! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, FrameworkConfiguration::getInstance()->readConfig('entry_method') )); diff --git a/application/shoutbox/exceptions.php b/application/shoutbox/exceptions.php index c6310a3..f463a9c 100644 --- a/application/shoutbox/exceptions.php +++ b/application/shoutbox/exceptions.php @@ -25,7 +25,7 @@ // Our own exception handler function __exceptionHandler (FrameworkException $e) { // Call the app_die() method - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", ApplicationHelper::getInstance()->getAppName(), ApplicationHelper::getInstance()->getAppShortName(), $e->__toString(), @@ -44,7 +44,7 @@ set_exception_handler('__exceptionHandler'); // Error handler function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message - $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", + $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", basename($errfile), $errline, $errno, @@ -64,7 +64,7 @@ function __assertHandler ($file, $line, $code) { if ($code === "") $code = "Unknown"; // Create message - $message = sprintf("File: %s, Line: %s, Code: %s", + $message = sprintf("File: %s, Line: %s, Code: %s", basename($file), $line, $code diff --git a/application/shoutbox/starter.php b/application/shoutbox/starter.php index b1530f7..b128839 100644 --- a/application/shoutbox/starter.php +++ b/application/shoutbox/starter.php @@ -29,18 +29,18 @@ $app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readCon // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, FrameworkConfiguration::getInstance()->readConfig('app_helper_class') )); } elseif (!is_object($app)) { // No object! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) { // Method not found! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, FrameworkConfiguration::getInstance()->readConfig('entry_method') )); diff --git a/application/todo/exceptions.php b/application/todo/exceptions.php index c6310a3..f463a9c 100644 --- a/application/todo/exceptions.php +++ b/application/todo/exceptions.php @@ -25,7 +25,7 @@ // Our own exception handler function __exceptionHandler (FrameworkException $e) { // Call the app_die() method - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s (%s) has been terminated due to a thrown exception: %s [%s]: %s Backtrace:
%s
", ApplicationHelper::getInstance()->getAppName(), ApplicationHelper::getInstance()->getAppShortName(), $e->__toString(), @@ -44,7 +44,7 @@ set_exception_handler('__exceptionHandler'); // Error handler function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) { // Construct the message - $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", + $message = sprintf("File: %s, Line: %s, Code: %s, Message: %s", basename($errfile), $errline, $errno, @@ -64,7 +64,7 @@ function __assertHandler ($file, $line, $code) { if ($code === "") $code = "Unknown"; // Create message - $message = sprintf("File: %s, Line: %s, Code: %s", + $message = sprintf("File: %s, Line: %s, Code: %s", basename($file), $line, $code diff --git a/application/todo/starter.php b/application/todo/starter.php index b1530f7..b128839 100644 --- a/application/todo/starter.php +++ b/application/todo/starter.php @@ -29,18 +29,18 @@ $app = call_user_func_array(array(FrameworkConfiguration::getInstance()->readCon // Some sanity checks if ((empty($app)) || (is_null($app))) { // Something went wrong! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the helper class %s is not loaded.", $application, FrameworkConfiguration::getInstance()->readConfig('app_helper_class') )); } elseif (!is_object($app)) { // No object! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because 'app' is not an object.", $application )); } elseif (!method_exists($app, FrameworkConfiguration::getInstance()->readConfig('entry_method'))) { // Method not found! - ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", + ApplicationEntryPoint::app_die(sprintf("[Main:] The application %s could not be launched because the method %s is missing.", $application, FrameworkConfiguration::getInstance()->readConfig('entry_method') )); diff --git a/inc/classes.php b/inc/classes.php index 5a541c9..78bafeb 100644 --- a/inc/classes.php +++ b/inc/classes.php @@ -35,19 +35,19 @@ foreach ($lowerClasses as $className) { try { ClassLoader::getInstance()->loadClasses(sprintf("inc/classes/%s/", $className)); } catch (PathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $className )); } catch (PathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $className )); } catch (PathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $className )); } catch (DirPointerNotOpenedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path %s for the follwing reason: %s", $className )); } diff --git a/inc/classes/exceptions/actions/class_InvalidActionException.php b/inc/classes/exceptions/actions/class_InvalidActionException.php index 3f6df30..addebdb 100644 --- a/inc/classes/exceptions/actions/class_InvalidActionException.php +++ b/inc/classes/exceptions/actions/class_InvalidActionException.php @@ -31,7 +31,7 @@ class InvalidActionException extends FrameworkException { */ public function __construct(array $msgArray, $code) { // Prepare the message - $message = sprintf("[%s:%d] Cannot resolve action %s.", + $message = sprintf("[%s:%d] Cannot resolve action %s.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/exceptions/auth/class_UserAuthorizationException.php b/inc/classes/exceptions/auth/class_UserAuthorizationException.php index a5ab08b..a07bf45 100644 --- a/inc/classes/exceptions/auth/class_UserAuthorizationException.php +++ b/inc/classes/exceptions/auth/class_UserAuthorizationException.php @@ -31,7 +31,7 @@ class UserAuthorizationException extends FrameworkException { */ public function __construct(Filterable $filterInstance, $code) { // Construct the message - $message = sprintf("[%s:%d] Authorization has failed. Error code %s", + $message = sprintf("[%s:%d] Authorization has failed. Error code %s", $filterInstance->__toString(), $this->getLine(), $this->getHexCode($code) diff --git a/inc/classes/exceptions/class_FrameworkException.php b/inc/classes/exceptions/class_FrameworkException.php index 3ba2fbe..267744c 100644 --- a/inc/classes/exceptions/class_FrameworkException.php +++ b/inc/classes/exceptions/class_FrameworkException.php @@ -121,7 +121,7 @@ abstract class FrameworkException extends ReflectionException { } // END - if // Prepare argument infos - $info = "{$info}"; + $info = "{$info}"; // File detection $file = "Unknown file"; @@ -136,7 +136,7 @@ abstract class FrameworkException extends ReflectionException { } // END - if // The message - $dbgMsg .= "\t at ".$dbgIndex." ".$file." (".$line.") -> ".$dbgInfo['function']."(".$info.")
\n"; + $dbgMsg .= "\t at ".$dbgIndex." ".$file." (".$line.") -> ".$dbgInfo['function']."(".$info.")
\n"; } // END - if $dbgMsg .= "Debug backtrace end
\n"; diff --git a/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php b/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php index 1d0acb4..dfba485 100644 --- a/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php +++ b/inc/classes/exceptions/compressor/class_MismatchingCompressorsException.php @@ -31,7 +31,7 @@ class MismatchingCompressorsException extends FrameworkException { */ public function __construct (array $array, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Der Kompressor %s zu den geladenen Daten aus %s und der aktuell verwendete Kompressor %s stimmen nicht überein!", + $message = sprintf("[%s:%d] Der Kompressor %s zu den geladenen Daten aus %s und der aktuell verwendete Kompressor %s stimmen nicht überein!", $array[0]->__toString(), $this->getLine(), strtoupper($array[1]), diff --git a/inc/classes/exceptions/controller/class_InvalidControllerException.php b/inc/classes/exceptions/controller/class_InvalidControllerException.php index b166455..7fec632 100644 --- a/inc/classes/exceptions/controller/class_InvalidControllerException.php +++ b/inc/classes/exceptions/controller/class_InvalidControllerException.php @@ -31,7 +31,7 @@ class InvalidControllerException extends FrameworkException { */ public function __construct(array $msgArray, $code) { // Prepare the message - $message = sprintf("[%s:%d] Cannot resolve controller %s (class name: %s).", + $message = sprintf("[%s:%d] Cannot resolve controller %s (class name: %s).", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1], diff --git a/inc/classes/exceptions/database/general/class_SqlException.php b/inc/classes/exceptions/database/general/class_SqlException.php index 6270e9c..0634928 100644 --- a/inc/classes/exceptions/database/general/class_SqlException.php +++ b/inc/classes/exceptions/database/general/class_SqlException.php @@ -31,7 +31,7 @@ class SqlException extends DatabaseException { */ public function __construct (array $msgArray, $code) { // Construct the message - $message = sprintf("[%s:%d] SQL error detected. Message from database: %s, code: %s.", + $message = sprintf("[%s:%d] SQL error detected. Message from database: %s, code: %s.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1], diff --git a/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php b/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php index a8fb42b..b14fa97 100644 --- a/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php +++ b/inc/classes/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php @@ -31,7 +31,7 @@ class SavePathIsNoDirectoryException extends DatabaseException { */ public function __construct ($path, $code) { // Add a message around the missing class - $message = sprintf("Der angegebene Speicherpfad %s ist ungütig (kein Pfad).", $path); + $message = sprintf("Der angegebene Speicherpfad %s ist ungütig (kein Pfad).", $path); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php b/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php index 7a0534b..ce0ffa6 100644 --- a/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php +++ b/inc/classes/exceptions/database/local_file/class_SavePathReadProtectedException.php @@ -31,7 +31,7 @@ class SavePathReadProtectedException extends DatabaseException { */ public function __construct ($path, $code) { // Add a message around the missing class - $message = sprintf("Der Pfad %s ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path); + $message = sprintf("Der Pfad %s ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php b/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php index 9d7f699..81a1067 100644 --- a/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php +++ b/inc/classes/exceptions/database/local_file/class_SavePathWriteProtectedException.php @@ -31,7 +31,7 @@ class SavePathWriteProtectedException extends DatabaseException { */ public function __construct ($path, $code) { // Add a message around the missing class - $message = sprintf("Der angegebene Speicherpfad %s ist schreibgeschützt. Bitte Zugriffsrechte (CHMOD) entsprechend setzen.", $path); + $message = sprintf("Der angegebene Speicherpfad %s ist schreibgeschützt. Bitte Zugriffsrechte (CHMOD) entsprechend setzen.", $path); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/database/wrapper/class_WrapperUserNameNotFoundException.php b/inc/classes/exceptions/database/wrapper/class_WrapperUserNameNotFoundException.php index bf3aa4c..0422552 100644 --- a/inc/classes/exceptions/database/wrapper/class_WrapperUserNameNotFoundException.php +++ b/inc/classes/exceptions/database/wrapper/class_WrapperUserNameNotFoundException.php @@ -31,7 +31,7 @@ class WrapperUserNameNotFoundException extends DatabaseException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Username %s was not found. Requesting class: %s", + $message = sprintf("[%s:%d] Username %s was not found. Requesting class: %s", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1]->getUserName(), diff --git a/inc/classes/exceptions/helper/class_FormClosedException.php b/inc/classes/exceptions/helper/class_FormClosedException.php index 59a52ad..9978e5e 100644 --- a/inc/classes/exceptions/helper/class_FormClosedException.php +++ b/inc/classes/exceptions/helper/class_FormClosedException.php @@ -32,7 +32,7 @@ class FormClosedException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Could not add form element %s because form is closed.", + $message = sprintf("[%s:%d] Could not add form element %s because form is closed.", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/helper/class_FormGroupClosedException.php b/inc/classes/exceptions/helper/class_FormGroupClosedException.php index a1e8802..92a6e43 100644 --- a/inc/classes/exceptions/helper/class_FormGroupClosedException.php +++ b/inc/classes/exceptions/helper/class_FormGroupClosedException.php @@ -31,7 +31,7 @@ class FormGroupClosedException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Could not add sub group %s because no form group has been opened before.", + $message = sprintf("[%s:%d] Could not add sub group %s because no form group has been opened before.", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/helper/class_HelperNoPreviousOpenedSubGroupException.php b/inc/classes/exceptions/helper/class_HelperNoPreviousOpenedSubGroupException.php index 6c257c0..b6b78f6 100644 --- a/inc/classes/exceptions/helper/class_HelperNoPreviousOpenedSubGroupException.php +++ b/inc/classes/exceptions/helper/class_HelperNoPreviousOpenedSubGroupException.php @@ -31,7 +31,7 @@ class HelperNoPreviousOpenedSubGroupException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Sub group not opened before. Raw text follows: %s", + $message = sprintf("[%s:%d] Sub group not opened before. Raw text follows: %s", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/exceptions/helper/class_NoGroupOpenedException.php b/inc/classes/exceptions/helper/class_NoGroupOpenedException.php index c650070..2946a8b 100644 --- a/inc/classes/exceptions/helper/class_NoGroupOpenedException.php +++ b/inc/classes/exceptions/helper/class_NoGroupOpenedException.php @@ -31,7 +31,7 @@ class NoGroupOpenedException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Group not opened before. Raw text follows: %s", + $message = sprintf("[%s:%d] Group not opened before. Raw text follows: %s", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/exceptions/helper/class_UserInstanceMissingException.php b/inc/classes/exceptions/helper/class_UserInstanceMissingException.php index e68e8f0..218968b 100644 --- a/inc/classes/exceptions/helper/class_UserInstanceMissingException.php +++ b/inc/classes/exceptions/helper/class_UserInstanceMissingException.php @@ -31,7 +31,7 @@ class UserInstanceMissingException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Registry key %s does not include a class with implemented interface Manageable(User|Guest).", + $message = sprintf("[%s:%d] Registry key %s does not include a class with implemented interface Manageable(User|Guest).", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php b/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php index 6dc16a4..5b0293e 100644 --- a/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php +++ b/inc/classes/exceptions/io/class_DirPointerNotOpenedException.php @@ -31,7 +31,7 @@ class DirPointerNotOpenedException extends FrameworkException { */ public function __construct ($path, $code) { // Add a message around the missing class - $message = sprintf("Für den Pfad %s konnte kein Pointer initialisiert werden.", $path); + $message = sprintf("Für den Pfad %s konnte kein Pointer initialisiert werden.", $path); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/io/class_FileNotFoundException.php b/inc/classes/exceptions/io/class_FileNotFoundException.php index a071944..e2e7dbc 100644 --- a/inc/classes/exceptions/io/class_FileNotFoundException.php +++ b/inc/classes/exceptions/io/class_FileNotFoundException.php @@ -31,7 +31,7 @@ class FileNotFoundException extends FrameworkException { */ public function __construct ($fqfn, $code) { // Add a message around the missing class - $message = sprintf("The requested file %s was not found.", + $message = sprintf("The requested file %s was not found.", $fqfn ); diff --git a/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php b/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php index e7e8bde..37300a5 100644 --- a/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php +++ b/inc/classes/exceptions/io/class_FilePointerNotOpenedException.php @@ -31,7 +31,7 @@ class FilePointerNotOpenedException extends FrameworkException { */ public function __construct ($fqfn, $code) { // Add a message around the missing class - $message = sprintf("Not able to initialize a pointer for the file %s. Maybe the file is missing.", $fqfn); + $message = sprintf("Not able to initialize a pointer for the file %s. Maybe the file is missing.", $fqfn); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/io/class_FileReadProtectedException.php b/inc/classes/exceptions/io/class_FileReadProtectedException.php index f68aebe..4e8a0e6 100644 --- a/inc/classes/exceptions/io/class_FileReadProtectedException.php +++ b/inc/classes/exceptions/io/class_FileReadProtectedException.php @@ -31,7 +31,7 @@ class FileReadProtectedException extends FrameworkException { */ public function __construct ($fileName, $code) { // Add a message around the missing class - $message = sprintf("File %s is read-protected. Please set read access rights (CHMOD).", $fileName); + $message = sprintf("File %s is read-protected. Please set read access rights (CHMOD).", $fileName); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/io/class_InvalidDataLengthException.php b/inc/classes/exceptions/io/class_InvalidDataLengthException.php index 47fd5fb..a1ef85a 100644 --- a/inc/classes/exceptions/io/class_InvalidDataLengthException.php +++ b/inc/classes/exceptions/io/class_InvalidDataLengthException.php @@ -31,7 +31,7 @@ class InvalidDataLengthException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Eine unerwartete Datenlänge von %s Byte ist aufgetreten. %s wurden erwartet!", + $message = sprintf("[%s:%d] Eine unerwartete Datenlänge von %s Byte ist aufgetreten. %s wurden erwartet!", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1], diff --git a/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php b/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php index 26a1270..2e5104a 100644 --- a/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php +++ b/inc/classes/exceptions/io/class_InvalidMD5ChecksumException.php @@ -31,7 +31,7 @@ class InvalidMD5ChecksumException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Die MD5-Prüfsummen %s und %s stimmen nicht überein!", + $message = sprintf("[%s:%d] Die MD5-Prüfsummen %s und %s stimmen nicht überein!", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1], diff --git a/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php b/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php index 51222eb..7f908b1 100644 --- a/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php +++ b/inc/classes/exceptions/io/class_PathIsNoDirectoryException.php @@ -31,7 +31,7 @@ class PathIsNoDirectoryException extends FrameworkException { */ public function __construct ($path, $code) { // Add a message around the missing class - $message = sprintf("Der angegebene Pfad %s ist ungütig (kein Pfad).", $path); + $message = sprintf("Der angegebene Pfad %s ist ungütig (kein Pfad).", $path); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/io/class_PathReadProtectedException.php b/inc/classes/exceptions/io/class_PathReadProtectedException.php index 09fed2b..b5dd935 100644 --- a/inc/classes/exceptions/io/class_PathReadProtectedException.php +++ b/inc/classes/exceptions/io/class_PathReadProtectedException.php @@ -31,7 +31,7 @@ class PathReadProtectedException extends FrameworkException { */ public function __construct ($path, $code) { // Add a message around the missing class - $message = sprintf("Der Pfad %s ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path); + $message = sprintf("Der Pfad %s ist lese-geschützt. Bitte Zugriffsrechte (CHMOD) zum Lesen setzen.", $path); // Call parent constructor parent::__construct($message, $code); diff --git a/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php b/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php index 9265b33..19be0cd 100644 --- a/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php +++ b/inc/classes/exceptions/language/class_InvalidLanguagePathStringException.php @@ -31,7 +31,7 @@ class InvalidLanguagePathStringException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] %s is not a string with path!", + $message = sprintf("[%s:%d] %s is not a string with path!", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php b/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php index 858e737..b17823d 100644 --- a/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php +++ b/inc/classes/exceptions/language/class_LanguagePathIsNoDirectoryException.php @@ -31,7 +31,7 @@ class LanguagePathIsNoDirectoryException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Der Sprach-Basispfad %s existiert nicht oder ist eine Datei!", + $message = sprintf("[%s:%d] Der Sprach-Basispfad %s existiert nicht oder ist eine Datei!", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php b/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php index 2fc7866..0938f77 100644 --- a/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php +++ b/inc/classes/exceptions/language/class_LanguagePathReadProtectedException.php @@ -31,7 +31,7 @@ class LanguagePathReadProtectedException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Base language path %s is read-protected. Please change access rights (CHMOD).", + $message = sprintf("[%s:%d] Base language path %s is read-protected. Please change access rights (CHMOD).", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/main/class_ClassMismatchException.php b/inc/classes/exceptions/main/class_ClassMismatchException.php index 32499e3..51497b4 100644 --- a/inc/classes/exceptions/main/class_ClassMismatchException.php +++ b/inc/classes/exceptions/main/class_ClassMismatchException.php @@ -31,7 +31,7 @@ class ClassMismatchException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("The class %s does not match class %s.", + $message = sprintf("The class %s does not match class %s.", $classArray[0], $classArray[1] ); diff --git a/inc/classes/exceptions/main/class_ClassNotFoundException.php b/inc/classes/exceptions/main/class_ClassNotFoundException.php index 29f13f2..1dcf9bd 100644 --- a/inc/classes/exceptions/main/class_ClassNotFoundException.php +++ b/inc/classes/exceptions/main/class_ClassNotFoundException.php @@ -31,7 +31,7 @@ class ClassNotFoundException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Internal class %s not found.", + $message = sprintf("[%s:%d] Internal class %s not found.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php b/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php index e4ec1b7..40c3c71 100644 --- a/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php +++ b/inc/classes/exceptions/main/class_ConfigEntryNotFoundException.php @@ -31,7 +31,7 @@ class ConfigEntryNotFoundException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Configuration entry %s not found.", + $message = sprintf("[%s:%d] Configuration entry %s not found.", $classArray[0], $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php b/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php index 7806f9b..1e11cce 100644 --- a/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php +++ b/inc/classes/exceptions/main/class_DimNotFoundInArrayException.php @@ -38,7 +38,7 @@ class DimNotFoundInArrayException extends FrameworkException { ); } else { // No class given - $message = sprintf("Please provide a class for %s", __CLASS__); + $message = sprintf("Please provide a class for %s", __CLASS__); } // Call parent constructor diff --git a/inc/classes/exceptions/main/class_EmptyVariableException.php b/inc/classes/exceptions/main/class_EmptyVariableException.php index 1fae654..188969c 100644 --- a/inc/classes/exceptions/main/class_EmptyVariableException.php +++ b/inc/classes/exceptions/main/class_EmptyVariableException.php @@ -31,7 +31,7 @@ class EmptyVariableException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Variable %s is not set.", + $message = sprintf("[%s:%d] Variable %s is not set.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/exceptions/main/class_ExceptionNotFoundException.php b/inc/classes/exceptions/main/class_ExceptionNotFoundException.php index d3b37c8..81ff4f1 100644 --- a/inc/classes/exceptions/main/class_ExceptionNotFoundException.php +++ b/inc/classes/exceptions/main/class_ExceptionNotFoundException.php @@ -31,7 +31,7 @@ class ExceptionNotFoundException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Exception %s not found.", + $message = sprintf("[%s:%d] Exception %s not found.", $classArray[0], $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/main/class_GetterNotFoundException.php b/inc/classes/exceptions/main/class_GetterNotFoundException.php index 5291b05..a632dcd 100644 --- a/inc/classes/exceptions/main/class_GetterNotFoundException.php +++ b/inc/classes/exceptions/main/class_GetterNotFoundException.php @@ -34,7 +34,7 @@ class GetterNotFoundException extends FrameworkException { $dataArray = (array) $dataArray; // Add a message around the missing class - $message = sprintf("[%s:%d] Getter-Methode für Attribut %s nicht gefunden.", + $message = sprintf("[%s:%d] Getter-Methode für Attribut %s nicht gefunden.", $dataArray[0]->__toString(), $this->getLine(), $dataArray[1] diff --git a/inc/classes/exceptions/main/class_InvalidArrayCountException.php b/inc/classes/exceptions/main/class_InvalidArrayCountException.php index a85bebf..3703f1a 100644 --- a/inc/classes/exceptions/main/class_InvalidArrayCountException.php +++ b/inc/classes/exceptions/main/class_InvalidArrayCountException.php @@ -31,7 +31,7 @@ class InvalidArrayCountException extends FrameworkException { */ public function __construct (array $array, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] %s hat %d Elemente, soll aber %d enthalten!", + $message = sprintf("[%s:%d] %s hat %d Elemente, soll aber %d enthalten!", $array[0]->__toString(), $this->getLine(), $array[1], diff --git a/inc/classes/exceptions/main/class_InvalidCommandException.php b/inc/classes/exceptions/main/class_InvalidCommandException.php index d546cc1..d55a167 100644 --- a/inc/classes/exceptions/main/class_InvalidCommandException.php +++ b/inc/classes/exceptions/main/class_InvalidCommandException.php @@ -31,7 +31,7 @@ class InvalidCommandException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Invalid command %s (class %s) detected.", + $message = sprintf("[%s:%d] Invalid command %s (class %s) detected.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1], diff --git a/inc/classes/exceptions/main/class_InvalidCommandInstanceException.php b/inc/classes/exceptions/main/class_InvalidCommandInstanceException.php index 93cc03a..34a4d24 100644 --- a/inc/classes/exceptions/main/class_InvalidCommandInstanceException.php +++ b/inc/classes/exceptions/main/class_InvalidCommandInstanceException.php @@ -31,7 +31,7 @@ class InvalidCommandInstanceException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Invalid command %s detected.", + $message = sprintf("[%s:%d] Invalid command %s detected.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/exceptions/main/class_InvalidInterfaceException.php b/inc/classes/exceptions/main/class_InvalidInterfaceException.php index a7fc71e..c628542 100644 --- a/inc/classes/exceptions/main/class_InvalidInterfaceException.php +++ b/inc/classes/exceptions/main/class_InvalidInterfaceException.php @@ -31,7 +31,7 @@ class InvalidInterfaceException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Object does not implement expected interface .", + $message = sprintf("[%s:%d] Object does not implement expected interface .", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/main/class_MissingArrayElementsException.php b/inc/classes/exceptions/main/class_MissingArrayElementsException.php index a59b514..5c3547b 100644 --- a/inc/classes/exceptions/main/class_MissingArrayElementsException.php +++ b/inc/classes/exceptions/main/class_MissingArrayElementsException.php @@ -41,7 +41,7 @@ class MissingArrayElementsException extends FrameworkException { } // Add a message around the missing class - $message = sprintf("[%s:%d] Array %s() Does not have these elements: %s", + $message = sprintf("[%s:%d] Array %s() Does not have these elements: %s", $classArray[0]->__toString(), $this->getLine(), $classArray[1], diff --git a/inc/classes/exceptions/main/class_NoArrayCreatedException.php b/inc/classes/exceptions/main/class_NoArrayCreatedException.php index 36dcbba..e9f00de 100644 --- a/inc/classes/exceptions/main/class_NoArrayCreatedException.php +++ b/inc/classes/exceptions/main/class_NoArrayCreatedException.php @@ -31,7 +31,7 @@ class NoArrayCreatedException extends FrameworkException { */ public function __construct (array $array, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] %s ist kein erstelltes Objekt.", + $message = sprintf("[%s:%d] %s ist kein erstelltes Objekt.", $array[0]->__toString(), $this->getLine(), $array[1] diff --git a/inc/classes/exceptions/main/class_NoArrayException.php b/inc/classes/exceptions/main/class_NoArrayException.php index 2f0c557..30d312f 100644 --- a/inc/classes/exceptions/main/class_NoArrayException.php +++ b/inc/classes/exceptions/main/class_NoArrayException.php @@ -29,7 +29,7 @@ class NoArrayException extends FrameworkException { */ public function __construct ($string, $code) { // Add a message around the missing class - $message = sprintf("%s ist kein Array!", + $message = sprintf("%s ist kein Array!", $string ); diff --git a/inc/classes/exceptions/main/class_NoObjectException.php b/inc/classes/exceptions/main/class_NoObjectException.php index 20f6870..541b849 100644 --- a/inc/classes/exceptions/main/class_NoObjectException.php +++ b/inc/classes/exceptions/main/class_NoObjectException.php @@ -33,7 +33,7 @@ class NoObjectException extends FrameworkException { */ public function __construct ($string, $code) { // Add a message around the missing class - $message = sprintf("%s ist kein Objekt!", + $message = sprintf("%s ist kein Objekt!", $string ); diff --git a/inc/classes/exceptions/main/class_VariableIsNotSetException.php b/inc/classes/exceptions/main/class_VariableIsNotSetException.php index 57000be..ddcad58 100644 --- a/inc/classes/exceptions/main/class_VariableIsNotSetException.php +++ b/inc/classes/exceptions/main/class_VariableIsNotSetException.php @@ -31,7 +31,7 @@ class VariableIsNotSetException extends FrameworkException { */ public function __construct (array $array, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Bei der Initialisierung der Applikation %s wurde keine Variable %s erzeugt.", + $message = sprintf("[%s:%d] Bei der Initialisierung der Applikation %s wurde keine Variable %s erzeugt.", $array[0]->__toString(), $this->getLine(), $array[1], diff --git a/inc/classes/exceptions/result/class_InvalidDatabaseResultException.php b/inc/classes/exceptions/result/class_InvalidDatabaseResultException.php index be1ab5d..762eb82 100644 --- a/inc/classes/exceptions/result/class_InvalidDatabaseResultException.php +++ b/inc/classes/exceptions/result/class_InvalidDatabaseResultException.php @@ -31,7 +31,7 @@ class InvalidDatabaseResultException extends FrameworkException { */ public function __construct(array $msgArray, $code) { // Construct the message - $message = sprintf("[%s:%d] Database instance %s contains invalid entries.", + $message = sprintf("[%s:%d] Database instance %s contains invalid entries.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1]->__toString() diff --git a/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php b/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php index 5a109fb..04d510a 100644 --- a/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php +++ b/inc/classes/exceptions/template/class_BasePathIsNoDirectoryException.php @@ -31,7 +31,7 @@ class BasePathIsNoDirectoryException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Der Template-Basispfad %s existiert nicht oder ist eine Datei!", + $message = sprintf("[%s:%d] Der Template-Basispfad %s existiert nicht oder ist eine Datei!", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/template/class_BasePathReadProtectedException.php b/inc/classes/exceptions/template/class_BasePathReadProtectedException.php index c66fd7b..6a4d956 100644 --- a/inc/classes/exceptions/template/class_BasePathReadProtectedException.php +++ b/inc/classes/exceptions/template/class_BasePathReadProtectedException.php @@ -31,7 +31,7 @@ class BasePathReadProtectedException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Der Template-Basispfad %s ist lesegeschützt! Bitte Zugriffsrechte (CHMOD) ändern.", + $message = sprintf("[%s:%d] Der Template-Basispfad %s ist lesegeschützt! Bitte Zugriffsrechte (CHMOD) ändern.", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/template/class_InvalidBasePathStringException.php b/inc/classes/exceptions/template/class_InvalidBasePathStringException.php index c52a584..93f875e 100644 --- a/inc/classes/exceptions/template/class_InvalidBasePathStringException.php +++ b/inc/classes/exceptions/template/class_InvalidBasePathStringException.php @@ -31,7 +31,7 @@ class InvalidBasePathStringException extends FrameworkException { */ public function __construct (array $classArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] %s is not a string with a base path!", + $message = sprintf("[%s:%d] %s is not a string with a base path!", $classArray[0]->__toString(), $this->getLine(), $classArray[1] diff --git a/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php b/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php index 9a7eb05..9394348 100644 --- a/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php +++ b/inc/classes/exceptions/template/class_UnexpectedTemplateTypeException.php @@ -31,7 +31,7 @@ class UnexpectedTemplateTypeException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:%d] Der Template-Typ %s entspricht nicht dem erwartetem Template-Typ %s.", + $message = sprintf("[%s:%d] Der Template-Typ %s entspricht nicht dem erwartetem Template-Typ %s.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1], diff --git a/inc/classes/exceptions/template/class_ViewHelperNotFoundException.php b/inc/classes/exceptions/template/class_ViewHelperNotFoundException.php index 0af17cd..06dea77 100644 --- a/inc/classes/exceptions/template/class_ViewHelperNotFoundException.php +++ b/inc/classes/exceptions/template/class_ViewHelperNotFoundException.php @@ -31,7 +31,7 @@ class ViewHelperNotFoundException extends FrameworkException { */ public function __construct (array $msgArray, $code) { // Add a message around the missing class - $message = sprintf("[%s:] View-Helper %s ist ungültig.", + $message = sprintf("[%s:] View-Helper %s ist ungültig.", $msgArray[0]->__toString(), $msgArray[1] ); diff --git a/inc/classes/exceptions/user/class_UserEmailMissingException.php b/inc/classes/exceptions/user/class_UserEmailMissingException.php index 27dbf51..dcef370 100644 --- a/inc/classes/exceptions/user/class_UserEmailMissingException.php +++ b/inc/classes/exceptions/user/class_UserEmailMissingException.php @@ -31,7 +31,7 @@ class UserEmailMissingException extends FrameworkException { */ public function __construct(array $msgArray, $code = 0) { // Create the message - $message = sprintf("[%s:%d] User email %s was not found.", + $message = sprintf("[%s:%d] User email %s was not found.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/exceptions/user/class_UserPasswordMismatchException.php b/inc/classes/exceptions/user/class_UserPasswordMismatchException.php index a5184b3..0457930 100644 --- a/inc/classes/exceptions/user/class_UserPasswordMismatchException.php +++ b/inc/classes/exceptions/user/class_UserPasswordMismatchException.php @@ -31,7 +31,7 @@ class UserPasswordMismatchException extends FrameworkException { */ public function __construct(array $msgArray, $code = 0) { // Create the message - $message = sprintf("[%s:%d] Supplied password for user %s did not match with stored password.", + $message = sprintf("[%s:%d] Supplied password for user %s did not match with stored password.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1]->getUserName() diff --git a/inc/classes/exceptions/user/class_UsernameMissingException.php b/inc/classes/exceptions/user/class_UsernameMissingException.php index 0ab7e9e..9f5e52d 100644 --- a/inc/classes/exceptions/user/class_UsernameMissingException.php +++ b/inc/classes/exceptions/user/class_UsernameMissingException.php @@ -31,7 +31,7 @@ class UsernameMissingException extends FrameworkException { */ public function __construct(array $msgArray, $code = 0) { // Create the message - $message = sprintf("[%s:%d] Username %s was not found.", + $message = sprintf("[%s:%d] Username %s was not found.", $msgArray[0]->__toString(), $this->getLine(), $msgArray[1] diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 3dc4aad..31fecee 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -211,7 +211,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $this->setRealClass('DestructedObject'); } elseif ((defined('DEBUG_DESTRUCTOR')) && (is_object($this->getDebugInstance()))) { // Already destructed object - $this->debugOutput(sprintf("[%s:] The object %s is already destroyed.", + $this->debugOutput(sprintf("[%s:] The object %s is already destroyed.", __CLASS__, $this->__toString() )); } @@ -764,7 +764,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { ); // Output it - ApplicationEntryPoint::app_die(sprintf("%s debug output:
%s
\nLoaded includes:
%s
", + ApplicationEntryPoint::app_die(sprintf("
%s debug output:
%s
\nLoaded includes:
%s
", $this->__toString(), $content, ClassLoader::getInstance()->getPrintableIncludeList() diff --git a/inc/classes/main/console/class_ConsoleTools.php b/inc/classes/main/console/class_ConsoleTools.php index 3b49f72..d037d40 100644 --- a/inc/classes/main/console/class_ConsoleTools.php +++ b/inc/classes/main/console/class_ConsoleTools.php @@ -50,7 +50,7 @@ class ConsoleTools extends BaseFrameworkSystem { // Read the file $hostname = trim($io->readFromFile()); - $helper->debugOutput(sprintf("[%s:] Our host name is: %s", + $helper->debugOutput(sprintf("[%s:] Our host name is: %s", $helper->__toString(), $hostname )); @@ -65,7 +65,7 @@ class ConsoleTools extends BaseFrameworkSystem { $ip = $ipResolved; // Debug message - $helper->debugOutput(sprintf("[%s:] Resolved IP address is: %s\n", + $helper->debugOutput(sprintf("[%s:] Resolved IP address is: %s\n", $helper->__toString(), $ip )); diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index 7e1aa7c..2bbec44 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -1098,7 +1098,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { default: // Unknown type found // Construct message - $msg = sprintf("[%s->%s] Unknown/unsupported template type %s detected.", + $msg = sprintf("[%s->%s] Unknown/unsupported template type %s detected.", $this->__toString(), __FUNCTION__, $this->getTemplateType() diff --git a/inc/database.php b/inc/database.php index 52d7506..de0c7d8 100644 --- a/inc/database.php +++ b/inc/database.php @@ -52,27 +52,27 @@ unset($INC); try { $db = DatabaseConnection::createDatabaseConnection(DebugMiddleware::getInstance(), $layerInstance); } catch (NullPointerException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (InvalidDirectoryResourceException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (PathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (PathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (PathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } catch (DirPointerNotOpenedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database sub-system not initialized for the follwing reason: %s
\n", $e->getMessage() )); } diff --git a/inc/database/lib-local.php b/inc/database/lib-local.php index ae748c5..9e9d5a6 100644 --- a/inc/database/lib-local.php +++ b/inc/database/lib-local.php @@ -26,23 +26,23 @@ try { $layerInstance = LocalFileDatabase::createLocalFileDatabase(FrameworkConfiguration::getInstance()->readConfig('local_db_path'), FileIoHandler::getInstance()); } catch (SavePathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", $e->getMessage() )); } catch (SavePathNotFoundException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", $e->getMessage() )); } catch (SavePathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", $e->getMessage() )); } catch (SavePathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", $e->getMessage() )); } catch (SavePathWriteProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer could not be initialized. Reason: %s", $e->getMessage() )); } diff --git a/inc/language.php b/inc/language.php index b9250e5..fe8847a 100644 --- a/inc/language.php +++ b/inc/language.php @@ -26,19 +26,19 @@ try { FrameworkConfiguration::getInstance()->readConfig('lang_base_path') )); } catch (LanguagePathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } catch (InvalidLanguagePathStringException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } catch (LanguagePathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } catch (LanguagePathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } diff --git a/templates/de/code/emergency_exit.ctp b/templates/de/code/emergency_exit.ctp index fdb0014..e974daf 100644 --- a/templates/de/code/emergency_exit.ctp +++ b/templates/de/code/emergency_exit.ctp @@ -1,10 +1,10 @@ {?header:title="Problem in application framework detected!"?} -
+
$content[message]
-
+
File inclusion backtrace:
diff --git a/templates/de/code/footer_msg.ctp b/templates/de/code/footer_msg.ctp index c67ed0c..fb1de36 100644 --- a/templates/de/code/footer_msg.ctp +++ b/templates/de/code/footer_msg.ctp @@ -1,4 +1,4 @@ -