]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-add_points.php
Generic function accepts eights (!) but optional parameter $callback, ext-network...
[mailer.git] / inc / modules / admin / what-add_points.php
index fe7baa722f4d9aa524005eb7766b5242867ff2c8..003f955a47681d9ba7d221f58cd31a36e59d79a8 100644 (file)
@@ -56,7 +56,10 @@ if (getRequestParameter('userid') == 'all') {
                        __FILE__, __LINE__);
 
                // Process all entries
-               while ($content = merge_array($content, SQL_FETCHARRAY($result_main))) {
+               while ($row = SQL_FETCHARRAY($result_main)) {
+                       // Merge both arrays
+                       $content = merge_array($content, $row);
+
                        // Remove depth to prevent booking errors. This is a bad coding
                        // practice, thats also why we need to write this project from
                        // scratch...
@@ -71,14 +74,14 @@ if (getRequestParameter('userid') == 'all') {
 
                        // Load email template and send email away
                        $message = loadEmailTemplate('add-points', $content, bigintval($content['userid']));
-                       sendEmail(bigintval($content['userid']), getMessage('ADMIN_ADD_SUBJ'), $message);
+                       sendEmail(bigintval($content['userid']), '{--ADMIN_ADD_SUBJECT--}', $message);
                } // END - while
 
                // Free memory
                SQL_FREERESULT($result_main);
 
                // Output message
-               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_ADDED'));
+               loadTemplate('admin_settings_saved', false, '{--ADMIN_ALL_POINTS_ADDED--}');
        } else {
                // Display form add points
                loadTemplate('admin_add_points_all');
@@ -102,8 +105,8 @@ if (getRequestParameter('userid') == 'all') {
                        // Message laden
                        $message = loadEmailTemplate('add-points', $content, bigintval(getRequestParameter('userid')));
 
-                       sendEmail(bigintval(getRequestParameter('userid')), getMessage('ADMIN_ADD_SUBJ'), $message);
-                       loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED'));
+                       sendEmail(bigintval(getRequestParameter('userid')), '{--ADMIN_ADD_SUBJECT--}', $message);
+                       loadTemplate('admin_settings_saved', false, '{--ADMIN_POINTS_ADDED--}');
                } else {
                        // Prepare content
                        $content['user']   = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
@@ -114,7 +117,7 @@ if (getRequestParameter('userid') == 'all') {
                }
        } else {
                // User not found!
-               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))) . '</div>');
        }
 } else {
        // Output selection form with all confirmed user accounts listed