]> git.mxchange.org Git - mailer.git/commitdiff
Used EL code {%template,LoadTemplate=foo%} instead of loadTemplate('foo', TRUE);
authorRoland Häder <roland@mxchange.org>
Thu, 10 Jan 2013 06:29:49 +0000 (06:29 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 10 Jan 2013 06:29:49 +0000 (06:29 +0000)
26 files changed:
DOCS/TODOs.txt
beg.php
birthday_confirm.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-list_country.php
inc/modules/admin/what-list_sponsor_pay.php
inc/modules/guest/what-rallyes.php
inc/modules/guest/what-register.php
inc/modules/member/what-mydata.php
inc/modules/member/what-rallyes.php
inc/modules/member/what-reflinks.php
inc/modules/sponsor.php
show_bonus.php
templates/de/emails/admin/admin_rallye_expired.tpl
templates/de/emails/member/member_rallye_expired_bronce.tpl
templates/de/emails/member/member_rallye_expired_gold.tpl
templates/de/emails/member/member_rallye_expired_other.tpl
templates/de/emails/member/member_rallye_expired_silver.tpl
templates/de/html/admin/admin_list_country.tpl
templates/de/html/admin/admin_list_rallyes_row.tpl
templates/de/html/admin/admin_sponsor_paytypes.tpl
templates/de/html/beg/beg_link.tpl
templates/de/html/birthday/birthday_confirm.tpl
templates/de/html/guest/guest_register.tpl
templates/de/html/show_bonus.tpl
templates/de/html/sponsor/sponsor_main.tpl

index a42f5ff7aa07b0c09a2c117d6b60232fe695ac16..7a821d651404cebaec9e8a49987f3175c35117e6 100644 (file)
@@ -2,7 +2,7 @@
 ### DO NOT EDIT THIS FILE. ###
 ./api.php:68:// @TODO Do stuff here
 ./autoreg.php:62:// @TODO Add processing of request here
-./beg.php:175:                 // @TODO Opps, what is missing here???
+./beg.php:173:                 // @TODO Opps, what is missing here???
 ./cron.php:62:// @TODO Do stuff here
 ./inc/classes/cachesystem.class.php:516:       // @TODO Add support for more types which break in last else-block
 ./inc/config-functions.php:150:        // @TODO Make this all better... :-/
@@ -82,9 +82,9 @@
 ./inc/libs/doubler_functions.php:44:// @TODO Lame description
 ./inc/libs/doubler_functions.php:96:                   // @TODO Can't this be moved into EL?
 ./inc/libs/forced_functions.php:457:// @TODO Can't we use our new expression language instead of this ugly code?
-./inc/libs/mailid_functions.php:126:   // @TODO Rewrite these blocks to filter
+./inc/libs/mailid_functions.php:123:   // @TODO Rewrite these blocks to filter
 ./inc/libs/mailid_functions.php:47:            // @TODO Rewrite this to a dynamic include or so
-./inc/libs/mailid_functions.php:96:    // @TODO Rewrite this to a filter
+./inc/libs/mailid_functions.php:93:    // @TODO Rewrite this to a filter
 ./inc/libs/network_functions.php:1182: // @TODO Implement this function, don't forget to set HTTP status back to '200 OK' if everything went fine
 ./inc/libs/order_functions.php:46:     // @TODO Move this array into a filter
 ./inc/libs/rallye_functions.php:771:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
 ./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
 ./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter                                   *
 ./inc/modules/member/what-logout.php:52:       // @TODO Move this in a filter, e.g. member_logout
+./inc/modules/member/what-mydata.php:82:               // @TODO Move this to a function (for better EL code)
 ./inc/modules/member/what-order.php:463:                       // @TODO Rewrite this to a filter
 ./inc/modules/member/what-payout.php:208:                                      // @TODO Rewrite this to a filter
 ./inc/modules/member/what-points.php:61:// @TODO Should we rewrite this to a filter?
diff --git a/beg.php b/beg.php
index 58d12841ea679fe832554fa3786d9fba1894ff4b..6bc039e62e773db6c9c7510fc76f133e01cda956 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -90,8 +90,6 @@ if (isGetRequestElementSet('userid')) {
                // Set nickname / userid for template
                $content['userid']        = getRequestElement('userid');
                $content['clicks']        = (getUserData('beg_clicks') + 1);
-               $content['header_banner'] = loadTemplate('beg_header_banner', TRUE);
-               $content['footer_banner'] = loadTemplate('beg_footer_banner', TRUE);
                $content['points']        = $points;
        } // END - if
 
index 607dd32c9e8c5e02e4311d10f8997f7c87e71dff..51c7c936295d4c320f133ece64f2b68a05c5b79a 100644 (file)
@@ -123,12 +123,6 @@ $GLOBALS['__module'] = 'birthday_confirm';
 // Include header
 loadIncludeOnce('inc/header.php');
 
-// Load birthday header template (for your banners, e.g.?)
-$content['header'] = loadTemplate('birthday_header', TRUE);
-
-// Load birthday footer template (for your banners, e.g.?)
-$content['footer'] = loadTemplate('birthday_footer', TRUE);
-
 // Load final template and output it
 loadTemplate('birthday_confirm', FALSE, $content);
 
index 209319c84d6680abe0ac4131c4fb47004398cb95..5d655b2f74b4fac3935630f250db0f6b54d4a08f 100644 (file)
@@ -1722,10 +1722,10 @@ function registerFirstAdmin () {
                        } // END - if
 
                        // Output error messages
-                       $content['login_message'] = loadTemplate('admin_login_msg', TRUE, $loginMessage);
+                       $content['login_message']     = loadTemplate('admin_login_msg', TRUE, $loginMessage);
                        $content['password1_message'] = loadTemplate('admin_login_msg', TRUE, $password1Message);
                        $content['password2_message'] = loadTemplate('admin_login_msg', TRUE, $password2Message);
-                       $content['error_message'] = loadTemplate('admin_login_msg', TRUE, $errorMessage);
+                       $content['error_message']     = loadTemplate('admin_login_msg', TRUE, $errorMessage);
                } // END - if
 
                // Output message in seperate template
