Refill page continued
authorRoland Häder <roland@mxchange.org>
Fri, 15 Aug 2008 00:43:37 +0000 (00:43 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 15 Aug 2008 00:43:37 +0000 (00:43 +0000)
.gitattributes
application/ship-simu/config.php
application/ship-simu/main/actions/web/class_WebLogin [new file with mode: 0644]
application/ship-simu/main/actions/web/class_WebLoginMoneyRefillAction.php [new file with mode: 0644]
application/ship-simu/main/filter/.htaccess [new file with mode: 0644]
application/ship-simu/main/filter/class_MoneyRefillPageFilter.php [new file with mode: 0644]
application/ship-simu/templates/de/code/action_login_money_refill.ctp [new file with mode: 0644]

index 95797f55667658eaa148c1d90c67e756b8b9c316..3a428644a997633d18dd796a8e1e1af053019601 100644 (file)
@@ -102,7 +102,9 @@ application/ship-simu/main/actions/ship-simu/.htaccess -text
 application/ship-simu/main/actions/ship-simu/class_ShipSimuLoginAction.php -text
 application/ship-simu/main/actions/ship-simu/class_ShipSimuProfileAction.php -text
 application/ship-simu/main/actions/web/.htaccess -text
 application/ship-simu/main/actions/ship-simu/class_ShipSimuLoginAction.php -text
 application/ship-simu/main/actions/ship-simu/class_ShipSimuProfileAction.php -text
 application/ship-simu/main/actions/web/.htaccess -text
+application/ship-simu/main/actions/web/class_WebLogin -text
 application/ship-simu/main/actions/web/class_WebLoginCompanyAction.php -text
 application/ship-simu/main/actions/web/class_WebLoginCompanyAction.php -text
+application/ship-simu/main/actions/web/class_WebLoginMoneyRefillAction.php -text
 application/ship-simu/main/bank/.htaccess -text
 application/ship-simu/main/bank/class_MoneyBank.php -text
 application/ship-simu/main/class_ -text
 application/ship-simu/main/bank/.htaccess -text
 application/ship-simu/main/bank/class_MoneyBank.php -text
 application/ship-simu/main/class_ -text
@@ -136,6 +138,8 @@ application/ship-simu/main/drives/motor/.htaccess -text
 application/ship-simu/main/drives/motor/class_Motor.php -text
 application/ship-simu/main/factories/.htaccess -text
 application/ship-simu/main/factories/class_ShipSimuWebNewsFactory.php -text
 application/ship-simu/main/drives/motor/class_Motor.php -text
 application/ship-simu/main/factories/.htaccess -text
 application/ship-simu/main/factories/class_ShipSimuWebNewsFactory.php -text
+application/ship-simu/main/filter/.htaccess -text
+application/ship-simu/main/filter/class_MoneyRefillPageFilter.php -text
 application/ship-simu/main/goverment/.htaccess -text
 application/ship-simu/main/goverment/class_SimplifiedGoverment.php -text
 application/ship-simu/main/login/.htaccess -text
 application/ship-simu/main/goverment/.htaccess -text
 application/ship-simu/main/goverment/class_SimplifiedGoverment.php -text
 application/ship-simu/main/login/.htaccess -text
@@ -195,6 +199,7 @@ application/ship-simu/templates/.htaccess -text
 application/ship-simu/templates/de/.htaccess -text
 application/ship-simu/templates/de/code/action_login_company.ctp -text
 application/ship-simu/templates/de/code/action_login_logout.ctp -text
 application/ship-simu/templates/de/.htaccess -text
 application/ship-simu/templates/de/code/action_login_company.ctp -text
 application/ship-simu/templates/de/code/action_login_logout.ctp -text
+application/ship-simu/templates/de/code/action_login_money_refill.ctp -text
 application/ship-simu/templates/de/code/action_login_profile.ctp -text
 application/ship-simu/templates/de/code/action_login_status_problem.ctp -text
 application/ship-simu/templates/de/code/action_login_welcome.ctp -text
 application/ship-simu/templates/de/code/action_login_profile.ctp -text
 application/ship-simu/templates/de/code/action_login_status_problem.ctp -text
 application/ship-simu/templates/de/code/action_login_welcome.ctp -text
index 307310d91d5b0dad61cd436ccea3f95277a23d2c..29be1ee2cf2614e691ecdf4ab3da2ea36b0ef2e5 100644 (file)
@@ -151,6 +151,9 @@ $cfg->setConfigEntry('captcha_register_verifier_class', "GraphicalCodeCaptchaVer
 // CFG: CONFIRM-CODE-VALIDATOR-CLASS
 $cfg->setConfigEntry('confirm_code_verifier_class', "ConfirmCodeVerifierFilter");
 
 // CFG: CONFIRM-CODE-VALIDATOR-CLASS
 $cfg->setConfigEntry('confirm_code_verifier_class', "ConfirmCodeVerifierFilter");
 
+// CFG: REFILL-PAGE-FILTER
+$cfg->setConfigEntry('refill_page_class', "MoneyRefillPageFilter");
+
 // CFG: NEWS-HOME-LIMIT
 $cfg->setConfigEntry('news_home_limit', 10);
 
 // CFG: NEWS-HOME-LIMIT
 $cfg->setConfigEntry('news_home_limit', 10);
 
diff --git a/application/ship-simu/main/actions/web/class_WebLogin b/application/ship-simu/main/actions/web/class_WebLogin
new file mode 100644 (file)
index 0000000..c234cd4
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/**
+ * An action for 
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class WebLogin???Action extends BaseAction 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 createWebLogin???Action (ActionResolver $resolverInstance) {
+               // Get a new instance
+               $actionInstance = new WebLogin???Action();
+
+               // 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        Maybe add fetching company list of current user here?
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Unfinished method
+       }
+
+       /**
+        * 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
+        */
+       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+               // Add user status filter here
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_class'));
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/ship-simu/main/actions/web/class_WebLoginMoneyRefillAction.php b/application/ship-simu/main/actions/web/class_WebLoginMoneyRefillAction.php
new file mode 100644 (file)
index 0000000..7f63754
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/**
+ * An action for money refill page
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class WebLoginMoneyRefillAction extends BaseAction 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 createWebLoginMoneyRefillAction (ActionResolver $resolverInstance) {
+               // Get a new instance
+               $actionInstance = new WebLoginMoneyRefillAction();
+
+               // 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        Maybe add fetching company list of current user here?
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Unfinished method
+       }
+
+       /**
+        * 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
+        */
+       public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
+               // Add user status filter here
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_class'));
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/ship-simu/main/filter/.htaccess b/application/ship-simu/main/filter/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/ship-simu/main/filter/class_MoneyRefillPageFilter.php b/application/ship-simu/main/filter/class_MoneyRefillPageFilter.php
new file mode 100644 (file)
index 0000000..68e9c7a
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A filter for money refill page
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class MoneyRefillPageFilter extends BaseFrameworkSystem implements Filterable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Creates an instance of this filter class
+        *
+        * @return      $filterInstance         An instance of this filter class
+        */
+       public final static function createMoneyRefillPageFilter () {
+               // Get a new instance
+               $filterInstance = new MoneyRefillPageFilter();
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Executes the filter with given request and response objects
+        *
+        * @param       $requestInstance        An instance of a class with an Requestable interface
+        * @param       $responseInstance       An instance of a class with an Responseable interface
+        * @return      void
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Implement this!
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/ship-simu/templates/de/code/action_login_money_refill.ctp b/application/ship-simu/templates/de/code/action_login_money_refill.ctp
new file mode 100644 (file)
index 0000000..66f2b73
--- /dev/null
@@ -0,0 +1,8 @@
+<div id="refill_frame">
+       <div class="content_header">
+               Jetzt dein {?currency?}-Konto aufladen!
+       </div>
+       <div class="content_body">
+               {?refill_form?}
+       </div>
+</div>