]> git.mxchange.org Git - city.git/commitdiff
Added a lot more stuff for login area and more:
authorRoland Haeder <roland@mxchange.org>
Tue, 7 Apr 2015 16:15:17 +0000 (18:15 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 7 Apr 2015 16:15:17 +0000 (18:15 +0200)
- First 'welcome' or 'overview' page is "ready".
- Registration is half-finished (confirmation is not done)
- Added a lot more classes

Signed-off-by: Roland Haeder <roland@mxchange.org>
42 files changed:
application/city/config.php
application/city/main/actions/.htaccess [new file with mode: 0644]
application/city/main/actions/class_ [new file with mode: 0644]
application/city/main/actions/class_BaseCityAction.php [new file with mode: 0644]
application/city/main/actions/html/.htaccess [new file with mode: 0644]
application/city/main/actions/html/class_HtmlCityLoginWelcomeAction.php [new file with mode: 0644]
application/city/main/commands/html/class_CityHtmlRegisterCommand.php
application/city/main/commands/html/class_HtmlCityRegisterCommand.php
application/city/main/controller/html/class_CityHtmlLoginController.php [new file with mode: 0644]
application/city/main/controller/html/login/.htaccess [new file with mode: 0644]
application/city/main/controller/html/login/class_CityHtmlLoginAreaController.php [new file with mode: 0644]
application/city/main/login/.htaccess [new file with mode: 0644]
application/city/main/login/class_CityGuestLogin.php [new file with mode: 0644]
application/city/main/login/class_CityUserLogin.php [new file with mode: 0644]
application/city/main/login/helper/.htaccess [new file with mode: 0644]
application/city/main/login/helper/class_CityLoginHelper.php [new file with mode: 0644]
application/city/main/menu/class_City [new file with mode: 0644]
application/city/main/menu/class_CityConfirmMenu.php [new file with mode: 0644]
application/city/main/menu/class_CityLoginAreaMenu.php [new file with mode: 0644]
application/city/main/menu/class_CityLoginFailedMenu.php [new file with mode: 0644]
application/city/main/menu/class_CityLoginMenu.php [new file with mode: 0644]
application/city/main/menu/class_CityLogoutMenu.php [new file with mode: 0644]
application/city/main/menu/class_CityStatusMenu.php [new file with mode: 0644]
application/city/main/menu/government/.htaccess [new file with mode: 0644]
application/city/main/menu/government/class_CityGovernmentFailedAreaMenu.php [new file with mode: 0644]
application/city/main/registration/.htaccess [new file with mode: 0644]
application/city/main/registration/class_CityRegistration.php [new file with mode: 0644]
application/city/templates/de/code/action_city_login_government_startup_help.ctp [new file with mode: 0644]
application/city/templates/de/code/action_city_login_government_training.ctp [new file with mode: 0644]
application/city/templates/de/code/action_city_login_logout.ctp [new file with mode: 0644]
application/city/templates/de/code/action_city_login_profile.ctp [new file with mode: 0644]
application/city/templates/de/code/action_city_login_status_problem.ctp [new file with mode: 0644]
application/city/templates/de/code/action_city_login_welcome.ctp [new file with mode: 0644]
application/city/templates/de/code/block_persona_data.ctp [new file with mode: 0644]
application/city/templates/de/code/captch_graphic_code.ctp
application/city/templates/de/code/city_main.ctp
application/city/templates/de/code/login_main.ctp [new file with mode: 0644]
application/city/templates/de/code/register_form.ctp
application/city/templates/de/menu/login_area_menu_entries.xml [new file with mode: 0644]
core
db/user/.htaccess [new file with mode: 0644]
db/user_points/.htaccess [new file with mode: 0644]

index 40ffebb1bea52baaaa70ed761079c7723e45a9ef..de73d4914d287b1694a53d19c4fec6b7c99a66b4 100644 (file)
@@ -68,32 +68,71 @@ $cfg->setConfigEntry('city_html_cmd_home_resolver_class', 'CityHtmlCommandResolv
 // CFG: CITY-HTML-CMD-REGISTER-RESOLVER-CLASS
 $cfg->setConfigEntry('city_html_cmd_register_resolver_class', 'CityHtmlCommandResolver');
 
+// CFG: CITY-HTML-CMD-LOGIN-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_login_resolver_class', 'HtmlCommandResolver');
+
 // CFG: NEWS-READER-HOME-CLASS
 $cfg->setConfigEntry('news_reader_home_class', 'DefaultNewsReader');
 
 // CFG: NEWS-READER-REGISTER-CLASS
 $cfg->setConfigEntry('news_reader_register_class', 'DefaultNewsReader');
 
+// CFG: NEWS-READER-LOGIN-AREA-CLASS
+$cfg->setConfigEntry('news_reader_login_area_class', 'DefaultNewsReader');
+
 // CFG: NEWS-HOME-LIMIT
 $cfg->setConfigEntry('news_home_limit', 10);
 
 // CFG: NEWS-REGISTER-LIMIT
 $cfg->setConfigEntry('news_register_limit', 5);
 
+// CFG: NEWS-LOGIN-AREA-LIMIT
+$cfg->setConfigEntry('news_login_area_limit', 5);
+
 // CFG: CITY-HOME-MENU-CLASS
 $cfg->setConfigEntry('city_home_menu_class', 'CityHomeMenu');
 
 // CFG: CITY-REGISTER-MENU-CLASS
 $cfg->setConfigEntry('city_register_menu_class', 'CityRegisterMenu');
 
+// CFG: LOGIN-FAILED-MENU-CLASS
+$cfg->setConfigEntry('login_failed_menu_class', 'CityLoginFailedMenu');
+
+// CFG: STATUS-MENU-CLASS
+$cfg->setConfigEntry('status_menu_class', 'CityStatusMenu');
+
+// CFG: LOGIN-MENU-CLASS
+$cfg->setConfigEntry('login_menu_class', 'CityLoginMenu');
+
+// CFG: LOGOUT-MENU-CLASS
+$cfg->setConfigEntry('logout_menu_class', 'CityLogoutMenu');
+
+// CFG: REGISTER-MENU-CLASS
+$cfg->setConfigEntry('register_menu_class', 'CityRegisterMenu');
+
+// CFG: CONFIRM-MENU-CLASS
+$cfg->setConfigEntry('confirm_menu_class', 'CityConfirmMenu');
+
+// CFG: LOGIN-AREA-MENU-CLASS
+$cfg->setConfigEntry('login_area_menu_class', 'CityLoginAreaMenu');
+
+// CFG: GOVERNMENT-FAILED-AREA-MENU-CLASS
+$cfg->setConfigEntry('government_failed_area_menu_class', 'CityGovernmentFailedAreaMenu');
+
 // CFG: MENU-TEMPLATE-CLASS
 $cfg->setConfigEntry('menu_template_class', 'MenuTemplateEngine');
 
 // CFG: MENU-TEMPLATE-EXTENSION
 $cfg->setConfigEntry('menu_template_extension', '.xml');
 
+// CFG: HTML-BLOCK-HELPER
+$cfg->setConfigEntry('html_block_helper_class', 'HtmlBlockHelper');
+
 // CFG: HTML-FORM-HELPER
-$cfg->setConfigEntry('html_form_helper', 'HtmlFormHelper');
+$cfg->setConfigEntry('html_form_helper_class', 'HtmlFormHelper');
+
+// CFG: HTML-LINK-HELPER
+$cfg->setConfigEntry('html_link_helper_class', 'HtmlLinkHelper');
 
 // CFG: FORM-ACTION
 $cfg->setConfigEntry('form_action', 'index.php?app={?app_short_name?}&amp;command=do_form');
@@ -194,6 +233,18 @@ $cfg->setConfigEntry('captcha_encrypt_validator_filter', 'CaptchaEncryptFilter')
 // CFG: CITY-HTML-CMD-DO-FORM-RESOLVER-CLASS
 $cfg->setConfigEntry('city_html_cmd_do_form_resolver_class', 'HtmlCommandResolver');
 
+// CFG: CITY-HTML-CMD-LOGIN-AREA-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_login_area_resolver_class', 'HtmlCommandResolver');
+
+// CFG: CITY-HTML-CMD-CONFIRM-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_confirm_resolver_class', 'HtmlCommandResolver');
+
+// CFG: CITY-HTML-CMD-PROBLEM-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_problem_resolver_class', 'HtmlCommandResolver');
+
+// CFG: CITY-HTML-CMD-LOGOUT-RESOLVER-CLASS
+$cfg->setConfigEntry('city_html_cmd_logout_resolver_class', 'HtmlCommandResolver');
+
 // CFG: CAPTCHA-GUEST-VERIFIER-FILTER
 $cfg->setConfigEntry('captcha_guest_verifier_filter', 'GraphicalCodeCaptchaVerifierFilter');
 
@@ -221,6 +272,141 @@ $cfg->setConfigEntry('birthday_register_verifier_filter', 'BirthdayVerifierFilte
 // CFG: BIRTHDAY-PROFILE-VERIFIER-FILTER
 $cfg->setConfigEntry('birthday_profile_verifier_filter', 'BirthdayVerifierFilter');
 
+// CFG: GUEST-LOGIN-USERNAME
+$cfg->setConfigEntry('guest_login_user', 'guest');
+
+// CFG: GUEST-LOGIN-PASS
+$cfg->setConfigEntry('guest_login_passwd', 'guest');
+
+// CFG: USER-REGISTRATION
+$cfg->setConfigEntry('user_registration_class', 'CityRegistration');
+
+// CFG: USER-LOGIN-CLASS
+$cfg->setConfigEntry('user_login_class', 'CityUserLogin');
+
+// CFG: GUEST-LOGIN-CLASS
+$cfg->setConfigEntry('guest_login_class', 'CityGuestLogin');
+
+// CFG: CONFIRM-EMAIL-ENABLED
+$cfg->setConfigEntry('confirm_email_enabled', 'Y');
+
+// 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: USER-STATUS-LOCKED
+$cfg->setConfigEntry('user_status_locked', 'LOCKED');
+
+// CFG: LOGIN-HELPER-CLASS
+$cfg->setConfigEntry('login_helper_class', 'CityLoginHelper');
+
+// 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?}&amp;command=login_area');
+
+// CFG: LOGIN-FAILED-URL
+$cfg->setConfigEntry('login_failed_url', 'index.php?app={?app_short_name?}&amp;command=login_failed');
+
+// CFG: LOGIN-FAILED-LOGIN-RETRY-ACTION-URL
+$cfg->setConfigEntry('login_failed_login_retry_action_url', 'index.php?app={?app_short_name?}&amp;command=login&amp;note=login_failed');
+
+// CFG: LOGIN-AREA-LOGOUT-ACTION-URL
+$cfg->setConfigEntry('login_area_logout_action_url', 'index.php?app={?app_short_name?}&amp;command=login_area');
+
+// CFG: GOVERNMENT-FAILED-LOGOUT-ACTION-URL
+$cfg->setConfigEntry('government_failed_logout_action_url', 'index.php?app={?app_short_name?}&amp;command=login_area');
+
+// CFG: LOGIN-AREA-PROFILE-ACTION-URL
+$cfg->setConfigEntry('login_area_profile_action_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;status=profile');
+
+// CFG: GOVERNMENT-FAILED-PROFILE-ACTION-URL
+$cfg->setConfigEntry('government_failed_profile_action_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;status=profile');
+
+// CFG: LOGIN-AREA-LOGOUT-NOW-ACTION-URL
+$cfg->setConfigEntry('login_area_logout_now_action_url', 'index.php?app={?app_short_name?}&amp;command=logout');
+
+// CFG: LOGIN-AREA-RETURN-LOGIN-ACTION-URL
+$cfg->setConfigEntry('login_area_return_login_action_url', 'index.php?app={?app_short_name?}&amp;command=login_area');
+
+// CFG: LOGIN-AREA-SHIPSIMU-PROFILE-ACTION-URL
+$cfg->setConfigEntry('login_area_shipsimu_profile_action_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;action=profile');
+
+// CFG: LOGOUT_DONE-RELOGIN-ACTION-URL
+$cfg->setConfigEntry('logout_done_relogin_action_url', 'index.php?app={?app_short_name?}&amp;command=login');
+
+// CFG: LOGIN-REGISTER-ACTION-URL
+$cfg->setConfigEntry('login_register_action_url', 'index.php?app={?app_short_name?}&amp;command=register');
+
+// CFG: CONFIRM-DIRECT-LOGIN-ACTION-URL
+$cfg->setConfigEntry('confirm_direct_login_action_url', 'index.php?app={?app_short_name?}&amp;command=login_area');
+
+// CFG: LOGOUT-DONE-URL
+$cfg->setConfigEntry('logout_done_url', 'index.php?app={?app_short_name?}&amp;command=logout_done');
+
+// CFG: ACTION-STATUS-PROBLEM
+$cfg->setConfigEntry('action_status_problem', 'status_problem');
+
+// CFG: LOGIN-USER-STATUS-URL
+$cfg->setConfigEntry('login_user_status_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;action=status_problem&amp;status=status_problem&amp;status=general');
+
+// CFG: LOGIN-USER-STATUS-GUEST-URL
+$cfg->setConfigEntry('login_user_status_guest_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;action=status_problem&amp;status=status_problem&amp;status=guest');
+
+// CFG: USER-NOT-UNCONFIRMED-URL
+$cfg->setConfigEntry('user_not_unconfirmed_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;action=status_problem&amp;status=unconfirmed_problem');
+
+// CFG: USER-UNCONFIRMED-EMAIL-MISSING-URL
+$cfg->setConfigEntry('user_unconfirmed_email_missing_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;action=status_problem&amp;status=unconfirmed_email_missing');
+
+// CFG: CONFIRM-CODE-INVALID-URL
+$cfg->setConfigEntry('confirm_code_invalid_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;action=status_problem&amp;status=confirm_code_invalid');
+
+// CFG: USER-NOT-FOUND-URL
+$cfg->setConfigEntry('user_not_found_url', 'index.php?app={?app_short_name?}&amp;command=login_area&amp;action=status_problem&amp;status=user_not_found');
+
+// CFG: USER-AUTH-FILTER
+$cfg->setConfigEntry('user_auth_filter', 'UserAuthFilter');
+
+// CFG: USER-UPDATE-FILTER
+$cfg->setConfigEntry('user_update_filter', 'UserUpdateFilter');
+
+// CFG: LOGIN-DEFAULT-ACTION
+$cfg->setConfigEntry('login_default_action', 'welcome');
+
+// CFG: MONEYBANK-ACTIVATED
+$cfg->setConfigEntry('moneybank_activated', 'Y');
+
+// CFG: MONEYBANK-OPENING-CLASS
+$cfg->setConfigEntry('moneybank_opening_class', 'MoneyBankRealtimeOpening');
+
+// CFG: USER-POINTS-CLASS
+$cfg->setConfigEntry('user_points_class', 'UserPoints');
+
+// CFG: BLOCK-SHOWS-REGISTRATION
+$cfg->setConfigEntry('block_shows_registration', 'Y');
+
+// CFG: GOVERNMENT-CLASS
+$cfg->setConfigEntry('government_class', 'SimplifiedGovernment');
+
+// CFG: BANK-CLASS
+$cfg->setConfigEntry('bank_class', 'MoneyBank');
+
+// CFG: USER-POINTS-DB-WRAPPER-CLASS
+$cfg->setConfigEntry('user_points_db_wrapper_class', 'UserPointsDatabaseWrapper');
+
+// CFG: USER-GOVERNMENT-WRAPPER-CLASS
+$cfg->setConfigEntry('user_government_wrapper_class', 'UserGovernmentDatabaseWrapper');
+
+// CFG: PAYMENT-DB-WRAPPER-CLASS
+$cfg->setConfigEntry('payment_db_wrapper_class', 'PaymentsDatabaseWrapper');
+
 /******************************************************************************
  *                              Console client                                *
  ******************************************************************************/
diff --git a/application/city/main/actions/.htaccess b/application/city/main/actions/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/actions/class_ b/application/city/main/actions/class_
new file mode 100644 (file)
index 0000000..1f7aa89
--- /dev/null
@@ -0,0 +1,82 @@
+<?php
+/**
+ * 
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @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 ???Action extends BaseCityAction implements Commandable, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this action
+        *
+        * @param       $resolverInstance       An instance of an action resolver
+        * @return      $actionInstance         An instance of this action class
+        */
+       public final static function create???Action (ActionResolver $resolverInstance) {
+               // Get a new instance
+               $actionInstance = new ???Action();
+
+               // 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        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Call parent execute method
+               parent::execute($requestInstance, $responseInstance);
+
+               // Add your code here
+               $this->partialStub("You have to implement me.");
+       }
+
+       /**
+        * 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 some filters here
+        */
+       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+               // Call parent addExtraFilters method
+               parent::addExtraFilters($controllerInstance, $requestInstance);
+
+               // Unfinished method
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/actions/class_BaseCityAction.php b/application/city/main/actions/class_BaseCityAction.php
new file mode 100644 (file)
index 0000000..a21caf5
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/**
+ * A general action class for city
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 BaseCityAction extends BaseAction {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+       }
+
+       /**
+        * 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        0% done
+        */
+       protected function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Add code here executed with every action
+       }
+
+       /**
+        * 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 some filters here
+        */
+       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+               // Unfinished method
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/actions/html/.htaccess b/application/city/main/actions/html/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/actions/html/class_HtmlCityLoginWelcomeAction.php b/application/city/main/actions/html/class_HtmlCityLoginWelcomeAction.php
new file mode 100644 (file)
index 0000000..6407d6b
--- /dev/null
@@ -0,0 +1,81 @@
+<?php
+/**
+ * An action for the welcome page
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 HtmlCityLoginWelcomeAction extends BaseCityAction implements Commandable, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this action
+        *
+        * @param       $resolverInstance       An instance of an action resolver
+        * @return      $actionInstance         An instance of this action class
+        */
+       public static final function createHtmlCityLoginWelcomeAction (ActionResolver $resolverInstance) {
+               // Get a new instance
+               $actionInstance = new HtmlCityLoginWelcomeAction();
+
+               // Set the resolver instance
+               $actionInstance->setResolverInstance($resolverInstance);
+
+               // 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        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Call parent execute method
+               parent::execute($requestInstance, $responseInstance);
+
+               // Add your code here...
+       }
+
+       /**
+        * 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 some filters here
+        */
+       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+               // Unfinished method
+       }
+}
+
+// [EOF]
+?>
index ad43a76cf52bd4ff2463ed87e74b07a0fbb613b3..012bbbc1ed4b0d9ee6bed8589483e77db2cdddc3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2015 Ship-Simu Developer Team
+ * @copyright  Copyright (c) 2015 City Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 4b82e51a592bf8f2430fd0139725c6fdd429a81b..a683c42c2c781dd607f5b4b80026a8ab2d40078f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2015 Ship-Simu Developer Team
+ * @copyright  Copyright (c) 2015 City Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
diff --git a/application/city/main/controller/html/class_CityHtmlLoginController.php b/application/city/main/controller/html/class_CityHtmlLoginController.php
new file mode 100644 (file)
index 0000000..5ac7d8a
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Controller for login form with password reminder and maybe enabled
+ * "guest-login" button
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityHtmlLoginController extends BaseController implements Controller {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $resolverInstance               An instance of a command resolver class
+        * @return      $controllerInstance             A prepared instance of this class
+        * @todo        Add some filters to this controller
+        */
+       public static final function createCityHtmlLoginController (CommandResolver $resolverInstance) {
+               // Create the instance
+               $controllerInstance = new CityHtmlLoginController();
+
+               // Set the command resolver
+               $controllerInstance->setResolverInstance($resolverInstance);
+
+               // Return the prepared instance
+               return $controllerInstance;
+       }
+
+       /**
+        * Handles the given request and response
+        *
+        * @param       $requestInstance        An instance of a request class
+        * @param       $responseInstance       An instance of a response class
+        * @return      void
+        */
+       public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+               // Generic pre-post command execution
+               $this->executeGenericPrePostCommand($requestInstance, $responseInstance);
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/controller/html/login/.htaccess b/application/city/main/controller/html/login/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/controller/html/login/class_CityHtmlLoginAreaController.php b/application/city/main/controller/html/login/class_CityHtmlLoginAreaController.php
new file mode 100644 (file)
index 0000000..5169a87
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Controller for login area with news
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityHtmlLoginAreaController extends BaseController implements Controller {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Init additional filter chains
+               foreach (array('shutdown') as $filterChain) {
+                       $this->initFilterChain($filterChain);
+               } // END - foreach
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @param       $resolverInstance               An instance of a command resolver class
+        * @return      $controllerInstance             A prepared instance of this class
+        * @todo        Add some morer filters to this controller
+        */
+       public static final function createCityHtmlLoginAreaController (CommandResolver $resolverInstance) {
+               // Create the instance
+               $controllerInstance = new CityHtmlLoginAreaController();
+
+               // Set the command resolver
+               $controllerInstance->setResolverInstance($resolverInstance);
+
+               // User auth filter
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_auth_filter'));
+
+               // User update filter
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_update_filter'));
+
+               // News fetcher filter
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
+
+               // News proccess/display-preparation
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
+
+               // Return the prepared instance
+               return $controllerInstance;
+       }
+
+       /**
+        * Handles the given request and response
+        *
+        * @param       $requestInstance        An instance of a request class
+        * @param       $responseInstance       An instance of a response class
+        * @return      void
+        */
+       public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) {
+               /*
+                * Generic execute of the command: pre and post filters with redirect
+                * but request becomes valid after pre-filters run.
+                */
+               $this->genericHanleRequestLoginAreaFailedRedirect($requestInstance, $responseInstance);
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/login/.htaccess b/application/city/main/login/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/login/class_CityGuestLogin.php b/application/city/main/login/class_CityGuestLogin.php
new file mode 100644 (file)
index 0000000..4b8f5eb
--- /dev/null
@@ -0,0 +1,152 @@
+<?php
+/**
+ * A special guest login class for City
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityGuestLogin extends BaseFrameworkSystem implements LoginableUser {
+       /**
+        * The hashed password
+        */
+       private $hashedPassword = '';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this login class
+        *
+        * @return      $loginInstance  An instance of this login class
+        */
+       public static final function createCityGuestLogin () {
+               // Get a new instance
+               $loginInstance = new CityGuestLogin();
+
+               // 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      UserAuthMethodException If wether username nor email login
+        *                                                                              was detected
+        * @throws      MissingMethodException          If a method was not found in the
+        *                                                                              User class
+        * @throws      UserPasswordMismatchException   If the supplied password did not
+        *                                                                              match with the stored password
+        */
+       public function doLogin (Requestable $requestInstance, Responseable $responseInstance) {
+               // By default no method is selected
+               $method = null;
+               $data = "";
+
+               // Detect login method (username or email) and try to get a userinstance
+               if (!is_null($requestInstance->getRequestElement('user'))) {
+                       // Username found!
+                       $method = 'createGuestByUsername';
+                       $data = $requestInstance->getRequestElement('user');
+               } // END - if
+
+               // Is a method detected?
+               if (is_null($method)) {
+                       // Then abort here
+                       throw new UserAuthMethodException($this, self::EXCEPTION_MISSING_METHOD);
+               } elseif (!method_exists($this->getConfigInstance()->getConfigEntry('guest_class'), $method)) {
+                       // The method is invalid!
+                       throw new MissingMethodException(array($this, $method), self::EXCEPTION_MISSING_METHOD);
+               }
+
+               // Get a user instance
+               $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('guest_class'), $method), array($data));
+
+               // Remember this new instance in registry
+               Registry::getRegistry()->addInstance('user', $userInstance);
+
+               // Is the password correct?
+               if ($userInstance->ifPasswordHashMatches($requestInstance) === false) {
+                       // Mismatching password
+                       throw new UserPasswordMismatchException(array($this, $userInstance), BaseUser::EXCEPTION_USER_PASS_MISMATCH);
+               } // END - if
+
+               // 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]
+?>
diff --git a/application/city/main/login/class_CityUserLogin.php b/application/city/main/login/class_CityUserLogin.php
new file mode 100644 (file)
index 0000000..f02a615
--- /dev/null
@@ -0,0 +1,140 @@
+<?php
+/**
+ * A special login class for City
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityUserLogin extends BaseFrameworkSystem implements LoginableUser {
+       /**
+        * The hashed password
+        */
+       private $hashedPassword = '';
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this login class
+        *
+        * @return      $loginInstance  An instance of this login class
+        */
+       public static final function createCityUserLogin () {
+               // Get a new instance
+               $loginInstance = new CityUserLogin();
+
+               // 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 member class
+               $userClass = $this->getConfigInstance()->getConfigEntry('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('user', $userInstance);
+
+               // 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]
+?>
diff --git a/application/city/main/login/helper/.htaccess b/application/city/main/login/helper/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/login/helper/class_CityLoginHelper.php b/application/city/main/login/helper/class_CityLoginHelper.php
new file mode 100644 (file)
index 0000000..0abe805
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+/**
+ * A helper for City to 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@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityLoginHelper 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 static final function createCityLoginHelper (Requestable $requestInstance) {
+               // Get a new instance first
+               $helperInstance = new CityLoginHelper();
+
+               // 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()->getConfigEntry('auth_method_class');
+       }
+
+       /**
+        * Execute the login request by given response instance. This instance can
+        * be used for sending cookies or at least the session id out.
+        *
+        * @param       $responseInstance       An instance of a Responseable class
+        * @return      void
+        */
+       public function executeLogin (Responseable $responseInstance) {
+               // Get an instance from the login method
+               $loginInstance = ObjectFactory::createObjectByName($this->authMethod, array($responseInstance));
+
+               // Set user cookie
+               $loginInstance->setUserAuth($this->getRequestInstance()->getRequestElement('username'));
+
+               // Set password cookie
+               $loginInstance->setPasswordAuth($this->getRequestInstance()->getRequestElement('pass_hash'));
+
+               // Remember this login instance for later usage
+               Registry::getRegistry()->addInstance('login', $loginInstance);
+       }
+}
+
+//
+?>
diff --git a/application/city/main/menu/class_City b/application/city/main/menu/class_City
new file mode 100644 (file)
index 0000000..979c2e0
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A ??? menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @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 City???Menu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public final static function createCity???Menu () {
+               // Get a new instance
+               $menuInstance = new City???Menu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/menu/class_CityConfirmMenu.php b/application/city/main/menu/class_CityConfirmMenu.php
new file mode 100644 (file)
index 0000000..056f766
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A Confirm menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityConfirmMenu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public static final function createCityConfirmMenu () {
+               // Get a new instance
+               $menuInstance = new CityConfirmMenu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/menu/class_CityLoginAreaMenu.php b/application/city/main/menu/class_CityLoginAreaMenu.php
new file mode 100644 (file)
index 0000000..52d8be2
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityLoginAreaMenu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public static final function createCityLoginAreaMenu () {
+               // Get a new instance
+               $menuInstance = new CityLoginAreaMenu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/menu/class_CityLoginFailedMenu.php b/application/city/main/menu/class_CityLoginFailedMenu.php
new file mode 100644 (file)
index 0000000..4acd90e
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A LoginFailed menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityLoginFailedMenu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public static final function createCityLoginFailedMenu () {
+               // Get a new instance
+               $menuInstance = new CityLoginFailedMenu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/menu/class_CityLoginMenu.php b/application/city/main/menu/class_CityLoginMenu.php
new file mode 100644 (file)
index 0000000..201c3c1
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityLoginMenu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public static final function createCityLoginMenu () {
+               // Get a new instance
+               $menuInstance = new CityLoginMenu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/menu/class_CityLogoutMenu.php b/application/city/main/menu/class_CityLogoutMenu.php
new file mode 100644 (file)
index 0000000..9b59a72
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityLogoutMenu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public static final function createCityLogoutMenu () {
+               // Get a new instance
+               $menuInstance = new CityLogoutMenu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/menu/class_CityStatusMenu.php b/application/city/main/menu/class_CityStatusMenu.php
new file mode 100644 (file)
index 0000000..1dcd6d4
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A Status menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityStatusMenu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public static final function createCityStatusMenu () {
+               // Get a new instance
+               $menuInstance = new CityStatusMenu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/menu/government/.htaccess b/application/city/main/menu/government/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/menu/government/class_CityGovernmentFailedAreaMenu.php b/application/city/main/menu/government/class_CityGovernmentFailedAreaMenu.php
new file mode 100644 (file)
index 0000000..c72a2b9
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A menu class for Ship-Simu
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityGovernmentFailedAreaMenu extends BaseMenu implements RenderableMenu {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $menuInstance   An instance of this class
+        */
+       public static final function createCityGovernmentFailedAreaMenu () {
+               // Get a new instance
+               $menuInstance = new CityGovernmentFailedAreaMenu();
+
+               // Return the prepared instance
+               return $menuInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/city/main/registration/.htaccess b/application/city/main/registration/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/city/main/registration/class_CityRegistration.php b/application/city/main/registration/class_CityRegistration.php
new file mode 100644 (file)
index 0000000..fd72623
--- /dev/null
@@ -0,0 +1,208 @@
+<?php
+/**
+ * A user registration class specially for City
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2015 City Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 CityRegistration extends BaseRegistration implements UserRegister {
+       /**
+        * Hashed password
+        */
+       private $hashedPassword = '';
+
+       /**
+        * Elements for criteria
+        */
+       private $criteriaElements = array(
+               'username',
+               'pass_hash',
+               'email' => 'email1',
+               'surname',
+               'family',
+               'street',
+               'zip',
+               'city',
+               'icq',
+               'jabber',
+               'yahoo',
+               'aol',
+               'msn',
+               'birth_day',
+               'birth_month',
+               'birth_year'
+       );
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Create a new instance
+        *
+        * @return      $registrationInstance   An instance of this registration class
+        */
+       public static final function createCityRegistration () {
+               // Get a new instance
+               $registrationInstance = new CityRegistration();
+
+               // Initialize the filter chains
+               $registrationInstance->initFilterChains();
+
+               // And return it
+               return $registrationInstance;
+       }
+
+       /**
+        * 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:
+
+                       // 1.: Get the plain password
+                       $plainPassword = $this->getRequestInstance()->getRequestElement($requestKey);
+
+                       // 2. Get a crypto helper and hash the password
+                       $this->hashedPassword = ObjectFactory::createObjectByConfiguredName('crypto_class')->hashString($plainPassword);
+
+                       // 3. Store the hash back in request
+                       $this->getRequestInstance()->setRequestElement('pass_hash', $this->hashedPassword);
+               }
+       }
+
+       /**
+        * Perform things like informing assigned affilates about new registration
+        * before registration
+        *
+        * @return      void
+        * @todo        Maybe add more things to perform
+        */
+       public function doPreRegistration () {
+               // First run all pre filters
+               $this->executePreFilters();
+       }
+
+       /**
+        * Registers the new user account by insterting the request data into the
+        * database and paying some start credits or throw exceptions if this fails
+        *
+        * @return      void
+        * @todo        Maybe add more things to perform
+        */
+       public function registerNewUser () {
+               // Get a user database wrapper
+               $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_db_wrapper_class');
+
+               // Use this instance to insert the whole registration instance
+               $wrapperInstance->insertRegistrationObject($this);
+       }
+
+       /**
+        * Perform things like notifying partner websites after registration is done
+        *
+        * @return      void
+        * @todo        Maybe add more things to perform
+        */
+       public function doPostRegistration () {
+               // First run all post filters
+               $this->executePostFilters();
+       }
+
+       /**
+        * Do the action which is required after all registration steps are done.
+        * This can be a simple redirect to another webpage or displaying a message
+        * to the user. Or this can be a login step into the newly created account.
+        *
+        * @return      void
+        */
+       public function doPostAction () {
+               // Get an action instance from our factory
+               $actionInstance = ObjectFactory::createObjectByConfiguredName('post_registration_class');
+
+               // Execute the action
+               $actionInstance->execute($this->getRequestInstance(), $this->getResponseInstance());
+       }
+
+       /**
+        * Adds registration elements to a given dataset instance
+        *
+        * @param       $criteriaInstance       An instance of a StoreableCriteria class
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) {
+               // Default is unconfirmed!
+               $configEntry = 'user_status_unconfirmed';
+
+               // Is the confirmation process entirely disabled?
+               if ($this->getConfigInstance()->getConfigEntry('confirm_email_enabled') === 'N') {
+                       // No confirmation of email needed
+                       $configEntry = 'user_status_confirmed';
+               } // END - if
+
+               // Add a lot elements to the dataset criteria
+               foreach ($this->criteriaElements as $alias => $element) {
+                       // Do we have an alias?
+                       if (is_string($alias)) {
+                               // Yes, so use it
+                               $criteriaInstance->addCriteria($alias, $this->getRequestInstance()->getRequestElement($element));
+
+                               // Debug message
+                               //* DEBUG: */ $this->debugOutput('ALIAS: alias='.$alias.',element='.$element.'='.$this->getRequestInstance()->getRequestElement($element));
+                       } else {
+                               // No, default entry
+                               $criteriaInstance->addCriteria($element, $this->getRequestInstance()->getRequestElement($element));
+
+                               // Debug message
+                               //* DEBUG: */ $this->debugOutput('DEFAULT: element='.$element.'='.$this->getRequestInstance()->getRequestElement($element));
+                       }
+
+                       // Is this a guest account?
+                       if ((($element == 'username') || ($alias == 'username')) && ($this->getRequestInstance()->getRequestElement($element) == $this->getConfigInstance()->getConfigEntry('guest_login_user'))) {
+                               // Yes, then set the config entry to guest status
+                               $configEntry = 'user_status_guest';
+                       } // END - if
+               } // END - foreach
+
+               // Mark the username as unique key
+               $criteriaInstance->setUniqueKey(UserDatabaseWrapper::DB_COLUMN_USERNAME);
+
+               // Add account status as configured
+               $criteriaInstance->addConfiguredCriteria(UserDatabaseWrapper::DB_COLUMN_USER_STATUS, $configEntry);
+
+               // Include registration timestamp
+               $criteriaInstance->addCriteria('registered', date('Y-m-d H:i:s', time()));
+       }
+}
+
+//
+?>
diff --git a/application/city/templates/de/code/action_city_login_government_startup_help.ctp b/application/city/templates/de/code/action_city_login_government_startup_help.ctp
new file mode 100644 (file)
index 0000000..bce1daf
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+// Get form helper instance
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_government_startup'));
+
+// Prefetch user instance
+$helperInstance->prefetchValueInstance('user');
+
+// Add main form group
+$helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausf&uuml;llen! (Die Profildaten sollte jedoch echt sein.)");
+
+// Add group for personal data
+$helperInstance->addFormGroup('persona_data', "Deine pers&ouml;nliche Daten, die f&uuml;r die Beantragung n&ouml;tig sind:");
+
+// Display email, surname and family name
+$helperInstance->addFormNote('surname', "Vorname: <span class=\"persona_data\">".$helperInstance->getValueField('surname')."</span>");
+$helperInstance->addFormNote('family', "Nachname: <span class=\"persona_data\">".$helperInstance->getValueField('family')."</span>");
+$helperInstance->addFormNote('email', "Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
+$helperInstance->addFormNote('birthday', "Geburtstag: <span class=\"persona_data\">".(int)$helperInstance->getValueField('birth_day').".".(int)$helperInstance->getValueField('birth_month').".".(int)$helperInstance->getValueField('birth_year')."</span>");
+
+// Add link placeholder for profile page
+$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?city_profile?}");
+
+// Ask again for current account password
+$helperInstance->addFormGroup('password', "Bitte gebe zur Best&auml;tigung dein derzeitiges Passwort ein.");
+$helperInstance->addFieldText('password', "Derzeitiges Passwort:");
+$helperInstance->addInputPasswordField('password');
+
+// CAPTCHA enabled?
+if ($helperInstance->ifFormSecuredWithCaptcha()) {
+       $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung von Starthilfe ist durch ein CAPTCHA gesch&uuml;tzt. Bitte wiederhole den angezeigten Code, damit du die Starthilfe beantragen kannst.");
+       $helperInstance->addCaptcha();
+} // END - if
+
+// Final notices
+$helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
+$helperInstance->addInputResetButton("Alles nochmal eingeben");
+$helperInstance->addInputSubmitButton("Starthilfe beantragen");
+$helperInstance->addFormNote('data_protection', "Deine Daten werden nach den g&uuml;ltigen Datenschutzgesetzen gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link &quot;Datenschutz&quot;.");
+
+// Flush the finished form
+$helperInstance->flushContent();
+
+// Get link helper for profile link
+$linkInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'city_profile'));
+
+// Add action
+$linkInstance->addActionLinkById('profile', 'profile');
+
+// Flush the finished form
+$linkInstance->flushContent();
+
+// [EOC]
+?>
+<div id="government_frame">
+       <div id="government_header">
+               Virtuelle Beantragung von Starthilfe
+       </div>
+
+       <div id="government_form">
+               {?city_government_startup?}
+       </div>
+</div>
diff --git a/application/city/templates/de/code/action_city_login_government_training.ctp b/application/city/templates/de/code/action_city_login_government_training.ctp
new file mode 100644 (file)
index 0000000..d7d423c
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+// Get form helper instance
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_government_training'));
+
+// Prefetch user instance
+$helperInstance->prefetchValueInstance('user');
+
+// Add main form group
+$helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausf&uuml;llen!");
+
+// Add group for personal data
+$helperInstance->addFormGroup('persona_data', "Deine pers&ouml;nliche Daten, die f&uuml;r die Kursusteilnahme n&ouml;tig sind:");
+
+// Ask again for current account password
+$helperInstance->addFormGroup('password', "Bitte gebe zur Best&auml;tigung dein derzeitiges Passwort ein.");
+$helperInstance->addFieldText('password', "Derzeitiges Passwort:");
+$helperInstance->addInputPasswordField('password');
+
+// Display email, surname and family name
+$helperInstance->addFormNote('surname', "Vorname: <span class=\"persona_data\">".$helperInstance->getValueField('surname')."</span>");
+$helperInstance->addFormNote('family', "Nachname: <span class=\"persona_data\">".$helperInstance->getValueField('family')."</span>");
+$helperInstance->addFormNote('email', "Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
+$helperInstance->addFormNote('birthday', "Geburtstag: <span class=\"persona_data\">".(int)$helperInstance->getValueField('birth_day').".".(int)$helperInstance->getValueField('birth_month').".".(int)$helperInstance->getValueField('birth_year')."</span>");
+
+// Add link placeholder for profile page
+$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?city_profile?}");
+
+// CAPTCHA enabled?
+if ($helperInstance->ifFormSecuredWithCaptcha()) {
+       $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung eines Trainingkursus ist durch ein CAPTCHA gesch&uuml;tzt. Bitte wiederhole den angezeigten Code, um den Trainingskursus zu beantragen.");
+       $helperInstance->addCaptcha();
+} // END - if
+
+// Final notices
+$helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
+$helperInstance->addInputResetButton("Alles nochmal eingeben");
+$helperInstance->addInputSubmitButton("Trainingskurs beantragen");
+$helperInstance->addFormNote('data_protection', "Deine Daten werden nach den g&uuml;ltigen Datenschutzgesetzen gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link &quot;Datenschutz&quot;.");
+
+// Flush the finished form
+$helperInstance->flushContent();
+
+// Get link helper for profile link
+$linkInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'city_profile'));
+
+// Add action
+$linkInstance->addActionLinkById('profile', 'profile');
+
+// Flush the finished form
+$linkInstance->flushContent();
+
+// [EOC]
+?>
+<div id="government_frame">
+       <div id="government_header">
+               Virtuelle Beantragung eines Training-Kursus
+       </div>
+
+       <div id="government_form">
+               {?city_government_training?}
+       </div>
+</div>
diff --git a/application/city/templates/de/code/action_city_login_logout.ctp b/application/city/templates/de/code/action_city_login_logout.ctp
new file mode 100644 (file)
index 0000000..bc534f8
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+// Get helper instance
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'logout_now'));
+
+// Set link text
+$helperInstance->addLinkWithTextById('logout_now');
+
+// Flush the content
+$helperInstance->flushContent();
+
+// Get helper instance
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'return_login'));
+
+// Set link text
+$helperInstance->addLinkWithTextById('return_login');
+
+// Flush the content
+$helperInstance->flushContent();
+
+// [EOC]
+?>
+<div id="logout_box">
+       <div id="logout_header">
+               Willst du dich wirklich aus dem Spiel ausloggen?
+       </div>
+
+       <div id="logouts">
+               {?logout_now?} | {?return_login?}
+       </div>
+</div>
diff --git a/application/city/templates/de/code/action_city_login_profile.ctp b/application/city/templates/de/code/action_city_login_profile.ctp
new file mode 100644 (file)
index 0000000..26ac26d
--- /dev/null
@@ -0,0 +1,145 @@
+<?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.
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, "city_profile"));
+
+// Pre-fetch field data with a given registry key
+$helperInstance->prefetchValueInstance('user');
+
+// Password can only be changed when the old one is entered and new one twice!
+$helperInstance->addFormGroup('pass', "Neues Passwort einrichten:");
+$helperInstance->addFormSubGroup('pass', "Bitte gebe zum &Auml;ndern deines Passwortes zweimal das gew&uuml;nschte neue Passwort ein.");
+$helperInstance->addFieldText('pass1', "Neues Passwort:");
+$helperInstance->addInputPasswordField('pass1');
+$helperInstance->addFieldText('pass2', "Neues Passwort, Wiederholung:");
+$helperInstance->addInputPasswordField('pass2');
+
+// Display current email
+$helperInstance->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helperInstance->getValueField('email')."</span>");
+
+// Only for changing email address
+if ($helperInstance->ifEmailChangeAllowed()) {
+       $helperInstance->addFormGroup('email', "&Auml;nderung deiner Email-Addresse:");
+       $helperInstance->addFormSubGroup('email', "Gebe nur deine Email-Adresse zweimal ein, wenn du diese &auml;ndern m&ouml;chtest!");
+       $helperInstance->addFieldText('email1', "Email-Adresse:");
+       $helperInstance->addInputTextField('email1');
+       $helperInstance->addFieldText('email2', "Wiederholung Email-Adresse:");
+       $helperInstance->addInputTextField('email2');
+
+       if ($helperInstance->ifEmailMustBeUnique()) {
+               $helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein.");
+       } // END - if
+
+       if ($helperInstance->ifEmailChangeRequireConfirmation()) {
+               $helperInstance->addFormNote('confirm', "Es wird ein Best&auml;tigungslink an deine neue Email-Adresse gesendet. Bitte klicke diesen dann m&ouml;glichst schnell an.");
+       } // END - if
+} // END - if
+
+// Add form group for user profile
+$helperInstance->addFormGroup('profile', "Hier kannst du deine Profildaten &auml;ndern.");
+
+// Persoenliche Daten mit in der Anmeldung abfragen?
+if ($helperInstance->ifRegisterIncludesPersonaData()) {
+       $helperInstance->addFormSubGroup('persona', "Wenn du magst, dann vervollst&auml;ndige deine komplette Adresse mit deinem Namen.");
+       $helperInstance->addFieldText('surname', "Dein Vorname:");
+       $helperInstance->addInputTextFieldWithDefault('surname');
+       $helperInstance->addFieldText('family', "Dein Nachname:");
+       $helperInstance->addInputTextFieldWithDefault('family');
+       $helperInstance->addFieldText('street', "Strasse und Hausnummer:");
+       $helperInstance->addInputTextFieldWithDefault('street');
+       $helperInstance->addFieldText('city', "Wohnort:");
+       $helperInstance->addInputTextFieldWithDefault('city');
+
+       // Include birthday?
+       if ($helperInstance->ifProfileIncludesBirthDay()) {
+               $helperInstance->addFormSubGroup('birthday', "Verrate uns doch dein Geburtsdatum, als Dankesch&ouml;n erh&auml;lst du interessante Pr&auml;mien - ausschliesslich per Email - zum Geburtstag zugesandt! G&uuml;ltiges Format: TT.MM.JJJJ");
+               $helperInstance->addInputTextField('birth_day');
+               $helperInstance->addFieldText('birth_day', ".");
+               $helperInstance->addInputTextField('birth_month');
+               $helperInstance->addFieldText('birth_day', ".");
+               $helperInstance->addInputTextField('birth_year');
+       } // END - if
+} // END - if
+
+// Add sub group for zip code
+$helperInstance->addFormSubGroup('zip', "Magst du uns auch deine Postleitzahl verraten?");
+$helperInstance->addFieldText('zip', "Postleitzahl:");
+$helperInstance->addInputTextFieldWithDefault('zip');
+
+// Add sub group for chat protocols
+$helperInstance->addFormSubGroup('chat', "Gebe hier deine Nicknames bzw. Nummern an:");
+
+// Add ICQ chat?
+if ($helperInstance->ifChatEnabled('icq')) {
+       $helperInstance->addFieldText('icq', "ICQ-Nummer:");
+       $helperInstance->addInputTextFieldWithDefault('icq');
+} // END - if
+
+// Add Jabber chat?
+if ($helperInstance->ifChatEnabled('jabber')) {
+       $helperInstance->addFieldText('jabber', "Jabber:");
+       $helperInstance->addInputTextFieldWithDefault('jabber');
+} // END - if
+
+// Add Yahoo! chat?
+if ($helperInstance->ifChatEnabled('yahoo')) {
+       $helperInstance->addFieldText('yahoo', "Yahoo!:");
+       $helperInstance->addInputTextFieldWithDefault('yahoo');
+} // END - if
+
+// Add AOL chat?
+if ($helperInstance->ifChatEnabled('aol')) {
+       $helperInstance->addFieldText('aol', "AOL-Screenname:");
+       $helperInstance->addInputTextFieldWithDefault('aol');
+} // END - if
+
+// Add MSN chat?
+if ($helperInstance->ifChatEnabled('msn')) {
+       $helperInstance->addFieldText('msn', "MSN:");
+       $helperInstance->addInputTextFieldWithDefault('msn');
+} // END - if
+
+if (!$helperInstance->ifRegisterRequiresEmailVerification()) {
+       $helperInstance->addFormExtraNote(1, "Die Benachrichtigungen per Email sind im Loginbereich verfeinerbar, welche du genau haben willst.");
+} // END - if
+
+// Rules already accepted?
+if ($helperInstance->ifRulesHaveChanged()) {
+       $helperInstance->addFormGroup('rules', "Bitte lese dir die Spieleregeln gut durch und kreuze dann &quot;Ja, ich akzeptiere die aktuellen Spielregeln&quot; an.");
+       $helperInstance->addFieldText('rules', "Ja, ich akzeptiere die aktuellen Spielregeln:");
+       $helperInstance->addInputCheckboxField('rules', false);
+} else {
+       $helperInstance->addFormNote('rules_accepted', "Du hast die aktuellen Spielregeln akzeptiert. Vielen Dank!");
+       $helperInstance->addInputHiddenField('rules', "1");
+}
+
+// CAPTCHA enabled?
+if ($helperInstance->ifFormSecuredWithCaptcha()) {
+       $helperInstance->addFormGroup('captcha_user', "Das &Auml;ndern von Profildaten ist durch ein CAPTCHA gesch&uuml;tzt. Bitte wiederhole den angezeigten Code, damit deine &Auml;nderungen gespeichert werden k&ouml;nnen.");
+       $helperInstance->addCaptcha();
+} // END - if
+
+// Ask again for current account password
+$helperInstance->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der &Auml;nderungen dein derzeitiges Passwort ein.");
+$helperInstance->addFieldText('pass_old', "Derzeitiges Passwort:");
+$helperInstance->addInputPasswordField('pass_old');
+
+// Final notices
+$helperInstance->addFormGroup('buttons', "Sind alle Daten nun korrekt eingegeben? Dann sende sie mit einem Klick einfach ab!");
+$helperInstance->addInputResetButton("Alles nochmal eingeben");
+$helperInstance->addInputSubmitButton("Accountdaten aktualisieren");
+$helperInstance->addFormNote('data_protection', "Deine Daten werden nach den g&uuml;ltigen Datenschutzgesetzen gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link &quot;Datenschutz&quot;.");
+
+// Flush finished form
+$helperInstance->flushContent();
+
+// [EOC]
+?>
+<div id="content_header">
+       Deine Profildaten bearbeiten
+</div>
+
+<div id="profile_box">
+       {?city_profile?}
+</div>
diff --git a/application/city/templates/de/code/action_city_login_status_problem.ctp b/application/city/templates/de/code/action_city_login_status_problem.ctp
new file mode 100644 (file)
index 0000000..813840f
--- /dev/null
@@ -0,0 +1,79 @@
+<?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.
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'resend_link'));
+
+// Pre-fetch field data with a given registry key
+$helperInstance->prefetchValueInstance('user');
+
+// Add submit button or notice
+if ($helperInstance->ifUserAccountUnconfirmed()) {
+       // Add submit button
+       $helperInstance->addInputHiddenFieldWithDefault('email');
+       $helperInstance->addInputSubmitButton("Best&auml;tigungslink erneut aussenden");
+} elseif ($helperInstance->ifUserAccountLocked()) {
+       // Account is locked
+       $helperInstance->addFormNote('status_locked', "Dein Account wurde gesperrt! Grund der Sperre:
+               <span id=\"lock_reason\">".$helperInstance->getValueField('lock_reason')."</span>
+               Bitte melde dich beim Support, damit dieser dir weiterhelfen kann."
+       );
+} elseif ($helperInstance->ifUserAccountGuest()) {
+       // Account is guest account
+       $helperInstance->addFormNote('status_guest', "G&auml;steaccounts sind in der Funktionalit&auml;t
+               leicht eingeschr&auml;nkt. Bitte melde dich an, damit du ein
+               vollwertiges Account bekommst."
+       );
+}
+
+// Flush content and automatically close the form
+$helperInstance->flushContent();
+
+// Build the form for confirmation
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'confirm_code'));
+
+// Pre-fetch field data with a given registry key
+$helperInstance->prefetchValueInstance('user');
+
+if ($helperInstance->ifUserAccountUnconfirmed()) {
+       // Add code box
+       $helperInstance->addFormGroup('code', "Bitte gebe hier den Best&auml;tigungscode aus der Willkommensemail ein. Solltest du diese nicht erhalten haben, kannst du dir diesen jetzt zusenden lassen.");
+       $helperInstance->addFieldText('code', "Best&auml;tigungscode aus der Mail:");
+       $helperInstance->addInputTextField('code');
+
+       // Add submit button
+       $helperInstance->addFormGroup('buttons', "Bitte einmal abschicken und das Ergebnis abwarten!");
+       $helperInstance->addInputResetButton("Nochmal eingeben");
+       $helperInstance->addInputSubmitButton("Best&auml;tigungscode absenden");
+} else {
+       // Add message
+       $helperInstance->addFormNote('status_not_unconfirmed', "M&ouml;glicherweise hast du einen Best&auml;tigungslink angeklickt, obwohl dein Account bereits freigegeben oder gesperrt ist.");
+}
+
+// Flush content and automatically close the form
+$helperInstance->flushContent();
+
+// [EOC]
+?>
+<div id="content_header">
+       Problem mit deinem Account gefunden:
+</div>
+
+<div id="status_box">
+       Du bist m&ouml;glicherweise f&uuml;r deine ausgew&auml;hlte Aktion nicht
+       berechtigt oder du hast noch deine Email-Adresse nicht best&auml;tigt. Du
+       kannst dir nun den Best&auml;tigungslink erneut aussenden lassen, oder den
+       Best&auml;tigungscode unten eingeben.
+
+       <div id="resend_link_box">
+               {?resend_link?}
+       </div>
+
+       <div id="confirm_code_header">
+               Weitere M&ouml;glichkeiten:
+       </div>
+
+       <div id="confirm_code_box">
+               {?confirm_code?}
+       </div>
+</div>
diff --git a/application/city/templates/de/code/action_city_login_welcome.ctp b/application/city/templates/de/code/action_city_login_welcome.ctp
new file mode 100644 (file)
index 0000000..550d73c
--- /dev/null
@@ -0,0 +1,3 @@
+<div id="news_frame">
+       {?city_login_news?}
+</div>
diff --git a/application/city/templates/de/code/block_persona_data.ctp b/application/city/templates/de/code/block_persona_data.ctp
new file mode 100644 (file)
index 0000000..07ff64c
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+// Get a helper instance for the profile link (and maybe later more!)
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'profile'));
+
+// Prefetch user instance
+$helperInstance->prefetchValueInstance('user');
+
+// Flush the content out
+$helperInstance->flushContent();
+
+// [EOC]
+?>
+<div id="user_name_div" class="block_cell">
+       Spielername: <span id="user_name">{?block_username?}</span>
+</div>
+<div id="user_status_div" class="block_cell">
+       Spielerstatus: <span id="user_status">{?block_user_status?}</span>
+</div>
+<div id="user_points_div" class="block_cell">
+       {?currency?}: <span id="user_points">{?block_points?}</span>
+</div>
+<div id="user_profile_div" class="block_cell">
+       {?profile?}
+</div>
+<div id="user_registered_div" class="block_cell">
+       Angemeldet seit: <span id="registered">{?block_registered?}</span>
+</div>
index 942d94c6e1a9a26850605d7802c8c4ee9916c1c6..6e89dfcc89e7d7085a00a09786123540084677d0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Get a helper instance without a form tag
-$captchaHelper = ObjectFactory::createObjectByConfiguredName('html_form_helper', array($this, 'captcha_code', false, false));
+$captchaHelper = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'captcha_code', false, false));
 
 // Add input field with text for CAPTCHA code
 $captchaHelper->addFieldText('captcha_code', "Bitte wiederhole den Code:");
