Tons of rewrites (SQL queries), surfbar nearly finished (working: surfing with static...
[mailer.git] / inc / modules / admin / what-add_points.php
index a71bb71c18e30bca856119593371af9b6ee5e58b..0d9ea9651d6a5c2c6e1a5cf5866801abe4678eea 100644 (file)
@@ -54,7 +54,7 @@ if ($_GET['u_id'] == "all")
                while (list($uid) = SQL_FETCHROW($result_main))
                {
                        // 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=%d AND status='CONFIRMED' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
                         array(bigintval($uid)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1)
                        {
@@ -65,7 +65,7 @@ if ($_GET['u_id'] == "all")
                                if ((isset($_POST['ok'])) && (!empty($_POST['points'])))
                                {
                                        // Ok, add points and send an email to him...
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+(%s) WHERE userid=%d AND ref_depth=0 LIMIT 1",
+                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+(%s) WHERE userid=%s AND ref_depth=0 LIMIT 1",
                                         array($_POST['points'], bigintval($uid)), __FILE__, __LINE__);
 
                                        // Update mediadata as well
@@ -97,7 +97,7 @@ if ($_GET['u_id'] == "all")
  elseif (!empty($_GET['u_id']))
 {
        // 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=%d AND status='CONFIRMED' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
         array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1)
        {
@@ -108,7 +108,7 @@ if ($_GET['u_id'] == "all")
                if ((isset($_POST['ok'])) && (!empty($_POST['points'])))
                {
                        // Ok, add points and send an email to him...
-                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+(%s) WHERE userid=%d AND ref_depth=0 LIMIT 1",
+                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+(%s) WHERE userid=%s AND ref_depth=0 LIMIT 1",
                         array($_POST['points'], bigintval($_GET['u_id'])), __FILE__, __LINE__);
 
                        // Remember points in constant