* text=auto !eol
/Doxyfile -text
+application/admin/.htaccess -text
+application/admin/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/actions/.htaccess -text
+application/admin/main/actions/web/.htaccess -text
+application/admin/main/actions/web/class_WebAdminLoginWelcomeAction.php -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_admin_login_logout.ctp -text
+application/admin/templates/de/code/action_admin_login_profile.ctp -text
+application/admin/templates/de/code/action_admin_login_status_problem.ctp -text
+application/admin/templates/de/code/action_admin_login_welcome.ctp -text
+application/admin/templates/de/code/action_admin_status_problem.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_admin.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
/clear-cache.sh -text
db/.htaccess -text
db/company/.htaccess -text
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A class holding general data about the application and some methods for
+ * the management including the entry point.
+ *
+ * E.g.:
+ *
+ * index.php?app=my_app
+ *
+ * You need to create a folder in the folder "application" named "my_app"
+ * (without the quotes) and create a include file called
+ * class_ApplicationHelper.php. You have to write the same class for your
+ * application and implement the same interface called ManageableApplication
+ * because this class include file will be searched for.
+ *
+ * It is good when you avoid more GET parameters to keep URLs short and sweet.
+ * But sometimes you need some GET paramerers e.g. for your imprint or info page
+ * or other linked pages which you have to create and state some informations.
+ *
+ * Please remember that this include file is being loaded *before* the class
+ * loader is loading classes from "exceptions", "interfaces" and "main"!
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+class ApplicationHelper extends BaseApplication implements ManageableApplication, Registerable {
+ /**
+ * 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__);
+ }
+
+ /**
+ * 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."<br />\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]
+?>
--- /dev/null
+<?php
+/**
+ * Additional/overwritten configuration parts
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+// 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");
+
+// CFG: WEB-BLOCK-HELPER
+$cfg->setConfigEntry('web_block_helper', "WebBlockHelper");
+
+// CFG: WEB-FORM-HELPER
+$cfg->setConfigEntry('web_form_helper', "WebFormHelper");
+
+// CFG: WEB-LINK-HELPER
+$cfg->setConfigEntry('web_link_helper', "WebLinkHelper");
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * Application data
+ *
+ * Please remember that this include file is being loaded *before* the class
+ * loader is loading classes from "exceptions", "interfaces" and "main"!
+ *
+ * You can prevent adding this application to the selector by uncommenting the
+ * following line:
+ *
+ * if ((isset($this)) && (is_object($this)) && ($this->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 <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+// 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]
+?>
--- /dev/null
+<?php
+/**
+ * Some debugging stuff for this application
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+// 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]
+?>
--- /dev/null
+<?php
+/**
+ * The exception handler for this application
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+// Our own exception handler
+function __exceptionHandler (FrameworkException $e) {
+ // Call the app_die() method
+ ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> (<span class=\"app_short_name\">%s</span>) has terminated due to a thrown exception: <span class=\"exception_name\">%s</span> <span class=\"exception_number\">[%s]</span>: <span class=\"debug_exception\">%s</span> Backtrace: <div class=\"debug_backtrace\">%s</div>",
+ 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: <span class=\"debug_file\">%s</span>, Line: <span class=\"debug_line\">%s</span>, Code: <span class=\"debug_code\">%s</span>, Message: <span class=\"debug_message\">%s</span>",
+ 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 = "<em>Unknown</em>";
+
+ // Create message
+ $message = sprintf("File: <span class=\"debug_file\">%s</span>, Line: <span class=\"debug_line\">%s</span>, Code: <span class=\"debug_code\">%s</span>",
+ 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]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * Application initializer
+ *
+ * Please remember that this include file is being loaded *before* the class
+ * loader is loading classes from "exceptions", "interfaces" and "main"!
+ *
+ * You can prevent adding this application to the selector by uncommenting the
+ * following line:
+ *
+ * if ((isset($this)) && (is_object($this)) && ($this->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 <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+// 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]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A specialized class loader for this class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+// 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]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An action class for the admin "welcome" page
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+class WebAdminLoginWelcomeAction extends BaseAction implements PerformableAction, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this action
+ *
+ * @return $actionInstance An instance of this action class
+ */
+ public final static function createWebAdminLoginWelcomeAction () {
+ // Get a new instance
+ $actionInstance = new WebAdminLoginWelcomeAction();
+
+ // Return the instance
+ return $actionInstance;
+ }
+
+ /**
+ * 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
+ * @todo Maybe we need to do something later here
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ $this->partialStub("Unfinished part.");
+ }
+
+ /**
+ * 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 0% done
+ */
+ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+ $this->partialStub("Need to add filters which looks for applications with "admin" directory.");
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ *
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A command for user login
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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 {
+ // Redirect...
+ $responseInstance->redirectToConfiguredUrl('app_login_url');
+
+ // Exit here
+ exit();
+ } 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', array($controllerInstance)));
+ break;
+
+ case "email": // Login via email
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_verifier_filter', array($controllerInstance)));
+ break;
+
+ default: // Wether username or email is set
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_email_verifier_filter', array($controllerInstance)));
+ break;
+ }
+
+ // Password verifier filter
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_verifier_filter', array($controllerInstance)));
+
+ // Add filter for CAPTCHA
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_user_verifier_filter', array($controllerInstance)));
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A special login class for administration area
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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) === false) {
+ // 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 '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 given request key or throw an exception if key was not found in
+ * request
+ *
+ * @param $requestKey Key in request class
+ * @return void
+ */
+ public function encryptPassword ($requestKey) {
+ // Check if password is found in 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 request
+ $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
+ } // END - if
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A helper for administration area login. This login helper first checks what
+ * setting (cookie or session) the admin has choosen then overwrites it with the
+ * setting from current user. The registry instance should hold an instance of
+ * this user class at key 'user' else an exception will be thrown. After this
+ * the setting from a login form will be taken as login method and be stored
+ * in database for later usage.
+ *
+ * The user shall be able to choose "Default login method" or similar to use his
+ * own login method.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+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);
+ }
+}
+
+//
+?>
--- /dev/null
+<?php
+/**
+ * The application launcher
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+// 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 <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
+ $application,
+ FrameworkConfiguration::getInstance()->readConfig('app_helper_class')
+ ));
+} elseif (!is_object($app)) {
+ // No object!
+ ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> 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 <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
+ $application,
+ FrameworkConfiguration::getInstance()->readConfig('entry_method')
+ ));
+}
+
+// Call user function
+call_user_func_array(array($app, FrameworkConfiguration::getInstance()->readConfig('entry_method')), array());
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Get helper instance
+$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_now_link', 'index.php?app={?app_short_name?}&page=logout'));
+
+// Set link text
+$helper->addLinkWithTextById('logout_now_link_text');
+
+// Flush the content
+$helper->flushContent();
+
+// Get helper instance
+$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($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();
+
+// [EOC]
+?>
+<div id="logout_box">
+ <div id="logout_header">
+ Willst du dich wirklich aus dem <span class="app_name">{?app_full_name?}</span> ausloggen?
+ </div>
+
+ <div id="logout_links">
+ {?logout_now_link?} | {?return_login_link?}
+ </div>
+</div>
--- /dev/null
+<?php
+// Get helper instance for web forms. This will add the opening form-tag to
+// the helper's render cache which is simply a small variable in the class
+// BaseHelper.
+$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "admin_profile"));
+
+// Pre-fetch field data with a given registry key
+$helper->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: <span class=\"persona_data\">".$helper->getValueField('email')."</span>");
+
+// 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 <span class=\"app_name\">{?app_full_name?}</span> 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();
+
+// [EOC]
+?>
+<div id="content_header">
+ Deine Profildaten bearbeiten
+</div>
+
+<div id="profile_box">
+ {?admin_profile?}
+</div>
--- /dev/null
+<?php
+// Get helper instance for web forms. This will add the opening form-tag to
+// the helper's render cache which is simply a small variable in the class
+// BaseHelper.
+$helper = WebFormHelper::createWebFormHelper($this, "resend_link");
+
+// Pre-fetch field data with a given registry key
+$helper->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:
+ <span id=\"lock_reason\">".$helper->getValueField('lock_reason')."</span>
+ 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
+?>
+<div id="content_header">
+ Problem mit deinem Account gefunden:
+</div>
+
+<div id="status_box">
+ 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.
+
+ <div id="resend_link_box">
+ {?resend_link?}
+ </div>
+
+ <div id="confirm_code_box">
+ {?confirm_code?}
+ </div>
+</div>
--- /dev/null
+<div id="overview_frame">
+ {?admin_app_list?}
+</div>
+
+<div id="overview_frame">
+ {?admin_overview?}
+</div>
+
+<div id="updates_frame">
+ <div id="updates_header">
+ {?updates_header?}
+ </div>
+
+ <div id="updates_content">
+ {?updates_content?}
+ </div>
+</div>
--- /dev/null
+<?php
+// Get helper instance for web forms. This will add the opening form-tag to
+// the helper's render cache which is simply a small variable in the class
+// BaseHelper.
+$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, "resend_link"));
+
+// Pre-fetch field data with a given registry key
+$helper->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:
+ <span id=\"lock_reason\">".$helper->getValueField('lock_reason')."</span>
+ 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 = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($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
+
+// [EOC]
+?>
+<div id="content_header">
+ Problem mit deinem Account gefunden:
+</div>
+
+<div id="status_box">
+ 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.
+
+ <div id="resend_link_box">
+ {?resend_link?}
+ </div>
+
+ <div id="confirm_code_box">
+ {?confirm_code?}
+ </div>
+</div>
--- /dev/null
+{?header?}
+
+<div id="main_header">
+ {?admin_header?}
+</div>
+
+<div id="navigation">
+ {?navigation?}
+</div>
+
+<div id="main_content">
+ {?content?}
+</div>
+
+<div id="main_footer">
+ {?admin_footer?}
+</div>
+
+{?footer?}
--- /dev/null
+<?php
+// Get a helper instance for the profile link (and maybe later more!)
+$helperInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'profile_link', 'index.php?app={?app_short_name?}&page=login_area'));
+
+// Prefetch user instance
+$helperInstance->prefetchValueInstance('user');
+
+// Flush the content out
+$helperInstance->flushContent();
+
+// [EOC]
+?>
+<div class="user_name_div">
+ Nickname: <span class="user_name">{?block_username?}</span>
+</div>
+<div class="user_status_div">
+ Account-Status: <span class="user_status">{?block_user_status?}</span>
+</div>
+<div class="user_profile_div">
+ {?profile_link?}
+</div>
+<div class="user_registered_div">
+ Angemeldet seit: <span class="registered">{?block_registered?}</span>
+</div>
--- /dev/null
+<?php
+// Get a helper instance without a form tag
+$captchaHelper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'captcha_code', false, false));
+
+// Add input field with text for CAPTCHA code
+$captchaHelper->addFieldText('captcha_code', "Bitte wiederhole den Code:");
+$captchaHelper->addInputTextField('c_code');
+
+// Add hidden field with validation hash
+$captchaHelper->addInputHiddenField('hash', $this->readVariable('captcha_hash'));
+
+// Flush content
+$captchaHelper->flushContent();
+
+// [EOC]
+?>
+<div class="captcha_image">
+ <img src="$config[base_url]/index.php?app={?app_short_name?}&page=code_captcha&encrypt={?encrypted_code?}&request=image" alt="CAPTCHA-Bild" title="CAPTCHA-Bild" class="captcha_img" />
+</div>
+<div class="captcha_code">
+ {?captcha_code?}
+</div>
--- /dev/null
+</div> <!-- masterbox //-->
+
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
+<head>
+ <title>
+ {?app_full_name?} - {?title?}
+ </title>
+
+ <meta name="author" content="$config[meta_author]" />
+ <meta name="publisher" content="$config[meta_publisher]" />
+ <meta name="keywords" content="$config[meta_keywords]" />
+ <meta name="robots" content="index,follow" />
+ <meta name="description" content="$config[meta_description]" />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="content-style-type" content="text/css" />
+ <meta http-equiv="content-script-type" content="text/javascript" />
+ <meta http-equiv="language" content="de" />
+</head>
+
+<body>
+<div id="masterbox">
--- /dev/null
+<div id="content_header">
+ Willkommen zum <span class="app_name">{?app_full_name?}</span>!
+</div>
--- /dev/null
+<?php
+// Get helper instance
+$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'login_retry_link', 'index.php?app={?app_short_name?}&page=login'));
+
+// Set link text
+$helper->addLinkWithTextById('login_retry_link_text');
+
+// Flush the content
+$helper->flushContent();
+
+// [EOC]
+?>
+<div id="content_header">
+ Du bist nicht mehr im <span class="app_name">{?app_full_name?}</span> eingeloggt!
+</div>
+
+<div id="content_body">
+ Du bist nicht mehr im <span class="app_name">{?app_full_name?}</span> eingeloggt. Dies kann verschiedene Gründe haben:
+
+ <ol id="login_failed_list">
+ <li>Dein Browser nimmt keine Cookies an.</li>
+ <li>Du hast den Loginbereich aus deinen Bookmarks/Favoriten aufgerufen
+ und die Cookies sind gelöscht.</li>
+ <li>Es besteht ein Problem mit dem Server, wofür du meistens nichts
+ kannst. Bitte kontaktiere den Support, falls dieses Problem
+ weiterhin besteht.</li>
+ </ol>
+
+ Wenn du den Support kontaktierst, halte bitte sämtliche relevante
+ Informationen - <span class="important_note">nicht aber dein Passwort</span>
+ - bereit. Du kannst auch einen Screenshot dieser Seite anfertigen und dem
+ Support diesen senden!
+</div>
+
+<div id="content_footer">
+ <div id="login_retry">
+ {?login_retry_link?}
+ </div>
+
+ Vielen Dank für deine Mitarbeit! :-)
+</div>
--- /dev/null
+<?php
+// Get helper instance for web forms. This will add the opening form-tag to
+// the helper's render cache which is simply a small variable in the class
+// BaseHelper.
+$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'admin_user_login'));
+
+// Formular deaktiviert?
+if ($helper->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', "Das Benutzer-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 <span class=\"app_name\">{?app_full_name?}</span> einloggen");
+} else {
+ // Formular deaktiviert
+ $helper->addFormNote('form_deactivated', "Einloggen in den <span class=\"app_name\">{?app_full_name?}</span> ist deaktiviert worden. Bitte komme später noch mal wieder.");
+ $helper->addFormNote('admin_notice', "Nachricht vom Admin: <span id=\"disabled_reason\">".$this->getConfigInstance()->readConfig('login_disabled_reason')."</span>");
+}
+
+// Formular schliessen
+$helper->flushContent();
+
+// Get helper instance
+$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($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();
+
+// [EOC]
+?>
+<div id="content_header">
+ Einloggen zu <span class="app_name">{?app_full_name?}</span>
+</div>
+
+<div id="content_body">
+ <div id="login_box">
+ {?admin_user_login?}
+ </div>
+</div>
+
+<div id="content_footer">
+ Noch kein Loginaccount? {?register_login_form_link?}
+</div>
--- /dev/null
+<?php
+///////////////////////////////
+// Assign personal user data //
+///////////////////////////////
+
+// Get a new instance for personal data
+$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data'));
+
+// Set the data source instance which must exist in registry
+$blockInstance->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 = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'));
+
+// Add action
+$helper->addActionLink('logout', "Ausloggen");
+
+// Flush the content
+$helper->flushContent();
+
+// [EOC]
+?>
+<div id="content_header">
+ Willkommen zum <span class=\"app_name\">{?app_full_name?}</span>!
+</div>
+
+<div id="content_body">
+ {?login_content?}
+</div>
+
+<div id="persona_data" title="Informationen zum Adminaccount">
+ <div id="persona_header">
+ Account-Infos:
+ </div>
+
+ <div id="persona_body">
+ {?persona_data?}
+ </div>
+
+ <div id="logout_link">
+ {?logout_action_link?}
+ </div>
+</div>
--- /dev/null
+<?php
+// Get helper instance
+$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'relogin_link', 'index.php?app={?app_short_name?}&page=login'));
+
+// Set link text
+$helper->addLinkWithTextById('relogin_link_text');
+
+// Flush the content
+$helper->flushContent();
+
+// [EOC]
+?>
+<div id="content_header">
+ Du bist jetzt aus dem <span class=\"app_name\">{?app_full_name?}</span> ausgeloggt!
+</div>
+
+<div id="content_body">
+ Du kannst dich nun {?relogin_link?} oder weiter auf unseren Seiten bleiben. ;-)
+</div>
--- /dev/null
+<div class="debug_header">
+ Mail-Debug-Ausgabe:
+</div>
+
+<div class="mail_header">
+ <div class="mail_header_line">
+ <span class="mail_sender">Von:</span> <span class="mail_info">{?sender?}</span>
+ </div>
+ <div class="mail_header_line">
+ <span class="mail_recipient">An:</span> <span class="mail_info">{?recipient?}</span>
+ </div>
+ <div class="mail_header_line">
+ <span class="mail_subject">Betreff:</span> <span class="mail_info">{?subject?}</span>
+ </div>
+</div>
+
+<div class="mail_text_box">
+ <div class="mail_message">
+ Nachricht:
+ </div>
+
+ <div class="mail_content">
+ {?message?}
+ </div>
+</div>
--- /dev/null
+<?php
+// Get helper instance for web forms. This will add the opening form-tag to
+// the helper's render cache which is simply a small variable in the class
+// BaseHelper.
+$helper = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'admin_register'));
+
+// Always ask at least for nickname and password
+$helper->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 <span class=\"app_name\">{?app_full_name?}</span>:");
+$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 <span class=\"app_name\">{?app_full_name?}</span> 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 (<span id=\"add_note\">*1</span>) 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 <span class=\"app_name\">{?app_full_name?}</span> 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();
+
+// [EOC]
+?>
+<div id="content_header">
+ Anmeldung bei <span class="app_name">{?app_full_name?}</span>
+</div>
+
+<div id="register_box">
+ {?admin_register?}
+</div>
--- /dev/null
+Deny from all
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<text-mail>
+ <mail-data>
+ <sender-address value="$config[admin_email]" />
+ <subject-line value="Anforderung deines Bestätigungslinks" />
+ <recipient-address value="{?email?}" />
+ <message>
+ <![CDATA[Hallo {?username?}!
+
+Du (oder ein anderer) hattest soeben deinen Bestätigungslink erneut angefordert. Solltest du dies nicht gewesen sein, bitten wir dich den Vorfall zu entschuldigen.
+
+Hier ist nun dein Bestätigungslink. Der alte aus der Anmeldemail ist somit nicht mehr gültig!
+
+$config[base_url]/index.php?app={?app_short_name?}&page=confirm&username={?username?}&confirm={?confirm_hash?}
+
+Solltest du die URL nicht anklicken können, versuche diese in die Adresszeile deines Browsers zu kopieren.
+
+Alternativ kannst du im Loginbereich unter Bestätigungscode den folgenden Code reinkopieren oder eingeben:
+
+{?confirm_hash?}
+
+Solltest du Fragen dazu oder Probleme mit der Bestätigung haben, so melde dich bitte beim Support-Team.
+
+Mit freundlichen Grüßen,
+ Dein {?app_short_name?}-Team
+
+{?mail_footer?}]]>
+ </message>
+ </mail-data>
+</text-mail>
--- /dev/null
+Deny from all
--- /dev/null
+<!-- Put your ads code here which shall be shown below the navigation //-->
--- /dev/null
+<div id="selector_content">
+ <strong>TODO:</strong> Diese Anwendung sollte eigentlich nicht auswählbar sein.
+</div>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<image>
+ <type value="{?image_type?}" />
+ <base>
+ <name value="{?image_name?}" />
+ </base>
+ <resolution>
+ <width value="{?image_width?}" />
+ <height value="{?image_height?}" />
+ </resolution>
+ <background-color>
+ <red value="{?image_bg_red?}" />
+ <green value="{?image_bg_green?}" />
+ <blue value="{?image_bg_blue?}" />
+ </background-color>
+ <foreground-color>
+ <red value="{?image_fg_red?}" />
+ <green value="{?image_fg_green?}" />
+ <blue value="{?image_fg_blue?}" />
+ </foreground-color>
+ <image-string value="groupable">
+ <string-name value="{?image_string_name?}" />
+ <x value="{?image_x?}" />
+ <y value="{?image_y?}" />
+ <font-size value="{?image_size?}" />
+ <text value="{?image_string?}" />
+ </image-string>
+</image>
--- /dev/null
+<?php
+// Needed in every image template to initialy set the image type
+$helper = ImageHelper::createImageHelper($this, "png");
+$helper->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]
+?>