ID)) { $userid = $current_user->ID; } return $userid; } function getFriendsList($userid,$time) { $sql = ("select DISTINCT ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity, CONCAT(".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID.",'|',".TABLE_PREFIX.DB_USERTABLE.".user_email) avatar, ".TABLE_PREFIX.DB_USERTABLE.".user_nicename link, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." <> '".mysql_real_escape_string($userid)."' and ('".$time."'-".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." < '".((ONLINE_TIMEOUT)*2)."') order by username asc"); return $sql; } function getUserDetails($userid) { $sql = ("select ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." userid, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_NAME." username, ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_LASTACTIVITY." lastactivity, ".TABLE_PREFIX.DB_USERTABLE.".user_nicename link, CONCAT(".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID.",'|',".TABLE_PREFIX.DB_USERTABLE.".user_email) avatar, cometchat_status.message, cometchat_status.status from ".TABLE_PREFIX.DB_USERTABLE." left join cometchat_status on ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = cometchat_status.userid where ".TABLE_PREFIX.DB_USERTABLE.".".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'"); return $sql; } function updateLastActivity($userid) { $sql = ("update `".TABLE_PREFIX.DB_USERTABLE."` set ".DB_USERTABLE_LASTACTIVITY." = '".getTimeStamp()."' where ".DB_USERTABLE_USERID." = '".mysql_real_escape_string($userid)."'"); return $sql; } function getUserStatus($userid) { $sql = ("select cometchat_status.message, cometchat_status.status from cometchat_status where userid = '".mysql_real_escape_string($userid)."'"); return $sql; } function getLink($link) { return ''; } function getAvatar($data) { $data = explode('|',$data); $id = $data[0]; return 'http://www.gravatar.com/avatar/'.md5($data[1]).'?d=wavatar&s=80'; } function getTimeStamp() { return current_time('timestamp'); } function processTime($time) { return $time; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* HOOKS */ function hooks_statusupdate($userid,$statusmessage) { } function hooks_forcefriends() { } function hooks_activityupdate($userid,$status) { } function hooks_message($userid,$unsanitizedmessage) { } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /* LICENSE */ include_once(dirname(__FILE__).'/license.php'); $x="\x62a\x73\x656\x34\x5fd\x65c\157\144\x65"; eval($x('JHI9ZXhwbG9kZSgnLScsJGxpY2Vuc2VrZXkpOyRwXz0wO2lmKCFlbXB0eSgkclsyXSkpJHBfPWludHZhbChwcmVnX3JlcGxhY2UoIi9bXjAtOV0vIiwnJywkclsyXSkpOw')); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////