]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-add_points.php
A lot templates rewritten, TODOs.txt updated, XHTML fixes:
[mailer.git] / inc / modules / admin / what-add_points.php
index 73534797b87b57581ed03b1d080ab28d68982c19..a86d41efedd51e055656d6f4c302813c7511d9e7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 11/23/2003 *
- * ===============                              Last change: 09/23/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 11/23/2003 *
+ * ===================                          Last change: 09/23/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-add_points.php                              *
@@ -83,12 +83,10 @@ if (getRequestElement('userid') == 'all') {
                loadTemplate('admin_add_points_all');
        }
 } elseif (isGetRequestElementSet('userid')) {
-       // User ID found in URL so we use this give him some credits
-       $result = SQL_QUERY_ESC("SELECT `surname`, `family`, `email` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s AND `status`='CONFIRMED' LIMIT 1",
-               array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1) {
+       // User id found in URL so we use this give him some credits
+       if (fetchUserData(getRequestElement('userid'))) {
                // Selected user does exist
-               $content = SQL_FETCHARRAY($result);
+               $content = getUserDataArray();
 
                if ((isFormSent()) && (isPostRequestElementSet(('points')))) {
                        // Add points and send an email to him...
@@ -117,12 +115,9 @@ if (getRequestElement('userid') == 'all') {
                // User not found!
                loadTemplate('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), getRequestElement('userid'))."</div>");
        }
-
-       // Free result
-       SQL_FREERESULT($result);
 } else {
        // Output selection form with all confirmed user accounts listed
-       addMemberSelectionBox('0', true);
+       addMemberSelectionBox(0, true);
 }
 
 // [EOF]