]> git.mxchange.org Git - shipsimu.git/commitdiff
Payment introduced, minor rewrites
authorRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 18:28:05 +0000 (18:28 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 5 Oct 2008 18:28:05 +0000 (18:28 +0000)
- Payment system introduced (not finished)
- Refill page prepared for payment system
- Methods addCriteria() first parameter is now in ", not in '
- Minor improvements

36 files changed:
.gitattributes
application/blog/config.php
application/ship-simu/config.php
application/ship-simu/main/actions/web/class_WebLoginRefillAction.php
application/ship-simu/main/commands/web/class_WebRefillFormCommand.php
application/ship-simu/main/goverment/class_SimplifiedGoverment.php
application/ship-simu/main/registration/class_ShipSimuRegistration.php
application/ship-simu/main/user/extended/class_ShipSimuMember.php
application/ship-simu/main/wrapper/class_CompanyDatabaseWrapper.php
application/ship-simu/templates/de/code/action_login_profile.ctp
application/ship-simu/templates/de/code/action_login_refill.ctp
application/shoutbox/config.php
application/todo/config.php
db/payments/.htaccess [new file with mode: 0644]
inc/classes/interfaces/discovery/.htaccess [new file with mode: 0644]
inc/classes/interfaces/discovery/class_Discoverable.php [new file with mode: 0644]
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/controller/class_BaseController.php
inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php [new file with mode: 0644]
inc/classes/main/debug/class_DebugConsoleOutput.php
inc/classes/main/debug/class_DebugWebOutput.php
inc/classes/main/discovery/.htaccess [new file with mode: 0644]
inc/classes/main/discovery/class_ [new file with mode: 0644]
inc/classes/main/discovery/class_BaseDiscovery.php [new file with mode: 0644]
inc/classes/main/discovery/payment/.htaccess [new file with mode: 0644]
inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php [new file with mode: 0644]
inc/classes/main/filter/payment/.htaccess [new file with mode: 0644]
inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php [new file with mode: 0644]
inc/classes/main/helper/web/forms/class_WebFormHelper.php
inc/classes/main/output/class_ConsoleOutput.php
inc/classes/main/output/class_WebOutput.php
inc/classes/main/points/class_UserPoints.php
inc/classes/main/reader/class_DefaultNewsReader.php
inc/classes/main/resolver/action/class_BaseActionResolver.php
inc/classes/main/response/class_BaseResponse.php
inc/classes/main/user/member/class_Member.php

index e57ab49e7955ef1018f98aa6c73e7cf3e4d4cbf4..fb12de854a04f28c3949120422ae01f9bcdf399f 100644 (file)
@@ -327,6 +327,7 @@ db/.htaccess -text
 db/company_user/.htaccess -text
 db/gov_user/.htaccess -text
 db/news/.htaccess -text
 db/company_user/.htaccess -text
 db/gov_user/.htaccess -text
 db/news/.htaccess -text
+db/payments/.htaccess -text
 db/user/.htaccess -text
 db/user_points/.htaccess -text
 devel/.htaccess -text
 db/user/.htaccess -text
 db/user_points/.htaccess -text
 devel/.htaccess -text
@@ -485,6 +486,8 @@ inc/classes/interfaces/database/middleware/.htaccess -text
 inc/classes/interfaces/database/middleware/class_DatabaseConnector.php -text
 inc/classes/interfaces/debug/.htaccess -text
 inc/classes/interfaces/debug/class_Debugger.php -text
 inc/classes/interfaces/database/middleware/class_DatabaseConnector.php -text
 inc/classes/interfaces/debug/.htaccess -text
 inc/classes/interfaces/debug/class_Debugger.php -text
+inc/classes/interfaces/discovery/.htaccess -text
+inc/classes/interfaces/discovery/class_Discoverable.php -text
 inc/classes/interfaces/filter/.htaccess -text
 inc/classes/interfaces/filter/class_Filterable.php -text
 inc/classes/interfaces/helper/.htaccess -text
 inc/classes/interfaces/filter/.htaccess -text
 inc/classes/interfaces/filter/class_Filterable.php -text
 inc/classes/interfaces/helper/.htaccess -text
@@ -609,12 +612,18 @@ inc/classes/main/database/databases/.htaccess -text
 inc/classes/main/database/databases/class_LocalFileDatabase.php -text
 inc/classes/main/database/wrapper/.htaccess -text
 inc/classes/main/database/wrapper/class_NewsDatabaseWrapper.php -text
 inc/classes/main/database/databases/class_LocalFileDatabase.php -text
 inc/classes/main/database/wrapper/.htaccess -text
 inc/classes/main/database/wrapper/class_NewsDatabaseWrapper.php -text
+inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php -text
 inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php -text
 inc/classes/main/database/wrapper/class_UserPointsDatabaseWrapper.php -text
 inc/classes/main/debug/.htaccess -text
 inc/classes/main/debug/class_DebugConsoleOutput.php -text
 inc/classes/main/debug/class_DebugErrorLogOutput.php -text
 inc/classes/main/debug/class_DebugWebOutput.php -text
 inc/classes/main/database/wrapper/class_UserDatabaseWrapper.php -text
 inc/classes/main/database/wrapper/class_UserPointsDatabaseWrapper.php -text
 inc/classes/main/debug/.htaccess -text
 inc/classes/main/debug/class_DebugConsoleOutput.php -text
 inc/classes/main/debug/class_DebugErrorLogOutput.php -text
 inc/classes/main/debug/class_DebugWebOutput.php -text
+inc/classes/main/discovery/.htaccess -text
+inc/classes/main/discovery/class_ -text
+inc/classes/main/discovery/class_BaseDiscovery.php -text
+inc/classes/main/discovery/payment/.htaccess -text
+inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php -text
 inc/classes/main/factories/.htaccess -text
 inc/classes/main/factories/cache/.htaccess -text
 inc/classes/main/factories/cache/class_CacheFactory.php -text
 inc/classes/main/factories/.htaccess -text
 inc/classes/main/factories/cache/.htaccess -text
 inc/classes/main/factories/cache/class_CacheFactory.php -text
@@ -645,6 +654,8 @@ inc/classes/main/filter/news/class_NewsDownloadFilter.php -text
 inc/classes/main/filter/news/class_NewsProcessFilter.php -text
 inc/classes/main/filter/null/.htaccess -text
 inc/classes/main/filter/null/class_NullFilter.php -text
 inc/classes/main/filter/news/class_NewsProcessFilter.php -text
 inc/classes/main/filter/null/.htaccess -text
 inc/classes/main/filter/null/class_NullFilter.php -text
+inc/classes/main/filter/payment/.htaccess -text
+inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php -text
 inc/classes/main/filter/update/.htaccess -text
 inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php -text
 inc/classes/main/filter/update/class_UserUpdateFilter.php -text
 inc/classes/main/filter/update/.htaccess -text
 inc/classes/main/filter/update/class_UserStatusConfimedUpdateFilter.php -text
 inc/classes/main/filter/update/class_UserUpdateFilter.php -text
index 23358796e1270f48d8cf04dba909fa65d9037f7d..a2900e6b6330678f2e4c0f00250983d620b040c9 100644 (file)
@@ -74,13 +74,13 @@ $cfg->setConfigEntry('chat_enabled_aol', "Y");
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
-$cfg->setConfigEntry('user_registration_class', "ShipSimuRegistration");
+$cfg->setConfigEntry('user_registration_class', "BlogRegistration");
 
 // CFG: USER-LOGIN-CLASS
 
 // CFG: USER-LOGIN-CLASS
-$cfg->setConfigEntry('user_login_class', "ShipSimuUserLogin");
+$cfg->setConfigEntry('user_login_class', "BlogUserLogin");
 
 // CFG: GUEST-LOGIN-CLASS
 
 // CFG: GUEST-LOGIN-CLASS
-$cfg->setConfigEntry('guest_login_class', "ShipSimuGuestLogin");
+$cfg->setConfigEntry('guest_login_class', "BlogGuestLogin");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
@@ -92,7 +92,7 @@ $cfg->setConfigEntry('user_status_guest', "GUEST");
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
-$cfg->setConfigEntry('login_helper_class', "ShipSimuLoginHelper");
+$cfg->setConfigEntry('login_helper_class', "BlogLoginHelper");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
@@ -191,21 +191,21 @@ $cfg->setConfigEntry('guest_login_user', "guest");
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
-$cfg->setConfigEntry('login_welcome_action_class', "ShipSimuLoginAction");
+$cfg->setConfigEntry('login_welcome_action_class', "BlogLoginAction");
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
-$cfg->setConfigEntry('login_logout_action_class', "ShipSimuLogoutAction");
+$cfg->setConfigEntry('login_logout_action_class', "BlogLogoutAction");
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
-$cfg->setConfigEntry('login_profile_action_class', "ShipSimuProfileAction");
+$cfg->setConfigEntry('login_profile_action_class', "BlogProfileAction");
 
 
-// CFG: SHIPSIMU-REGISTER-CAPTCHA
+// CFG: BLOG-REGISTER-CAPTCHA
 $cfg->setConfigEntry('blog_register_captcha', "GraphicalCodeCaptcha");
 
 $cfg->setConfigEntry('blog_register_captcha', "GraphicalCodeCaptcha");
 
-// CFG: blog-USER-LOGIN-CAPTCHA
+// CFG: BLOG-USER-LOGIN-CAPTCHA
 $cfg->setConfigEntry('blog_user_login_captcha', "GraphicalCodeCaptcha");
 
 $cfg->setConfigEntry('blog_user_login_captcha', "GraphicalCodeCaptcha");
 
-// CFG: blog-GUEST-LOGIN-CAPTCHA
+// CFG: BLOG-GUEST-LOGIN-CAPTCHA
 $cfg->setConfigEntry('blog_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
 $cfg->setConfigEntry('blog_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
@@ -217,13 +217,13 @@ $cfg->setConfigEntry('captcha_search_chars', "+/=");
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
-// CFG: blog-REGISTER-CAPTCHA-SECURED
+// CFG: BLOG-REGISTER-CAPTCHA-SECURED
 $cfg->setConfigEntry('blog_register_captcha_secured', "Y");
 
 $cfg->setConfigEntry('blog_register_captcha_secured', "Y");
 
-// CFG: blog-USER-LOGIN-CAPTCHA-SECURED
+// CFG: BLOG-USER-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('blog_user_login_captcha_secured', "Y");
 
 $cfg->setConfigEntry('blog_user_login_captcha_secured', "Y");
 
-// CFG: blog-GUEST-LOGIN-CAPTCHA-SECURED
+// CFG: BLOG-GUEST-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('blog_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
 $cfg->setConfigEntry('blog_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
index 6e60c09bed3579f4da10a8e64828c6a0242c13f1..0240453b92633006e2525749c7aaacd0c186ee0e 100644 (file)
@@ -160,12 +160,18 @@ $cfg->setConfigEntry('captcha_register_verifier_filter', "GraphicalCodeCaptchaVe
 // CFG: CAPTCHA-REFILL-VERFIER-FILTER
 $cfg->setConfigEntry('captcha_refill_verifier_filter', "GraphicalCodeCaptchaVerifierFilter");
 
 // CFG: CAPTCHA-REFILL-VERFIER-FILTER
 $cfg->setConfigEntry('captcha_refill_verifier_filter', "GraphicalCodeCaptchaVerifierFilter");
 
-// CFG: CONFIRM-CODE-VALIDATOR-FILTER
+// CFG: CONFIRM-CODE-VERIFIER-FILTER
 $cfg->setConfigEntry('confirm_code_verifier_filter', "ConfirmCodeVerifierFilter");
 
 // CFG: REFILL-PAGE-FILTER
 $cfg->setConfigEntry('refill_page_filter', "RefillPageFilter");
 
 $cfg->setConfigEntry('confirm_code_verifier_filter', "ConfirmCodeVerifierFilter");
 
 // CFG: REFILL-PAGE-FILTER
 $cfg->setConfigEntry('refill_page_filter', "RefillPageFilter");
 
+// CFG: REFILL-REQUEST-CURRENCY-BOOK-FILTER
+$cfg->setConfigEntry('refill_request_currency_book_filter', "RefillRequestCurrencyBookFilter");
+
+// CFG: PAYMENT-DISCOVERY-FILTER
+$cfg->setConfigEntry('payment_discovery_filter', "PaymentDiscoveryFilter");
+
 // CFG: NEWS-HOME-LIMIT
 $cfg->setConfigEntry('news_home_limit', 10);
 
 // CFG: NEWS-HOME-LIMIT
 $cfg->setConfigEntry('news_home_limit', 10);
 
@@ -253,16 +259,19 @@ $cfg->setConfigEntry('company_db_wrapper_class', "CompanyDatabaseWrapper");
 // CFG: USER-POINTS-DB-WRAPPER-CLASS
 $cfg->setConfigEntry('user_points_db_wrapper_class', "UserPointsDatabaseWrapper");
 
 // CFG: USER-POINTS-DB-WRAPPER-CLASS
 $cfg->setConfigEntry('user_points_db_wrapper_class', "UserPointsDatabaseWrapper");
 
-// CFG: USER-GOVERMENT-WRAPPER
+// CFG: USER-GOVERMENT-WRAPPER-CLASS
 $cfg->setConfigEntry('user_gov_wrapper_class', "UserGovermentDatabaseWrapper");
 
 $cfg->setConfigEntry('user_gov_wrapper_class', "UserGovermentDatabaseWrapper");
 
+// CFG: PAYMENT-DB-WRAPPER-CLASS
+$cfg->setConfigEntry('payment_db_wrapper_class', "PaymentsDatabaseWrapper");
+
 // CFG EMAIl-TPL-RESEND-LINK
 $cfg->setConfigEntry('email_tpl_resend_link', "text");
 
 // CFG EMAIl-TPL-RESEND-LINK
 $cfg->setConfigEntry('email_tpl_resend_link', "text");
 
-// CFG: MAIL-TEMPLATE-ENGINE
+// CFG: MAIL-TEMPLATE-CLASS
 $cfg->setConfigEntry('mail_template_class', "MailTemplateEngine");
 
 $cfg->setConfigEntry('mail_template_class', "MailTemplateEngine");
 
-// CFG: IMAGE-TEMPLATE-ENGINE
+// CFG: IMAGE-TEMPLATE-CLASS
 $cfg->setConfigEntry('image_template_class', "ImageTemplateEngine");
 
 // CFG: ADMIN-EMAIL
 $cfg->setConfigEntry('image_template_class', "ImageTemplateEngine");
 
 // CFG: ADMIN-EMAIL
@@ -298,5 +307,8 @@ $cfg->setConfigEntry('refill_page_active', "Y");
 // CFG: REFILL-PAGE-MIN-CURRENCY-AMOUNT
 $cfg->setConfigEntry('refill_page_min_currency_amount', 1000);
 
 // CFG: REFILL-PAGE-MIN-CURRENCY-AMOUNT
 $cfg->setConfigEntry('refill_page_min_currency_amount', 1000);
 
+// CFG: LOGIN-FILL-PAYMENT-DISCOVERY
+$cfg->setConfigEntry('login_refill_payment_discovery', "LocalPaymentDiscovery");
+
 // [EOF]
 ?>
 // [EOF]
 ?>
index 3120fac0c00aa89023e2ff8b4ae281c923396a0a..77f18f57abe3153f72528c867d63edd751f87b16 100644 (file)
@@ -55,7 +55,7 @@ class WebLoginRefillAction extends BaseAction implements Commandable, Registerab
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         * @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?
+        * @todo        0% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Unfinished method
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Unfinished method
@@ -74,6 +74,9 @@ class WebLoginRefillAction extends BaseAction implements Commandable, Registerab
 
                // Is the refill page active?
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
 
                // Is the refill page active?
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
+
+               // Add payment discovery filter
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('payment_discovery_filter', array($this)));
        }
 }
 
        }
 }
 
