X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-config_points.php;h=35f312eaf9c6f3b2d328159dd8d8708028054d59;hb=f5e6a0a8acafd76f06f1122b4bdc2dc0f9277aa4;hp=53cbc18472f81738df2793b05152e057a2391392;hpb=1ebf518b9552f71ee95de6f4b80e6de3a27716d1;p=mailer.git diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 53cbc18472..35f312eaf9 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -1,7 +1,7 @@ $value) { - // Secure ID + // Secure id $id = bigintval($id); // Revert german commata - setRequestPostElement('perc', array($id => convertCommaToDot(postRequestElement('perc', $id)))); + setRequestPostElement('percents', array($id => convertCommaToDot(postRequestElement('percents', $id)))); // Update entry - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET level='%s', percents='%s' WHERE `id`=%s LIMIT 1", - array(bigintval($value), postRequestElement('perc', $id), $id), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET `level`='%s', `percents`='%s' WHERE `id`=%s LIMIT 1", + array(bigintval($value), postRequestElement('percents', $id), $id), __FILE__, __LINE__); } $message = getMessage('REF_DEPTHS_SAVED'); break; @@ -120,11 +120,11 @@ if (isFormSent()) { array('allow_direct_pay', 'reg_points_mode', 'ref_payout'), array(postRequestElement('allow_direct_pay'), postRequestElement('reg_points_mode'), $REF) ); - if ((getConfig('ref_payout') == 0) && (postRequestElement('ref_payout') > 0)) { + if ((getConfig('ref_payout') == '0') && (postRequestElement('ref_payout') > 0)) { // Update account's ref_payout for "must-confirm" addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`) WHERE `mails_confirmed` < %s", $REF, $REF)); - } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == 0)) { + } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == '0')) { // Update account's ref_payout for "not-must-confirm" addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0"); addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0"); @@ -135,8 +135,8 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); if ((isSqlsValid()) && (isSqlsValid())) { if (strpos($GLOBALS['sqls'][0], 'INSERT') > -1) { - $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE level='%s' LIMIT 1", - array(bigintval(postRequestElement('level'))), __FILE__, __LINE__); + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level`='%s' LIMIT 1", + array(bigintval(postRequestElement('level'))), __FILE__, __LINE__); SQL_FREERESULT($result); } // END - if @@ -220,7 +220,7 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); 'sw' => $SW, 'id' => $id, 'level' => $content['level'], - 'percents' => translateComma($contentp['percents']), + 'percents' => translateComma($content['percents']), ); // Load row template and switch color