]> git.mxchange.org Git - mailer.git/commitdiff
Several template fixes/cleanups, naming convention applied:
authorRoland Häder <roland@mxchange.org>
Tue, 22 Jun 2010 01:57:02 +0000 (01:57 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 22 Jun 2010 01:57:02 +0000 (01:57 +0000)
- Several templates fixed (see naming convention below)
- Some more HTML code swapped out to templates
- New naming convention: _en_ is obsolete, we use _enable_ and same for _di_,
  we now use _disable_. _mem_ is obsolete, too. We now use _member_.
- TODOs.txt updated

35 files changed:
.gitattributes
DOCS/TODOs.txt
inc/databases.php
inc/expression-functions.php
inc/extensions/ext-beg.php
inc/extensions/ext-bonus.php
inc/functions.php
inc/language/beg_de.php
inc/language/bonus_de.php
inc/language/de.php
inc/libs/rallye_functions.php
inc/libs/register_functions.php
inc/libs/sponsor_functions.php
inc/mails/beg_mails.php
inc/mails/bonus_mails.php
inc/modules/admin/what-config_beg.php
inc/modules/admin/what-config_bonus.php
inc/modules/admin/what-list_user.php
inc/modules/login.php
inc/modules/member/what-refback.php
inc/wrapper-functions.php
show_bonus.php
templates/de/html/admin/admin_config_beg.tpl
templates/de/html/admin/admin_config_bonus.tpl
templates/de/html/admin/admin_del_user.tpl
templates/de/html/admin/admin_list_cats_404.tpl
templates/de/html/admin/admin_list_user_row.tpl
templates/de/html/admin/admin_lock_user.tpl
templates/de/html/guest/guest_rallye.tpl [new file with mode: 0644]
templates/de/html/guest/guest_rallye_expired_footer.tpl
templates/de/html/guest/guest_rallye_expired_header.tpl
templates/de/html/guest/guest_rallye_footer.tpl
templates/de/html/guest/guest_rallye_header.tpl
templates/de/html/guest/guest_rallye_row.tpl [new file with mode: 0644]
templates/de/html/show_bonus_msg.tpl

index efdaa45424e69ff2248ad71b6018c6c9d2193412..94f3f50daf5bc2c37ab63201a59509453dc31c33 100644 (file)
@@ -1408,6 +1408,7 @@ templates/de/html/guest/guest_menu_title.tpl -text
 templates/de/html/guest/guest_menu_whats.tpl -text
 templates/de/html/guest/guest_nickname_login.tpl -text
 templates/de/html/guest/guest_no_rallyes.tpl -text
+templates/de/html/guest/guest_rallye.tpl -text
 templates/de/html/guest/guest_rallye_expired_footer.tpl -text
 templates/de/html/guest/guest_rallye_expired_header.tpl -text
 templates/de/html/guest/guest_rallye_footer.tpl -text
index 1bcd6a72b6145653ff1c21ed29abc93571121c71..be9e927d472068893ba2635be6e730f6d27a3d05 100644 (file)
 ./inc/extensions-functions.php:143:    // @TODO Do we still need this? setExtensionUpdateNotes('');
 ./inc/extensions-functions.php:423:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
 ./inc/extensions-functions.php:539:            // @TODO Extension is loaded, what next?
-./inc/functions.php:1055:// @TODO $simple/$constants are deprecated
-./inc/functions.php:1082:      // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
-./inc/functions.php:2415:      // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/functions.php:2564:              // @TODO Add a little more infos here
-./inc/functions.php:2647:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:1052:// @TODO $simple/$constants are deprecated
+./inc/functions.php:1079:      // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates
+./inc/functions.php:2412:      // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/functions.php:2561:              // @TODO Add a little more infos here
+./inc/functions.php:2644:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
+./inc/functions.php:2667:                      // @TODO Rewrite this old lost code to a template
 ./inc/functions.php:266:       // @TODO Remove this sanity-check if all is fine
-./inc/functions.php:2670:                      // @TODO Rewrite this old lost code to a template
 ./inc/functions.php:269:       // @TODO Try to rewrite all $DATA to $content
-./inc/functions.php:2760:                      // @TODO Are these convertions still required?
-./inc/functions.php:2778:// @TODO Rewrite this function to use readFromFile() and writeToFile()
-./inc/functions.php:3654:// @TODO Lame description for this function
-./inc/functions.php:3676:                      // @TODO Move this in a filter
-./inc/functions.php:3800:      // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:481:       // @TODO Do only use $content, not $DATA or raw variables
-./inc/functions.php:551:               // @TODO Extension 'msg' does not exist
-./inc/functions.php:614:// @TODO Rewrite this to an extension 'smtp'
+./inc/functions.php:2757:                      // @TODO Are these convertions still required?
+./inc/functions.php:2775:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:3651:// @TODO Lame description for this function
+./inc/functions.php:3670:                      // @TODO Move this in a filter
+./inc/functions.php:3794:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:478:       // @TODO Do only use $content, not $DATA or raw variables
+./inc/functions.php:548:               // @TODO Extension 'msg' does not exist
+./inc/functions.php:611:// @TODO Rewrite this to an extension 'smtp'
 ./inc/install-functions.php:63:        // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
 ./inc/language/de.php:1143:// @TODO Rewrite these two constants
 ./inc/language/de.php:1158:// @TODO Rewrite these three constants
 ./inc/libs/doubler_functions.php:46:// @TODO Lame description
 ./inc/libs/doubler_functions.php:94:                   // @TODO Can't this be moved into EL?
 ./inc/libs/mailid_functions.php:49:            // @TODO Rewrite this to a dynamic include or so
-./inc/libs/rallye_functions.php:724:   $EXPIRE = 3; // @TODO The hard-coded value...
-./inc/libs/rallye_functions.php:806:// @TODO Please document this function
-./inc/libs/rallye_functions.php:864:           // Load count @TODO Can't we rewrite this to our API?
+./inc/libs/rallye_functions.php:708:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
+./inc/libs/rallye_functions.php:779:   $EXPIRE = 3; // @TODO The hard-coded value...
+./inc/libs/rallye_functions.php:865:// @TODO Please document this function
+./inc/libs/rallye_functions.php:923:           // Load count @TODO Can't we rewrite this to our API?
 ./inc/libs/refback_functions.php:61:           // @TODO Try to rewrite the following unset()
 ./inc/libs/register_functions.php:299: // @TODO Rewrite these all to a single filter
 ./inc/libs/register_functions.php:375: // @TODO Rewrite this to a filter
 ./inc/modules/admin/what-list_unconfirmed.php:88:      // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
 ./inc/modules/admin/what-list_user.php:157:            // @TODO Rewrite these to filters
 ./inc/modules/admin/what-list_user.php:275:            // @TODO Rewrite this into a filter
-./inc/modules/admin/what-list_user.php:330:                    // @TODO Rewrite this into a filter
+./inc/modules/admin/what-list_user.php:325:                    // @TODO Rewrite this into a filter
 ./inc/modules/admin/what-list_user.php:59:// @TODO Rewrite these if-blocks in a filter
 ./inc/modules/admin/what-logs.php:69:                  // @TODO Fix content-type here
 ./inc/modules/admin/what-logs.php:72:                  // @TODO Fix content-type here
 ./inc/modules/member/what-payout.php:222:                                      // @TODO Rewrite this to a filter
 ./inc/modules/member/what-points.php:55:// @TODO Should we rewrite this to a filter?
 ./inc/modules/member/what-rallyes.php:91:      // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;admin=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
-./inc/modules/member/what-refback.php:131:                     // @TODO UNUSED: $refRow['status']      = translateUserStatus($refRow['status']);
+./inc/modules/member/what-refback.php:130:                     // @TODO UNUSED: $refRow['status']      = translateUserStatus($refRow['status']);
 ./inc/modules/member/what-reflinks.php:54:// @TODO Move this into a filter
 ./inc/modules/member/what-transfer.php:132:                            // @TODO Rewrite this to a filter
 ./inc/modules/member/what-transfer.php:222:                            // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
 ./mailid_top.php:222:                                                                  // @TODO Rewrite these blocks to filter
 ./mailid_top.php:257:                                                                          // @TODO Try to rewrite the following unset()
 ./mailid_top.php:99:           // @TODO Rewrite this to a filter
+./show_bonus.php:107:                  // @TODO No more needed? $content['points'] = translateComma($content['points']);
 ./view.php:70:         // @TODO No banner found, output some default banner
 ./templates/de/html/admin/admin_add_country.tpl:23:                    <!-- @TODO Rewrite this selection box to our generic functions //-->
 ./templates/de/html/admin/admin_admins_contct_form.tpl:4:      <!-- @TODO Shouldn't we add a title here? //-->
 ./inc/modules/member/what-newsletter.php:2:// @DEPRECATED
 ./inc/modules/member/what-sponsor.php:2:// @DEPRECATED
 ./templates/de/html/admin/admin_list_rallye_noselect.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/guest/guest_rallye_expired_footer.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/guest/guest_rallye_expired_header.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/guest/guest_rallye_footer.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/guest/guest_rallye_header.tpl:1:<!-- @DEPRECATED //-->
 ### ### template-warnings.log follows: ### ###
 Warning: Not parsing JavaScript templates/de/html/js/js_order_send.tpl.
 Warning: Not parsing JavaScript templates/de/html/js/js_cookies_disabled.tpl.
index 35a86969aae4351aa2aff8ecd28f5e378a8b1dff..5f383d2a373f30124d8fd6ebb8cf1b54499162ad 100644 (file)
@@ -76,7 +76,7 @@ addCode('MENU_NOT_VALID'     , 0x01f);
 addCode('LOGIN_FAILED'       , 0x020);
 addCode('BEG_SAME_AS_OWN'    , 0x021);
 addCode('UNHANDLED_STATUS'   , 0x022);
-addCode('MODULE_MEM_ONLY'    , 0x023);
+addCode('MODULE_MEMBER_ONLY' , 0x023);
 addCode('UNKNOWN_ERROR'      , 0x024);
 
 // Full version
index e112a20bf393504162f381418a00d1c4e837c668..6a7ca12bf646bc544057143089c288999cef0b58 100644 (file)
@@ -99,9 +99,9 @@ function doExpressionUser ($data) {
                if ($data['matches'][4][$data['key']] == '$userid') {
                        // Use dynamic call
                        $functionName = "getFetchedUserData('userid', \$userid, '" . $data['callback'] . "')";
-               } elseif ($data['matches'][4][$data['key']] > 0) {
+               } elseif (!empty($data['matches'][4][$data['key']])) {
                        // User data found
-                       $functionName = "getFetchedUserData('userid', " . $data['matches'][4][$data['key']] . ", " . $data['callback'] . "')";
+                       $functionName = "getFetchedUserData('userid', " . $data['matches'][4][$data['key']] . ", '" . $data['callback'] . "')";
                }
        } elseif ((!empty($data['callback'])) && (isUserDataValid())) {
                // "Call-back" alias column for current logged in user's data
index db9a335c8e3926f89a2d7a0d79fc039bdcd61e3a..a8da2f7d48dd354d821a84cfa0b732d098bf7779 100644 (file)
@@ -43,10 +43,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.2.6');
+setThisExtensionVersion('0.2.7');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6'));
+setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
@@ -255,7 +255,18 @@ PRIMARY KEY (id)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("IP-Lock mit Session-Id erweitert. Tracker-Script eingef&uuml;gt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll.");
                                break;
-               }
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_new_mem_notify` `beg_new_member_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Umbenannt nach neuer Namenskonvention");
+                               break;
+               } // END - switch
                break;
 
        case 'modify': // When the extension got modified
