]> git.mxchange.org Git - mailer.git/commitdiff
min payout and withdraw sepperated in wernis extension
authorRoland Häder <roland@mxchange.org>
Mon, 18 Feb 2008 20:19:31 +0000 (20:19 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 18 Feb 2008 20:19:31 +0000 (20:19 +0000)
inc/extensions/ext-wernis.php
inc/language/wernis_de.php
inc/modules/admin/what-config_wernis.php
inc/modules/member/what-wernis.php
templates/de/html/admin/admin_config_wernis.tpl

index e33f6ecc3febf87c7c9cf52d9c6f6f283f359aed..bde8ccb19decc70fdee49b7470e3989a3facaacc 100644 (file)
@@ -62,7 +62,8 @@ wernis_type ENUM('IN','OUT') NOT NULL default 'OUT',
 KEY(userid),
 PRIMARY KEY(id)
 ) TYPE=MyISAM";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_amount bigint(20) not null default '40000'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout bigint(20) not null default '40000'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw bigint(20) not null default '5000'";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id bigint(20) not null default '0'";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_md5 varchar(32) not null default ''";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_url varchar(255) not null default 'http://www.wds66.com/api/'";
@@ -103,11 +104,12 @@ case "update": // Update an extension
 
 default: // Do stuff when extension is loaded
        $DUMMY = LOAD_CONFIG("0");
-       $_CONFIG['wernis_min_amount'] = $DUMMY['wernis_min_amount'];
-       $_CONFIG['wernis_api_id']     = $DUMMY['wernis_api_id'];
-       $_CONFIG['wernis_api_md5']    = $DUMMY['wernis_api_md5'];
-       $_CONFIG['wernis_api_url']    = $DUMMY['wernis_api_url'];
-       $_CONFIG['wernis_refid']      = $DUMMY['wernis_refid'];
+       $_CONFIG['wernis_min_payout']           = $DUMMY['wernis_min_payout'];
+       $_CONFIG['wernis_min_withdraw'] = $DUMMY['wernis_min_withdraw'];
+       $_CONFIG['wernis_api_id']                       = $DUMMY['wernis_api_id'];
+       $_CONFIG['wernis_api_md5']                      = $DUMMY['wernis_api_md5'];
+       $_CONFIG['wernis_api_url']                      = $DUMMY['wernis_api_url'];
+       $_CONFIG['wernis_refid']                        = $DUMMY['wernis_refid'];
        unset($DUMMY);
        break;
 }
