Public Member Functions | |
ilChatRecord ($a_id=0) | |
Constructor public. | |
getErrorMessage () | |
setRoomId ($a_id) | |
getRoomId () | |
setRefId ($a_id) | |
getRefId () | |
setRecordId ($a_id) | |
getRecordId () | |
setModeratorId ($a_id) | |
getModeratorId () | |
setRecord ($a_data) | |
getRecord ($a_id=0) | |
setTitle ($a_title) | |
getTitle () | |
setDescription ($a_description) | |
getDescription () | |
startRecording ($a_title="") | |
stopRecording () | |
isRecording () | |
Data Fields | |
$ilias | |
$lng | |
$error_msg | |
$ref_id = 0 | |
$moderator_id = 0 | |
$room_id = 0 | |
$record_id = 0 | |
$data = array() |
Definition at line 33 of file class.ilChatRecord.php.
ilChatRecord::getDescription | ( | ) |
Definition at line 147 of file class.ilChatRecord.php.
{ return $this->data["description"]; }
ilChatRecord::getErrorMessage | ( | ) |
Definition at line 69 of file class.ilChatRecord.php.
{
return $this->error_msg;
}
ilChatRecord::getModeratorId | ( | ) |
Definition at line 105 of file class.ilChatRecord.php.
Referenced by startRecording().
{
return $this->moderator_id;
}
ilChatRecord::getRecord | ( | $ | a_id = 0 |
) |
Definition at line 114 of file class.ilChatRecord.php.
References $data, $query, $res, getRecordId(), setRecord(), and setRecordId().
Referenced by isRecording(), and startRecording().
{ if ($a_id != 0) { $this->setRecordId($a_id); } $query = "SELECT * FROM chat_records WHERE record_id = '" . addslashes($this->getRecordId()) . "'"; $res = $this->ilias->db->query($query); if (DB::isError($res)) die("ilChatRecord::getRecord(): " . $res->getMessage() . "<br>SQL-Statement: ".$q); $data = array(); if ($res->numRows() > 0) { $data = $res->fetchRow(DB_FETCHMODE_ASSOC); } $this->setRecord($data); }
ilChatRecord::getRecordId | ( | ) |
Definition at line 96 of file class.ilChatRecord.php.
Referenced by getRecord().
{
return $this->record_id;
}
ilChatRecord::getRefId | ( | ) |
Definition at line 87 of file class.ilChatRecord.php.
Referenced by isRecording(), startRecording(), and stopRecording().
{
return $this->ref_id;
}
ilChatRecord::getRoomId | ( | ) |
Definition at line 78 of file class.ilChatRecord.php.
Referenced by isRecording(), startRecording(), and stopRecording().
{
return $this->room_id;
}
ilChatRecord::getTitle | ( | ) |
Definition at line 138 of file class.ilChatRecord.php.
{ return $this->data["title"]; }
ilChatRecord::ilChatRecord | ( | $ | a_id = 0 |
) |
Constructor public.
integer | reference_id or object_id | |
boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 53 of file class.ilChatRecord.php.
References $ilias, $lng, and setRefId().
{ global $ilias,$lng; define(MAX_TIME,60*60*24); $this->ilias =& $ilias; $this->lng =& $lng; if ($a_id > 0) { $this->setRefId($a_id); } }
ilChatRecord::isRecording | ( | ) |
Definition at line 191 of file class.ilChatRecord.php.
References $id, $query, $res, getRecord(), getRefId(), getRoomId(), and setRecordId().
{ $query = "SELECT record_id FROM chat_records WHERE chat_id = '" . $this->getRefId() . "' AND room_id = '" . $this->getRoomId() . "' AND start_time > 0 AND end_time = 0"; $res = $this->ilias->db->query($query); if (DB::isError($res)) die("ilChatRecord::isRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q); if ($res->numRows() > 0) { $id = $res->fetchRow(DB_FETCHMODE_ASSOC); $this->setRecordId($id["record_id"]); $this->getRecord(); return true; } return false; }
ilChatRecord::setDescription | ( | $ | a_description | ) |
Definition at line 143 of file class.ilChatRecord.php.
{
$this->data["description"] = $a_description;
}
ilChatRecord::setModeratorId | ( | $ | a_id | ) |
Definition at line 101 of file class.ilChatRecord.php.
{ $this->moderator_id = $a_id; }
ilChatRecord::setRecord | ( | $ | a_data | ) |
Definition at line 110 of file class.ilChatRecord.php.
Referenced by getRecord(), and stopRecording().
{ $this->data = $a_data; }
ilChatRecord::setRecordId | ( | $ | a_id | ) |
Definition at line 92 of file class.ilChatRecord.php.
Referenced by getRecord(), isRecording(), startRecording(), and stopRecording().
{ $this->record_id = $a_id; }
ilChatRecord::setRefId | ( | $ | a_id | ) |
Definition at line 83 of file class.ilChatRecord.php.
Referenced by ilChatRecord().
{ $this->ref_id = $a_id; }
ilChatRecord::setRoomId | ( | $ | a_id | ) |
Definition at line 74 of file class.ilChatRecord.php.
{ $this->room_id = $a_id; }
ilChatRecord::setTitle | ( | $ | a_title | ) |
Definition at line 134 of file class.ilChatRecord.php.
{
$this->data["title"] = $a_title;
}
ilChatRecord::startRecording | ( | $ | a_title = "" |
) |
Definition at line 152 of file class.ilChatRecord.php.
References $query, $res, getModeratorId(), getRecord(), getRefId(), getRoomId(), and setRecordId().
{ $query = "INSERT INTO chat_records SET moderator_id = '" . $this->getModeratorId() . "', chat_id = '" . $this->getRefId() . "', room_id = '" . $this->getRoomId() . "', title = '" . addslashes($a_title) . "', start_time = '" . time() . "'"; $res = $this->ilias->db->query($query); if (DB::isError($res)) die("ilChatRecord::startRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q); $query = "SELECT LAST_INSERT_ID()"; $res = $this->ilias->db->query($query); if (DB::isError($res)) die("ilChatRecord::startRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q); if ($res->numRows() > 0) { $lastId = $res->fetchRow(); $this->setRecordId($lastId[0]); $this->getRecord(); } }
ilChatRecord::stopRecording | ( | ) |
Definition at line 176 of file class.ilChatRecord.php.
References $data, $query, $res, getRefId(), getRoomId(), setRecord(), and setRecordId().
{ $query = "UPDATE chat_records SET end_time = '" . time() . "' WHERE chat_id = '" . $this->getRefId() . "' AND room_id = '" . $this->getRoomId() . "'"; $res = $this->ilias->db->query($query); if (DB::isError($res)) die("ilChatRecord::stopRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q); $this->setRecordId(0); $data = array(); $this->setRecord($data); }
ilChatRecord::$data = array() |
Definition at line 45 of file class.ilChatRecord.php.
Referenced by getRecord(), and stopRecording().
ilChatRecord::$error_msg |
Definition at line 38 of file class.ilChatRecord.php.
ilChatRecord::$ilias |
Definition at line 35 of file class.ilChatRecord.php.
Referenced by ilChatRecord().
ilChatRecord::$lng |
Definition at line 36 of file class.ilChatRecord.php.
Referenced by ilChatRecord().
ilChatRecord::$moderator_id = 0 |
Definition at line 41 of file class.ilChatRecord.php.
ilChatRecord::$record_id = 0 |
Definition at line 43 of file class.ilChatRecord.php.
ilChatRecord::$ref_id = 0 |
Definition at line 40 of file class.ilChatRecord.php.
ilChatRecord::$room_id = 0 |
Definition at line 42 of file class.ilChatRecord.php.