index 70c12a7a4a3e3ae3c997d8202c0f96bf25ceda54..006357e497e11e47151d80e976b4e32f910236f6 100644 (file)
@@ -1,21 +1,29 @@
 {?header?}
 
 <div id="master">
-       <div class="menu" id="menu">
-               {?menu_content?}
-       </div>
+<div id="main_header">
+       {?city_header?}
+</div>
+
+<div id="menu">
+       {?menu?}
+</div>
+
+<div id="advert">
+       {?nav_advert?}
+</div>
 
-       <div id="main_header">
-               {?city_header?}
-       </div>
+<div id="language">
+       {?language_selector?}
+</div>
 
-       <div class="main_content" id="main_content">
-               {?main_content?}
-       </div>
+<div id="main_content">
+       {?content?}
+</div>
 
-       <div id="main_footer">
-               {?city_footer?}
-       </div>
+<div id="main_footer">
+       {?city_footer?}
+</div>
 </div>
 
 {?footer?}
diff --git a/application/city/templates/de/code/login_main.ctp b/application/city/templates/de/code/login_main.ctp
new file mode 100644 (file)
index 0000000..fb818fe
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+///////////////////////////////
+// Assign personal user data //
+///////////////////////////////
+
+// Get a new instance for personal data
+$blockInstance = ObjectFactory::createObjectByConfiguredName('html_block_helper_class', array($this, 'persona_data'));
+
+// Set the data source instance which must exist in registry
+$blockInstance->prefetchValueInstance('user', 'user_points');
+
+// Assign fields with template variables
+$blockInstance->assignField('username');
+$blockInstance->assignFieldWithFilter('user_status', 'user_status_translator');
+$blockInstance->assignFieldWithFilter('points', 'format_number');
+
+// Shall we include registration date?
+if ($blockInstance->ifIncludeRegistrationStamp()) {
+       // Then assign it as well!
+       $blockInstance->assignFieldWithFilter('registered', 'format_timestamp');
+} // END - if
+
+// Flush the content out to a template variable
+$blockInstance->flushContent();
+
+// Get helper instance
+$linkInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'logout'));
+
+// Add action
+$linkInstance->addActionLinkById('logout', 'logout');
+
+// Flush the content
+$linkInstance->flushContent();
+
+// [EOC]
+?>
+<div id="content_header">
+       Willkommen im Loginbereich von <span class="app_name">{?app_full_name?}</span>!
+</div>
+
+<div id="content_body">
+       {?login_content?}
+</div>
+
+<div id="persona_data" title="Informationen zu Deinem Spieleaccount">
+       <div id="persona_header">
+               Account-Infos:
+       </div>
+
+       <div id="persona_body">
+               {?persona_data?}
+       </div>
+
+       <div id="logout">
+               {?logout?}
+       </div>
+</div>
index 3a9c35479abdac47dbac4762f714ba37ee865e44..db0103ce8a1a2d011d31a2fb9d633046d418484b 100644 (file)
@@ -2,7 +2,7 @@
 // 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.