@@ -271,7 +282,7 @@ PRIMARY KEY (id)
                $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE `timeout` < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__);
 
                // Check for beg rallye is active and send mails out
-               if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_mem_notify') == 'Y')) {
+               if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_member_notify') == 'Y')) {
                        // Include file for sending out mails
                        addIncludeToPool('notify', 'inc/mails/beg_mails.php');
                } // END - if
@@ -280,7 +291,7 @@ PRIMARY KEY (id)
        default: // Unknown extension mode
                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
-}
+} // END - switch
 
-//
+// [EOF]
 ?>
index 8651fdd1ef81d5a48e3503b14d5746c5cbe3e0d9..6f6c007fe524887603ec19a462d4d32176e425f8 100644 (file)
@@ -43,10 +43,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version of this extension
-setThisExtensionVersion('0.9.0');
+setThisExtensionVersion('0.9.1');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0'));
+setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
@@ -465,14 +465,14 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                break;
 
                        case '0.7.7': // SQL queries for v0.7.7
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_en_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_di_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_new_mem_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_notify_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_notify_wait` BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_en_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_di_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Optionale automatische Benachrichtigung &uuml;ber aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.");
@@ -550,7 +550,16 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                // Update notes
                                setExtensionUpdateNotes("Filter hinzugef&uuml;gt der den Login-Bonus aktualisiert (bzw. soll) (internes TODO).");
                                break;
-               }
+
+                       case '0.9.1': // SQL queries for v0.9.1
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_en_notify` `bonus_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_di_notify` `bonus_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_new_mem_notify` `bonus_new_member_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+                               // Update notes
+                               setExtensionUpdateNotes("Umbenannt nach neuer Konvention (bitte Einstellungen kontrollieren).");
+                               break;
+               } // END - switch
                break;
 
        case 'modify': // When the extension got modified
@@ -561,7 +570,7 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
 
        case 'init': // Do stuff when extension is initialized
                // Check for bonus rallye is active and send mails out
-               if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) {
+               if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_member_notify') == 'Y')) {
                        // Include file for sending out mails
                        addIncludeToPool('notify', 'inc/mails/bonus_mails.php');
                } // END - if
index f010daf758244f3a06b1538c472f104d1515ac69..887faea62aa5f772ada24286930081da85dd0e7d 100644 (file)
@@ -471,9 +471,6 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "content()=".count($content)." - AFTER<br />");
        } // END - if
 
-       // Translate M to male or F to female if present
-       if (isset($content['gender'])) $content['gender'] = translateGender($content['gender']);
-
        // Overwrite email from data if present
        if (isset($content['email'])) $email = $content['email'];
 
@@ -2611,11 +2608,11 @@ function getMessageFromErrorCode ($code) {
                case getCode('COOKIES_DISABLED')   : $message = getMessage('LOGIN_COOKIES_DISABLED'); break;
                case getCode('BEG_SAME_AS_OWN')    : $message = getMessage('BEG_SAME_UID_AS_OWN'); break;
                case getCode('LOGIN_FAILED')       : $message = getMessage('LOGIN_FAILED_GENERAL'); break;
-               case getCode('MODULE_MEM_ONLY')    : $message = getMaskedMessage('MODULE_MEM_ONLY', getRequestParameter('mod')); break;
+               case getCode('MODULE_MEMBER_ONLY') : $message = getMaskedMessage('MODULE_MEMBER_ONLY', getRequestParameter('mod')); break;
                case getCode('OVERLENGTH')         : $message = getMessage('MEMBER_TEXT_OVERLENGTH'); break;
                case getCode('URL_FOUND')          : $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); break;
                case getCode('SUBJ_URL')           : $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break;
-               case getCode('BLIST_URL')          : $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestParameter('blist'), 0); break;
+               case getCode('BLIST_URL')          : $message = '{--MEMBER_URL_BLACK_LISTED--}<br />{--MEMBER_BLIST_TIME--}: ' . generateDateTime(getRequestParameter('blist'), 0); break;
                case getCode('NO_RECS_LEFT')       : $message = getMessage('MEMBER_SELECTED_MORE_RECS'); break;
                case getCode('INVALID_TAGS')       : $message = getMessage('MEMBER_HTML_INVALID_TAGS'); break;
                case getCode('MORE_POINTS')        : $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); break;
@@ -3666,9 +3663,6 @@ function sendModeMails ($mod, $modes) {
                        // Load the data
                        $content = getUserDataArray();
 
-                       // Translate gender
-                       $content['gender'] = translateGender($content['gender']);
-
                        // Clear/init the content variable
                        $content['message'] = '';
 
index 50dbbab0ff51aa17c5ebe2438e7ca38a988dcf64..6cf9a06e830bcce65c33a795b55a0cb44bd8246e 100644 (file)
@@ -125,8 +125,8 @@ addMessages(array(
        'BEG_RALLYE_NO_ONE_JOINED' => "Niemand nimmt an der Bettel-Rallye dran teil, oder sie ist administrativ deaktiviert worden.",
        'ADMIN_BEG_RALLYE_DEACTIVATED' => "Bettel-Rallye nicht aktiviert.",
        'ADMIN_EDIT_BEG_RALLYE_NOTIFICATIONS' => "Benachrichtungen per Mail zur Bettel-Rallye",
-       'ADMIN_BEG_RAL_EN_NOTIFY' => "Benachtigen, wenn Bettel-Rallye aktiviert wurde?",
-       'ADMIN_BEG_RAL_DI_NOTIFY' => "Benachtigen, wenn Bettel-Rallye deaktiviert wurde?",
+       'ADMIN_BEG_RAL_ENABLE_NOTIFY' => "Benachtigen, wenn Bettel-Rallye aktiviert wurde?",
+       'ADMIN_BEG_RAL_DISABLE_NOTIFY' => "Benachtigen, wenn Bettel-Rallye deaktiviert wurde?",
        'ADMIN_BEG_NOTIFY_BONUS' => "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bettel-Rallye aktiviert wurde. <div class=\"admin_note\">(0 = Unverg&uuml;tete Benachrichtigung aussenden; nur in Verbindung mit der Erweiterung <strong>bonus!</strong>)</div>",
        'ADMIN_BEG_NEW_MEMBER_NOTIFY' => "Sollen neue Mitglieder mit selber Mail &uuml;ber eine laufende Bettel-Rallye benachrichtigt werden?",
        'ADMIN_BEG_NOTIFY_WAIT' => "Wie lange soll die Wartezeit der Bonus-Mail sein?",
@@ -138,8 +138,8 @@ addMessages(array(
        'ADMIN_TASK_LIST_BEG_TITLE' => "Es nehmen Mitglieder an der Bettel-Rallye dran teil.",
 
 // Subject lines
-       'BEG_RALLYE_EN_NOTIFY' => "HINWEIS: Eine Bettel-Rallye ist am Laufen.",
-       'BEG_RALLYE_DI_NOTIFY' => "HINWEIS: Eine Bettel-Rallye wurde gestoppt.",
+       'BEG_RALLYE_ENABLE_NOTIFY' => "HINWEIS: Eine Bettel-Rallye ist am Laufen.",
+       'BEG_RALLYE_DISABLE_NOTIFY' => "HINWEIS: Eine Bettel-Rallye wurde gestoppt.",
 ));
 
 // [EOF]
index 84eaf36674f7ed67932b7e98341c36d7c0dda2ed..6f051154d95dacbbc9b7202ab70799b0adba4329 100644 (file)
@@ -110,8 +110,8 @@ addMessages(array(
        'BONUS_MEMBER_TOTAL' => "Gesamtbonus aller teilnehmenden Mitglieder",
        'ADMIN_BONUS_RALLYE_DEACTIVATED' => "Aktiv-Rallye deaktiviert.",
        'ADMIN_BONUS_RALLYE_NOTIFTICATIONS' => "Benachrichtigungen per Mail &uuml;ber Bonus-Rallye",
-       'ADMIN_BONUS_RALLYE_EN_NOTIFY' => "Sollen die Mitglieder bei Aktivierung benachtichtigt werden?",
-       'ADMIN_BONUS_RALLYE_DI_NOTIFY' => "Sollen die Mitglieder bei Deaktivierung benachtichtigt werden?",
+       'ADMIN_BONUS_RALLYE_ENABLE_NOTIFY' => "Sollen die Mitglieder bei Aktivierung benachtichtigt werden?",
+       'ADMIN_BONUS_RALLYE_DISABLE_NOTIFY' => "Sollen die Mitglieder bei Deaktivierung benachtichtigt werden?",
        'ADMIN_BONUS_RALLYE_NOTIFY_POINTS' => "Bonus-Mail mit Anzahl {?POINTS?} aussenden, wenn Bonus-Rallye aktiviert wurde. <div class=\"tiny\">(0 = Unverg&uuml;tete Benachrichtigung aussenden)</div>",
        'ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY' => "Sollen neue Mitglieder mit selber Mail &uuml;ber eine laufende Bonus-Rallye benachrichtigt werden?",
        'ADMIN_BONUS_RALLYE_NOTIFY_WAIT' => "Wie lange soll die Wartezeit der Bonus-Mail sein?",
@@ -134,8 +134,8 @@ addMessages(array(
        'MEMBER_MAIL_BONUS_DETAILS_TITLE' => "Details zur Bonusmail <span class=\"data\">%s</span>:",
 
 // Subject lines
-       'BONUS_RALLYE_DI_NOTIFY' => "HINWEIS: Aktiv-Rallye gestoppt.",
-       'BONUS_RALLYE_EN_NOTIFY' => "HINWEIS: Aktiv-Rallye ist am Laufen.",
+       'BONUS_RALLYE_DISABLE_NOTIFY' => "HINWEIS: Aktiv-Rallye gestoppt.",
+       'BONUS_RALLYE_ENABLE_NOTIFY' => "HINWEIS: Aktiv-Rallye ist am Laufen.",
 ));
 
 // [EOF]
index 9c261f7db30224e36241c8dbaa672b1b7ef7c1ac..220016b4216279c27f24ecdf33476b82d98325bb 100644 (file)
@@ -316,7 +316,7 @@ addMessages(array(
        'LIFE_WEEKS' => "Woche(n)",
        'LIFE_MONTHS' => "Monat(e)",
        'LIFE_YEARS' => "Jahr(e)",
-       'MODULE_MEM_ONLY' => "Auf das ausgew&auml;hlte Modul <span class=\"data\">%s</span> d&uuml;rfen nur eingeloggte Mitglieder zugreifen.",
+       'MODULE_MEMBER_ONLY' => "Auf das ausgew&auml;hlte Modul <span class=\"data\">%s</span> d&uuml;rfen nur eingeloggte Mitglieder zugreifen.",
        'MEMBER_404_ACTION' => "Das Mitgliedsaktionsmodul <span class=\"data\">%s</span> ist nicht auffindbar.",
        'USERNAME_GUEST' => "Gast",
        'USERNAME_INSTALLER' => "Installation",
@@ -622,8 +622,8 @@ addMessages(array(
        'KBYTES' => "KBytes",
        'DEFAULT_SUBJECT_LINE' => "Klick-Mail von {?MAIN_TITLE?}",
        'MEBER_UPDATE_PWD_WRONG' => "Sie haben das falsche Passwort eingegeben! Bitte nochmal versuchen.",
-       'ADMIN_MEM_NO_CATS_1' => "Das Mitglied <u>",
-       'ADMIN_MEM_NO_CATS_2' => "</u> hat keine Kategorien ausgew&auml;hlt.",
+       'ADMIN_MEMBER_NO_CATS_1' => "Das Mitglied <u>",
+       'ADMIN_MEMBER_NO_CATS_2' => "</u> hat keine Kategorien ausgew&auml;hlt.",
        'USER_ID' => "Mitglied",
        'UNCONFIRMED_LINKS' => "Unbest&auml;tigte Mails",
        'ADMIN_MEMBER_LINKS' => "Das Mitglied <span class=\"data\">%s</span> hat alle seine Mails best&auml;tigt.",
index c8662e6dc74bf3777a0ebafd432555c4e0270ee1..acb09444c5c049133c79d66149084909a22c21c2 100644 (file)
@@ -51,7 +51,13 @@ function autostartReferalRallyes ($result) {
        SQL_FREERESULT($result);
 
        // Set notified to Y
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `notified`='Y' WHERE `id`=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_rallye_data`
+SET
+       `notified`='Y'
+WHERE
+       `id`=%s
+LIMIT 1",
                array(bigintval($id)), __FUNCTION__, __LINE__);
 
        // Transfer all neccessary data to the $content array
