- if ((isset($_POST['ok'])) && ($_POST['points'] > 0)) {
- define('__POINTS_VALUE', $_POST['points']);
- $result_main = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
- while (list($uid) = SQL_FETCHROW($result_main)) {
+ if ((IS_FORM_SENT()) && (REQUEST_POST('points') > 0)) {
+ // @TODO Rewrite this constant
+ define('__POINTS_VALUE', REQUEST_POST('points'));
+
+ // Select all users
+ $result_main = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY userid",
+ __FILE__, __LINE__);
+
+ // Process all entries
+ while ($content = SQL_FETCHROW($result_main)) {