index 8373690f78b0b0e141c29a584947460bb6db9371..6d86d0bd1a3901c73f30ea94991867d7f77a19ac 100644 (file)
@@ -195,9 +195,6 @@ LIMIT 1");
        // Add list to constant for the template
        $content['rows'] = $OUT;
 
-       // Include add template
-       $content['add_form'] = loadTemplate('admin_add_country', TRUE);
-
        // Load main template
        loadTemplate('admin_list_country', FALSE, $content);
 }
index 16276c4da5a8079dd09fb0d0ac748dabff40ecf5..cd3178fc98e9b37ce98017e289d343ac8906afab 100644 (file)
@@ -95,7 +95,7 @@ LIMIT 1",
                // Remove entries here...
                foreach (postRequestElement('id') as $id => $sel) {
                        // Remove entry
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1",
+                       SQL_QUERY_ESC('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`=%s LIMIT 1',
                                array(bigintval($id)), __FILE__, __LINE__);
                }
 
@@ -172,7 +172,7 @@ if (isFormSent('add')) {
        }
 } else {
        // Load all payment types
-       $result = SQL_QUERY("SELECT
+       $result = SQL_QUERY('SELECT
        `id`,
        `pay_name`,
        `pay_rate`,
@@ -181,7 +181,7 @@ if (isFormSent('add')) {
 FROM
        `{?_MYSQL_PREFIX?}_sponsor_paytypes`
 ORDER BY
-       `pay_name` ASC",
+       `pay_name` ASC',
                __FILE__, __LINE__);
 
        // Are there some payment types setup?
@@ -205,9 +205,6 @@ ORDER BY
        // Free memory
        SQL_FREERESULT($result);
 
-       // Add new payment types here
-       $content['add_out'] = loadTemplate('admin_add_sponsor_paytype', TRUE);
-
        // Load final template
        loadTemplate('admin_sponsor_paytypes', FALSE, $content);
 }
index 43afabe64ddebad8cc450c4595834e51f45a3a64..bb0448e6ba67fce928cc2bed67b842a77899a91e 100644 (file)
@@ -101,19 +101,13 @@ if (SQL_NUMROWS($result) == 1) {
        // Handle description...
        if ((empty($content['descr'])) && (!empty($content['template']))) {
                // Use description from template
-               $content['descr'] = loadTemplate('rallye_' . $content['template'], TRUE);
+               $content['descr'] = '{%template,LoadTemplate=rallye_' . $content['template'] . '%}';
        } // END - if
 
        // Set start and end time
        $content['start_time'] = generateDateTime($content['start_time'], 1);
        $content['end_time']   = generateDateTime($content['end_time']  , 1);
 
-       // Determine min_users
-       $content['min_users'] = determineReferralRallyeMinimumUsers($content['min_users']);
-
-       // Determine min prices (now in function)
-       $content['min_prices'] = determineReferralRallyeMinimumPrices($content['min_prices']);
-
        if ($expired === TRUE) {
                $content['prices']       = addReferralRallyeWinners('guest', $content['id']);
                $content['top_users']    = '<div align="center" class="big">' . $content['extras'] . '</div>';
index 2036b9f7e1e33713246aee87b0f2d5eb1464a5c4..4b30681ebc76935a764662bad5c1297cd1971845 100644 (file)
@@ -125,9 +125,6 @@ if ((isFormSent()) && (isRegistrationDataComplete())) {
                $content['refid_content'] = loadTemplate('guest_register_refid', TRUE);
        }
 
-       // You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-)
-       $content['header_content'] = loadTemplate('register_header', TRUE);
-
        // ZIP codes are numerical values
        $content['zip'] = '';
        if ((isPostRequestElementSet('zip')) && (postRequestElement('zip') > 0)) {
index d2644c773c77c9953652a036fcdfb538d1822671..6f61788d35d3bc97d76a4c478942edcb2237639c 100644 (file)
@@ -79,12 +79,10 @@ switch ($mode) {
                        $content['change'] = loadTemplate('member_mydata_button', TRUE);
                }
 
-               $content['birth_day']   = padLeftZero($content['birth_day']);
-               $content['birth_month'] = padLeftZero($content['birth_month']);
-
+               // @TODO Move this to a function (for better EL code)
                switch (getLanguage()) {
-                       case 'de': $content['dob'] = $content['birth_day']   . '.' . $content['birth_month'] . '.' . $content['birth_year']; break;
-                       default  : $content['dob'] = $content['birth_month'] . '-' . $content['birth_day']   . '-' . $content['birth_year']; break;
+                       case 'de': $content['dob'] = '{%pipe,padLeftZero=' . $content['birth_day']   . '%}.{%pipe,padLeftZero=' . $content['birth_month'] . '%}.' . $content['birth_year']; break;
+                       default  : $content['dob'] = '{%pipe,padLeftZero=' . $content['birth_month'] . '%}-{%pipe,padLeftZero=' . $content['birth_day']   . '%}-' . $content['birth_year']; break;
                } // END - switch
 
                if (isExtensionActive('country')) {
index 26292af15672773ed462109b3e139bc0098bfd8f..62c02fd53a5f46b6097c0568c3771b89ba5289c1 100644 (file)
@@ -101,13 +101,9 @@ if (SQL_NUMROWS($result) == 1) {
        // Handle description...
        if ((empty($content['descr'])) && (!empty($content['template']))) {
                // Use description from template
-               $content['descr'] = loadTemplate('rallye_' . $content['template'], TRUE);
+               $content['descr'] = '{%template,LoadTemplate=rallye_' . $content['template'] . '%}';
        } // END - if
 
-       // Determine min_users/prices
-       $content['min_users']  = determineReferralRallyeMinimumUsers($content['min_users']);
-       $content['min_prices'] = determineReferralRallyeMinimumPrices($content['min_prices']);
-
        // Set start and end time
        $content['start_time'] = generateDateTime($content['start_time'], 1);
        $content['end_time']   = generateDateTime($content['end_time']  , 1);
index 81d8c78803e56f35f63ac86df1f6fa5504cadb53..b3499985c3609474e5280ebd164da2cc648210f5 100644 (file)
@@ -59,7 +59,7 @@ if (isExtensionActive('nickname')) {
                $content['nickname_content'] = loadTemplate('member_reflink_nickname', TRUE, $nick);
        } else {
                // Display link to nickname form
-               $content['nickname_content'] = loadTemplate('member_reflink_no_nickname', TRUE);
+               $content['nickname_content'] = '{%template,LoadTemplate=member_reflink_no_nickname%}';
        }
 } // END - if
 
index 6299d72674d06c52c18611641c94009358f802d9..17e5a57475f6953d1beefe768d542cc126b3c9b5 100644 (file)
@@ -59,12 +59,6 @@ $content['menu'] = addSponsorMenu(getWhat());
 // Generate right-side output
 $content['content'] = addSponsorContent(getWhat());
 
-// Load header template
-$content['header'] = loadTemplate('sponsor_header', TRUE);
-
-// Load footer template
-$content['footer'] = loadTemplate('sponsor_footer', TRUE);
-
 // 'You are here' navigation
 $content['you_are_here'] = addYouAreHereLink('sponsor', getWhat(), TRUE);
 
index ff3545d61bc8052793dbad772bbfb11399a84223..5144df314e07b056258aa16aacc86970e7e3d490 100644 (file)
@@ -128,12 +128,6 @@ LIMIT 1",
        $content['message'] = '<span class="bad">{--BONUS_SHOW_WRONG_CALL--}</span>';
 }
 
-// Load send_bonus header template (for your banners, e.g.?)
-$content['header'] = loadTemplate('show_bonus_header', TRUE);
-
-// Load show_bonus footer template (for your banners, e.g.?)
-$content['footer'] = loadTemplate('show_bonus_footer', TRUE);
-
 // Load final template
 loadTemplate('show_bonus', FALSE, $content);
 
index ae626869783d746e65c7791ad5b366ec2f04765c..cd353d50aad5dceedf9e7c911db1ed66e3026810 100644 (file)
@@ -15,8 +15,8 @@ Es wurden bereits alle {%pipe,translateComma=$content[count]%} Gewinner informie
 
 Wichtige Hinweise:
 -----------------------------
-- $content[min_users]
-- $content[min_prices]
+- {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
+- {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
 -----------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 5a71e7036c9e969772dcc765dab659061c7bf7ad..c820c85c27f7f37d98d805854cbaefa7128cc863 100644 (file)
@@ -24,8 +24,8 @@ Wir bedanken uns f&uuml;r Ihre Bem&uuml;hungen und Interesse an unserer Rallye u
 Wichtige Hinweise:
 -----------------------------
 - Es werden nur aktive User gewertet. Der Rechtsweg ist ausgeschlossen.
-- $content[min_users]
-- $content[min_prices]
+- {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
+- {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
 -----------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index cd9e0532a1cb8244398c77a1d63c90db8a7bf85e..3064bf82a08c99014f1460817613b26070e454a1 100644 (file)
@@ -24,8 +24,8 @@ Wir bedanken uns f&uuml;r Ihre Bem&uuml;hungen und Interesse an unserer Rallye u
 Wichtige Hinweise:
 -----------------------------
 - Es werden nur aktive User gewertet. Der Rechtsweg ist ausgeschlossen.
-- $content[min_users]
-- $content[min_prices]
+- {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
+- {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
 -----------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 0c041103895585217fb286eba2bcd08958478eab..da65390a52dff0748121b6687f107fa8893f9e14 100644 (file)
@@ -24,8 +24,8 @@ Wir bedanken uns f&uuml;r Ihre Bem&uuml;hungen und Interesse an unserer Rallye u
 Wichtige Hinweise:
 --------------------------------
 - Es werden nur aktive User gewertet. Der Rechtsweg ist ausgeschlossen.
-- $content[min_users]
-- $content[min_prices]
+- {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
+- {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
 --------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 0b137e657d6f5a4ff6a896967ae101a504d89636..aca5f2d9028838e7e4643e3903f32cc4b9070ee4 100644 (file)
@@ -24,8 +24,8 @@ Wir bedanken uns f&uuml;r Ihre Bem&uuml;hungen und Interesse an unserer Rallye u
 Wichtige Hinweise:
 -----------------------------
 - Es werden nur aktive User gewertet. Der Rechtsweg ist ausgeschlossen.
-- $content[min_users]
-- $content[min_prices]
+- {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
+- {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
 -----------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 06bfca980377bc1e799878cd9e65d977af1bd16a..cdce09fa3aa369370051d8f6c2d48a6367bb4a17 100644 (file)
@@ -29,5 +29,5 @@ $content[rows]
 </div>
 
 <div align="center">
-       $content[add_form]
+       {%template,LoadTemplate=admin_add_country%}
 </div>
index d54281012c619baee49e40cd60526fb58d37cb2d..dd4f4076e4d98467d91d956925d11145b90950c6 100644 (file)
 <tr>
        <td align="center" class="{%template,ColorSwitch%} bottom right" colspan="3">
                <strong>{--ADMIN_RALLYE_MIN_USERS_MINI--}:</strong><br />
-               $content[min_users]
+               {%pipe,determineReferralRallyeMinimumUsers=$content[min_users]%}
        </td>
        <td align="center" class="{%template,ColorSwitch%} bottom" colspan="2">
                <strong>{--ADMIN_RALLYE_MIN_PRICES_MINI--}:</strong><br />
-               $content[min_prices]
+               {%pipe,determineReferralRallyeMinimumPrices=$content[min_prices]%}
        </td>
 </tr>
index b4e0e5987452bc245f6cdf90387d646e3846ee16..fbfc6331cd920034fe824ff974f3d010ebd43cfa 100644 (file)
@@ -3,6 +3,6 @@
                $content[list_out]
        </div>
        <div class="para">
-               $content[add_out]
+               {%template,LoadTemplate=admin_add_sponsor_paytype%}
        </div>
 </div>
index e3f8caae2d770fdcbe034f35100ac2fa0ee50071..cc215f5ad92a09ba6587d4b1c27ef8227e641b58 100644 (file)
@@ -2,7 +2,7 @@
 <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 100%">
        <tr>
                <td height="10%" align="center">
-                       <div align="center">$content[header_banner]</div>
+                       <div align="center">{%template,LoadTemplate=beg_header_banner%}</div>
                </td>
        </tr>
        <tr>
@@ -28,7 +28,7 @@
        </tr>
        <tr>
                <td height="10%" align="center">
-                       <div align="center">$content[footer_banner]</div>
+                       <div align="center">{%template,LoadTemplate=beg_footer_banner%}</div>
                </td>
        </tr>
 </table>
index eba8d27d63988fc4053427bf09eb4fe1c5313162..8d0be0c8c8b8370c435d34dc8e3f360caaf75b89 100644 (file)
@@ -1,7 +1,7 @@
 <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 100%">
 <tr>
        <td height="10%" align="center">
-               $content[header]
+               {%template,LoadTemplate=birthday_header%}
        </td>
 </tr>
 <tr>
@@ -11,7 +11,7 @@
 </tr>
 <tr>
        <td height="10%" align="center">
-               $content[footer]
+               {%template,LoadTemplate=birthday_footer%}
        </td>
 </tr>
 </table>
index e23df8a14bdbafc82ec526d7917bef8eff46e8a5..f4416deac28ded7ed4fbb19d913ade17b92613a8 100644 (file)
@@ -3,7 +3,7 @@
 <table border="0" cellspacing="0" cellpadding="0" width="640" class="table dashed">
        <tr>
                <td colspan="2" class="table_header bottom">
-                       $content[header_content]
+                       {%template,LoadTemplate=register_header%}
                </td>
        </tr>
 
index eba8d27d63988fc4053427bf09eb4fe1c5313162..db8ce2b2ab06b597e07d4e8a08e8d66da57df7ea 100644 (file)
@@ -1,7 +1,7 @@
 <table border="0" cellspacing="0" cellpadding="0" width="100%" style="height: 100%">
 <tr>
        <td height="10%" align="center">
-               $content[header]
+               {%template,LoadTemplate=show_bonus_header%}
        </td>
 </tr>
 <tr>
@@ -11,7 +11,7 @@
 </tr>
 <tr>
        <td height="10%" align="center">
-               $content[footer]
+               {%template,LoadTemplate=show_bonus_footer%}
        </td>
 </tr>
 </table>
index 5712bde4bca62590e293a5748481f8ed3d111516..72dfd97067f739a9c588a91d5bab7f57c8f09c46 100644 (file)
@@ -2,7 +2,7 @@
 <table border="0" cellspacing="0" cellpadding="0" class="sponsor_main" width="100%">
 <tr>
        <td colspan="2" class="table_header" align="center" height="75">
-               $content[header]
+               {%template,LoadTemplate=sponsor_header%}
        </td>
 </tr>
 <tr>
@@ -16,7 +16,7 @@
 </tr>
 <tr>
        <td colspan="2" class="table_footer" align="center" height="75">
-               $content[footer]
+               {%template,LoadTemplate=sponsor_footer%}
        </td>
 </tr>
 </table>