application/ship-simu/main/filter/page/class_RefillPageFilter.php -text
application/ship-simu/main/filter/validator/.htaccess -text
application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php -text
+application/ship-simu/main/filter/verifier/.htaccess -text
+application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.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
$helper->addInputPasswordField('pass2');
// Display current email
-$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span id=\"displayed_field\">".$helper->getValueField('email')."</span>");
+$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helper->getValueField('email')."</span>");
// Only for changing email address
if ($helper->ifEmailChangeAllowed()) {
// CAPTCHA enabled?
if ($helper->ifFormSecuredWithCaptcha()) {
- $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
+ $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
$helper->addCaptcha();
} // END - if
$helper->addInputPasswordField('pass2');
// Display current email
-$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span id=\"displayed_field\">".$helper->getValueField('email')."</span>");
+$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helper->getValueField('email')."</span>");
// Only for changing email address
if ($helper->ifEmailChangeAllowed()) {
// CAPTCHA enabled?
if ($helper->ifFormSecuredWithCaptcha()) {
- $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
+ $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
$helper->addCaptcha();
} // END - if
// CFG: REGISTER-EMAIL-UNIQUE
$cfg->setConfigEntry('register_email_unique', "Y");
+// CFG: PROFILE-INCLUDES-BIRTHDAY
+$cfg->setConfigEntry('profile_includes_birthday', "Y");
+
// CFG: CHAT-ENABLED-ICQ
$cfg->setConfigEntry('chat_enabled_icq', "Y");
// CFG: CONFIRM-CODE-VERIFIER-FILTER
$cfg->setConfigEntry('confirm_code_verifier_filter', "ConfirmCodeVerifierFilter");
+// CFG: BIRTHDAY-REGISTER-VERIFIER-FILTER
+$cfg->setConfigEntry('birthday_register_verifier_filter', "BirthdayVerifierFilter");
+
+// CFG: BIRTHDAY-PROFILE-VERIFIER-FILTER
+$cfg->setConfigEntry('birthday_profile_verifier_filter', "BirthdayVerifierFilter");
+
// CFG: REFILL-PAGE-FILTER
$cfg->setConfigEntry('refill_page_filter', "RefillPageFilter");
// CFG: SHIPSIMU-PROFILE-CAPTCHA
$cfg->setConfigEntry('shipsimu_profile_captcha', "GraphicalCodeCaptcha");
-// CFG: REFILL-FORM-CAPTCHA
-$cfg->setConfigEntry('refill_form_captcha', "GraphicalCodeCaptcha");
+// CFG: SHIPSIMU-REFILL-CAPTCHA
+$cfg->setConfigEntry('shipsimu_refill_captcha', "GraphicalCodeCaptcha");
+
+// CFG: SHIPSIMU-GOVERMENT-STARTUP-CAPTCHA
+$cfg->setConfigEntry('shipsimu_goverment_startup_captcha', "GraphicalCodeCaptcha");
// CFG: CAPTCHA-STRING-LENGTH
$cfg->setConfigEntry('captcha_string_length', 5);
// CFG: SHIPSIMU-PROFILE-CAPTCHA-SECURED
$cfg->setConfigEntry('shipsimu_profile_captcha_secured', "Y");
-// CFG: REFILL-FORM-CAPTCHA-SECURED
-$cfg->setConfigEntry('refill_form_captcha_secured', "Y");
+// CFG: SHIPSIMU-REFILL-CAPTCHA-SECURED
+$cfg->setConfigEntry('shipsimu_refill_captcha_secured', "Y");
+
+// CFG: SHIPSIMU-GOVERMENT-STARTUP-CAPTCHA-SECURED
+$cfg->setConfigEntry('shipsimu_goverment_startup_captcha_secured', "Y");
// CFG: BLOCK-SHOWS-REGISTRATION
$cfg->setConfigEntry('block_shows_registration', "Y");
// Validate CAPTCHA input
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_profile_verifier_filter'));
+ // Validate birthday input
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_profile_verifier_filter'));
+
// Email changed
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_change_filter'));
// Validate CAPTCHA input
$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('captcha_register_verifier_filter'));
+
+ // Validate birthday
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('birthday_register_verifier_filter'));
}
}
* 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 ShipSimuGovermentPaysStartupHelpFilter extends BaseFrameworkSystem implements Filterable {
+class ShipSimuGovermentPaysStartupHelpFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
$userInstance = Registry::getRegistry()->getInstance('user');
// Now simply check for it
- if (($userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysStartupHelp() === false)) {
+ if ((!$userInstance instanceof ManageableMember) || ($userInstance->ifGovermentPaysStartupHelp() === false)) {
// Request is invalid
$requestInstance->requestIsValid(false);
* 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 ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements Filterable {
+class ShipSimuGovermentPaysTrainingFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
* 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 RefillPageFilter extends BaseFrameworkSystem implements Filterable {
+class RefillPageFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
* 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 RefillRequestValidatorFilter extends BaseFrameworkSystem implements Filterable {
+class RefillRequestValidatorFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A verifier filter for birthday data
+ *
+ * @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 BirthdayVerifierFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createBirthdayVerifierFilter () {
+ // Get a new instance
+ $filterInstance = new BirthdayVerifierFilter();
+
+ // 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
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Implement this!
+ $this->partialStub("Please implement this method.");
+ }
+}
+
+// [EOF]
+?>
<?php
// Get form helper instance
-$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_startup_form'));
+$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_goverment_startup'));
// Prefetch user instance
$helperInstance->prefetchValueInstance('user');
// Add main form group
$helperInstance->addFormNote('reality_warning', "WARNUNG: Bitte dieses Formular nicht mit echten Angaben ausfüllen!");
+// Add group for personal data
+$helperInstance->addFormGroup('persona_data', "Deine persönliche Daten, die für die Beantragung nö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\">".$helperInstance->getValueField('birth_day').".".$helperInstance->getValueField('birth_month').".".$helperInstance->getValueField('birth_year')."</span>");
+
+// Add link placeholder for profile page
+$helperInstance->addFormNote('profile', "Stimmen die Daten noch? {?shipsimu_profile_link?}");
+
+// CAPTCHA enabled?
+if ($helperInstance->ifFormSecuredWithCaptcha()) {
+ $helperInstance->addFormGroup('captcha_user', "Die virtuelle Beantragung von Starthilfe ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du die Starthilfe beantragen kannst.");
+ $helperInstance->addCaptcha();
+} // END - if
+
+// Ask again for current account password
+$helperInstance->addFormGroup('password', "Bitte gebe zur Bestätigung dein derzeitiges Passwort ein.");
+$helperInstance->addFieldText('password', "Derzeitiges Passwort:");
+$helperInstance->addInputPasswordField('password');
+
+// 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ültigen Datenschutzgesetzten gespeichert und werden nicht an Dritte weitergegeben. Weiteres dazu siehe Link "Datenschutz".");
+
// Flush the finished form
$helperInstance->flushContent();
+// Get link helper for profile link
+$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'shipsimu_profile_link', 'index.php?app={?app_short_name?}&page=login_area'));
+
+// Add action
+$linkInstance->addActionLinkById('profile', 'goto_profile_link');
+
+// Flush the finished form
+$linkInstance->flushContent();
+
// [EOC]
?>
<div id="goverment_frame">
<div id="goverment_header">
- Virtuelle Beantragung von Startuphilfe
+ Virtuelle Beantragung von Starthilfe
</div>
<div id="goverment_form">
- {?shipsimu_startup_form?}
+ {?shipsimu_goverment_startup?}
</div>
</div>
$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ön erhälst du interessante Prämien - ausschliesslich per Email - zum Geburtstag zugesandt! Gü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
// CAPTCHA enabled?
if ($helperInstance->ifFormSecuredWithCaptcha()) {
- $helperInstance->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
+ $helperInstance->addFormGroup('captcha_user', "Das Ändern von Profildaten ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit deine Änderungen gespeichert werden können.");
$helperInstance->addCaptcha();
} // END - if
<?php
// Neue Helper-Instanz holen
-$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'refill_form'));
+$helperInstance = ObjectFactory::createObjectByConfiguredName('web_form_helper', array($this, 'shipsimu_refill'));
// Pre-fetch payment types
$helperInstance->prefetchValueInstance('payments');
Jetzt dein {?currency?}-Konto aufladen!
</div>
<div class="content_body">
- {?refill_form?}
+ {?shipsimu_refill?}
</div>
</div>
// CAPTCHA enabled?
if ($helperInstance->ifFormSecuredWithCaptcha()) {
- $helperInstance->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
+ $helperInstance->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
$helperInstance->addCaptcha();
} // END - if
$helperInstance->addFieldText('pass2', "Passwortwiederholung:");
$helperInstance->addInputPasswordField('pass2');
+// Does this registration require an email?
if ($helperInstance->ifRegisterRequiresEmailVerification()) {
$helperInstance->addFormGroup('email', "Bitte gebe deine Email zweimal (ein zweites Mal zur Bestätigung) ein, damit wir dir deinen Freischaltlink zusenden können.");
$helperInstance->addFieldText('email1', "Email-Adresse:");
$helperInstance->addFieldText('email2', "Wiederholung Email-Adresse:");
$helperInstance->addInputTextField('email2');
+ // Must the email address be unique in this system?
if ($helperInstance->ifEmailMustBeUnique()) {
$helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein.");
- } // END - Unique email addresses
-
-} // END - email verification
+ } // END - if
+} // END - if
+// Shall we also ask some personal data to complete the profile?
if ($helperInstance->ifRegisterIncludesProfile()) {
$helperInstance->addFormGroup('profile', "Hier kannst du zusätzlich deine Profildaten vorweg eingeben, du kannst sie aber auch nach dem Login vervollständigen!");
$helperInstance->addFormSubGroup('email', "Die Angabe deiner Email-Adresse ist nur dann nötig, wenn du auch Email-Benachrichtigungen (<span id=\"add_note\">*1</span>) haben möchtest.");
$helperInstance->addFieldText('email1', "Email-Adresse:");
$helperInstance->addInputTextField('email1');
- } // END - No email verification
+
+ // Must the email address be unique in this system?
+ if ($helperInstance->ifEmailMustBeUnique()) {
+ $helperInstance->addFormNote('email', "Die von dir eingegebene Email-Adresse darf nur einmal im Spiel verwendet worden sein.");
+ } // END - if
+ } // END - if
// Persoenliche Daten mit in der Anmeldung abfragen?
if ($helperInstance->ifRegisterIncludesPersonaData()) {
$helperInstance->addInputTextField('street');
$helperInstance->addFieldText('city', "Wohnort:");
$helperInstance->addInputTextField('city');
- } // END - Persona data
+
+ // Include birthday?
+ if ($helperInstance->ifProfileIncludesBirthDay()) {
+ $helperInstance->addFormSubGroup('birthday', "Verrate uns doch dein Geburtsdatum, als Dankeschön erhälst du interessante Prämien - ausschliesslich per Email - zum Geburtstag zugesandt! Gü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
$helperInstance->addFormSubGroup('zip', "Magst du uns auch deine Postleitzahl verraten?");
$helperInstance->addFieldText('zip', "Postleitzahl:");
$helper->addInputPasswordField('pass2');
// Display current email
-$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span id=\"displayed_field\">".$helper->getValueField('email')."</span>");
+$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helper->getValueField('email')."</span>");
// Only for changing email address
if ($helper->ifEmailChangeAllowed()) {
// CAPTCHA enabled?
if ($helper->ifFormSecuredWithCaptcha()) {
- $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
+ $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
$helper->addCaptcha();
} // END - if
$helper->addInputPasswordField('pass2');
// Display current email
-$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span id=\"displayed_field\">".$helper->getValueField('email')."</span>");
+$helper->addFormNote('current_email', "Derzeitige Email-Adresse: <span class=\"persona_data\">".$helper->getValueField('email')."</span>");
// Only for changing email address
if ($helper->ifEmailChangeAllowed()) {
// CAPTCHA enabled?
if ($helper->ifFormSecuredWithCaptcha()) {
- $helper->addFormGroup('captcha_user', "Unser Benuzter-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
+ $helper->addFormGroup('captcha_user', "Das Benutzer-Login ist durch ein CAPTCHA geschützt. Bitte wiederhole den angezeigten Code, damit du dich einloggen kannst.");
$helper->addCaptcha();
} // END - if
* 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 EmailChangeFilter extends BaseFrameworkSystem implements Filterable {
+class EmailChangeFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
* 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 PasswordChangeFilter extends BaseFrameworkSystem implements Filterable {
+class PasswordChangeFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
* 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 CaptchaEncryptFilter extends BaseFrameworkSystem implements Filterable {
+class CaptchaEncryptFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
* 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 {
+class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
/**
* Action name for payment discovery
*/
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Clean up a little
- $this->removeNumberFormaters();
- $this->removeSystemArray();
}
/**
* 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 UserStatusConfimedUpdateFilter extends BaseFrameworkSystem implements Filterable {
+class UserStatusConfimedUpdateFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
* 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 UserUpdateFilter extends BaseFrameworkSystem implements Filterable {
+class UserUpdateFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
* 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 UserStatusVerifierFilter extends BaseFrameworkSystem implements Filterable {
+class UserStatusVerifierFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
* 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 UserUnconfirmedVerifierFilter extends BaseFrameworkSystem implements Filterable {
+class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable {
/**
* Protected constructor
*
return $required;
}
+ /**
+ * Checks wether for birthday shall be asked
+ *
+ * @return $required Wether birthday shall be asked
+ */
+ public function ifProfileIncludesBirthDay () {
+ $required = ($this->getConfigInstance()->readConfig('profile_includes_birthday') === "Y");
+ return $required;
+ }
+
/**
* Checks wether email addresses can only be once used
*