ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChatInvitations Class Reference

Class ilChatInvitations. More...

+ Collaboration diagram for ilChatInvitations:

Public Member Functions

 ilChatInvitations ()
 Constructor.

Static Public Member Functions

static _countNewInvitations ($a_user_id)
static _getNewInvitations ($a_user_id)

Detailed Description

Class ilChatInvitations.

Author
Sascha Hofmann
Version
$Id$

Definition at line 32 of file class.ilChatInvitations.php.

Member Function Documentation

static ilChatInvitations::_countNewInvitations (   $a_user_id)
static

Definition at line 42 of file class.ilChatInvitations.php.

References $ilDB, $res, $row, and DB_FETCHMODE_OBJECT.

{
global $ilDB, $ilias;
if (!$a_user_id)
{
return 0;
}
$res = $ilDB->queryf('
SELECT COUNT(*) invitations FROM chat_invitations
WHERE guest_id = %s
AND guest_informed = %s
AND invitation_time > %s',
array('integer', 'integer', 'integer'),
array($a_user_id, '0', time() - 2 * 60 * 60));
return $row->invitations;
}
static ilChatInvitations::_getNewInvitations (   $a_user_id)
static

Definition at line 64 of file class.ilChatInvitations.php.

References $ilDB, $res, $row, and DB_FETCHMODE_ASSOC.

Referenced by ilChatInvitationGUI\getHTML().

{
global $ilDB, $ilias;
if(!(int)$a_user_id)
{
return array();
}
$res = $ilDB->queryf('
SELECT * FROM chat_invitations
WHERE guest_id = %s
AND guest_informed = %s
AND invitation_time > %s',
array('integer', 'integer', 'integer'),
array($a_user_id, '0', time() - 2 * 60 * 60));
$rows = array();
while($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
{
$rows[] = $row;
}
return is_array($rows) ? $rows : array();
}

+ Here is the caller graph for this function:

ilChatInvitations::ilChatInvitations ( )

Constructor.

Definition at line 37 of file class.ilChatInvitations.php.

{
return;
}

The documentation for this class was generated from the following file: