inc/language/booking_de.php svneol=native#text/plain
inc/language/cache_de.php svneol=native#text/plain
inc/language/country_de.php svneol=native#text/plain
+inc/language/coupon_de.php svneol=native#text/plain
inc/language/de.php svneol=native#text/plain
inc/language/debug_de.php svneol=native#text/plain
inc/language/doubler_de.php svneol=native#text/plain
inc/libs/booking_functions.php svneol=native#text/plain
inc/libs/cache_functions.php svneol=native#text/plain
inc/libs/country_functions.php svneol=native#text/plain
+inc/libs/coupon_functions.php svneol=native#text/plain
inc/libs/debug_functions.php svneol=native#text/plain
inc/libs/doubler_functions.php svneol=native#text/plain
inc/libs/events_functions.php svneol=native#text/plain
inc/modules/admin/action-admins.php svneol=native#text/plain
inc/modules/admin/action-bank.php svneol=native#text/plain
inc/modules/admin/action-country.php svneol=native#text/plain
+inc/modules/admin/action-coupon.php svneol=native#text/plain
inc/modules/admin/action-doubler.php svneol=native#text/plain
inc/modules/admin/action-email.php svneol=native#text/plain
inc/modules/admin/action-holiday.php svneol=native#text/plain
inc/modules/admin/what-config_birthday.php svneol=native#text/plain
inc/modules/admin/what-config_bonus.php svneol=native#text/plain
inc/modules/admin/what-config_cats.php svneol=native#text/plain
+inc/modules/admin/what-config_coupon.php svneol=native#text/plain
inc/modules/admin/what-config_doubler.php svneol=native#text/plain
inc/modules/admin/what-config_email.php svneol=native#text/plain
inc/modules/admin/what-config_extensions.php svneol=native#text/plain
templates/de/html/admin/admin_admins_mails_list.tpl svneol=native#text/plain
templates/de/html/admin/admin_admins_mails_list_row.tpl svneol=native#text/plain
templates/de/html/admin/admin_cache_stats.tpl svneol=native#text/plain
+templates/de/html/admin/admin_config_ svneol=native#text/plain
templates/de/html/admin/admin_config_active.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_admin.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_admins.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_bonus.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_cats.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_cats_row.tpl svneol=native#text/plain
+templates/de/html/admin/admin_config_coupon.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_doubler.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_email.tpl svneol=native#text/plain
templates/de/html/admin/admin_config_email_del.tpl svneol=native#text/plain
./inc/extensions-functions.php:567: // @TODO Extension is loaded, what next?
./inc/filter/bonus_filter.php:55: // @TODO This query isn't right, it will only update if the user was for a longer time away!
./inc/filter/cache_filter.php:78: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
-./inc/functions.php:1213: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
-./inc/functions.php:1301: // @TODO Are these convertions still required?
-./inc/functions.php:1319:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1217: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1305: // @TODO Are these convertions still required?
+./inc/functions.php:1323:// @TODO Rewrite this function to use readFromFile() and writeToFile()
./inc/functions.php:163:// @TODO Rewrite this to an extension 'smtp'
-./inc/functions.php:1901: // @TODO Find a way to cache this
-./inc/functions.php:2002: // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2182: // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:1905: // @TODO Find a way to cache this
+./inc/functions.php:2006: // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2186: // @TODO Rename column data_type to e.g. mail_status
./inc/functions.php:92: // @TODO Extension 'msg' does not exist
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
// Configuration entries
addConfigAddSql('coupon_default_time', 'BIGINT(20) NOT NULL DEFAULT ' . (getOneDay() * 7));
- addConfigAddSql('coupon_default_points', 'FLOAT(20,5) NOT NULL DEFAULT 1000.00000');
+ addConfigAddSql('coupon_default_points', 'FLOAT(20,5) NOT NULL DEFAULT 100.00000');
// Menu systems:
// - Admin entries
// First, cast all to double, due to PHP changes
$dotted = (double) $dotted;
- // Default is 3 you can change this in admin area "Misc -> Misc Options"
- if (!isConfigEntrySet('max_comma')) setConfigEntry('max_comma', 3);
+ // Default is 3 you can change this in admin area "Settings -> Misc Options"
+ if (!isConfigEntrySet('max_comma')) {
+ setConfigEntry('max_comma', 3);
+ } // END - if
// Use from config is default
$maxComma = getConfig('max_comma');
// Use from parameter?
- if ($max > 0) $maxComma = $max;
+ if ($max > 0) {
+ $maxComma = $max;
+ } // END - if
// Cut zeros off?
if (($cut === true) && ($max == '0')) {
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 26/06/2011 *
+ * =================== Last change: 26/06/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : coupon_de.php *
+ * -------------------------------------------------------------------- *
+ * Short description : German langugage support *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Deutsche Sprachunterstuetzung *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.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 2 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Language definitions
+addMessages(array(
+ 'ADMIN_CONFIG_COUPON_SETTINGS_TITLE' => "Allgemeine Einstellungen zu den Gutscheinen",
+ 'ADMIN_CONFIG_COUPON_DEFAULT_TIME' => "Zeit, bis Gutscheine ablaufen sollen. Sie können diesen Ausgangswert beim Erstellen von neuen Gutscheinen nachträglich anpassen.",
+ 'ADMIN_CONFIG_COUPON_DEFAULT_POINTS' => "Ausgangsvergütung in {?POINTS?}. Sie können diesen Ausgangswert beim Erstellen von neuen Gutscheinen nachträglich anpassen.",
+));
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 26/06/2011 *
+ * =================== Last change: 26/06/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : coupon_functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for ext- *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Funktionen fuer ext- *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.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 2 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Wrapper function for 'coupon_default_points'
+function getCouponDefaultPoints () {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Get config entry
+ $GLOBALS[__FUNCTION__] = getConfig('coupon_default_points');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 06/26/2011 *
+ * =================== Last change: 06/26/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : action-coupon.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Coupon admin menus *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Gutschein-Adminmenues *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.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 2 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+// Load the include file
+$inc = sprintf("inc/modules/admin/what-%s.php", getWhat());
+if (isIncludeReadable($inc)) {
+ // Ok, we finally load the admin action module
+ loadInclude($inc);
+} else {
+ addFatalMessage(__FILE__, __LINE__, getMaskedMessage('ADMIN_WHAT_404', getWhat()));
+}
+
+// [EOF]
+?>
addYouAreHereLink('admin', __FILE__);
if (isFormSent()) {
- // Translate german decimal commas to computer decimal dots
- setPostRequestParameter('beg_points' , convertCommaToDot(postRequestParameter('beg_points') ));
- setPostRequestParameter('beg_points_max' , convertCommaToDot(postRequestParameter('beg_points_max') ));
- setPostRequestParameter('beg_notify_bonus', convertCommaToDot(postRequestParameter('beg_notify_bonus')));
+ // Replace german decimal comma with computer decimal dot
+ convertCommaToDotInPostDataArray(array('beg_points', 'beg_points_max', 'beg_notify_bonus'));
// Save settings
adminSaveSettingsFromPostData();
addYouAreHereLink('admin', __FILE__);
if (isFormSent()) {
- // Replace german decimal commas to computer decimal dots
- setPostRequestParameter('login_bonus', convertCommaToDot(postRequestParameter('login_bonus')));
- setPostRequestParameter('turbo_bonus', convertCommaToDot(postRequestParameter('turbo_bonus')));
- setPostRequestParameter('bonus_ref', convertCommaToDot(postRequestParameter('bonus_ref')));
- setPostRequestParameter('bonus_order', convertCommaToDot(postRequestParameter('bonus_order')));
- setPostRequestParameter('bonus_notify_points', convertCommaToDot(postRequestParameter('bonus_notify_points')));
+ // Replace german decimal comma with computer decimal dot
+ convertCommaToDotInPostDataArray(array('login_bonus', 'turbo_bonus', 'bonus_ref', 'bonus_order', 'bonus_notify_points'));
// Generate string for saving ranks
setPostRequestParameter('turbo_rates', '');
unsetPostRequestParameter('rate');
// Automatically calculate bonus points for ranks 2 and 3 when not set
- if (!isPostRequestParameterSet('turbo_rates')) setPostRequestParameter('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).'');
+ if (!isPostRequestParameterSet('turbo_rates')) {
+ setPostRequestParameter('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).'');
+ } // END - if
// Save data
adminSaveSettingsFromPostData();
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 26/06/2011 *
+ * =================== Last change: 26/06/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-config_coupon.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Configuration for extension coupon *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Konfiguration der Gutschein-Erweiterung *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * For more information visit: http://www.mxchange.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 2 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+ die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+if (isFormSent()) {
+ // Replace German comma with computer's version
+ convertCommaToDotInPostData('coupon_default_points');
+
+ // Save data
+ adminSaveSettingsFromPostData();
+} else {
+ // Prepare some template data
+ $content['coupon_default_time_selection'] = createConfigurationTimeSelections('coupon_default_time', 'WDh');
+
+ // Load template
+ loadTemplate('admin_config_coupon', false, $content);
+}
+
+// [EOF]
+?>
addYouAreHereLink('admin', __FILE__);
if (isFormSent()) {
- // Replace commata with decimal dot
- setPostRequestParameter('doubler_charge', convertCommaToDot(postRequestParameter('doubler_charge')));
- setPostRequestParameter('doubler_ref' , convertCommaToDot(postRequestParameter('doubler_ref')));
- setPostRequestParameter('doubler_min' , convertCommaToDot(postRequestParameter('doubler_min')));
- setPostRequestParameter('doubler_max' , convertCommaToDot(postRequestParameter('doubler_max')));
- setPostRequestParameter('doubler_left' , convertCommaToDot(postRequestParameter('doubler_left')));
+ // Replace german decimal comma with computer decimal dot
+ convertCommaToDotInPostDataArray(array('doubler_charge', 'doubler_ref', 'doubler_min', 'doubler_max', 'doubler_left'));
// Save settings
adminSaveSettingsFromPostData();
} else {
// Init all Y/N selections
- foreach (array('jackpot','own','sent_all') as $entry) {
+ foreach (array('jackpot', 'own', 'sent_all') as $entry) {
$content[$entry . '_y'] = '';
$content[$entry . '_n'] = '';
$content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"';
// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
-if (isPostRequestParameterSet('rate')) setPostRequestParameter('rate', convertCommaToDot(postRequestParameter('rate')));
+// Convert 'rate' if set
+if (isPostRequestParameterSet('rate')) {
+ convertCommaToDotInPostData('rate');
+} // END - if
if ((isFormSent('add')) && (isPostRequestParameterSet('title')) && (postRequestParameter('rate') > 0)) {
// Add new payout type
if (isFormSent()) {
// Replace german decimal comma with computer decimal dot
- if (isPostRequestParameterSet('refback_min_perc')) setPostRequestParameter('refback_min_perc', convertCommaToDot(postRequestParameter('refback_min_perc')));
- if (isPostRequestParameterSet('refback_max_perc')) setPostRequestParameter('refback_max_perc', convertCommaToDot(postRequestParameter('refback_max_perc')));
+ convertCommaToDotInPostDataArray(array('refback_min_perc', 'refback_max_perc'));
// Save configuration
adminSaveSettingsFromPostData();
// Was the form submitted?
if (isFormSent()) {
// Replace german decimal comma with computer decimal dot
- if (isPostRequestParameterSet('surfbar_static_reward')) setPostRequestParameter('surfbar_static_reward' , convertCommaToDot(postRequestParameter('surfbar_static_reward')));
- if (isPostRequestParameterSet('surfbar_static_costs')) setPostRequestParameter('surfbar_static_costs' , convertCommaToDot(postRequestParameter('surfbar_static_costs')));
- if (isPostRequestParameterSet('surfbar_dynamic_percent')) setPostRequestParameter('surfbar_dynamic_percent', convertCommaToDot(postRequestParameter('surfbar_dynamic_percent')));
+ convertCommaToDotInPostDataArray(array('surfbar_static_reward', 'surfbar_static_costs', 'surfbar_dynamic_percent'));
// Save settings
adminSaveSettingsFromPostData();
}
// Shortens calls with configuration entry as first argument (the second will become obsolete in the future)
-function createConfigurationTimeSelections ($configEntry, $stamps) {
+function createConfigurationTimeSelections ($configEntry, $stamps, $align = 'center') {
// Get the configuration entry
$configValue = getConfig($configEntry);
// Call inner method
- return createTimeSelections($configValue, $configEntry, $stamps);
+ return createTimeSelections($configValue, $configEntry, $stamps, $align);
+}
+
+// Shortens converting of German comma to Computer's version in POST data
+function convertCommaToDotInPostData ($postEntry) {
+ // Read and convert given entry
+ $postValue = convertCommaToDot(postRequestParameter($postEntry));
+
+ // ... and set it again
+ setPostRequestParameter($postEntry, $postValue);
+}
+
+// Converts German commas to Computer's version in all entries
+function convertCommaToDotInPostDataArray (array $postEntries) {
+ // Replace german decimal comma with computer decimal dot
+ foreach ($postEntries as $entry) {
+ // Is the entry there?
+ if (isPostRequestParameterSet($entry)) {
+ // Then convert it
+ convertCommaToDotInPostData($entry);
+ } // END - if
+ } // END - foreach
}
// [EOF]
--- /dev/null
+<div align="center">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=config_%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+ <tr>
+ <td class="table_header bottom" colspan="2" align="center">
+ <strong>{--ADMIN_CONFIG__SETTINGS_TITLE--}:</strong>
+ </td>
+ </tr>
+ <tr>
+ <td class="bottom" align="right">{--ADMIN_CONFIG_--}:</td>
+ <td class="bottom" align="center">
+ <input type="input" name="" class="form_field" value="{??}" size="5" maxlength="20" />
+ </td>
+ </tr>
+ <tr>
+ <td class="table_footer" colspan="2" align="center">
+ <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+ <input type="submit" class="form_submit" name="ok" value="{--SAVE_SETTINGS--}" />
+ </td>
+ </tr>
+</table>
+</form>
+</div>
--- /dev/null
+<div align="center">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=config_coupon%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+ <tr>
+ <td class="table_header bottom" colspan="2" align="center">
+ <strong>{--ADMIN_CONFIG_COUPON_SETTINGS_TITLE--}:</strong>
+ </td>
+ </tr>
+ <tr>
+ <td class="bottom" align="right">{--ADMIN_CONFIG_COUPON_DEFAULT_TIME--}:</td>
+ <td class="bottom" align="center">
+ $content[coupon_default_time_selection]
+ </td>
+ </tr>
+ <tr>
+ <td class="bottom" align="right">{--ADMIN_CONFIG_COUPON_DEFAULT_POINTS--}:</td>
+ <td class="bottom" align="center">
+ <input type="input" name="coupon_default_points" class="form_field" value="{%config,translateComma=coupon_default_points%}" size="5" maxlength="20" />
+ <span class="tiny">({?POINTS?})</span>
+ </td>
+ </tr>
+ <tr>
+ <td class="table_footer" colspan="2" align="center">
+ <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+ <input type="submit" class="form_submit" name="ok" value="{--SAVE_SETTINGS--}" />
+ </td>
+ </tr>
+</table>
+</form>
+</div>