<?php
/************************************************************************
- * MXChange v0.2.1 Start: 12/18/2008 *
- * ================ Last change: 12/18/2008 *
+ * Mailer v0.2.1-FINAL Start: 12/18/2008 *
+ * =================== Last change: 12/18/2008 *
* *
* -------------------------------------------------------------------- *
* File : online_functions.php *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Empty session?
if (session_id() == '') {
// This is invalid here!
- debug_report_bug('Invalid session.');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Invalid session.');
} // END - if
// Initialize variables
- $userid = 0;
+ $userid = '0';
$MEM = 'N';
$ADMIN = 'N';
// Valid userid?
- if ((isUserIdSet()) && (getUserId() > 0) && (isMember())) {
+ if ((isMemberIdSet()) && (getMemberId() > 0) && (isMember())) {
// Is valid user
- $userid = getUserId();
+ $userid = getMemberId();
$MEM = 'Y';
} // END - if
), __FUNCTION__, __LINE__);
} 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(
getModule(),
getAction(),
SQL_FREERESULT($result);
// Purge old entries
- SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_online` WHERE `timestamp` <= (UNIX_TIMESTAMP() - {?online_timeout?})", __FUNCTION__, __LINE__);
+ SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_online` WHERE `timestamp` <= (UNIX_TIMESTAMP() - {?online_timeout?})', __FUNCTION__, __LINE__);
}
// [EOF]