index 25869cf249f0c39811760840d886979d6b198f15..5cae379a6f29333aaab4ca0ebc6e201e3553723e 100644 (file)
@@ -82,11 +82,20 @@ class WebRefillFormCommand extends BaseCommand implements Commandable {
                // Is the refill page active?
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
 
                // Is the refill page active?
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_page_filter'));
 
+               // Verify password
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('account_password_filter'));
+
                // Verify CAPTCHA code
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
 
                // Verify refill request
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_request_validator_filter'));
                // Verify CAPTCHA code
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_refill_verifier_filter'));
 
                // Verify refill request
                $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('refill_request_validator_filter'));
+
+               // Prepare a filter based on the requested type we shall refill
+               $filterName = sprintf("refill_request_%s_book_filter", $requestInstance->getRequestElement('type'));
+
+               // Now, try to load that filter
+               $controllerInstance->addPostFilter(ObjectFactory::createObjectByConfiguredName($filterName));
        }
 }
 
        }
 }
 
index 0f0c4ca80412565aa84379528e3c0c124d01edd6..ccdc373a7ef3745a6c151dbf8cec99fcc5978477 100644 (file)
@@ -69,8 +69,8 @@ class SimplifiedGoverment extends BaseFrameworkSystem implements Registerable {
 
                // Now get a search criteria and set the user's name as criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Now get a search criteria and set the user's name as criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-               $criteriaInstance->addCriteria('gov_uid', $this->getUserInstance()->getUserName());
-               $criteriaInstance->addCriteria('gov_activity_status', self::STATUS_STARTER_HELP);
+               $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserName());
+               $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP);
                $criteriaInstance->setLimit(1);
 
                // Get a wrapper instance
                $criteriaInstance->setLimit(1);
 
                // Get a wrapper instance