@@ -70,7 +76,14 @@ function autostartReferalRallyes ($result) {
        $content['prices'] = addReferalRallyePrices($id);
 
        // Query all users
-       $result_user = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", __FUNCTION__, __LINE__);
+       $result_user = SQL_QUERY("SELECT
+       `userid`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `status`='CONFIRMED'
+ORDER BY
+       `userid` ASC", __FUNCTION__, __LINE__);
 
        // Let's begin with the userids...
        while ($row = SQL_FETCHARRAY($result_user)) {
@@ -84,7 +97,14 @@ function autostartReferalRallyes ($result) {
                if (empty($cnt)) $cnt = '0'; // Added prevent some unknown troubles... :-?
 
                // Check if line is already included...
-               $result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s AND `userid`=%s LIMIT 1",
+               $result_ref = SQL_QUERY_ESC("SELECT
+       `id`
+FROM
+       `{?_MYSQL_PREFIX?}_rallye_users`
+WHERE
+       `rallye_id`=%s AND
+       `userid`=%s
+LIMIT 1",
                        array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_ref) == 0) {
                        // Free memory
@@ -104,8 +124,8 @@ WHERE
        d.max_mails > 0 AND
        d.mails_confirmed >= {?ref_payout?} AND
        p.ref_depth=1 AND
-       p.points > 0
-       AND d.userid=%s",
+       p.points > 0 AND
+       d.userid=%s",
                                array(bigintval($content['userid'])), __FUNCTION__, __LINE__);
 
                        // Get points
@@ -117,8 +137,11 @@ WHERE
                        if (empty($cpoints)) $cpoints = '0.00000';
 
                        // Add info line
-                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_users` (`rallye_id`, `userid`, `refs`, `curr_points`)
-VALUES (%s, %s, %s, %s)",
+                       SQL_QUERY_ESC("INSERT INTO
+       `{?_MYSQL_PREFIX?}_rallye_users`
+(`rallye_id`, `userid`, `refs`, `curr_points`)
+       VALUES
+(%s, %s, %s, %s)",
                                array(
                                        bigintval($id),
                                        bigintval($content['userid']),
@@ -151,10 +174,10 @@ VALUES (%s, %s, %s, %s)",
 }
 
 //
-function addReferalRallyePrices ($rallye, $mode='email') {
+function addReferalRallyePrices ($rallye, $mode = 'email') {
        // Output mode
        switch($mode) {
-               case 'email': $mode = "\n";     break;
+               case 'email': $mode = "\n";       break;
                case 'html' : $mode = "<br />\n"; break;
        } // END - switch
 
@@ -172,7 +195,8 @@ ORDER BY
        // Entries found?
        if (SQL_NUMROWS($result_prices) > 0) {
                // Load prices
-               if ($mode == "\n") $prices = "{--RALLYE_MEMBER_PRICES_ADDED--}:".$mode."------------------------------".$mode;
+               if ($mode == "\n") $prices = '{--RALLYE_MEMBER_PRICES_ADDED--}:' . $mode . '------------------------------' . $mode;
+
                $prices = '';
                while ($content = SQL_FETCHARRAY($result_prices)) {
                        $prices .= $content['price_level']. '{--RALLYE_PRICE--}: ';
@@ -200,11 +224,11 @@ ORDER BY
 
 //
 function addReferalRallyeTopUsers ($rallye, $default=0) {
+       // Init variables
+       $min_users = 0; $min_prices = 0;
+
        // First check how many prices are set
-       $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY price_level",
-               array(bigintval($rallye)), __FUNCTION__, __LINE__);
-       $prices = SQL_NUMROWS($result);
-       SQL_FREERESULT($result);
+       $prices = countSumTotalData($rallye, 'rallye_prices', 'id', 'rallye_id', true);
 
        // And load only limited users
        $result = SQL_QUERY_ESC("SELECT
@@ -220,18 +244,20 @@ LEFT JOIN
 ON
        u.rallye_id=rd.id
 WHERE
-       u.`rallye_id`=%s AND r.counter > 0
+       u.`rallye_id`=%s AND
+       r.counter > 0
 ORDER BY
        u.refs DESC",
                array(bigintval($rallye)), __FUNCTION__, __LINE__);
 
        // Load users
        $DATA = array(
-               'userid'   => array(),
-               'ref'      => array(),
-               'cpoints'  => array()
+               'userid'  => array(),
+               'ref'     => array(),
+               'cpoints' => array()
        );
 
+       // Load all users
        while ($content = SQL_FETCHARRAY($result)) {
                // Get current refs
                $cnt = getReferalRallyeRefsCount($content['userid'], $content['refs']);
@@ -284,37 +310,42 @@ LIMIT 1",
        array_pk_sort($DATA, array('ref', 'cpoints'), 0, 1, true);
 
        // Generate table
-       $OUT = loadTemplate('guest_rallye_header', true);
+       $OUT = '';
        $SW = 2;
        for ($idx = '0'; $idx < $prices; $idx++) {
                if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---';
                if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = '---';
-               // Add row
-               $OUT .= "<tr>
-  <td class=\"switch_sw".$SW." bottom\">".($idx+1).".</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom\">";
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '<strong>';
-               $OUT .= $DATA['userid'][$idx];
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '</strong>';
-               $OUT .= "</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom\">";
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '<strong>';
-               $OUT .= $DATA['ref'][$idx];
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '</strong>';
-               $OUT .= "</td>
-</tr>\n";
+
+               // Prepare marking of default (maybe current user's) id
+               $start = ''; $end = '';
+               if (($DATA['userid'][$idx] == $default) && ($default > 0)) {
+                       $start = '<strong>';
+                       $end   = '</strong>';
+               } // END - if
+
+               // Prepare content
+               $content = array(
+                       'sw'     => $SW,
+                       'idx'    => ($idx + 1),
+                       'start'  => $start,
+                       'end'    => $end,
+                       'userid' => $DATA['userid'][$idx],
+                       'ref'    => $DATA['ref'][$idx],
+                       'info'   => ''
+               );
+
+               // Load row template and switch color
+               $OUT .= loadTemplate('guest_rallye_row', true, $content);
                $SW = 3 - $SW;
        } // END - for
 
        // Add min_prices/users
+       $content['rows']       = $OUT;
        $content['min_prices'] = bigintval($min_prices);
        $content['min_users']  = bigintval($min_users);
 
-       // Add footer
-       $OUT .= loadTemplate('guest_rallye_footer', true, $content);
-
        // And finnally return the output
-       return $OUT;
+       return loadTemplate('guest_rallye', true, $content);
 }
 
 // Run this function only when a new member has confirmed his email address!
@@ -323,7 +354,7 @@ function addUserToReferalRallye ($userid, $content = array()) {
 
        // Updated extension?
        if (isExtensionInstalledAndNewer('rallye', '0.2.0')) {
-               $add .= ", `min_users`, `min_prices`";
+               $add .= ', `min_users`, `min_prices`';
        } // END - if
 
        // Check for an auto-add rallye
@@ -374,7 +405,14 @@ LIMIT 1", __FUNCTION__, __LINE__);
                } // END - if
 
                // Check if line is already included...
-               $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s AND `userid`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT
+       `id`
+FROM
+       `{?_MYSQL_PREFIX?}_rallye_users`
+WHERE
+       `rallye_id`=%s AND
+       `userid`=%s
+LIMIT 1",
                        array(
                                bigintval($id),
                                bigintval($userid)
@@ -383,8 +421,11 @@ LIMIT 1", __FUNCTION__, __LINE__);
                // Is this user added?
                if (SQL_NUMROWS($result) < 1) {
                        // Add userid and his ref count to table
-                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_users` (`rallye_id`, `userid`, `refs`)
-VALUES ('%s','%s',0)",
+                       SQL_QUERY_ESC("INSERT INTO
+       `{?_MYSQL_PREFIX?}_rallye_users`
+(`rallye_id`, `userid`, `refs`)
+       VALUES
+(%s,%s,0)",
                                array(
                                        bigintval($id),
                                        bigintval($userid)
@@ -410,7 +451,8 @@ function markReferalRallyesAsExpired ($result) {
        $prices = getArrayFromReferalRallyeUsers($id);
 
        // Init array
-       $DATA = array(); $cnt = '0';
+       $DATA = array();
+       $cnt = '0';
        $users = array();
        $DATA['title']  = $title;
        $DATA['start']  = generateDateTime($start, 1);
@@ -422,17 +464,8 @@ function markReferalRallyesAsExpired ($result) {
        foreach($prices['userid'] as $key => $userid) {
                // Check status
                //   active = 1: account is still confirmed
-               //   active = '0': account is deleted or locked
-               $result = SQL_QUERY_ESC("SELECT
-       COUNT(`userid`) AS active
-FROM
-       `{?_MYSQL_PREFIX?}_user_data`
-WHERE
-       `userid`=%s AND `status`='CONFIRMED'
-LIMIT 1",
-                       array(bigintval($userid)), __FUNCTION__, __LINE__);
-               list($active) = SQL_FETCHROW($result);
-               SQL_FREERESULT($result);
+               //   active = 0: account is deleted or locked
+               $active = countSumTotalData($DATA['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'");
 
                $prices['active'][$key] = $active;
 
@@ -531,8 +564,20 @@ function getReferalRallyeUserDataFromArray ($userIds) {
        $ret = '';
 
        // Load users
-       $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` IN(%s) AND `status`='CONFIRMED' ORDER BY `userid` ASC LIMIT %s",
-               array($userid_string, count($userIds)), __FUNCTION__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT
+       `userid`, `gender`, `surname`, `family`, `email`
+FROM
+       `{?_MYSQL_PREFIX?}_user_data`
+WHERE
+       `userid` IN(%s) AND
+       `status`='CONFIRMED'
+ORDER BY
+       `userid` ASC
+LIMIT %s",
+               array(
+                       $userid_string,
+                       count($userIds)
+               ), __FUNCTION__, __LINE__);
        while ($content = SQL_FETCHARRAY($result)) {
                // Construct the message masked and add it
                $ret .= sprintf("%s %s %s (%s) - %s\n",
@@ -558,8 +603,15 @@ function getArrayFromReferalRallyePrices ($rallye) {
        );
 
        // Load prices
-       $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY price_level",
-       array(bigintval($rallye)), __FUNCTION__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT
+       `price_level`, `points`, `info`
+FROM
+       `{?_MYSQL_PREFIX?}_rallye_prices`
+WHERE
+       `rallye_id`=%s
+ORDER BY
+       `price_level` ASC",
+               array(bigintval($rallye)), __FUNCTION__, __LINE__);
 
        // Transfer elements
        while ($content = SQL_FETCHARRAY($result)) {
@@ -582,7 +634,7 @@ function getArrayFromReferalRallyeUsers ($rallye) {
 
        // Init multi array
        $users = array(
-               'userid'     => array(),
+               'userid'  => array(),
                'ref'     => array(),
                'cpoints' => array(),
        );
@@ -623,7 +675,7 @@ LIMIT 1",
                if (empty($refpoints)) $refpoints = '0';
 
                // Store calculated new refs to array
-               $users['userid'][]     = $content['userid'];
+               $users['userid'][]  = $content['userid'];
                $users['ref'][]     = abs($cnt - $content['refs']);
                $users['cpoints'][] = $refpoints - $content['curr_points'];
        } // END - while
@@ -632,7 +684,7 @@ LIMIT 1",
        SQL_FREERESULT($result_user);
 
        // Sort array for refs (descending)
-       array_pk_sort($users, array("ref", "cpoints"), 0, 1, true);
+       array_pk_sort($users, array('ref', 'cpoints'), 0, 1, true);
 
        // Load prices array (!)
        $prices = getArrayFromReferalRallyePrices($rallye);
@@ -653,7 +705,7 @@ LIMIT 1",
        return $prices;
 }
 
-//
+// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
 function addReferalRallyeWinners ($rallye, $default=0) {
        // First check how many prices are set
        $result_prices = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY `price_level` ASC",
@@ -665,12 +717,11 @@ function addReferalRallyeWinners ($rallye, $default=0) {
        $DATA = getArrayFromReferalRallyeUsers($rallye);
 
        // Generate table
-       $OUT = loadTemplate('guest_rallye_expired_header', true);
-       $SW = 2;
+       $OUT = ''; $SW = 2;
        for ($idx = '0'; $idx < $prices; $idx++) {
                // Check status
                //   active = 1: account is still confirmed
-               //   active = '0': account is deleted or locked
+               //   active = 0: account is deleted or locked
                $active = countSumTotalData($DATA['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'");
 
                if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---';
@@ -688,43 +739,51 @@ function addReferalRallyeWinners ($rallye, $default=0) {
                        $DATA['infos'][$idx] = $DATA['points'][$idx] . ' {?POINTS?}';
                }
 
-               // Add row
-               $add = '';
-               $OUT .= "<tr>
-  <td class=\"switch_sw".$SW." bottom".$add."\">".($idx+1).".</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom".$add."\">";
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '<strong>';
-               $OUT .= $DATA['userid'][$idx];
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '</strong>';
-               $OUT .= "</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom".$add."\">";
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '<strong>';
-               $OUT .= $DATA['ref'][$idx];
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '</strong>';
-               $OUT .= "</td>
-  <td align=\"center\" class=\"switch_sw".$SW." bottom".$add."\">";
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '<strong>';
-               $OUT .= $DATA['infos'][$idx];
-               if (($DATA['userid'][$idx] == $default) && ($default > 0)) $OUT .= '</strong>';
-               $OUT .= "</td>
-</tr>\n";
+               // Prepare marking of default (maybe current user's) id
+               $start = ''; $end = '';
+               if (($DATA['userid'][$idx] == $default) && ($default > 0)) {
+                       $start = '<strong>';
+                       $end   = '</strong>';
+               } // END - if
+
+               // Prepare content
+               $content = array(
+                       'sw'     => $SW,
+                       'idx'    => ($idx + 1),
+                       'userid' => $DATA['userid'][$idx],
+                       'ref'    => $DATA['ref'][$idx],
+                       'infos'  => $DATA['infos'][$idx],
+                       'start'  => $start,
+                       'end'    => $end
+               );
+
+               // Load row template
+               $OUT .= loadTemplate('guest_rallye_row', true, $content);
                $SW = 3 - $SW;
        } // END - for
 
-       // Add footer
-       $OUT .= loadTemplate('guest_rallye_expired_footer', true);
+       // Prepare content
+       $content = array(
+               'rows'       => $OUT,
+               'min_users'  => '???',
+               'min_prices' => '???'
+       );
 
-       // And finnally return the output
-       return $OUT;
+       // Load main template and finnally return the output
+       return loadTemplate('guest_rallye', true, $content);
 }
 
 //
 function purgeExpiredReferalRallyes () {
        // Check for expired rallyes
        $EXPIRE = 3; // @TODO The hard-coded value...
-       $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time
-FROM `{?_MYSQL_PREFIX?}_rallye_data`
-WHERE end_time <= (UNIX_TIMESTAMP() - {?ONE_DAY?} - %s) AND expired='Y'",
+       $result_rallye = SQL_QUERY_ESC("SELECT
+       `id`, `title`, `start_time`, `end_time`
+FROM
+       `{?_MYSQL_PREFIX?}_rallye_data`
+WHERE
+       `end_time` <= (UNIX_TIMESTAMP() - {?ONE_DAY?} - %s) AND
+       `expired`='Y'",
                array($EXPIRE), __FUNCTION__, __LINE__);
 
        if (SQL_NUMROWS($result_rallye) > 0) {
index 9218d5e93dcf422b14e147c7c123f29a95ae1063..211f98465363efbdcf4bdda0951ddec9e90df8d6 100644 (file)
@@ -310,8 +310,8 @@ function doRegistration () {
        // First comes first: begging rallye
        if (isExtensionInstalledAndNewer('beg', '0.1.7')) {
                // Okay, shall I disable now?
-               if (getConfig('beg_new_mem_notify') != 'Y') {
-                       $GLOBALS['register_sql_columns'] .= ', `beg_ral_notify`, `beg_ral_en_notify`';
+               if (getConfig('beg_new_member_notify') != 'Y') {
+                       $GLOBALS['register_sql_columns'] .= ', `beg_ral_notify`, `beg_ral_enable_notify`';
                        $GLOBALS['register_sql_data']    .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()';
                } // END - if
        } // END - if
@@ -319,8 +319,8 @@ function doRegistration () {
        // Second: active rallye
        if (isExtensionInstalledAndNewer('bonus', '0.7.7')) {
                // Okay, shall I disable now?
-               if (getConfig('bonus_new_mem_notify') != 'Y') {
-                       $GLOBALS['register_sql_columns'] .= ', `bonus_ral_notify`, `bonus_ral_en_notify`';
+               if (getConfig('bonus_new_member_notify') != 'Y') {
+                       $GLOBALS['register_sql_columns'] .= ', `bonus_ral_notify`, `bonus_ral_enable_notify`';
                        $GLOBALS['register_sql_data']    .= ', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()';
                } // END - if
        } // END - if
index 983a46b9685115caef2efbedd2e14211a494e18c..180086fc8c1832db9df087f895bf9978418c30a6 100644 (file)
@@ -434,7 +434,7 @@ function saveSponsorData ($postData, $content) {
        $sql = substr($sql, 0, -1);
 
        // Add SQL tail data
-       $sql .= " WHERE `id`='%s' AND password='%s' LIMIT 1";
+       $sql .= " WHERE `id`=%s AND password='%s' LIMIT 1";
        $DATA[] = bigintval(getSession('sponsorid'));
        $DATA[] = getSession('sponsorpass');
 
@@ -481,22 +481,23 @@ function saveSponsorData ($postData, $content) {
                        $content['new_data'] = $postData;
 
                        // Translate some data
-                       if (isset($content['gender']))             $content['gender']                  = translateGender($content['gender']);
-                       if (isset($content['new_data']['gender'])) $content['new_data']['gender']      = translateGender($content['new_data']['gender']);
-                       if (isset($content['receive_warnings']))   $content['new_data']['receive']     = translateYesNo($content['new_data']['receive_warnings']);
-                       if (isset($content['warning_interval']))   $content['new_data']['interval']    = createFancyTime($content['new_data']['warning_interval']);
+                       if (isset($content['gender']))             $content['gender']               = translateGender($content['gender']);
+                       if (isset($content['new_data']['gender'])) $content['new_data']['gender']   = translateGender($content['new_data']['gender']);
+                       if (isset($content['receive_warnings']))   $content['new_data']['receive']  = translateYesNo($content['new_data']['receive_warnings']);
+                       if (isset($content['warning_interval']))   $content['new_data']['interval'] = createFancyTime($content['new_data']['warning_interval']);
 
                        // Send email to admins
                        sendAdminNotification($subj, $templ, $content);
 
                        // Shall we send mail to the sponsor's new email address?
                        if ($content['receive_warnings'] == 'Y') {
-                               // Okay send email with confirmation link to new address and with no confirmation link
-                               // to the old address
+                               /*
+                                * Okay send email with confirmation link to new address and with no confirmation link
+                                * to the old address.
+                                */
 
                                // First to old address
-                               switch (getWhat())
-                               {
+                               switch (getWhat()) {
                                        case 'account': // Change account data
                                                $email_msg = loadEmailTemplate('sponsor_change_data', $content);
                                                sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg);
@@ -508,7 +509,7 @@ function saveSponsorData ($postData, $content) {
                                                        // Second mail goes to the new address
                                                        $email_msg = loadEmailTemplate('sponsor_change_email', $content);
                                                        sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg);
-                                               }
+                                               } // END - if
                                                break;
 
                                        case 'settings': // Change settings
@@ -516,7 +517,7 @@ function saveSponsorData ($postData, $content) {
                                                $email_msg = loadEmailTemplate('sponsor_settings', $content);
                                                sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg);
                                                break;
-                               }
+                               } // END - switch
                        } // END - if
                } // END - if
        } // END - if
index 4dcba25b0d53479ea2b44449ae4da86b898230cb..d81f507a1eaa93f5d92a4fde34abe9f6879e35b4 100644 (file)
@@ -55,10 +55,10 @@ $sql = ''; $mode = '';
 $sql = "SELECT `userid`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE (`beg_ral_notify` ";
 switch (getConfig('beg_rallye')) {
        case 'Y': // Begging rallye is activated
-               if (getConfig('beg_ral_en_notify') == 'Y') {
+               if (getConfig('beg_ral_enable_notify') == 'Y') {
                        // Okay, let's check for member accounts
-                       $sql .= '= 0 OR (`beg_ral_notify` > 0 AND `beg_ral_en_notify` < `beg_ral_di_notify`)';
-                       $mode = 'en';
+                       $sql .= '= 0 OR (`beg_ral_notify` > 0 AND `beg_ral_enable_notify` < `beg_ral_disable_notify`)';
+                       $mode = 'enable';
                } else {
                        // Do not notify!
                        $sql = '';
@@ -66,10 +66,10 @@ switch (getConfig('beg_rallye')) {
                break;
 
        case 'N': // Begging rallye is deactivated
-               if (getConfig('beg_ral_di_notify') == 'Y') {
+               if (getConfig('beg_ral_disable_notify') == 'Y') {
                        // Okay, let's check for member accounts
-                       $sql .= ' > 0 AND `beg_ral_di_notify` < `beg_ral_en_notify`';
-                       $mode = 'di';
+                       $sql .= ' > 0 AND `beg_ral_disable_notify` < `beg_ral_enable_notify`';
+                       $mode = 'disable';
                } else {
                        // Do not notify!
                        $sql = '';
@@ -93,13 +93,13 @@ if (!empty($sql)) {
        $result_main = SQL_QUERY($sql, __FILE__, __LINE__);
        if (SQL_NUMROWS($result_main) > 0) {
                // Normal notification mails or bonus mails?
-               $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($mode == "en") && (isExtensionActive('bonus')));
+               $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($mode == 'enable') && (isExtensionActive('bonus')));
 
                // Generate subject line
                $subject = getMessage('BEG_RALLYE_'.strtoupper($mode).'_NOTIFY');
 
                // Load message body for bonus mails
-               $message = loadEmailTemplate('beg_en_notify_body', '', '{PER}userid{PER}');
+               $message = loadEmailTemplate('beg_enable_notify_body', '', '{PER}userid{PER}');
                $receiver = ''; $userids = array();
 
                // Okay lets notify all users!
index a74c21a33792ab8484e2874c356f114bc2ab5b90..80c2558a52b32de4a5066f2f4e011bb42bdcfeb3 100644 (file)
@@ -56,10 +56,10 @@ $sql = "SELECT `userid`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE (`bonu
 switch (getConfig('bonus_active'))
 {
        case 'Y': // Active rallye is activated
-               if (getConfig('bonus_en_notify') == 'Y') {
+               if (getConfig('bonus_enable_notify') == 'Y') {
                        // Okay, let's check for member accounts
-                       $sql .= '= 0 OR (`bonus_ral_notify` > 0 AND `bonus_ral_en_notify` < `bonus_ral_di_notify`)';
-                       $mode = 'en';
+                       $sql .= '= 0 OR (`bonus_ral_notify` > 0 AND `bonus_ral_enable_notify` < `bonus_ral_disable_notify`)';
+                       $mode = 'enable';
                } else {
                        // Do not notify!
                        $sql = '';
@@ -67,10 +67,10 @@ switch (getConfig('bonus_active'))
                break;
 
        case 'N': // Active rallye is deactivated
-               if (getConfig('bonus_di_notify') == 'Y') {
+               if (getConfig('bonus_disable_notify') == 'Y') {
                        // Okay, let's check for member accounts
-                       $sql .= ' > 0 AND `bonus_ral_di_notify` < `bonus_ral_en_notify`';
-                       $mode = 'di';
+                       $sql .= ' > 0 AND `bonus_ral_disable_notify` < `bonus_ral_enable_notify`';
+                       $mode = 'disable';
                } else {
                        // Do not notify!
                        $sql = '';
@@ -83,13 +83,13 @@ if (!empty($sql)) {
        $sql .= ") AND `status`='CONFIRMED' ORDER BY `last_online` ASC";
 
        // Normal notification mails or bonus mails?
-       $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == "en") && (isExtensionActive('bonus')));
+       $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == 'enable') && (isExtensionActive('bonus')));
 
        // Generate subject line
        $subject = getMessage('BONUS_RALLYE_' . strtoupper($mode).'_NOTIFY');
 
        // Load message body for bonus mails
-       $message = loadEmailTemplate('bonus_en_notify_body', '', '{PER}userid{PER}');
+       $message = loadEmailTemplate('bonus_enable_notify_body', '', '{PER}userid{PER}');
        $receiver = ''; $userids = array();
 
        // Check for accounts to be notified
index d164cc4d0a326adae7614a0629a623552f539d0c..7d9852c40a6decbdc0f82ca2a60d144f8ddcb775 100644 (file)
@@ -55,9 +55,9 @@ if (isFormSent()) {
        adminSaveSettingsFromPostData();
 
        // Remember new settings
-       setConfigEntry('beg_rallye'       , postRequestParameter('beg_rallye'));
-       setConfigEntry('beg_ral_en_notify', postRequestParameter('beg_ral_en_notify'));
-       setConfigEntry('beg_ral_di_notify', postRequestParameter('beg_ral_di_notify'));
+       setConfigEntry('beg_rallye'            , postRequestParameter('beg_rallye'));
+       setConfigEntry('beg_ral_enable_notify' , postRequestParameter('beg_ral_enable_notify'));
+       setConfigEntry('beg_ral_disable_notify', postRequestParameter('beg_ral_disable_notify'));
 } else {
        // Prepare constants for the template
        $content['points']           = translateComma(getConfig('beg_points')      , false);
@@ -69,19 +69,27 @@ if (isFormSent()) {
        $content['wait_selection']   = createTimeSelections(getConfig('beg_notify_wait')   , 'beg_notify_wait'   , 'ms' );
 
        // Init all Y/N selections
-       foreach (array('rallye','activate','mode','ral_en_notify','ral_di_notify','new_mem_notify','include_own') as $entry) {
+       foreach (array('rallye', 'active', 'mode', 'ral_enable_notify', 'ral_disable_notify', 'new_member_notify', 'include_own') as $entry) {
                $content[$entry . '_y'] = '';
                $content[$entry . '_n'] = '';
                $content[$entry . '_' . strtolower(getConfig('beg_' . $entry))] = ' checked="checked"';
        } // END - foreach
 
-       // Init elements
-       foreach (array('pay_mode_img','pay_mode_js','pay_mode_both','pay_mode_none') as $key) {
-               $content[$entry]  = '';
+       // Init elements for faker-mode
+       foreach (array('pay_mode_img','pay_mode_js','pay_mode_both','pay_mode_none') as $entry) {
+               $content[$entry] = '';
        } // END - foreach
 
-       // Set pay mode
-       $content['pay_mode_'.strtolower(getConfig('beg_pay_mode'))] = ' selected="selected"';
+       // Set default faker-mode
+       $content['pay_mode_' . strtolower(getConfig('beg_pay_mode'))] = ' selected="selected"';
+
+       // Init beg_mode elements
+       foreach (array('direct', 'ref') as $entry) {
+               $content['beg_mode_' . $entry] = '';
+       } // END - foreach
+
+       // Set default mode
+       $content['beg_mode_' . strtolower(getConfig('beg_mode'))] = ' checked="checked"';
 
        // Member selection box
        $content['member_selection'] = addMemberSelectionBox(getConfig('beg_userid'), false, true, true, 'beg_userid');
index fc320e7d81dad06f071dd8acf4fc98bfd9d0d160..b6750d4f71e8a31feae45dd461f4efd3a3a30220 100644 (file)
@@ -70,9 +70,9 @@ if (isFormSent()) {
        adminSaveSettingsFromPostData();
 
        // Remember new settings
-       setConfigEntry('bonus_active'   , postRequestParameter('bonus_active'));
-       setConfigEntry('bonus_en_notify', postRequestParameter('bonus_en_notify'));
-       setConfigEntry('bonus_di_notify', postRequestParameter('bonus_di_notify'));
+       setConfigEntry('bonus_active'        , postRequestParameter('bonus_active'));
+       setConfigEntry('bonus_enable_notify' , postRequestParameter('bonus_enable_notify'));
+       setConfigEntry('bonus_disable_notify', postRequestParameter('bonus_disable_notify'));
 } else {
        // Prepare contants for the template
        $content['login']  = translateComma(getConfig('login_bonus')        , false);
@@ -119,7 +119,7 @@ if (isFormSent()) {
        $content['wait_selection']          = createTimeSelections(getConfig('bonus_notify_wait'), 'bonus_notify_wait', 'ms' );
 
        // Init Y/N selections
-       foreach (array('active','login_yn','stats_yn','order_yn','ref_yn','click_yn','en_notify','di_notify','new_mem_notify','include_own') as $entry) {
+       foreach (array('active','login_yn','stats_yn','order_yn','ref_yn','click_yn','enable_notify','disable_notify','new_member_notify','include_own') as $entry) {
                $content[$entry . '_y'] = '';
                $content[$entry . '_n'] = '';
                $content[$entry . '_' . strtolower(getConfig('bonus_' . $entry))] = ' checked="checked"';
index c10ec781d71edebef4de70d8331e55b80a0fb945..dfc67aa21eb2afda78f0d4e714adc94350850b2d 100644 (file)
@@ -309,16 +309,11 @@ LIMIT 1",
 
                        // Transfer data to array
                        $content['sw']             = $SW;
-                       $content['userid_link']    = generateUserProfileLink($content['userid']);
-                       $content['gender']         = translateGender($content['gender']);
                        $content['email']          = '[<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['email'] . '</a>]';
                        $content['alinks']         = generateMemberAdminActionLinks($content['userid'], $content['status']);
-                       $content['points']         = translateComma($content['points']);
-                       $content['rate']           = translateComma($content['rate']);
-                       $content['locked']         = translateComma(countSumTotalData($content['userid'], 'user_points', 'locked_points'));
                        $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], 2);
-                       $content['status']         = translateUserStatus($content['status']);
                        $content['refs']           = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', true);
+                       $content['locked']         = countSumTotalData($content['userid'], 'user_points', 'locked_points');
 
                        // If we have at least one referal, make it clickable to referal list
                        if ($content['refs'] > 0) $content['refs'] = $base . '&amp;what=list_refs&amp;userid=' . $content['userid'] . '%}">' . $content['refs'] . '</a>]';
index e03e32b54794ca49d3a9ad1dd22dec974608cc4f..a37888155c6c1c87cc674cdf27dafea8d025126a 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
        die();
 } elseif (!isMember()) {
        $url = 'modules.php?module=index';
-       if (checkModulePermissions('login') == 'mem_only') $url .= '&amp;code=' . getCode('MODULE_MEM_ONLY') . '&amp;mod=' . getModule();
+       if (checkModulePermissions('login') == 'mem_only') $url .= '&amp;code=' . getCode('MODULE_MEMBER_ONLY') . '&amp;mod=' . getModule();
        redirectToUrl($url);
 } // END - if
 
index 70967c9f6aea2a35932c50fd1241cb2e901ce143..fcfa29aefd879c8a10ff89d3a3c4ae0f825fdce9 100644 (file)
@@ -100,15 +100,14 @@ if ((isFormSent('edit')) && (isPostRequestParameterSet('id'))) {
 } // END - if
 
 // Load all referal levels
-$result = SQL_QUERY_ESC("SELECT
+$result = SQL_QUERY('SELECT
        r.level, r.percents
 FROM
        `{?_MYSQL_PREFIX?}_refdepths` AS r
 WHERE
        r.level > 0
 ORDER BY
-       r.level ASC",
-       array(getMemberId()), __FILE__, __LINE__);
+       r.level ASC', __FILE__, __LINE__);
 
 // Are there some entries? (Shall be!)
 if (SQL_NUMROWS($result) > 0) {
@@ -145,7 +144,7 @@ if (SQL_NUMROWS($result) > 0) {
                } // END - foreach
 
                // Remember the content
-               $content['rows']     = $rows;
+               $content['rows'] = $rows;
 
                // Load level template
                $OUT .= loadTemplate('member_refback_list_level', true, $content);
index 89ebde56c9ce83bf7d29eb90251928b6d097c64c..5bc89a05f366da844c18161cb7be874616a5460b 100644 (file)
@@ -697,7 +697,7 @@ function addPointsDirectly ($subject, $userid, $points) {
 // Wrapper function to redirect from member-only modules to index
 function redirectToIndexMemberOnlyModule () {
        // Do the redirect here
-       redirectToUrl('modules.php?module=index&code=' . getCode('MODULE_MEM_ONLY') . '&mod=' . getModule());
+       redirectToUrl('modules.php?module=index&code=' . getCode('MODULE_MEMBER_ONLY') . '&mod=' . getModule());
 }
 
 // Wrapper function to redirect to current URL
index fe6b508a80bcf9d4ad3f11fe43cbb6d147fb8298..a6eb714ec53faae9e9585d5e49d6cb8d74ca0f49 100644 (file)
@@ -79,15 +79,18 @@ if ((getRequestParameter('userid') > 0) && (getRequestParameter('d') > 0) && (is
        // Valid type?
        if (!empty($t)) {
                // Check for data
-               $result = SQL_QUERY_ESC("SELECT d.gender, d.surname, d.family, b.level, b.points
+               $result = SQL_QUERY_ESC("SELECT
+       d.`gender`, d.`surname`, d.`family`, b.`level`, b.`points`
 FROM
        `{?_MYSQL_PREFIX?}_user_data` AS d
-RIGHT JOIN
+INNER JOIN
        `{?_MYSQL_PREFIX?}_bonus_turbo` AS b
 ON
-       d.userid=b.userid
+       d.`userid`=b.`userid`
 WHERE
-       d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s
+       d.`status`='CONFIRMED' AND
+       d.`userid`=%s AND
+       b.`%s`=%s
 LIMIT 1",
                        array(
                                bigintval(getRequestParameter('userid')),
@@ -101,8 +104,7 @@ LIMIT 1",
                        $content = SQL_FETCHARRAY($result);
 
                        // Prepare constants for the pre-template
-                       $content['gender'] = translateGender($content['gender']);
-                       $content['points'] = translateComma($content['points']);
+                       // @TODO No more needed? $content['points'] = translateComma($content['points']);
                        $content['mailid'] = bigintval(getRequestParameter('d'));
                        $content['rows']   = addBonusRanks(bigintval(getRequestParameter('d')), $t, bigintval(getRequestParameter('userid')));
 
index dfadb8db78ade02751a4a759455d7e1a3614ddd5..26ce0d869db7ce1e662e2d541839733b1069032a 100644 (file)
        </tr>
        <tr>
                <td class="bottom" align="right" height="20">
-                       <input type="radio" name="beg_mode" class="admin_normal" value="DIRECT"$content[mode_direct] /> {--BEG_MODE_DIRECT--}
+                       <input type="radio" name="beg_mode" class="admin_normal" value="DIRECT"$content[beg_mode_direct] /> {--BEG_MODE_DIRECT--}
                </td>
                <td class="bottom" align="center">
-                       <input type="radio" name="beg_mode" class="admin_normal" value="REF"$content[mode_ref] /> {--BEG_MODE_REF--}
+                       <input type="radio" name="beg_mode" class="admin_normal" value="REF"$content[beg_mode_ref] /> {--BEG_MODE_REF--}
                </td>
        </tr>
        <tr>
        </tr>
        <tr>
                <td align="right" height="20">
-                       {--ADMIN_BEG_RAL_EN_NOTIFY--}
+                       {--ADMIN_BEG_RAL_ENABLE_NOTIFY--}
                </td>
                <td align="center">
-                       <input type="radio" name="beg_ral_en_notify" class="admin_normal" value="Y"$content[ral_enable_notify_y] /> {--YES--}<br />
-                       <input type="radio" name="beg_ral_en_notify" class="admin_normal" value="N"$content[ral_enable_notify_n] /> {--NO--}
+                       <input type="radio" name="beg_ral_enable_notify" class="admin_normal" value="Y"$content[ral_enable_notify_y] /> {--YES--}<br />
+                       <input type="radio" name="beg_ral_enable_notify" class="admin_normal" value="N"$content[ral_enable_notify_n] /> {--NO--}
                </td>
        </tr>
        <tr>
                <td align="right" height="20">
-                       {--ADMIN_BEG_RAL_DI_NOTIFY--}
+                       {--ADMIN_BEG_RAL_DISABLE_NOTIFY--}
                </td>
                <td align="center">
-                       <input type="radio" name="beg_ral_di_notify" class="admin_normal" value="Y"$content[ral_disable_notify_y] /> {--YES--}<br />
-                       <input type="radio" name="beg_ral_di_notify" class="admin_normal" value="N"$content[ral_disable_notify_n] /> {--NO--}
+                       <input type="radio" name="beg_ral_disable_notify" class="admin_normal" value="Y"$content[ral_disable_notify_y] /> {--YES--}<br />
+                       <input type="radio" name="beg_ral_disable_notify" class="admin_normal" value="N"$content[ral_disable_notify_n] /> {--NO--}
                </td>
        </tr>
        <tr>
                        {--ADMIN_BEG_NEW_MEMBER_NOTIFY--}
                </td>
                <td align="center">
-                       <input type="radio" name="beg_new_mem_notify" class="admin_normal" value="Y"$content[new_member_notify_y] /> {--YES--}<br />
-                       <input type="radio" name="beg_new_mem_notify" class="admin_normal" value="N"$content[new_member_notify_n] /> {--NO--}
+                       <input type="radio" name="beg_new_member_notify" class="admin_normal" value="Y"$content[new_member_notify_y] /> {--YES--}<br />
+                       <input type="radio" name="beg_new_member_notify" class="admin_normal" value="N"$content[new_member_notify_n] /> {--NO--}
                </td>
        </tr>
        <tr>
                </td>
        </tr>
        <tr>
-               <td align="right" height="20">
+               <td class="bottom" align="right" height="20">
                        {--ADMIN_BEG_NOTIFY_WAIT--}
                </td>
-               <td align="center">
+               <td class="bottom" align="center">
                        $content[wait_selection]
                </td>
        </tr>
index d3fdcfea06587c086c625b2e42690498c6c72256..7eff97be465a400a0f705d0239e0d2999558132e 100644 (file)
        </tr>
        <tr>
                <td align="right">
-                       {--ADMIN_BONUS_RALLYE_EN_NOTIFY--}
+                       {--ADMIN_BONUS_RALLYE_ENABLE_NOTIFY--}
                </td>
                <td align="center">
-                       <input type="radio" name="bonus_en_notify" class="admin_normal" value="Y"$content[en_notify_y] /> {--YES--}<br />
-                       <input type="radio" name="bonus_en_notify" class="admin_normal" value="N"$content[en_notify_n] /> {--NO--}
+                       <input type="radio" name="bonus_enable_notify" class="admin_normal" value="Y"$content[enable_notify_y] /> {--YES--}<br />
+                       <input type="radio" name="bonus_enable_notify" class="admin_normal" value="N"$content[enable_notify_n] /> {--NO--}
                </td>
        </tr>
        <tr>
                <td align="right">
-                       {--ADMIN_BONUS_RALLYE_DI_NOTIFY--}
+                       {--ADMIN_BONUS_RALLYE_DISABLE_NOTIFY--}
                </td>
                <td align="center">
-                       <input type="radio" name="bonus_di_notify" class="admin_normal" value="Y"$content[di_notify_y] /> {--YES--}<br />
-                       <input type="radio" name="bonus_di_notify" class="admin_normal" value="N"$content[di_notify_n] /> {--NO--}
+                       <input type="radio" name="bonus_disable_notify" class="admin_normal" value="Y"$content[disable_notify_y] /> {--YES--}<br />
+                       <input type="radio" name="bonus_disable_notify" class="admin_normal" value="N"$content[disable_notify_n] /> {--NO--}
                </td>
        </tr>
        <tr>
                        {--ADMIN_BONUS_RALLYE_NEW_MEMBER_NOTIFY--}
                </td>
                <td align="center">
-                       <input type="radio" name="bonus_new_mem_notify" class="admin_normal" value="Y"$content[new_mem_notify_y] /> {--YES--}<br />
-                       <input type="radio" name="bonus_new_mem_notify" class="admin_normal" value="N"$content[new_mem_notify_n] /> {--NO--}
+                       <input type="radio" name="bonus_new_member_notify" class="admin_normal" value="Y"$content[new_member_notify_y] /> {--YES--}<br />
+                       <input type="radio" name="bonus_new_member_notify" class="admin_normal" value="N"$content[new_member_notify_n] /> {--NO--}
                </td>
        </tr>
        <tr>
index 906a7cd067f5be1172919306c4394d87974b9e0f..f8231c5ee48b8a3aa7e556510a1dc99ffbef420a 100644 (file)
@@ -1,22 +1,28 @@
 <div align="center">
 <form accept-charset="utf-8" action="{%url=modules.php?module=admin&amp;what=del_user&amp;userid=$content[userid]%}" method="post">
+
 <div class="admin_table dashed">
        <div align="center" class="admin_title bottom">
                <strong>$content[header]</strong>
        </div>
+
        <div align="center">
                $content[text]
        </div>
+
        <div align="center">
                [&nbsp;<a href="$content[email]">$content[surname] $content[family]</a>&nbsp;]
        </div>
+
        <div class="bottom" align="center">
                <textarea name="reason" class="admin_normal" rows="5" cols="50"></textarea>
        </div>
+
        <div align="center" class="admin_footer">
                <input type="submit" name="no" class="admin_no" value="{--NO--}" />
                <input type="submit" name="ok" class="admin_yes" value="{--YES--}" />
        </div>
 </div>
+
 </form>
 </div>
index 9f636053c5e86cdfd83922cc9254e9b3e62d9e51..586cec2b80219baa5a33b0879f202694429e618b 100644 (file)
@@ -1,7 +1,7 @@
 <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
        <tr>
                <td align="center" class="admin_title bottom">
-                       <strong>{--ADMIN_MEM_NO_CATS_1--}<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;userid=$content[userid]%}">$content[userid]</a>{--ADMIN_MEM_NO_CATS_2--}</strong>
+                       <strong>{--ADMIN_MEMBER_NO_CATS_1--}<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;userid=$content[userid]%}">$content[userid]</a>{--ADMIN_MEMBER_NO_CATS_2--}</strong>
                </td>
        </tr>
        <tr>
index 25773796e809498eb711fb1810b6b8f86f38f1ed..29821d39d51720bc0b8933bf2136e75b8f63f454 100644 (file)
@@ -6,8 +6,8 @@
        <td width="20%" align="center" class="switch_sw$content[sw] top"><strong>{--USER_NICKNAME--}:</strong></td>
 </tr>
 <tr>
-       <td align="center" class="bottom right switch_sw$content[sw]">$content[userid_link]</td>
-       <td align="center" class="bottom right switch_sw$content[sw]">$content[gender]</td>
+       <td align="center" class="bottom right switch_sw$content[sw]">{%pipe,generateUserProfileLink=$content[userid]%}</td>
+       <td align="center" class="bottom right switch_sw$content[sw]">{%pipe,translateGender=$content[gender]%}</td>
        <td align="center" class="bottom right switch_sw$content[sw]">$content[surname]</td>
        <td align="center" class="bottom right switch_sw$content[sw]">$content[family]</td>
        <td align="center" class="bottom switch_sw$content[sw]">$content[nickname]</td>
@@ -23,7 +23,7 @@
        <td align="center" class="right switch_sw$content[sw] bottom">$content[email]</td>
        <td align="center" class="right switch_sw$content[sw] bottom">$content[REMOTE_ADDR]</td>
        <td align="center" class="right switch_sw$content[sw] bottom">$content[refid]</td>
-       <td align="center" class="right switch_sw$content[sw] bottom">$content[status]</td>
+       <td align="center" class="right switch_sw$content[sw] bottom">{%pipe,translateUserStatus=$content[status]%}</td>
        <td align="center" class="switch_sw$content[sw] bottom">$content[links]</td>
 </tr>
 <tr>
        <td align="center" class="switch_sw$content[sw]"><strong>{--TOTAL_REFERALS--}:</strong></td>
 </tr>
 <tr>
-       <td align="center" class="right switch_sw$content[sw] bottom">$content[points] {?POINTS?}</td>
-       <td align="center" class="right switch_sw$content[sw] bottom">$content[emails_sent]</td>
-       <td align="center" class="right switch_sw$content[sw] bottom">$content[rate]%</td>
-       <td align="center" class="right switch_sw$content[sw] bottom">$content[locked] {?POINTS?}</td>
+       <td align="center" class="right switch_sw$content[sw] bottom">{%pipe,translateComma=$content[points]%} {?POINTS?}</td>
+       <td align="center" class="right switch_sw$content[sw] bottom">{%pipe,translateComma=$content[emails_sent]%}</td>
+       <td align="center" class="right switch_sw$content[sw] bottom">{%pipe,translateComma=$content[rate]%}%</td>
+       <td align="center" class="right switch_sw$content[sw] bottom">{%pipe,translateComma=$content[locked]%} {?POINTS?}</td>
        <td align="center" class="switch_sw$content[sw] bottom">$content[refs]</td>
 </tr>
 <tr>
index 0c086e4f7b7e56eb2811b652d554f36b174a8ecc..afa48b4d438c13b28475a531117ec01b622cf086 100644 (file)
        </tr>
        <tr>
                <td align="center">
-                       [&nbsp;<a href="{%user,email,generateEmailLink=$content[userid]%}">{%user,surname=$content[userid]%} {%user,surname=$content[userid]%} ({%user,status,translateUserStatus=$content[userid])</a>&nbsp;]
+                       [&nbsp;<a href="{%user,email,generateEmailLink=$content[userid]%}">{%user,surname=$content[userid]%} {%user,surname=$content[userid]%} ({%user,status,translateUserStatus=$content[userid]%})</a>&nbsp;]
                </td>
        </tr>
        <tr>
-               <td align="center">
+               <td align="center" class="bottom">
                        <textarea name="reason" class="admin_normal" rows="5" cols="50"></textarea>
                </td>
        </tr>
diff --git a/templates/de/html/guest/guest_rallye.tpl b/templates/de/html/guest/guest_rallye.tpl
new file mode 100644 (file)
index 0000000..04665ea
--- /dev/null
@@ -0,0 +1,20 @@
+<div align="center">
+<table border="0" cellspacing="0" cellpadding="0" width="430" class="guest_table dashed">
+<tr>
+       <td align="center" class="header_column bottom" width="80" height="25"><strong>{--_RALLYE_PRICE--}</strong></td>
+       <td align="center" class="header_column bottom" width="50"><strong>{--_UID--}</strong></td>
+       <td align="center" class="header_column bottom" width="300"><strong>{--RALLYE_GUEST_REFS--}</strong></td>
+</tr>
+$content[rows]
+<tr>
+       <td colspan="3" class="guest_footer">
+       <ul>
+               <li><div class="guest_note">Es werden nur aktive User gewertet.</div></li>
+               <li><div class="guest_note">{%pipe,determineReferalRallyeMinimumUsers=$content[min_users]%}</div></li>
+               <li><div class="guest_note">{%pipe,determineReferalRallyeMinimumPrices=$content[min_prices]%}</div></li>
+               <li><div class="guest_note">Der Rechtsweg ist ausgeschlossen.</div></li>
+       </ul>
+       </td>
+</tr>
+</table>
+</div>
index d6fa8b58911a51459b81955a266b67f4bc37f8f0..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,7 +1 @@
-<tr>
-       <td colspan="4" class="guest_title" height="25" align="center">
-               <strong>{--RALLYE_HAPPY_WINNERS--}</strong>
-       </td>
-</tr>
-</table>
-</div>
+<!-- @DEPRECATED //-->
index feaa3830f2521f3d3928c161b7e2d5857160abde..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,8 +1 @@
-<div align="center">
-<table border="0" cellspacing="0" cellpadding="0" width="530" class="guest_table dashed">
-       <tr>
-               <td align="center" class="header_column bottom" width="80" height="25"><strong>{--_RALLYE_PRICE--}</strong></td>
-               <td align="center" class="header_column bottom" width="50"><strong>{--_UID--}</strong></td>
-               <td align="center" class="header_column bottom" width="200"><strong>{--RALLYE_GUEST_REFS--}</strong></td>
-               <td align="center" class="header_column bottom" width="200"><strong>{--RALLYE_PRICE_IS--}</strong></td>
-       </tr>
+<!-- @DEPRECATED //-->
index 4db0a89c0610da23f6e5bb7df24715c848ee1b8a..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,11 +1 @@
-<tr>
-       <td colspan="3" class="guest_title" height="10" style="padding-top: 5px; padding-bottom: 5px">
-       <ul>
-               <li><div class="guest_note">Es werden nur aktive User gewertet.</div></li>
-               <li><div class="guest_note">{%pipe,determineReferalRallyeMinimumUsers=$content[min_users]%}</div></li>
-               <li><div class="guest_note">{%pipe,determineReferalRallyeMinimumPrices=$content[min_prices]%}</div></li>
-               <li><div class="guest_note">Der Rechtsweg ist ausgeschlossen.</div></li>
-       </ul>
-       </td>
-</tr>
-</table>
+<!-- @DEPRECATED //-->
index ab0682dea87ddc4f6cc42fd35bd195c2d98b3c28..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,6 +1 @@
-<table border="0" cellspacing="0" cellpadding="0" width="430" class="guest_table dashed">
-       <tr>
-               <td align="center" class="header_column bottom" width="80" height="25"><strong>{--_RALLYE_PRICE--}</strong></td>
-               <td align="center" class="header_column bottom" width="50"><strong>{--_UID--}</strong></td>
-               <td align="center" class="header_column bottom" width="300"><strong>{--RALLYE_GUEST_REFS--}</strong></td>
-       </tr>
+<!-- @DEPRECATED //-->
diff --git a/templates/de/html/guest/guest_rallye_row.tpl b/templates/de/html/guest/guest_rallye_row.tpl
new file mode 100644 (file)
index 0000000..6931ab0
--- /dev/null
@@ -0,0 +1,6 @@
+<tr>
+  <td class="switch_sw$content[sw] bottom">$content[idx].</td>
+  <td align="center" class="switch_sw$content[sw] bottom">$content[start].$content[userid].$content[end]</td>
+  <td align="center" class="switch_sw$content[sw] bottom">$content[start].$content[ref].$content[end]</td>
+  <td align="center" class="switch_sw$content[sw] bottom">$content[start].$content[infos].$content[end]</td>
+</tr>
index 616e23e7c2f935b6ce238d8a9e62e6a329b81280..d774f05614d2649ace0b7e8f016e87d06f38c982 100644 (file)
@@ -1,5 +1,5 @@
 <div>
-       {--HELLO--} $content[gender] $content[surname] $content[family]!
+       {--HELLO--} {%pipe,translateGender=$content[gender]%} $content[surname] $content[family]!
 </div>
 <div>
        {%message,BONUS_SHOW_HEADER_LINE=$content[mailid]%}: