ILIAS  Release_3_10_x_branch Revision 61812
 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 DB_FETCHMODE_OBJECT.

{
global $ilDB, $ilias;
if (!$a_user_id)
{
return 0;
}
$q = "SELECT count(*) as invitations FROM chat_invitations WHERE guest_id = ".$ilDB->quote($a_user_id)." ".
"AND guest_informed = 0 ".
"AND invitation_time > ".(time() - 2 * 60 * 60)." ";
$row = $ilias->db->getRow($q,DB_FETCHMODE_OBJECT);
return $row->invitations;
}
static ilChatInvitations::_getNewInvitations (   $a_user_id)
static

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

References $res, and DB_FETCHMODE_ASSOC.

Referenced by ilChatInvitationGUI\getHTML().

{
global $ilDB, $ilias;
if(!(int)$a_user_id)
{
return array();
}
$query = "SELECT * FROM chat_invitations
WHERE guest_id = ".$ilDB->quote($a_user_id)."
AND guest_informed = 0
AND invitation_time > ".(time() - 2 * 60 * 60)." ";
$res = $ilDB->query($query);
$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: