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/'";
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;
}
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");
// 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: <u>%s</u> {!POINTS!}.");
+define('WERNIS_MEMBER_MIN_PAYOUT_PAYOUT', "Sie haben nicht genü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:");
} 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'],
$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'] = "";
// 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
// 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
// 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!
class="admin_normal" value="$content[api_md5]" size="33"
maxlength="32" /></TD>
</TR>
- <TR>
- <TD colspan="3" class="seperator bottom2" height="5"> </TD>
- </TR>
- <TR>
- <TD colspan="3" class="seperator" height="5"> </TD>
- </TR>
- <TR>
- <TD width="300" align="right">{--WERNIS_ADMIN_MIN_AMOUNT--}:</TD>
- <TD class="seperator" width="10"> </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"> </TD>
</TR>
<TR>
<TD colspan="3" class="bottom2 seperator" height="5"> </TD>
</TR>
+ <TR>
+ <TD colspan="3" class="seperator" height="5"> </TD>
+ </TR>
+ <TR>
+ <TD width="300" align="right">{--WERNIS_ADMIN_MIN_PAYOUT--}:</TD>
+ <TD class="seperator" width="10"> </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"> </TD>
+ </TR>
+ <TR>
+ <TD width="300" align="right">{--WERNIS_ADMIN_MIN_WITHDRAW--}:</TD>
+ <TD class="seperator" width="10"> </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"> </TD>
+ </TR>
<TR>
<TD colspan="3" align="center" class="admin_footer"><INPUT
type="reset" class="admin_reset" value="{--CLEAR_FORM--}"> * <INPUT