Possible fix
[mailer.git] / inc / mysql-manager.php
index 7c8d7b4947b49e6e4cec558ccde9637ee6459e08..459eeb549dbddea15b6026128426f6c9c5dfe789 100644 (file)
@@ -641,7 +641,7 @@ function isMember () {
 function isAdmin ($admin = '') {
        // Init variables
        $ret = false; $passCookie = ''; $valPass = '';
-       //* DEBUG: */ print(__LINE__."ADMIN:".$admin."<br />");
+       //* DEBUG: */ print(__FUNCTION__.':'.$admin.'<br />');
 
        // If admin login is not given take current from cookies...
        if ((empty($admin)) && (isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5'))) {
@@ -649,7 +649,7 @@ function isAdmin ($admin = '') {
                $admin = getSession('admin_login');
                $passCookie = getSession('admin_md5');
        } // END - if
-       //* DEBUG: */ print(__LINE__."ADMIN:".$admin.'/'.$passCookie."<br />");
+       //* DEBUG: */ print(__FUNCTION__.':'.$admin.'/'.$passCookie.'<br />');
 
        // Search in array for entry
        if (isset($GLOBALS['admin_hash'])) {
@@ -688,7 +688,7 @@ function isAdmin ($admin = '') {
 
        if (!empty($valPass)) {
                // Check if password is valid
-               //* DEBUG: */ print(__FUNCTION__ . ':' . $valPass . '/' . $passCookie . '<br />');
+               //* DEBUG: */ print(__FUNCTION__ . ':(' . $valPass . '==' . $passCookie . ')='.intval($valPass == $passCookie).'<br />');
                $ret = (($valPass == $passCookie) || ((strlen($valPass) == 32) && ($valPass == md5($passCookie))) || (($valPass == '*FAILED*') && (!isExtensionActive('cache'))));
        } // END - if
 
@@ -965,7 +965,7 @@ function getModeAction ($mode, $what) {
                // Get it directly from URL
                return getAction();
        }
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />");
+       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret.'<br />');
 
        // Does the module have a menu?
        if (ifModuleHasMenu($mode)) {
@@ -1343,7 +1343,7 @@ function updateReferalCounter ($userid) {
                array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS()."<br />");
+       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS().'<br />');
        if (SQL_AFFECTEDROWS() < 1) {
                // First count!
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refsystem` (`userid`, `level`, `counter`) VALUES (%s,%s,1)",
@@ -1919,7 +1919,7 @@ VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
 // Generate a receiver list for given category and maximum receivers
 function generateReceiverList ($cat, $receiver, $mode = '') {
        // Init variables
-       $CAT_TABS     = "%s";
+       $CAT_TABS     = $cat."=%s";
        $CAT_WHERE    = '';
        $receiverList = '';
        $result       = false;