Columns renamed, more EL than direct usage in PHP script
authorRoland Häder <roland@mxchange.org>
Thu, 16 Sep 2010 22:00:52 +0000 (22:00 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 16 Sep 2010 22:00:52 +0000 (22:00 +0000)
15 files changed:
inc/extensions/ext-sponsor.php
inc/language/yoomedia_de.php
inc/libs/sponsor_functions.php
inc/mails/beg_mails.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-list_yoomedia_tm.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/member/what-beg2.php
inc/modules/member/what-transfer.php
inc/monthly/monthly_beg.php
inc/pool/pool-user.php
inc/template-functions.php
templates/de/emails/admin/admin_sponsor_pending.tpl
templates/de/emails/sponsor/sponsor_pending.tpl

index 73e633b86637544df95c13421d6eb4f8d6a13b34..db17a5eb8e3c3fc2ae42b8075c4bd53979bf44f4 100644 (file)
@@ -92,8 +92,8 @@ switch (getExtensionMode()) {
 `refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `ref_count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `hash` VARCHAR(32) NULL DEFAULT NULL,
-`last_pay` FLOAT(7,2) UNSIGNED NOT NULL DEFAULT 0.00,
-`last_curr` VARCHAR(255) NOT NULL DEFAULT '&euro;',
+`last_payment` FLOAT(7,2) UNSIGNED NOT NULL DEFAULT 0.00,
+`last_currency` VARCHAR(255) NOT NULL DEFAULT '&euro;',
 INDEX (`refid`),
 INDEX (`email`),
 UNIQUE KEY (`hash`),
@@ -296,8 +296,8 @@ PRIMARY KEY (`id`)
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('refid','N')");
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('ref_count','N')");
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('hash','N')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_pay','N')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_curr','N')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_payment','N')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_admin_data` (`data_row`, `display`) VALUES ('last_currency','N')");
                //
                // Add default entries
                //
index 3fe44a425d204205a246c992ca3197cafa51ea8c..3f675120ea5140bf0be2934890187c3f0449105c 100644 (file)
@@ -64,7 +64,7 @@ addMessages(array(
        'ADMIN_YOOMEDIA_REMOVE_MAIL' => "Mail entfernen",
        'ADMIN_YOOMEDIA_UNLIST_MAIL' => "Aus Ausschlussliste nehmen",
        'ADMIN_YOOMEDIA_TEXTMAIL_ALREADY_SENT' => "Textmail wurde <span class=\"data\">%s</span> bereits versendet.",
-       'ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN' => "Textmail kann in <span class=\"data\">%s</span> erneut versendet werden.",
+       'ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN' => "Textmail kann in <span class=\"data\">{%%pipe,createFancyTime=%s%%}</span> erneut versendet werden.",
        'ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED' => "Textmail wurde manuell gesperrt.",
        'ADMIN_LIST_YOOMEDIA_TITLE' => "Alle Textmails von der Yoo!Media API 2.0 anzeigen",
        'ADMIN_LIST_YOOMEDIA_NOTE' => "<strong>Hinweise:</strong> Mails mit 0 Sekunden Mindestaufenthalt sind meistens Framekiller-Mails. Sie k&ouml;nnen eine Mail nur erneut aussenden, wenn die Reload-Sperre abgelaufen ist.",
index 39a4bec95f85f0284b46d58f0cf5f894612e4fd9..cd3c7922cc29e3b87a79d846f6e89566ebb8d651 100644 (file)
@@ -383,8 +383,8 @@ function saveSponsorData ($postData, $content) {
 
        // Unsecure data which we don't want
        $UNSAFE = array('password', 'id', 'remote_addr', 'sponsor_created', 'last_online', 'status', 'ref_count',
-                       'points_amount', 'points_used', 'refid', 'hash', 'last_pay', 'last_curr', 'pass_old',
-                       'ok', 'pass1', 'pass2');
+                       'points_amount', 'points_used', 'refid', 'hash', 'last_payment', 'last_currency',
+                       'pass_old', 'ok', 'pass1', 'pass2');
 
        // Set default message ("not saved")
        $message = '{--SPONSOR_ACCOUNT_DATA_NOT_SAVED--}';
index 46d05e95e5d3a87892eabcef8c60b633f5598782..f6e2a9b52660b05d329474bbfdb4eca16a63441a 100644 (file)
@@ -84,7 +84,7 @@ if (!empty($sql)) {
 
        if (getConfig('beg_ip_timeout') > 0) {
                // Create timemark
-               $content['ip_locker'] = createFancyTime(getConfig('beg_ip_timeout'));
+               $content['ip_locker'] = '{%config,createFancyTime=beg_ip_timeout%}';
        } // END - if
 
        // Check for accounts to be notified
index 6738f18fca420ec1bcc6536083efda9a9f5f4c61..7ae9c494854caccdd8fc05c20517cb2bcf5d6076 100644 (file)
@@ -144,8 +144,8 @@ LIMIT 1",
                                        handleSponsorRequest(postRequestArray());
 
                                        // Convert some data for the email template
-                                       postRequestParameter('gender'          , translateGender(postRequestParameter('gender')));
-                                       postRequestParameter('warning_interval', createFancyTime(postRequestParameter('warning_interval')));
+                                       postRequestParameter('gender'          , '{%pipe,translateComma=' . postRequestParameter('gender') . '%}');
+                                       postRequestParameter('warning_interval', '{%pipe,createFancyTime=' . postRequestParameter('warning_interval') . '%}');
 
                                        if ($PASS === false) setPostRequestParameter('pass1', '{--SPONSOR_PASS_UNCHANGED--}');
 
index 9088dfbb9a7c66d09fe34b7d72011029ed620744..05da918565ca25932a9b3127c5ae30d1d56d7877 100644 (file)
@@ -118,7 +118,7 @@ foreach ($result as $entry) {
                        } // END - if
 
                        // Add reload lock
-                       $entry['already'] = getMaskedMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN', createFancyTime($countdown));
+                       $entry['already'] = getMaskedMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN', $countdown);
                } else {
                        // Never resentable unless manual removal
                        $entry['already'] = '{--ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED--}';
index 215d31782bf4ecbfa808b7f417e48787407cab21..6d1255957e8d3c66f6a51e722799186ceba47ecb 100644 (file)
@@ -67,7 +67,7 @@ if (isGetRequestParameterSet('hash')) {
        `id`, `status`, `gender`, `surname`, `family`,
        `company`, `position`, `tax_ident`,
        `street_nr1`, `street_nr2`, `country`, `zip`, `city`, `email`, `phone`, `fax`, `cell`,
-       `points_amount` AS points, `last_pay` AS pay, `last_curr` AS curr
+       `points_amount` AS points, `last_payment`, `last_currency`
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_data`
 WHERE
index 526a9252cf7efaf5a3c724255094c345b5776c01..17dd29b14850b779e6fc734f9886c68090a99990 100644 (file)
@@ -221,8 +221,8 @@ LIMIT 1",
        // Add points to array
        postRequestParameter('points_amount', $points);
        postRequestParameter('points_used'  , '0.00000');
-       postRequestParameter('last_pay'     , $pay);
-       postRequestParameter('last_curr'    , $curr);
+       postRequestParameter('last_payment' , $pay);
+       postRequestParameter('last_currency', $curr);
 
        // Register sponsor but never ever update here!
        $message = doProcessSponsorFormRequest($messageArray);
index cfe3e46d47e6628ee272061c58643a03c532da19..aff0de78481ab20cdf0e3e4a69f91fea4eceb1ed 100644 (file)
@@ -59,7 +59,7 @@ if (isExtensionActive('autopurge')) {
        $lastOnline   = " AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})";
 } // END - if
 
-// Let's check if there are some points left we can 'pay'...
+// Let's check if there are some points left we can pay...
 $result = SQL_QUERY_ESC("SELECT
        `userid`, `beg_points` AS points, `last_online`
 FROM
index 4edd9678515771dee57196232550ffeea35d9855..0970463dd01cbd3a29bdbf9aacf59276bc16a51d 100644 (file)
@@ -140,7 +140,7 @@ switch ($mode) {
 
                                // Remember transfer reason and fancy date/time in constants
                                $content['reason']  = secureString(postRequestParameter('reason'));
-                               $content['expires'] = createFancyTime(getConfig('transfer_age'));
+                               $content['expires'] = '{%config,createFancyTime=transfer_age%}';
 
                                // Generate tranafer id
                                $content['trans_id'] = bigintval(generateRandomCode('10', mt_rand(0, 99999), getMemberId(), postRequestParameter('reason')));
index 6b97b99b4450691652279140ae71323e9f88d022..6a557df326b58133511e741c9413056e1acf9aae 100644 (file)
@@ -60,7 +60,7 @@ if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getC
                $whereStatement1 = " AND `userid` != {?beg_userid?}";
        } // END - if
 
-       // Let's check if there are some points left we can 'pay'...
+       // Let's check if there are some points left we can pay...
        if (isExtensionActive('autopurge')) {
                // Use last online stamp only when autopurge for inactive members is activated
                if ((getApInactiveSince() > 0) && (getConfig('beg_active') == 'Y')) {
index 4c206229d35d2880f7e15731c8eb956405dc0bb4..036aa3557b95d4beb7837eeb6d891dcb925b8e87 100644 (file)
@@ -175,7 +175,7 @@ if (!SQL_HASZERONUMS($result_main)) {
                                                        'cat_id'        => $DATA['cat_id'],
                                                        'text'          => $DATA['text'],
                                                        'url'           => $DATA['url'],
-                                                       'expiration'    => createFancyTime(getPaymentPoints($DATA['payment_id'], 'time'))
+                                                       'expiration'    => '{%pipe,createFancyTime=' . getPaymentPoints($DATA['payment_id'], 'time') . '%}'
                                                );
 
                                                // Yes we do, so we notify admin and sender about fully sent mail!
index 057ec6a052a90b93d8e82ccef64f43ef2a66c851..8f1349c454df6a6b5093b3c363c55b87b4b2dfc0 100644 (file)
@@ -430,7 +430,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') {
                        $content['expiration'] = '{--MAIL_WILL_NEVER_EXPIRE--}';
                } elseif (isConfigEntrySet('auto_purge')) {
                        // Create nice date string
-                       $content['expiration'] = createFancyTime(getAutoPurge());
+                       $content['expiration'] = '{%pipe,getAutoPurge,createFancyTime%}';
                } else {
                        // Missing entry
                        $content['expiration'] = '{--MAIL_NO_CONFIG_AUTO_PURGE--}';
index b7086cc993dc1854dec94efb7059d8bc24804bfc..ea4590ccfd3ca1cd03fbd88cb9e274c9cc7e73b2 100644 (file)
@@ -7,7 +7,7 @@ Bitte setzen Sie sich mit ihm in Verbindung (die EMail-Adresse finden Sie weiter
 ------------------------------
 Verwendungszweck: SPONSOR: $content[id], {%pipe,translateComma=$content[points]%}
 ------------------------------
-Zu &uuml;berweisender Betrag: {%pipe,translateComma=$content[pay]%} $content[curr]
+Zu &uuml;berweisender Betrag: {%pipe,translateComma=$content[last_payment]%} $content[last_currency]
 ------------------------------
 
 Hier sind nochmals alle seine Daten aus der Anmeldung:
index 1544090219eeb62dcc56c53ff5db176d2940443c..caeab1584ce0d20f2d2cf21d29a56cceb2fff3f5 100644 (file)
@@ -7,7 +7,7 @@ Wir werden uns bald mit Ihnen in Verbindung setzen und Ihnen unsere Kontodaten m
 ------------------------------
 Verwendungszweck: SPONSOR: $content[id], {%pipe,translateComma=$content[points]%}
 ------------------------------
-Zu &uuml;berweisender Betrag: {%pipe,translateComma=$content[pay]%} $content[curr]
+Zu &uuml;berweisender Betrag: {%pipe,translateComma=$content[last_payment]%} $content[last_currency]
 ------------------------------
 
 Hier sind nochmals alle Ihre Daten aus der Anmeldung: