From: Roland Häder Date: Mon, 18 Feb 2008 20:19:31 +0000 (+0000) Subject: min payout and withdraw sepperated in wernis extension X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ed8c755a84537d8558eb73b83046765a2dea3d12;p=mailer.git min payout and withdraw sepperated in wernis extension --- diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index e33f6ecc3f..bde8ccb19d 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -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; } diff --git a/inc/language/wernis_de.php b/inc/language/wernis_de.php index a44a05c241..9bca2761b5 100644 --- a/inc/language/wernis_de.php +++ b/inc/language/wernis_de.php @@ -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ür Auszahlungen."); +define('WERNIS_ADMIN_MIN_PAYOUT', "Minimumguthaben von {!POINTS!} für Auszahlungen."); +define('WERNIS_ADMIN_MIN_WITHDRAW', "Minimumguthaben von {!POINTS!} fü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üssen."); -define('WERNIS_MEMBER_MIN_AMOUNT_PAYOUT', "Sie haben nicht genügend {!POINTS!} zum Auszahlen! Mindestens: %s {!POINTS!}."); +define('WERNIS_MEMBER_MIN_PAYOUT_PAYOUT', "Sie haben nicht genügend {!POINTS!} zum Auszahlen! Mindestens: %s {!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:"); diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 5df7fb6ad7..9f1fa093f5 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -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'], diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index c2a1d8bcae..691c9d17fc 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -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("
"); - } 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("
"); } 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("
"); - } 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("
"); } elseif ($_POST['amount'] > $points) { // Not enougth points left! diff --git a/templates/de/html/admin/admin_config_wernis.tpl b/templates/de/html/admin/admin_config_wernis.tpl index bc6a11a1e4..b66a649826 100644 --- a/templates/de/html/admin/admin_config_wernis.tpl +++ b/templates/de/html/admin/admin_config_wernis.tpl @@ -26,19 +26,6 @@ class="admin_normal" value="$content[api_md5]" size="33" maxlength="32" /> - -   - - -   - - - {--WERNIS_ADMIN_MIN_AMOUNT--}: -   - -   @@ -62,6 +49,29 @@   + +   + + + {--WERNIS_ADMIN_MIN_PAYOUT--}: +   + + + +   + + + {--WERNIS_ADMIN_MIN_WITHDRAW--}: +   + + + +   +  *