min payout and withdraw sepperated in wernis extension
[mailer.git] / inc / modules / member / what-wernis.php
index c2a1d8b..691c9d1 100644 (file)
@@ -116,15 +116,15 @@ if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) {
        $points = bigintval($points[0]);
 
        // Is this enougth for a payout?
-       if ($points < $_CONFIG['wernis_min_amount']) {
+       if ($points < $_CONFIG['wernis_min_payout']) {
                // No, then abort here
-               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MIN_AMOUNT_PAYOUT, TRANSLATE_COMMA($_CONFIG['wernis_min_amount'])));
+               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MIN_PAYOUT_PAYOUT, TRANSLATE_COMMA($_CONFIG['wernis_min_payout'])));
                return;
        }
 
        // Add points to content array
        $content['points']              = $points;
-       $content['min_points']  = TRANSLATE_COMMA($_CONFIG['wernis_min_amount']);
+       $content['min_points']  = TRANSLATE_COMMA($_CONFIG['wernis_min_payout']);
 
        // Get WDS66 id
        $content['wds66_id'] = "";
@@ -145,7 +145,7 @@ if ((!isset($_GET['mode'])) || ($_GET['mode'] == "choose")) {
 
        // Prepare data for the template
        $content['points']              = TRANSLATE_COMMA($points);
-       $content['min_points']  = TRANSLATE_COMMA($_CONFIG['wernis_min_amount']);
+       $content['min_points']  = TRANSLATE_COMMA($_CONFIG['wernis_min_payout']);
        $content['wds66_id']    = "";
 
        // Get WDS66 id
@@ -192,9 +192,9 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                // Only numbers in amount!
                                LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT);
                                OUTPUT_HTML("<br />");
-                       } elseif ($_POST['amount'] < $_CONFIG['wernis_min_amount']) {
+                       } elseif ($_POST['amount'] < $_CONFIG['wernis_min_payout']) {
                                // Not enougth entered!
-                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_amount'])));
+                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_payout'])));
                                OUTPUT_HTML("<br />");
                        } else {
                                // All is fine here so do the withdraw
@@ -258,9 +258,9 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) {
                                // Only numbers in amount!
                                LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT);
                                OUTPUT_HTML("<br />");
-                       } elseif ($_POST['amount'] < $_CONFIG['wernis_min_amount']) {
+                       } elseif ($_POST['amount'] < $_CONFIG['wernis_min_payout']) {
                                // Not enougth entered!
-                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_amount'])));
+                               LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval($_CONFIG['wernis_min_payout'])));
                                OUTPUT_HTML("<br />");
                        } elseif ($_POST['amount'] > $points) {
                                // Not enougth points left!