index a44a05c241797f80654f1496fbeb564746cef66b..9bca2761b53682be373370be4d558f45e65f27b9 100644 (file)
@@ -41,7 +41,8 @@ if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) {
 define('TASK_ADMIN_LIST_WERNIS_ALL', "Alle {!POINTS!}-Ein-/Auszahlungen");
 define('TASK_ADMIN_LIST_WERNIS_ALL_TITLE', "Listet alle {!POINTS!}-Ein- und Auszahlungen auf.");
 define('WERNIS_ADMIN_CONFIG_TITLE', "Einstellungen zum WDS66-Hauptaccount:");
-define('WERNIS_ADMIN_MIN_AMOUNT', "Minimumguthaben von {!POINTS!} f&uuml;r Auszahlungen.");
+define('WERNIS_ADMIN_MIN_PAYOUT', "Minimumguthaben von {!POINTS!} f&uuml;r Auszahlungen.");
+define('WERNIS_ADMIN_MIN_WITHDRAW', "Minimumguthaben von {!POINTS!} f&uuml;r Einzahlungen.");
 define('WERNIS_ADMIN_API_ID', "WDS66-API-ID (api_id=x)");
 define('WERNIS_ADMIN_API_MD5', "WDS66-API-Key (api_md5=xxxxx; 32-stellig)");
 define('WERNIS_ADMIN_API_URL', "Basis-URL der API-Skripte");
@@ -79,7 +80,7 @@ define('WERNIS_UNKNOWN_ERROR', "Unbekannter Fehler aufgetreten!");
 // Member messages
 define('WERNIS_MEMBER_NO_ACCOUNT', "Noch kein WDS66-Account? Hier entlang!");
 define('WERNIS_MEMBER_API_DATA_MISSING', "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten m&uuml;ssen.");
-define('WERNIS_MEMBER_MIN_AMOUNT_PAYOUT', "Sie haben nicht gen&uuml;gend {!POINTS!} zum Auszahlen! Mindestens: <u>%s</u> {!POINTS!}.");
+define('WERNIS_MEMBER_MIN_PAYOUT_PAYOUT', "Sie haben nicht gen&uuml;gend {!POINTS!} zum Auszahlen! Mindestens: <u>%s</u> {!POINTS!}.");
 define('WERNIS_MEMBER_WITHDRAW_TITLE', "Wernis bei {!TITLE!} einzahlen:");
 define('WERNIS_MEMBER_WITHDRAW_POINTS_ACCOUNT', "{!POINTS!} hier im Account:");
 define('WERNIS_MEMBER_WITHDRAW_MIN_POINTS', "Mindest einzuzahlendes Wernis-Guthaben:");
index 5df7fb6ad77ac170bda3522714631d4aa1f236d3..9f1fa093f5a5c6ccc5d0d5f840229abc0c7fde43 100644 (file)
@@ -55,7 +55,8 @@ if (isset($_POST['ok'])) {
 }  else {
        // Prepare data for template output
        $content = array(
-               'min_amount'    => bigintval($_CONFIG['wernis_min_amount']),
+               'min_payout'    => bigintval($_CONFIG['wernis_min_payout']),
+               'min_withdraw'  => bigintval($_CONFIG['wernis_min_withdraw']),
                'api_id'                => bigintval($_CONFIG['wernis_api_id']),
                'api_md5'               => $_CONFIG['wernis_api_md5'],
                'api_url'               => $_CONFIG['wernis_api_url'],
index c2a1d8bcae8431a332dac7cbe60c55e0b5e5bc2e..691c9d17fcc87b9c5696bcbe74f74bebef3010ca 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!
index bc6a11a1e44fa895de26205e214ec0782fd56fa5..b66a6498260e355c94c780c537b1079fc4ef9d2a 100644 (file)
                        class="admin_normal" value="$content[api_md5]" size="33"
                        maxlength="32" /></TD>
        </TR>
-       <TR>
-               <TD colspan="3" class="seperator bottom2" height="5">&nbsp;</TD>
-       </TR>
-       <TR>
-               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
-       </TR>
-       <TR>
-               <TD width="300" align="right">{--WERNIS_ADMIN_MIN_AMOUNT--}:</TD>
-               <TD class="seperator" width="10">&nbsp;</TD>
-               <TD width="270"><INPUT type="text" name="wernis_min_amount"
-                       class="admin_normal" value="$content[min_amount]" size="5"
-                       maxlength="20" /></TD>
-       </TR>
        <TR>
                <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
        </TR>
        <TR>
                <TD colspan="3" class="bottom2 seperator" height="5">&nbsp;</TD>
        </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" align="right">{--WERNIS_ADMIN_MIN_PAYOUT--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270"><INPUT type="text" name="wernis_min_payout"
+                       class="admin_normal" value="$content[min_payout]" size="5"
+                       maxlength="20" /></TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+       </TR>
+       <TR>
+               <TD width="300" align="right">{--WERNIS_ADMIN_MIN_WITHDRAW--}:</TD>
+               <TD class="seperator" width="10">&nbsp;</TD>
+               <TD width="270"><INPUT type="text" name="wernis_min_withdraw"
+                       class="admin_normal" value="$content[min_withdraw]" size="5"
+                       maxlength="20" /></TD>
+       </TR>
+       <TR>
+               <TD colspan="3" class="seperator bottom2" height="5">&nbsp;</TD>
+       </TR>
        <TR>
                <TD colspan="3" align="center" class="admin_footer"><INPUT
                        type="reset" class="admin_reset" value="{--CLEAR_FORM--}">&nbsp;*&nbsp;<INPUT