From fa1e1a17bd1f2a03461e9e4c0f699dbfaddfc294 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 26 Sep 2008 15:35:43 +0000 Subject: [PATCH] Shoutbox stub added (will be moved out later on) --- .gitattributes | 42 +++ .../web/class_WebRefillFormCommand.php | 6 +- application/shoutbox/.htaccess | 1 + .../shoutbox/class_ApplicationHelper.php | 246 +++++++++++++++++ application/shoutbox/config.php | 251 ++++++++++++++++++ application/shoutbox/debug.php | 61 +++++ application/shoutbox/exceptions.php | 85 ++++++ application/shoutbox/exceptions/.htaccess | 1 + application/shoutbox/init.php | 71 +++++ application/shoutbox/interfaces/.htaccess | 1 + application/shoutbox/loader.php | 39 +++ application/shoutbox/main/.htaccess | 1 + application/shoutbox/main/class_ | 41 +++ application/shoutbox/starter.php | 53 ++++ application/shoutbox/templates/.htaccess | 1 + application/shoutbox/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 | 67 +++++ .../de/code/action_login_welcome.ctp | 3 + .../templates/de/code/block_persona_data.ctp | 24 ++ .../templates/de/code/captch_graphic_code.ctp | 16 ++ .../templates/de/code/confirm_link.ctp | 25 ++ .../shoutbox/templates/de/code/footer.ctp | 4 + .../shoutbox/templates/de/code/header.ctp | 20 ++ .../shoutbox/templates/de/code/home.ctp | 3 + .../templates/de/code/login_failed.ctp | 41 +++ .../shoutbox/templates/de/code/login_form.ctp | 98 +++++++ .../shoutbox/templates/de/code/login_main.ctp | 96 +++++++ .../templates/de/code/logout_done.ctp | 19 ++ .../shoutbox/templates/de/code/mail_debug.ctp | 25 ++ .../templates/de/code/register_form.ctp | 115 ++++++++ .../templates/de/code/shoutbox_main.ctp | 23 ++ .../shoutbox/templates/de/emails/.htaccess | 1 + .../templates/de/emails/text_resend_link.tpl | 30 +++ .../shoutbox/templates/de/html/.htaccess | 1 + .../shoutbox/templates/de/html/nav_advert.tpl | 1 + .../templates/de/html/selector_ship-simu.tpl | 17 ++ .../shoutbox/templates/images/.htaccess | 1 + .../templates/images/_cache/.htaccess | 1 + .../shoutbox/templates/images/de/.htaccess | 1 + .../templates/images/de/image/.htaccess | 1 + .../templates/images/de/image/base_code.itp | 28 ++ .../images/de/image/code_captcha.itp | 78 ++++++ 44 files changed, 1784 insertions(+), 3 deletions(-) create mode 100644 application/shoutbox/.htaccess create mode 100644 application/shoutbox/class_ApplicationHelper.php create mode 100644 application/shoutbox/config.php create mode 100644 application/shoutbox/debug.php create mode 100644 application/shoutbox/exceptions.php create mode 100644 application/shoutbox/exceptions/.htaccess create mode 100644 application/shoutbox/init.php create mode 100644 application/shoutbox/interfaces/.htaccess create mode 100644 application/shoutbox/loader.php create mode 100644 application/shoutbox/main/.htaccess create mode 100644 application/shoutbox/main/class_ create mode 100644 application/shoutbox/starter.php create mode 100644 application/shoutbox/templates/.htaccess create mode 100644 application/shoutbox/templates/de/.htaccess create mode 100644 application/shoutbox/templates/de/code/action_login_logout.ctp create mode 100644 application/shoutbox/templates/de/code/action_login_profile.ctp create mode 100644 application/shoutbox/templates/de/code/action_login_status_problem.ctp create mode 100644 application/shoutbox/templates/de/code/action_login_welcome.ctp create mode 100644 application/shoutbox/templates/de/code/block_persona_data.ctp create mode 100644 application/shoutbox/templates/de/code/captch_graphic_code.ctp create mode 100644 application/shoutbox/templates/de/code/confirm_link.ctp create mode 100644 application/shoutbox/templates/de/code/footer.ctp create mode 100644 application/shoutbox/templates/de/code/header.ctp create mode 100644 application/shoutbox/templates/de/code/home.ctp create mode 100644 application/shoutbox/templates/de/code/login_failed.ctp create mode 100644 application/shoutbox/templates/de/code/login_form.ctp create mode 100644 application/shoutbox/templates/de/code/login_main.ctp create mode 100644 application/shoutbox/templates/de/code/logout_done.ctp create mode 100644 application/shoutbox/templates/de/code/mail_debug.ctp create mode 100644 application/shoutbox/templates/de/code/register_form.ctp create mode 100644 application/shoutbox/templates/de/code/shoutbox_main.ctp create mode 100644 application/shoutbox/templates/de/emails/.htaccess create mode 100644 application/shoutbox/templates/de/emails/text_resend_link.tpl create mode 100644 application/shoutbox/templates/de/html/.htaccess create mode 100644 application/shoutbox/templates/de/html/nav_advert.tpl create mode 100644 application/shoutbox/templates/de/html/selector_ship-simu.tpl create mode 100644 application/shoutbox/templates/images/.htaccess create mode 100644 application/shoutbox/templates/images/_cache/.htaccess create mode 100644 application/shoutbox/templates/images/de/.htaccess create mode 100644 application/shoutbox/templates/images/de/image/.htaccess create mode 100644 application/shoutbox/templates/images/de/image/base_code.itp create mode 100644 application/shoutbox/templates/images/de/image/code_captcha.itp diff --git a/.gitattributes b/.gitattributes index 7d0519d..616fec2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -233,6 +233,48 @@ application/ship-simu/templates/images/de/.htaccess -text application/ship-simu/templates/images/de/image/.htaccess -text application/ship-simu/templates/images/de/image/base_code.itp -text application/ship-simu/templates/images/de/image/code_captcha.itp -text +application/shoutbox/.htaccess -text +application/shoutbox/class_ApplicationHelper.php -text +application/shoutbox/config.php -text +application/shoutbox/debug.php -text +application/shoutbox/exceptions.php -text +application/shoutbox/exceptions/.htaccess -text +application/shoutbox/init.php -text +application/shoutbox/interfaces/.htaccess -text +application/shoutbox/loader.php -text +application/shoutbox/main/.htaccess -text +application/shoutbox/main/class_ -text +application/shoutbox/starter.php -text +application/shoutbox/templates/.htaccess -text +application/shoutbox/templates/de/.htaccess -text +application/shoutbox/templates/de/code/action_login_logout.ctp -text +application/shoutbox/templates/de/code/action_login_profile.ctp -text +application/shoutbox/templates/de/code/action_login_status_problem.ctp -text +application/shoutbox/templates/de/code/action_login_welcome.ctp -text +application/shoutbox/templates/de/code/block_persona_data.ctp -text +application/shoutbox/templates/de/code/captch_graphic_code.ctp -text +application/shoutbox/templates/de/code/confirm_link.ctp -text +application/shoutbox/templates/de/code/footer.ctp -text +application/shoutbox/templates/de/code/header.ctp -text +application/shoutbox/templates/de/code/home.ctp -text +application/shoutbox/templates/de/code/login_failed.ctp -text +application/shoutbox/templates/de/code/login_form.ctp -text +application/shoutbox/templates/de/code/login_main.ctp -text +application/shoutbox/templates/de/code/logout_done.ctp -text +application/shoutbox/templates/de/code/mail_debug.ctp -text +application/shoutbox/templates/de/code/register_form.ctp -text +application/shoutbox/templates/de/code/shoutbox_main.ctp -text +application/shoutbox/templates/de/emails/.htaccess -text +application/shoutbox/templates/de/emails/text_resend_link.tpl -text +application/shoutbox/templates/de/html/.htaccess -text +application/shoutbox/templates/de/html/nav_advert.tpl -text +application/shoutbox/templates/de/html/selector_ship-simu.tpl -text +application/shoutbox/templates/images/.htaccess -text +application/shoutbox/templates/images/_cache/.htaccess -text +application/shoutbox/templates/images/de/.htaccess -text +application/shoutbox/templates/images/de/image/.htaccess -text +application/shoutbox/templates/images/de/image/base_code.itp -text +application/shoutbox/templates/images/de/image/code_captcha.itp -text application/todo/.htaccess -text application/todo/class_ApplicationHelper.php -text application/todo/config.php -text diff --git a/application/ship-simu/main/commands/web/class_WebRefillFormCommand.php b/application/ship-simu/main/commands/web/class_WebRefillFormCommand.php index 9039d56..625db1d 100644 --- a/application/ship-simu/main/commands/web/class_WebRefillFormCommand.php +++ b/application/ship-simu/main/commands/web/class_WebRefillFormCommand.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class WebMoneyRefillFormCommand extends BaseCommand implements Commandable { +class WebRefillFormCommand extends BaseCommand implements Commandable { /** * Protected constructor * @@ -42,9 +42,9 @@ class WebMoneyRefillFormCommand extends BaseCommand implements Commandable { * @param $resolverInstance An instance of a command resolver * @return $commandInstance The created command instance */ - public final static function createWebMoneyRefillFormCommand (CommandResolver $resolverInstance) { + public final static function createWebRefillFormCommand (CommandResolver $resolverInstance) { // Get a new instance - $commandInstance = new WebMoneyRefillFormCommand(); + $commandInstance = new WebRefillFormCommand(); // Set the resolver instance $commandInstance->setResolverInstance($resolverInstance); diff --git a/application/shoutbox/.htaccess b/application/shoutbox/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/class_ApplicationHelper.php b/application/shoutbox/class_ApplicationHelper.php new file mode 100644 index 0000000..71800ad --- /dev/null +++ b/application/shoutbox/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 = "shoutbox_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 shoutbox software + * + * @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('response')) { + // Then use it + $response = strtolower($requestInstance->getRequestElement('response')); + $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/shoutbox/config.php b/application/shoutbox/config.php new file mode 100644 index 0000000..8bba746 --- /dev/null +++ b/application/shoutbox/config.php @@ -0,0 +1,251 @@ + + * @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', "ShipSimuRegistration"); + +// CFG: USER-LOGIN-CLASS +$cfg->setConfigEntry('user_login_class', "ShipSimuUserLogin"); + +// CFG: GUEST-LOGIN-CLASS +$cfg->setConfigEntry('guest_login_class', "ShipSimuGuestLogin"); + +// 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', "ShipSimuLoginHelper"); + +// 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-CLASS +$cfg->setConfigEntry('news_download_class', "NewsDownloadFilter"); + +// CFG: NEWS-PROCESS-CLASS +$cfg->setConfigEntry('news_process_class', "NewsProcessFilter"); + +// CFG: USER-AUTH-CLASS +$cfg->setConfigEntry('user_auth_class', "UserAuthFilter"); + +// CFG: USER-UPDATE-CLASS +$cfg->setConfigEntry('user_update_class', "UserUpdateFilter"); + +// CFG: USER-STATUS-CONFIRMED-CLASS +$cfg->setConfigEntry('user_status_confirmed_class', "UserStatusConfimedUpdateFilter"); + +// CFG: CAPTCHA-ENCRYPT-VALIDATOR-CLASS +$cfg->setConfigEntry('captcha_encrypt_validator_class', "CaptchaEncryptFilter"); + +// CFG: CAPTCHA-GUEST-VERIFIER-CLASS +$cfg->setConfigEntry('captcha_guest_verifier_class', "GraphicalCodeCaptchaVerifierFilter"); + +// CFG: CAPTCHA-USER-VERIFIER-CLASS +$cfg->setConfigEntry('captcha_user_verifier_class', "GraphicalCodeCaptchaVerifierFilter"); + +// CFG: CAPTCHA-REGISTER-VERIFIER-CLASS +$cfg->setConfigEntry('captcha_register_verifier_class', "GraphicalCodeCaptchaVerifierFilter"); + +// CFG: CONFIRM-CODE-VALIDATOR-CLASS +$cfg->setConfigEntry('confirm_code_verifier_class', "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', "Y"); + +// CFG: EMAIL-CHANGE-CONFIRMATION +$cfg->setConfigEntry('email_change_confirmation', "Y"); + +// CFG: GUEST-LOGIN-ALLOWED +$cfg->setConfigEntry('guest_login_allowed', "Y"); + +// 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', "ShipSimuLoginAction"); + +// CFG: LOGIN-LOGOUT-ACTION-CLASS +$cfg->setConfigEntry('login_logout_action_class', "ShipSimuLogoutAction"); + +// CFG: LOGIN-PROFILE-ACTION-CLASS +$cfg->setConfigEntry('login_profile_action_class', "ShipSimuProfileAction"); + +// CFG: SHIPSIMU-REGISTER-CAPTCHA +$cfg->setConfigEntry('shoutbox_register_captcha', "GraphicalCodeCaptcha"); + +// CFG: shoutbox-USER-LOGIN-CAPTCHA +$cfg->setConfigEntry('shoutbox_user_login_captcha', "GraphicalCodeCaptcha"); + +// CFG: shoutbox-GUEST-LOGIN-CAPTCHA +$cfg->setConfigEntry('shoutbox_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: shoutbox-REGISTER-CAPTCHA-SECURED +$cfg->setConfigEntry('shoutbox_register_captcha_secured', "Y"); + +// CFG: shoutbox-USER-LOGIN-CAPTCHA-SECURED +$cfg->setConfigEntry('shoutbox_user_login_captcha_secured', "Y"); + +// CFG: shoutbox-GUEST-LOGIN-CAPTCHA-SECURED +$cfg->setConfigEntry('shoutbox_guest_login_captcha_secured', "Y"); + +// CFG: BLOCK-SHOWS-REGISTRATION +$cfg->setConfigEntry('block_shows_registration', "Y"); + +// CFG: COMPANY-CLASS +$cfg->setConfigEntry('company_class', "ShippingCompany"); + +// CFG: COMPANY-DB-WRAPPER-CLASS +$cfg->setConfigEntry('company_db_wrapper_class', "CompanyDatabaseWrapper"); + +// 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/shoutbox/debug.php b/application/shoutbox/debug.php new file mode 100644 index 0000000..f5da828 --- /dev/null +++ b/application/shoutbox/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/shoutbox/exceptions.php b/application/shoutbox/exceptions.php new file mode 100644 index 0000000..c6310a3 --- /dev/null +++ b/application/shoutbox/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/shoutbox/exceptions/.htaccess b/application/shoutbox/exceptions/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/exceptions/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/init.php b/application/shoutbox/init.php new file mode 100644 index 0000000..117b295 --- /dev/null +++ b/application/shoutbox/init.php @@ -0,0 +1,71 @@ +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'); + +// Generate call-back function +$callback = sprintf("%s::getInstance", + FrameworkConfiguration::getInstance()->readConfig('app_helper_class') +); + +// Get an instance of the helper +$app = call_user_func_array($callback, array()); + +// Set application name and version +$app->setAppName("Nameless Blogging Software"); +$app->setAppVersion("0.0.0"); +$app->setAppShortName("shoutbox"); + +// Set instances +$app->setFileIoInstance($io); +$app->setLanguageInstance($lang); +$app->setDatabaseInstance($db); + +// [EOF] +?> diff --git a/application/shoutbox/interfaces/.htaccess b/application/shoutbox/interfaces/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/interfaces/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/loader.php b/application/shoutbox/loader.php new file mode 100644 index 0000000..12b388b --- /dev/null +++ b/application/shoutbox/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/shoutbox/main/.htaccess b/application/shoutbox/main/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/main/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/main/class_ b/application/shoutbox/main/class_ new file mode 100644 index 0000000..df22004 --- /dev/null +++ b/application/shoutbox/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/shoutbox/starter.php b/application/shoutbox/starter.php new file mode 100644 index 0000000..b1530f7 --- /dev/null +++ b/application/shoutbox/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/shoutbox/templates/.htaccess b/application/shoutbox/templates/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/de/.htaccess b/application/shoutbox/templates/de/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/de/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/de/code/action_login_logout.ctp b/application/shoutbox/templates/de/code/action_login_logout.ctp new file mode 100644 index 0000000..4dd47d9 --- /dev/null +++ b/application/shoutbox/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 Blog aussloggen? +
+ + +
diff --git a/application/shoutbox/templates/de/code/action_login_profile.ctp b/application/shoutbox/templates/de/code/action_login_profile.ctp new file mode 100644 index 0000000..1718da2 --- /dev/null +++ b/application/shoutbox/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 Blog 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 Blogeregeln gut durch und kreuze dann "Ja, ich akzeptiere die aktuellen Blogregeln" an."); + $helper->addFieldText('rules', "Ja, ich akzeptiere die aktuellen Blogregeln:"); + $helper->addInputCheckboxField('rules', false); +} else { + $helper->addFormNote('rules_accepted', "Du hast die aktuellen Blogregeln 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 +
+ +
+ {?shoutbox_profile?} +
diff --git a/application/shoutbox/templates/de/code/action_login_status_problem.ctp b/application/shoutbox/templates/de/code/action_login_status_problem.ctp new file mode 100644 index 0000000..88a47b1 --- /dev/null +++ b/application/shoutbox/templates/de/code/action_login_status_problem.ctp @@ -0,0 +1,67 @@ +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." + ); +} elseif ($helper->ifUserAccountGuest()) { + // Account is guest account + $helper->addFormNote('status_guest', "Gästeaccounts sind in der Funktionalität + leicht eingeschränkt. Bitte melde dich an, damit du ein + vollwertiges Account bekommst." + ); +} + +// 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/shoutbox/templates/de/code/action_login_welcome.ctp b/application/shoutbox/templates/de/code/action_login_welcome.ctp new file mode 100644 index 0000000..902eba9 --- /dev/null +++ b/application/shoutbox/templates/de/code/action_login_welcome.ctp @@ -0,0 +1,3 @@ +
+ {?shoutbox_login_news?} +
diff --git a/application/shoutbox/templates/de/code/block_persona_data.ctp b/application/shoutbox/templates/de/code/block_persona_data.ctp new file mode 100644 index 0000000..e92df8a --- /dev/null +++ b/application/shoutbox/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/shoutbox/templates/de/code/captch_graphic_code.ctp b/application/shoutbox/templates/de/code/captch_graphic_code.ctp new file mode 100644 index 0000000..400a861 --- /dev/null +++ b/application/shoutbox/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/shoutbox/templates/de/code/confirm_link.ctp b/application/shoutbox/templates/de/code/confirm_link.ctp new file mode 100644 index 0000000..eaf8060 --- /dev/null +++ b/application/shoutbox/templates/de/code/confirm_link.ctp @@ -0,0 +1,25 @@ +addLinkWithTextById('direct_login_link_text'); + +// Flush the content +$helper->flushContent(); + +// [EOF] +?> +
+ Bestätigung Deiner Email-Adresse: +
+ +
+ Hallo {?username?}! Du hast heute deine + Email-Addresse bestätigt, wodurch alle Blogfunktionen entsperrt + worden sind. Viel Spass beim Bloggen! +
+ + diff --git a/application/shoutbox/templates/de/code/footer.ctp b/application/shoutbox/templates/de/code/footer.ctp new file mode 100644 index 0000000..aa82e68 --- /dev/null +++ b/application/shoutbox/templates/de/code/footer.ctp @@ -0,0 +1,4 @@ + + + + diff --git a/application/shoutbox/templates/de/code/header.ctp b/application/shoutbox/templates/de/code/header.ctp new file mode 100644 index 0000000..1c92a39 --- /dev/null +++ b/application/shoutbox/templates/de/code/header.ctp @@ -0,0 +1,20 @@ + + + + + {?app_full_name?} - {?title?} + + + + + + + + + + + + + + +
diff --git a/application/shoutbox/templates/de/code/home.ctp b/application/shoutbox/templates/de/code/home.ctp new file mode 100644 index 0000000..67db51c --- /dev/null +++ b/application/shoutbox/templates/de/code/home.ctp @@ -0,0 +1,3 @@ +
+ Willkommen zur namenlosen Blogging-Software! +
diff --git a/application/shoutbox/templates/de/code/login_failed.ctp b/application/shoutbox/templates/de/code/login_failed.ctp new file mode 100644 index 0000000..dc67766 --- /dev/null +++ b/application/shoutbox/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 Blog eingeloggt! +
+ +
+ Du bist nicht mehr im {?app_full_name?} Blog 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/shoutbox/templates/de/code/login_form.ctp b/application/shoutbox/templates/de/code/login_form.ctp new file mode 100644 index 0000000..ab7b020 --- /dev/null +++ b/application/shoutbox/templates/de/code/login_form.ctp @@ -0,0 +1,98 @@ +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 Blog einloggen"); +} else { + // Formular deaktiviert + $helper->addFormNote('form_deactivated', "Einloggen in diesen Blog ist derzeit administrativ 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(); + +// Ist Gastlogin erlaubt? +if ($helper->ifGuestLoginAllowed()) { + // Neue Helper-Instanz holen + $helper = WebFormHelper::createWebFormHelper($this, 'shoutbox_guest_login'); + $helper->addInputHiddenConfiguredField('user', 'guest_login'); + $helper->addInputHiddenConfiguredField('passwd', 'guest_login'); + + // CAPTCHA enbaled? + if ($helper->ifFormSecuredWithCaptcha()) { + $helper->addFormGroup('captcha_guest', "Unser Gast-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst."); + $helper->addCaptcha(); + } // END - if + + // Submit button + $helper->addFormGroup('buttons_guest', "Gastlogins sind in der Funkionsweise eingeschränkt. Mehr dazu unter "Gastlogin"."); + $helper->addInputSubmitButton("Als Gast einloggen"); + $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?} +
+ +
+
+ {?shoutbox_user_login?} +
+ +
+ {?shoutbox_guest_login?} +
+
+ + diff --git a/application/shoutbox/templates/de/code/login_main.ctp b/application/shoutbox/templates/de/code/login_main.ctp new file mode 100644 index 0000000..df6c2ba --- /dev/null +++ b/application/shoutbox/templates/de/code/login_main.ctp @@ -0,0 +1,96 @@ +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(); + +////////////////////////////////////// +// Assign the shipping company data // +////////////////////////////////////// + +// Get a new instance for personal data +$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data'); + +// Set the data source instance +$blockInstance->prefetchValueInstance('company', 'user'); + +// Assign the company name +if ($blockInstance->getValueInstance()->ifUserIsFounder()) { + // User is the founder of the company + $blockInstance->assignMessageField('company_status', "user_is_company_founder"); + $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview"); + $blockInstance->assignMessageField('company_link_text', "link_text_company_overview"); + $blockInstance->assignMessageField('company_link_title', "link_title_company_overview"); +} elseif ($blockInstance->getValueInstance()->ifUserIsOwner()) { + // User owns the company + $blockInstance->assignMessageField('company_status', "user_is_company_owner"); + $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview"); + $blockInstance->assignMessageField('company_link_text', "link_text_company_overview"); + $blockInstance->assignMessageField('company_link_title', "link_title_company_overview"); +} elseif ($blockInstance->getValueInstance()->ifUserIsEmployee()) { + // User is employed in company + $blockInstance->assignMessageField('company_status', "user_is_employed_in_company"); + $blockInstance->assignLinkFieldWithAction('company_link' , "employee_overview"); + $blockInstance->assignMessageField('company_link_text', "link_text_employee_overview"); + $blockInstance->assignMessageField('company_link_title', "link_title_employee_overview"); +} else { + // No company participation! + $blockInstance->assignMessageField('company_status', "user_not_assigned_company"); + $blockInstance->assignLinkFieldWithAction('company_link' , "company"); + $blockInstance->assignMessageField('company_link_text', "link_text_company"); + $blockInstance->assignMessageField('company_link_title', "link_title_company"); +} + +// 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 von {?app_full_name?}! +
+ +
+ {?login_content?} +
+ +
+
+ Account-Infos: +
+ +
+ {?persona_data?} +
+ + +
diff --git a/application/shoutbox/templates/de/code/logout_done.ctp b/application/shoutbox/templates/de/code/logout_done.ctp new file mode 100644 index 0000000..be8a24b --- /dev/null +++ b/application/shoutbox/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 Blog ausgeloggt! +
+ +
+ Du kannst dich nun {?relogin_link}? oder weiter auf unseren Seiten bleiben. ;-) +
diff --git a/application/shoutbox/templates/de/code/mail_debug.ctp b/application/shoutbox/templates/de/code/mail_debug.ctp new file mode 100644 index 0000000..e62dd07 --- /dev/null +++ b/application/shoutbox/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/shoutbox/templates/de/code/register_form.ctp b/application/shoutbox/templates/de/code/register_form.ctp new file mode 100644 index 0000000..1e71d98 --- /dev/null +++ b/application/shoutbox/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 Blog:"); +$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 Blog 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 Blogregeln gut durch und kreuze dann "Ja, ich akzeptiere die aktuellen Blogregeln" an."); +$helper->addFieldText('rules', "Ja, ich akzeptiere die aktuellen Blogregeln:"); +$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 Blog 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?} +
+ +
+ {?shoutbox_register?} +
diff --git a/application/shoutbox/templates/de/code/shoutbox_main.ctp b/application/shoutbox/templates/de/code/shoutbox_main.ctp new file mode 100644 index 0000000..9425c47 --- /dev/null +++ b/application/shoutbox/templates/de/code/shoutbox_main.ctp @@ -0,0 +1,23 @@ +{?header?} + +
+ {?shoutbox_header?} +
+ + + + + +
+ {?content?} +
+ + + +{?footer?} diff --git a/application/shoutbox/templates/de/emails/.htaccess b/application/shoutbox/templates/de/emails/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/de/emails/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/de/emails/text_resend_link.tpl b/application/shoutbox/templates/de/emails/text_resend_link.tpl new file mode 100644 index 0000000..e764146 --- /dev/null +++ b/application/shoutbox/templates/de/emails/text_resend_link.tpl @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/application/shoutbox/templates/de/html/.htaccess b/application/shoutbox/templates/de/html/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/de/html/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/de/html/nav_advert.tpl b/application/shoutbox/templates/de/html/nav_advert.tpl new file mode 100644 index 0000000..22da43b --- /dev/null +++ b/application/shoutbox/templates/de/html/nav_advert.tpl @@ -0,0 +1 @@ + diff --git a/application/shoutbox/templates/de/html/selector_ship-simu.tpl b/application/shoutbox/templates/de/html/selector_ship-simu.tpl new file mode 100644 index 0000000..b96640e --- /dev/null +++ b/application/shoutbox/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/shoutbox/templates/images/.htaccess b/application/shoutbox/templates/images/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/images/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/images/_cache/.htaccess b/application/shoutbox/templates/images/_cache/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/images/_cache/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/images/de/.htaccess b/application/shoutbox/templates/images/de/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/images/de/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/images/de/image/.htaccess b/application/shoutbox/templates/images/de/image/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/templates/images/de/image/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/shoutbox/templates/images/de/image/base_code.itp b/application/shoutbox/templates/images/de/image/base_code.itp new file mode 100644 index 0000000..6501b56 --- /dev/null +++ b/application/shoutbox/templates/images/de/image/base_code.itp @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/application/shoutbox/templates/images/de/image/code_captcha.itp b/application/shoutbox/templates/images/de/image/code_captcha.itp new file mode 100644 index 0000000..2e28522 --- /dev/null +++ b/application/shoutbox/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] +?> -- 2.30.2