index 31e6e6364de589e63fbf13777fede9daa90af813..1ad97313716eb84008af5695ac96c2f0939e7c10 100644 (file)
@@ -187,7 +187,7 @@ class ShipSimuRegistration extends BaseRegistration {
                $criteriaInstance->addConfiguredCriteria(UserDatabaseWrapper::DB_COLUMN_USER_STATUS, $configEntry);
 
                // Include registration timestamp
                $criteriaInstance->addConfiguredCriteria(UserDatabaseWrapper::DB_COLUMN_USER_STATUS, $configEntry);
 
                // Include registration timestamp
-               $criteriaInstance->addCriteria('registered', date("Y-m-d H:i:s", time()));
+               $criteriaInstance->addCriteria("registered", date("Y-m-d H:i:s", time()));
        }
 }
 
        }
 }
 
index acbdb62e70dea3479889e584256ba22dd740fd8e..f2caaa8eee31ea0762f622922e2c175bdd92dcea 100644 (file)
@@ -145,8 +145,8 @@ class ShipSimuMember extends ShipSimuBaseUser implements ManageableMember {
                $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
 
                // And add our both entries
                $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
 
                // And add our both entries
-               $updateInstance->addCriteria('last_activity', date("Y-m-d H:i:s", time()));
-               $updateInstance->addCriteria('last_action', $lastAction);
+               $updateInstance->addCriteria("last_activity", date("Y-m-d H:i:s", time()));
+               $updateInstance->addCriteria("last_action", $lastAction);
 
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);
 
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);
index 752e40999e19dc27d7fccb157e8ac8e8c4cb44c4..ea221b9e9d7e3035b96600ab69594bc26a57f29b 100644 (file)
@@ -78,7 +78,7 @@ class CompanyDatabaseWrapper extends BaseDatabaseWrapper {
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the user primary key as a search criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the user primary key as a search criteria
-               $criteriaInstance->addCriteria('participant_id', $userInstance->getPrimaryKey());
+               $criteriaInstance->addCriteria("participant_id", $userInstance->getPrimaryKey());
                $criteriaInstance->setLimit(1);
 
                // Set company->user table
                $criteriaInstance->setLimit(1);
 
                // Set company->user table
index 4d8f3ddcefffb63e5e8c5d43014feac8f9988cc2..bb78982b650db91adeda77727ed647894c3a51e9 100644 (file)
@@ -106,7 +106,7 @@ if ($helper->ifRulesHaveChanged()) {
 
 // Ask again for current account password
 $helper->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der &Auml;nderungen dein derzeitiges Passwort ein.");
 
 // Ask again for current account password
 $helper->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der &Auml;nderungen dein derzeitiges Passwort ein.");
-$helper->addFieldText('pass_old', "Altes Passwort:");
+$helper->addFieldText('pass_old', "Derzeitiges Passwort:");
 $helper->addInputPasswordField('pass_old');
 
 // Abschliessender Hinweis und Abschluss des Formulars
 $helper->addInputPasswordField('pass_old');
 
 // Abschliessender Hinweis und Abschluss des Formulars
index b31d35618c520db5b2bdd8c2061b35b37e72054c..136794f4a080cf90507d3cec5bbfbe0ff2d3344b 100644 (file)
@@ -2,6 +2,9 @@
 // Neue Helper-Instanz holen
 $helper = WebFormHelper::createWebFormHelper($this, 'refill_form');
 
 // Neue Helper-Instanz holen
 $helper = WebFormHelper::createWebFormHelper($this, 'refill_form');
 
+// Pre-fetch payment types
+$helper->prefetchValueInstance('payments');
+
 // Add form group
 $helper->addFormGroup('refill_form', "Bitte w&auml;hle aus, was du nachbestellen willst und gebe die Menge an.");
 
 // Add form group
 $helper->addFormGroup('refill_form', "Bitte w&auml;hle aus, was du nachbestellen willst und gebe die Menge an.");
 
@@ -25,6 +28,11 @@ $helper->addInputSelectField('type', "");
 $helper->addFormSubGroup('amount', "Gebe hier in ganzen Zahlen die Menge an, die du nachbestellen willst.");
 $helper->addInputTextField('amount', 1000);
 
 $helper->addFormSubGroup('amount', "Gebe hier in ganzen Zahlen die Menge an, die du nachbestellen willst.");
 $helper->addInputTextField('amount', 1000);
 
+// Ask again for current account password
+$helper->addFormGroup('pass_old', "Bitte gebe zur Best&auml;tigung der Nachbestellung dein derzeitiges Passwort ein.");
+$helper->addFieldText('pass_old', "Derzeitiges Passwort:");
+$helper->addInputPasswordField('pass_old');
+
 // CAPTCHA enbaled?
 if ($helper->ifFormSecuredWithCaptcha()) {
        $helper->addFormGroup('captcha_refill', "Bitte wiederhole den angezeigten Code:");
 // CAPTCHA enbaled?
 if ($helper->ifFormSecuredWithCaptcha()) {
        $helper->addFormGroup('captcha_refill', "Bitte wiederhole den angezeigten Code:");
@@ -32,7 +40,7 @@ if ($helper->ifFormSecuredWithCaptcha()) {
 } // END - if
 
 // Submit button
 } // END - if
 
 // Submit button
-$helper->addFormGroup('buttons_refill', "Mit Absenden des Formulars wird deine Nachbestellung rechtskr&auml;ftig!");
+$helper->addFormGroup('buttons_refill', "Mit Absenden des Formulars wird deine Nachbestellung verbindlich!");
 $helper->addInputResetButton("Eingaben l&ouml;schen");
 $helper->addInputSubmitButton("Nachbestellung verbindlich aufgeben");
 $helper->flushContent();
 $helper->addInputResetButton("Eingaben l&ouml;schen");
 $helper->addInputSubmitButton("Nachbestellung verbindlich aufgeben");
 $helper->flushContent();
index fa898c037c40e4693f8a4e9ebf003336a9bee38b..c77e1a3ccf77e99eb0da9ffee2c0c48e8792762d 100644 (file)
@@ -74,13 +74,13 @@ $cfg->setConfigEntry('chat_enabled_aol', "Y");
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
-$cfg->setConfigEntry('user_registration_class', "ShipSimuRegistration");
+$cfg->setConfigEntry('user_registration_class', "ShoutBoxRegistration");
 
 // CFG: USER-LOGIN-CLASS
 
 // CFG: USER-LOGIN-CLASS
-$cfg->setConfigEntry('user_login_class', "ShipSimuUserLogin");
+$cfg->setConfigEntry('user_login_class', "ShoutBoxUserLogin");
 
 // CFG: GUEST-LOGIN-CLASS
 
 // CFG: GUEST-LOGIN-CLASS
-$cfg->setConfigEntry('guest_login_class', "ShipSimuGuestLogin");
+$cfg->setConfigEntry('guest_login_class', "ShoutBoxGuestLogin");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
@@ -92,7 +92,7 @@ $cfg->setConfigEntry('user_status_guest', "GUEST");
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
-$cfg->setConfigEntry('login_helper_class', "ShipSimuLoginHelper");
+$cfg->setConfigEntry('login_helper_class', "ShoutBoxLoginHelper");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
@@ -191,21 +191,21 @@ $cfg->setConfigEntry('guest_login_user', "guest");
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
-$cfg->setConfigEntry('login_welcome_action_class', "ShipSimuLoginAction");
+$cfg->setConfigEntry('login_welcome_action_class', "ShoutBoxLoginAction");
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
-$cfg->setConfigEntry('login_logout_action_class', "ShipSimuLogoutAction");
+$cfg->setConfigEntry('login_logout_action_class', "ShoutBoxLogoutAction");
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
-$cfg->setConfigEntry('login_profile_action_class', "ShipSimuProfileAction");
+$cfg->setConfigEntry('login_profile_action_class', "ShoutBoxProfileAction");
 
 
-// CFG: SHIPSIMU-REGISTER-CAPTCHA
+// CFG: SHOUTBOX-REGISTER-CAPTCHA
 $cfg->setConfigEntry('shoutbox_register_captcha', "GraphicalCodeCaptcha");
 
 $cfg->setConfigEntry('shoutbox_register_captcha', "GraphicalCodeCaptcha");
 
-// CFG: shoutbox-USER-LOGIN-CAPTCHA
+// CFG: SHOUTBOX-USER-LOGIN-CAPTCHA
 $cfg->setConfigEntry('shoutbox_user_login_captcha', "GraphicalCodeCaptcha");
 
 $cfg->setConfigEntry('shoutbox_user_login_captcha', "GraphicalCodeCaptcha");
 
-// CFG: shoutbox-GUEST-LOGIN-CAPTCHA
+// CFG: SHOUTBOX-GUEST-LOGIN-CAPTCHA
 $cfg->setConfigEntry('shoutbox_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
 $cfg->setConfigEntry('shoutbox_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
@@ -217,13 +217,13 @@ $cfg->setConfigEntry('captcha_search_chars', "+/=");
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
-// CFG: shoutbox-REGISTER-CAPTCHA-SECURED
+// CFG: SHOUTBOX-REGISTER-CAPTCHA-SECURED
 $cfg->setConfigEntry('shoutbox_register_captcha_secured', "Y");
 
 $cfg->setConfigEntry('shoutbox_register_captcha_secured', "Y");
 
-// CFG: shoutbox-USER-LOGIN-CAPTCHA-SECURED
+// CFG: SHOUTBOX-USER-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('shoutbox_user_login_captcha_secured', "Y");
 
 $cfg->setConfigEntry('shoutbox_user_login_captcha_secured', "Y");
 
-// CFG: shoutbox-GUEST-LOGIN-CAPTCHA-SECURED
+// CFG: SHOUTBOX-GUEST-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('shoutbox_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
 $cfg->setConfigEntry('shoutbox_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
index fcbf3897f4a1f2fdfb7f9ab0fbe1e92df4bda19f..02f9e7b4535e96f0ef344a8e79e1b7148bc61589 100644 (file)
@@ -74,13 +74,13 @@ $cfg->setConfigEntry('chat_enabled_aol', "Y");
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
 $cfg->setConfigEntry('chat_enabled_msn', "Y");
 
 // CFG: USER-REGISTRATION
-$cfg->setConfigEntry('user_registration_class', "ShipSimuRegistration");
+$cfg->setConfigEntry('user_registration_class', "ToDoRegistration");
 
 // CFG: USER-LOGIN-CLASS
 
 // CFG: USER-LOGIN-CLASS
-$cfg->setConfigEntry('user_login_class', "ShipSimuUserLogin");
+$cfg->setConfigEntry('user_login_class', "ToDoUserLogin");
 
 // CFG: GUEST-LOGIN-CLASS
 
 // CFG: GUEST-LOGIN-CLASS
-$cfg->setConfigEntry('guest_login_class', "ShipSimuGuestLogin");
+$cfg->setConfigEntry('guest_login_class', "ToDoGuestLogin");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
 
 // CFG: USER-STATUS-REGISTER
 $cfg->setConfigEntry('user_status_unconfirmed', "UNCONFIRMED");
@@ -92,7 +92,7 @@ $cfg->setConfigEntry('user_status_guest', "GUEST");
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
 $cfg->setConfigEntry('user_status_confirmed', "CONFIRMED");
 
 // CFG: LOGIN-HELPER-CLASS
-$cfg->setConfigEntry('login_helper_class', "ShipSimuLoginHelper");
+$cfg->setConfigEntry('login_helper_class', "ToDoLoginHelper");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
 
 // CFG: AUTH-METHOD-CLASS
 $cfg->setConfigEntry('auth_method_class', "CookieAuth");
@@ -191,21 +191,21 @@ $cfg->setConfigEntry('guest_login_user', "guest");
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
 $cfg->setConfigEntry('guest_login_passwd', "guest");
 
 // CFG: LOGIN-WELCOME-ACTION-CLASS
-$cfg->setConfigEntry('login_welcome_action_class', "ShipSimuLoginAction");
+$cfg->setConfigEntry('login_welcome_action_class', "ToDoLoginAction");
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
 
 // CFG: LOGIN-LOGOUT-ACTION-CLASS
-$cfg->setConfigEntry('login_logout_action_class', "ShipSimuLogoutAction");
+$cfg->setConfigEntry('login_logout_action_class', "ToDoLogoutAction");
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
 
 // CFG: LOGIN-PROFILE-ACTION-CLASS
-$cfg->setConfigEntry('login_profile_action_class', "ShipSimuProfileAction");
+$cfg->setConfigEntry('login_profile_action_class', "ToDoProfileAction");
 
 
-// CFG: SHIPSIMU-REGISTER-CAPTCHA
+// CFG: TODO-REGISTER-CAPTCHA
 $cfg->setConfigEntry('todo_register_captcha', "GraphicalCodeCaptcha");
 
 $cfg->setConfigEntry('todo_register_captcha', "GraphicalCodeCaptcha");
 
-// CFG: todo-USER-LOGIN-CAPTCHA
+// CFG: TODO-USER-LOGIN-CAPTCHA
 $cfg->setConfigEntry('todo_user_login_captcha', "GraphicalCodeCaptcha");
 
 $cfg->setConfigEntry('todo_user_login_captcha', "GraphicalCodeCaptcha");
 
-// CFG: todo-GUEST-LOGIN-CAPTCHA
+// CFG: TODO-GUEST-LOGIN-CAPTCHA
 $cfg->setConfigEntry('todo_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
 $cfg->setConfigEntry('todo_guest_login_captcha', "GraphicalCodeCaptcha");
 
 // CFG: CAPTCHA-STRING-LENGTH
@@ -217,13 +217,13 @@ $cfg->setConfigEntry('captcha_search_chars', "+/=");
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
 // CFG: RANDOM-STRING-LENGTH
 $cfg->setConfigEntry('random_string_length', 100);
 
-// CFG: todo-REGISTER-CAPTCHA-SECURED
+// CFG: TODO-REGISTER-CAPTCHA-SECURED
 $cfg->setConfigEntry('todo_register_captcha_secured', "Y");
 
 $cfg->setConfigEntry('todo_register_captcha_secured', "Y");
 
-// CFG: todo-USER-LOGIN-CAPTCHA-SECURED
+// CFG: TODO-USER-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('todo_user_login_captcha_secured', "Y");
 
 $cfg->setConfigEntry('todo_user_login_captcha_secured', "Y");
 
-// CFG: todo-GUEST-LOGIN-CAPTCHA-SECURED
+// CFG: TODO-GUEST-LOGIN-CAPTCHA-SECURED
 $cfg->setConfigEntry('todo_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
 $cfg->setConfigEntry('todo_guest_login_captcha_secured', "Y");
 
 // CFG: BLOCK-SHOWS-REGISTRATION
diff --git a/db/payments/.htaccess b/db/payments/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/discovery/.htaccess b/inc/classes/interfaces/discovery/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/interfaces/discovery/class_Discoverable.php b/inc/classes/interfaces/discovery/class_Discoverable.php
new file mode 100644 (file)
index 0000000..8cc62fa
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * An interface for discovery
+ *
+ * @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/>.
+ */
+interface Discoverable extends FrameworkInterface {
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       function discover (Requestable $requestInstance);
+}
+
+//
+?>
index 006a6b46673839b3d18b7be4386c6fca2cc300e7..3dc4aade3460cd9d077595f3ebe042258ed407b2 100644 (file)
@@ -815,9 +815,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        public function debugBackTrace () {
                // Sorry, there is no other way getting this nice backtrace
         */
        public function debugBackTrace () {
                // Sorry, there is no other way getting this nice backtrace
-               print "<pre>\n";
+               print("<pre>\n");
                debug_print_backtrace();
                debug_print_backtrace();
-               print "</pre>";
+               print("</pre>");
                exit;
        }
 
                exit;
        }
 
index 1c4d442f5aca51619ce255e8394867e3d39e1185..69fa4d154669961f2f8b39156ccfea78c1bfa20b 100644 (file)
  */
 class BaseController extends BaseFrameworkSystem implements Registerable {
        /**
  */
 class BaseController extends BaseFrameworkSystem implements Registerable {
        /**
-        * Pre filter chain instance
+        * Generic filter chains
         */
         */
-       private $preFilterChain = null;
-
-       /**
-        * Post filter chain instance
-        */
-       private $postFilterChain = null;
+       private $filterChains = array();
 
        /**
         * Protected constructor
 
        /**
         * Protected constructor
@@ -49,13 +44,23 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
                $this->removeSystemArray();
 
                // Initialize both filter chains
                $this->removeSystemArray();
 
                // Initialize both filter chains
-               $this->preFilterChain  = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
-               $this->postFilterChain = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
+               $this->initFilterChain('pre');
+               $this->initFilterChain('post');
 
                // Add this controller to the registry
                Registry::getRegistry()->addInstance('controller', $this);
        }
 
 
                // Add this controller to the registry
                Registry::getRegistry()->addInstance('controller', $this);
        }
 
+       /**
+        * Private method to initialize a given filter chain
+        *
+        * @param       $filterChain    Name of the filter chain
+        * @return      void
+        */
+       private function initFilterChain ($filterChain) {
+               $this->filterChains[$filterChain] = ObjectFactory::createObjectByConfiguredName('filter_chain_class');
+       }
+
        /**
         * Adds a filter to the pre filter chain
         *
        /**
         * Adds a filter to the pre filter chain
         *
@@ -64,7 +69,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        public function addPreFilter (Filterable $filterInstance) {
                // Add the pre filter
         */
        public function addPreFilter (Filterable $filterInstance) {
                // Add the pre filter
-               $this->preFilterChain->addFilter($filterInstance);
+               $this->filterChains['pre']->addFilter($filterInstance);
        }
 
        /**
        }
 
        /**
@@ -75,7 +80,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        public function addPostFilter (Filterable $filterInstance) {
                // Add the post filter
         */
        public function addPostFilter (Filterable $filterInstance) {
                // Add the post filter
-               $this->postFilterChain->addFilter($filterInstance);
+               $this->filterChains['post']->addFilter($filterInstance);
        }
 
        /**
        }
 
        /**
@@ -87,7 +92,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        protected function executePreFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all pre filters
         */
        protected function executePreFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all pre filters
-               $this->preFilterChain->processFilters($requestInstance, $responseInstance);
+               $this->filterChains['pre']->processFilters($requestInstance, $responseInstance);
        }
 
        /**
        }
 
        /**
@@ -99,7 +104,7 @@ class BaseController extends BaseFrameworkSystem implements Registerable {
         */
        protected function executePostFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all post filters
         */
        protected function executePostFilters (Requestable $requestInstance, Responseable $responseInstance) {
                // Execute all post filters
-               $this->postFilterChain->processFilters($requestInstance, $responseInstance);
+               $this->filterChains['post']->processFilters($requestInstance, $responseInstance);
        }
 }
 
        }
 }
 
diff --git a/inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php b/inc/classes/main/database/wrapper/class_PaymentsDatabaseWrapper.php
new file mode 100644 (file)
index 0000000..52f3646
--- /dev/null
@@ -0,0 +1,59 @@
+<?php
+/**
+ * A database wrapper for payments
+ *
+ * @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 PaymentsDatabaseWrapper extends BaseDatabaseWrapper {
+       // Constants for exceptions
+       const EXCEPTION_CLIENT_USERNAME_NOT_FOUND = 0x180;
+
+       // Constants for database table names
+       const DB_TABLE_PAYMENTS = "payments";
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct() {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of this database wrapper by a provided user class
+        *
+        * @return      $wrapperInstance        An instance of the created wrapper class
+        */
+       public final static function createPaymentsDatabaseWrapper () {
+               // Get a new instance
+               $wrapperInstance = new PaymentsDatabaseWrapper();
+
+               // Set (primary!) table name
+               $wrapperInstance->setTableName(self::DB_TABLE_PAYMENTS);
+
+               // Return the instance
+               return $wrapperInstance;
+       }
+}
+
+// [EOF]
+?>
index b9db256800dea703a3c677aafa3f0a7c9f281099..08e6d426a892387e3107303f28d6afd0a7c0a78e 100644 (file)
@@ -52,7 +52,7 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output
         * @return      void
         */
        public final function outputStream ($output) {
         * @return      void
         */
        public final function outputStream ($output) {
-               print(html_entity_decode(strip_tags($output)));
+               print(html_entity_decode(strip_tags(stripslashes($output))));
        }
 
        /**
        }
 
        /**
index 268738a7a1ef4928ffc148f0eab7aaa42233a631..433f68e8b66d3505b622dcb12ad2900217ce7d21 100644 (file)
@@ -54,7 +54,7 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre
        public final function outputStream ($output) {
                // Strip out <br />
                $output = str_replace("<br />", "", $output);
        public final function outputStream ($output) {
                // Strip out <br />
                $output = str_replace("<br />", "", $output);
-               print($output."<br />\n");
+               print(stripslashes($output)."<br />\n");
        }
 
        /**
        }
 
        /**
diff --git a/inc/classes/main/discovery/.htaccess b/inc/classes/main/discovery/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/discovery/class_ b/inc/classes/main/discovery/class_
new file mode 100644 (file)
index 0000000..05a2063
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A local payment discovery class. This class looks in local database for
+ * registered payment types and like all the others it at least returns the
+ * money bank transfer type.
+ *
+ * @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 ???Discovery extends BaseDiscovery implements Discoverable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public final static function create???Discovery () {
+               // Get an instance of this class
+               $discoveryInstance = new ???Discovery();
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function discover (Requestable $requestInstance) {
+               $this->partialStub("Please implement this method.");
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/discovery/class_BaseDiscovery.php b/inc/classes/main/discovery/class_BaseDiscovery.php
new file mode 100644 (file)
index 0000000..48164e1
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+/**
+ * A general discovery class
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseDiscovery extends BaseFrameworkSystem {
+       /**
+        * Action name for payment discovery
+        */
+       private $actionName = "";
+
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Protected setter for action name
+        *
+        * @param       $actionName             Action name to set
+        * @return      void
+        */
+       protected final function setActionName ($actionName) {
+               $this->actionName = (string) $actionName;
+       }
+
+       /**
+        * Private getter for action name
+        *
+        * @return      $actionName             Action name to set
+        */
+       protected final function getActionName () {
+               return $this->actionName;
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/discovery/payment/.htaccess b/inc/classes/main/discovery/payment/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php b/inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php
new file mode 100644 (file)
index 0000000..1c46a4f
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+/**
+ * A local payment discovery class. This class looks in local database for
+ * registered payment types and like all the others it at least returns the
+ * money bank transfer type.
+ *
+ * @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 LocalPaymentDiscovery extends BaseDiscovery implements Discoverable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Clean up a little
+               $this->removeNumberFormaters();
+               $this->removeSystemArray();
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @param       $filterInstance         An instance of a filter
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public final static function createLocalPaymentDiscovery (Filterable $filterInstance) {
+               // Get an instance of this class
+               $discoveryInstance = new LocalPaymentDiscovery();
+
+               // Set the action from filter
+               $discoveryInstance->setActionName($filterInstance->getActionName());
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Discovers the request
+        *
+        * @param       $requestInstance        An instance of a Requestable class
+        * @return      void
+        */
+       public function discover (Requestable $requestInstance) {
+               // Now get a search criteria and set app name and payment action as search critera
+               $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
+               $criteriaInstance->addCriteria("app_name", $requestInstance->getRequestElement('app'));
+               $criteriaInstance->addCriteria("payment_action", $this->getActionName().'_action');
+               $criteriaInstance->setLimit(1);
+
+               // Get a wrapper instance
+               $wrapperInstance = ObjectFactory::createObjectByConfiguredName('payment_db_wrapper_class');
+
+               // Get result back
+               $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
+
+               // Set the result instance
+               $this->setResultInstance($resultInstance);
+       }
+}
+
+// [EOF]
+?>
diff --git a/inc/classes/main/filter/payment/.htaccess b/inc/classes/main/filter/payment/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php b/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php
new file mode 100644 (file)
index 0000000..3fc1d3d
--- /dev/null
@@ -0,0 +1,153 @@
+<?php
+/**
+ * A filter for payment discovery. This class discovers the payment type and
+ * returns an object holding all available payment system for the requested
+ * type.
+ *
+ * @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 PaymentDiscoveryFilter extends BaseFrameworkSystem implements Filterable {
+       /**
+        * Action name for payment discovery
+        */
+       private $actionName = "";
+
+       /**
+        * Instance of a discovery class
+        */
+       private $discoveryInstance = null;
+
+       /**
+        * 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
+        *
+        * @param       $actionInstance         A performable action
+        * @return      $filterInstance         An instance of this filter class
+        * @throws      NullPointerException    If the resolver is not set
+        */
+       public final static function createPaymentDiscoveryFilter (PerformableAction $actionInstance) {
+               // Get a new instance
+               $filterInstance = new PaymentDiscoveryFilter();
+
+               // Get resolver from action
+               $resolverInstance = $actionInstance->getResolverInstance();
+
+               // Is the resolver set?
+               if (is_null($resolverInstance)) {
+                       // Throw an exception here
+                       throw new NullPointerException($filterInstance, self::EXCEPTION_IS_NULL_POINTER);
+               } // END - if
+
+               // Get the action name from resolver
+               $actionName = $resolverInstance->getActionName();
+
+               // Store it away in this class
+               $filterInstance->setActionName($actionName);
+
+               // Return the instance
+               return $filterInstance;
+       }
+
+       /**
+        * Protected setter for action name
+        *
+        * @param       $actionName             Action name to set
+        * @return      void
+        */
+       protected final function setActionName ($actionName) {
+               $this->actionName = (string) $actionName;
+       }
+
+       /**
+        * Getter for action name
+        *
+        * @return      $actionName             Action name to set
+        */
+       public final function getActionName () {
+               return $this->actionName;
+       }
+
+       /**
+        * Protected setter for discovery instance
+        *
+        * @param       $discoveryInstance      A discovery instance
+        * @return      void
+        */
+       protected final function setDiscoveryInstance (Discoverable $discoveryInstance) {
+               $this->discoveryInstance = $discoveryInstance;
+       }
+
+       /**
+        * Protected getter for discovery instance
+        *
+        * @return      $discoveryInstance      A discovery instance
+        */
+       public final function getDiscoveryInstance () {
+               return $this->discoveryInstance;
+       }
+
+       /**
+        * 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
+        * @todo        0% done
+        */
+       public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Try to get real discovery class
+               try {
+                       // Get an instance from the object factory
+                       $discoveryInstance = ObjectFactory::createObjectByConfiguredName($this->getActionName().'_payment_discovery', array($this));
+
+                       // Call the discovery method
+                       $discoveryInstance->discover($requestInstance);
+
+                       // Remember this instance if all wents fine
+                       $this->setDiscoveryInstance($discoveryInstance);
+               } catch (FrameworkException $e) {
+                       // Something bad happend
+                       $requestInstance->requestIsValid(false);
+
+                       // Add a message to the response
+                       $responseInstance->addFatalMessage('payment_error');
+                       $responseInstance->addFatalMessagePlain($e->getMessage());
+
+                       // Abort here
+                       return false;
+               }
+       }
+}
+
+// [EOF]
+?>
index 2f3502c9e75632ca396cb00c2dbee2e2052b7295..a188251b5cd84215b1e2c94e55a4ef4beb77a3c1 100644 (file)
@@ -634,8 +634,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                } // END - if
 
                // Render the content
                } // END - if
 
                // Render the content
-               $content = sprintf("<option value=\"%s\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
-                       $subName,
+               $content = sprintf("<option value=\"invalid\" class=\"suboption suboption_%s\" disabled=\"disabled\">%s</option>\n",
                        $subName,
                        $subValue
                );
                        $subName,
                        $subValue
                );
index bcc1fc5eb8d91bc0674fcb25c0b58a2c1c73e3a0..51f5dcaf18abf6b15e64bec13b2954b6e4a0ad43 100644 (file)
@@ -95,7 +95,7 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer {
                        }
                } else {
                        // Output it to the console
                        }
                } else {
                        // Output it to the console
-                       printf("%s\n", trim(html_entity_decode(strip_tags($outStream))));
+                       printf("%s\n", trim(html_entity_decode(strip_tags(stripslashes($outStream)))));
                }
        }
 
                }
        }
 
