X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fonline_functions.php;h=ec0dffee1fc24f135b9b8c0d9608275d24f1d796;hb=259c881488239188a3a8606043a6864042de42f9;hp=9bf00786400cc069000bb391454a0a491ee623cd;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;p=mailer.git diff --git a/inc/libs/online_functions.php b/inc/libs/online_functions.php index 9bf0078640..ec0dffee1f 100644 --- a/inc/libs/online_functions.php +++ b/inc/libs/online_functions.php @@ -1,7 +1,7 @@ 0) && (isMember())) { + if (isMember()) { // Is valid user $userid = getMemberId(); - $MEM = 'Y'; + $isMember = 'Y'; } // END - if if (isAdmin()) { // Is administrator - $ADMIN = 'Y'; + $isAdmin = 'Y'; } // END - if - // Get refid - $rid = determineReferalId(); - // Now search for the user $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{?_MYSQL_PREFIX?}_online` WHERE `sid`='%s' LIMIT 1", array(session_id()), __FUNCTION__, __LINE__); @@ -86,7 +85,7 @@ SET `action`='%s', `what`='%s', `userid`=%s, - `refid`='%s', + `refid`=%s, `is_member`='%s', `is_admin`='%s', `timestamp`=UNIX_TIMESTAMP(), @@ -96,12 +95,12 @@ WHERE LIMIT 1", array( getModule(), - getAction(), + $action, getWhat(), $userid, - $rid, - $MEM, - $ADMIN, + makeDatabaseUserId(determineReferalId()), + $isMember, + $isAdmin, detectRemoteAddr(), session_id() ), __FUNCTION__, __LINE__); @@ -110,12 +109,12 @@ LIMIT 1", 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( getModule(), - getAction(), + $action, getWhat(), $userid, - $rid, - $MEM, - $ADMIN, + makeDatabaseUserId(determineReferalId()), + $isMember, + $isAdmin, session_id(), detectRemoteAddr() ), __FUNCTION__, __LINE__);