- if ((isFormSent()) && (postRequestElement('points') > 0)) {
- $result_main = SQL_QUERY("SELECT userid, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
- __FILE__, __LINE__);
- while ($content = merge_array($content, SQL_FETCHARRAY($result_main))) {
+ if ((isFormSent()) && (postRequestParameter('points') > 0)) {
+ // Add points to all accounts
+ $content['points'] = bigintval(postRequestParameter('points'));
+
+ // Load userid
+ $result_main = SQL_QUERY("SELECT `userid`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
+ __FILE__, __LINE__);
+ while ($row = SQL_FETCHARRAY($result_main)) {
+ // Merge both arrays
+ $content = merge_array($content, $row);
+