index 7a508058ddd1cc90acd210e9b8f0f82b80cbf612..e82c0b7af1e265543e91ce0351c825806b1b560a 100644 (file)
@@ -84,7 +84,7 @@ class WebOutput extends BaseFrameworkSystem implements OutputStreamer, Registera
         * @return      void
         */
        public final function output ($outStream=false) {
         * @return      void
         */
        public final function output ($outStream=false) {
-               print($outStream);
+               print(stripslashes($outStream));
        }
 }
 
        }
 }
 
index 17c22e2548842fb4eccf3ee72bafe3b68f04cc87..fb0f169e12e000e7978373d32797723f8a1b6082 100644 (file)
@@ -72,7 +72,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable {
 
                // Now get a search criteria and set the user's name as criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Now get a search criteria and set the user's name as criteria
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
-               $criteriaInstance->addCriteria('points_uid', $this->getUserInstance()->getUserName());
+               $criteriaInstance->addCriteria("points_uid", $this->getUserInstance()->getUserName());
                $criteriaInstance->setLimit(1);
 
                // Get result back
                $criteriaInstance->setLimit(1);
 
                // Get result back
index 4e5dbb10573b4548d617b4100cdf478ec3c19811..b0dbac671522f27e7c59cfcd5acb18fae4aeda2c 100644 (file)
@@ -70,7 +70,7 @@ class DefaultNewsReader extends BaseFrameworkSystem implements ReadableNews, Reg
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the page as criteria to it at lease
                $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
                // Add the page as criteria to it at lease
-               $criteriaInstance->addCriteria('page', $page);
+               $criteriaInstance->addCriteria("page", $page);
 
                // Add limitation from config
                $criteriaInstance->setLimit($this->getConfigInstance()->readConfig("news_{$page}_limit"));
 
                // Add limitation from config
                $criteriaInstance->setLimit($this->getConfigInstance()->readConfig("news_{$page}_limit"));
index 0c7f268faf88de2a449f14377ad7180325da9865..eef7b469761b001ca43e2e8a3e4865f4480ede52 100644 (file)
@@ -68,7 +68,7 @@ class BaseActionResolver extends BaseResolver {
         *
         * @return      $actionName     Last validated action name
         */
         *
         * @return      $actionName     Last validated action name
         */
-       protected final function getActionName () {
+       public final function getActionName () {
                return $this->actionName;
        }
 
                return $this->actionName;
        }
 
index 2ecfaa2baee1121ffb69eeb071e3cd4fd0c0a6fb..0c3a4c71a268f9778fc66c4f50be772966ef464a 100644 (file)
@@ -132,6 +132,17 @@ class BaseResponse extends BaseFrameworkSystem {
                $this->fatalMessages[] = $this->getApplicationInstance()->getLanguageInstance()->getMessage($messageId);
        }
 
                $this->fatalMessages[] = $this->getApplicationInstance()->getLanguageInstance()->getMessage($messageId);
        }
 
+       /**
+        * Adds a plain fatal message id to the response
+        *
+        * @param       $message        The plain message we shall add
+        * @return      void
+        */
+       public final function addFatalMessagePlain ($message) {
+               // Adds the resolved message id to the fatal message list
+               $this->fatalMessages[] = $message;
+       }
+
        /**
         * Flushs the cached HTTP response to the outer world
         *
        /**
         * Flushs the cached HTTP response to the outer world
         *
index 141f1de389c874dbe39fb034a83b4ca55ed1d351..726e8501405c08e5732a24b7079db6ef9c58f789 100644 (file)
@@ -144,8 +144,8 @@ class Member extends BaseUser implements ManageableMember, Registerable, Updatea
                $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
 
                // And add our both entries
                $updateInstance = ObjectFactory::createObjectByConfiguredName('update_criteria_class');
 
                // And add our both entries
-               $updateInstance->addCriteria('last_activity', date("Y-m-d H:i:s", time()));
-               $updateInstance->addCriteria('last_action', $lastAction);
+               $updateInstance->addCriteria("last_activity", date("Y-m-d H:i:s", time()));
+               $updateInstance->addCriteria("last_action", $lastAction);
 
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);
 
                // Add the search criteria for searching for the right entry
                $updateInstance->setSearchInstance($searchInstance);