-$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper', array($this, 'city_register'));
+$helperInstance = ObjectFactory::createObjectByConfiguredName('html_form_helper_class', array($this, 'city_register'));
 
 // Always ask at least for nickname and password
 $helperInstance->addFormGroup('login', "Bitte gebe hier gew&uuml;nschten Nickname und dein Zugangspasswort ein.");
diff --git a/application/city/templates/de/menu/login_area_menu_entries.xml b/application/city/templates/de/menu/login_area_menu_entries.xml
new file mode 100644 (file)
index 0000000..9c3a6ee
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Login area menu entries. You should leave this template for smooth upgrades.
+
+@author                Roland Haeder <webmaster@ship-simu.org>
+@version       0.0.0
+@copyright     Copyright (c) 2015 City Developer Team
+@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/>
+//-->
+<menu>
+       <block-list block-count="{?block_count?}">
+               <block>
+                       <block-header>
+                               <title>
+                                       <title-id><![CDATA[home_menu_title]]></title-id>
+                                       <title-class><![CDATA[menu_title]]></title-class>
+                                       <title-text><![CDATA[Home:]]></title-text>
+                               </title>
+                       </block-header>
+                       <entry-list entry-count="{?entry_count?}">
+                               <entry>
+                                       <entry-id><![CDATA[overview_entry]]></entry-id>
+                                       <anchor>
+                                               <anchor-id><![CDATA[menu_overview]]></anchor-id>
+                                               <anchor-text><![CDATA[Home]]></anchor-text>
+                                               <anchor-title><![CDATA[Zur &Uuml;bersichtsseite]]></anchor-title>
+                                               <anchor-href><![CDATA[index.php?app={?app_short_name?}&amp;command=login_area]]></anchor-href>
+                                       </anchor>
+                               </entry>
+                               <entry>
+                                       <entry-id><![CDATA[pillory_entry]]></entry-id>
+                                       <anchor>
+                                               <anchor-id><![CDATA[menu_pillory]]></anchor-id>
+                                               <anchor-text><![CDATA[Pranger]]></anchor-text>
+                                               <anchor-title><![CDATA[Zum Pranger]]></anchor-title>
+                                               <anchor-href><![CDATA[index.php?app={?app_short_name?}&amp;command=pillory]]></anchor-href>
+                                       </anchor>
+                               </entry>
+                       </entry-list>
+                       <block-footer>
+                               <footer-id><![CDATA[overview_menu_footer]]></footer-id>
+                               <footer-class><![CDATA[menu_footer]]></footer-class>
+                               <footer-text><![CDATA[Unterhalb Hauptauswahl]]></footer-text>
+                       </block-footer>
+               </block>
+               <block>
+                       <block-header>
+                               <title>
+                                       <title-id><![CDATA[misc_menu_title]]></title-id>
+                                       <title-class><![CDATA[menu_title]]></title-class>
+                                       <title-text><![CDATA[Weiteres:]]></title-text>
+                               </title>
+                       </block-header>
+                       <entry-list entry-count="{?entry_count?}">
+                               <entry>
+                                       <entry-id><![CDATA[imprint_entry]]></entry-id>
+                                       <anchor>
+                                               <anchor-id><![CDATA[menu_imprint]]></anchor-id>
+                                               <anchor-text><![CDATA[Impressum]]></anchor-text>
+                                               <anchor-title><![CDATA[Impressum]]></anchor-title>
+                                               <anchor-href><![CDATA[index.php?app={?app_short_name?}&amp;command=imprint]]></anchor-href>
+                                       </anchor>
+                               </entry>
+                               <entry>
+                                       <entry-id><![CDATA[terms_entry]]></entry-id>
+                                       <anchor>
+                                               <anchor-id><![CDATA[menu_terms]]></anchor-id>
+                                               <anchor-text><![CDATA[ANBs]]></anchor-text>
+                                               <anchor-title><![CDATA[Allgemeine Nutzungsbedingungen (=ANBs)]]></anchor-title>
+                                               <anchor-href><![CDATA[index.php?app={?app_short_name?}&amp;command=terms]]></anchor-href>
+                                       </anchor>
+                               </entry>
+                       </entry-list>
+                       <block-footer>
+                               <footer-id><![CDATA[law_menu_footer]]></footer-id>
+                               <footer-class><![CDATA[menu_footer]]></footer-class>
+                               <footer-text><![CDATA[Unterhalb Weiteres]]></footer-text>
+                       </block-footer>
+               </block>
+       </block-list>
+</menu>
diff --git a/core b/core
index bbb4031b65beb69a02f8c476ae4cdc36da851d84..4d41d3384681ba250309b7c71948968938f8df5b 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit bbb4031b65beb69a02f8c476ae4cdc36da851d84
+Subproject commit 4d41d3384681ba250309b7c71948968938f8df5b
diff --git a/db/user/.htaccess b/db/user/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/db/user_points/.htaccess b/db/user_points/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all