Entire rewrite of mail part in app! Not kidding here...
[mailer.git] / inc / mysql-manager.php
index 7e6d95f31ae89ab7fe7e6f4acc09be7dac53bc3a..50fcf10742eb1d5cbb23471f06f910aa1e732c3f 100644 (file)
@@ -159,12 +159,12 @@ function CHECK_MODULE($mod) {
                                // to find a loop here... *sigh*
                                $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg
 (module, locked, hidden, mem_only, admin_only, has_menu) VALUES
-('%s', 'Y', 'N', 'N', 'N', 'N')", array($mod_chk), __FILE__, __LINE__);
+('%s','Y','N','N','N','N')", array($mod_chk), __FILE__, __LINE__);
                        } else {
                                // Wrong/missing sql_patches!
                                $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_mod_reg
 (module, locked, hidden, mem_only, admin_only) VALUES
-('%s', 'Y', 'N', 'N', 'N')", array($mod_chk), __FILE__, __LINE__);
+('%s','Y','N','N','N')", array($mod_chk), __FILE__, __LINE__);
                        }
 
                        // Everthing is fine?
@@ -594,7 +594,7 @@ function IS_MEMBER()
        } // END - if
 
        // Fix "deleted" cookies first
-       FIX_DELETED_COOKIES(array('userid', 'u_hash', 'lifetime'));
+       FIX_DELETED_COOKIES(array('userid','u_hash','lifetime'));
 
        // Are cookies set?
        if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash')) && (isSessionVariableSet('lifetime')) && (defined('COOKIE_PATH')))
@@ -1042,7 +1042,7 @@ function REMOVE_RECEIVER(&$ARRAY, $key, $uid, $pool_id, $stats_id="", $bonus=fal
                        if (SQL_NUMROWS($result) == 0)
                        {
                                // No, so we add one!
-                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_links (%s, userid, link_type) VALUES ('%s', '%s', '%s')",
+                               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_links (%s, userid, link_type) VALUES ('%s','%s','%s')",
                                 array($rowName, $stats_id, bigintval($uid), $type), __FILE__, __LINE__);
                                $ret = "done";
                        }
@@ -1244,7 +1244,7 @@ function UPDATE_REF_COUNTER($uid)
        if (SQL_AFFECTEDROWS() == 0)
        {
                // First count!
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refsystem (userid, level, counter) VALUES ('%s', '%s', '1')",
+               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refsystem (userid, level, counter) VALUES ('%s','%s','1')",
                 array(bigintval($uid), $REF_LVL), __FILE__, __LINE__);
        }
 
@@ -1325,7 +1325,7 @@ WHERE sid='%s' LIMIT 1",
                );
        } else {
                // No entry does exists so we simply add it!
-               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_online (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s', '%s', '%s', %s, %s, '%s', '%s', UNIX_TIMESTAMP(), '%s', '%s')",
+               SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_online (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')",
                        array($mod, $act, $wht, $uid, $rid, $MEM, $ADMIN, $SID, getenv('REMOTE_ADDR')), __FILE__, __LINE__
                );
        }
@@ -1553,7 +1553,7 @@ function ADD_JACKPOT($points)
        if (SQL_NUMROWS($result) == 0)
        {
                // Create line
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_jackpot (ok, points) VALUES ('ok', '%s')", array($points), __FILE__, __LINE__);
+               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_jackpot (ok, points) VALUES ('ok','%s')", array($points), __FILE__, __LINE__);
        }
         else
        {
@@ -1765,7 +1765,7 @@ function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $subject, $notes) {
                array($subject), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Task not created so it's a brand-new extension which we need to register and create a task for!
-               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'EXTENSION_UPDATE', '%s', '%s', UNIX_TIMESTAMP())",
+               $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())",
                        array($admin_id, $subject, $notes), __FILE__, __LINE__);
        } // END - if
 
@@ -1796,7 +1796,7 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
 
                // Task not created so it's a brand-new extension which we need to register and create a task for!
                $result_insert = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created)
-VALUES (%s, 0, 'NEW', 'EXTENSION', '%s', '%s', UNIX_TIMESTAMP())",
+VALUES (%s,0,'NEW','EXTENSION','%s','%s',UNIX_TIMESTAMP())",
                        array(
                                $admin_id,
                                $subject,