New wrapper functions introduced, TODOs.txt updated
[mailer.git] / inc / modules / member / what-payout.php
index 8e62a5bd70a42d0c6157b128378735fc753b3765..aa9e6e516c4175c6f649607792caf42a412bed7d 100644 (file)
@@ -48,7 +48,7 @@ if (!defined('__SECURITY')) {
 addYouAreHereLink('member', __FILE__);
 
 if ((!isExtensionActive('payout')) && (!isAdmin())) {
-       loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('payout'));
+       displayMessage(generateExtensionInactiveNotInstalledMessage('payout'));
        return;
 } // END - if
 
@@ -119,7 +119,7 @@ ORDER BY
                outputPayoutList($totalPoints);
        } else {
                // No payout types setup
-               loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_SETUP_INCOMPLETE--}');
+               displayMessage('{--MEMBER_PAYOUT_SETUP_INCOMPLETE--}');
        }
 } else {
        // Chedk if he can get paid by selected type
@@ -207,7 +207,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
                                sendAdminNotification('{--ADMIN_PAYOUY_REQUEST_SUBJECT--}', $admin_tpl, postRequestArray(), getMemberId());
 
                                // Load template and output it
-                               loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_REQUEST_SENT--}');
+                               displayMessage('{--MEMBER_PAYOUT_REQUEST_SENT--}');
                        } elseif ($content['allow'] == 'Y') {
                                // Prepare content
                                $content = array(
@@ -231,11 +231,11 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
                        }
                } else {
                        // Not enougth points
-                       loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_POINTS_NOT_ENOUGTH--}');
+                       displayMessage('{--MEMBER_PAYOUT_POINTS_NOT_ENOUGTH--}');
                }
        } else {
                // id is invalid
-               loadTemplate('admin_settings_saved', false, '{--MEMBER_PAYOUT_ID_INVALID--}');
+               displayMessage('{--MEMBER_PAYOUT_ID_INVALID--}');
        }
 
        // Free result