ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChatPresentationGUI Class Reference

Chat presentation GUI handler. More...

+ Collaboration diagram for ilChatPresentationGUI:

Public Member Functions

 __construct ()
 Constructor public.
executeCommand ()
 execute command

Detailed Description

Chat presentation GUI handler.

Version
$Id$

ilChatPresentationGUI: ilObjChatGUI

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

Constructor & Destructor Documentation

ilChatPresentationGUI::__construct ( )

Constructor public.

Parameters
integerreference_id

Definition at line 39 of file class.ilChatPresentationGUI.php.

{}

Member Function Documentation

& ilChatPresentationGUI::executeCommand ( )

execute command

Definition at line 44 of file class.ilChatPresentationGUI.php.

References $_GET, $_POST, $_SESSION, $cmd, $ilCtrl, $lng, $param, $ret, $tpl, exit, ilUtil\sendInfo(), and ilUtil\stripSlashes().

{
global $lng, $ilAccess, $tpl, $ilNavigationHistory, $ilCtrl;
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd();
if ($next_class == "")
{
$ilCtrl->setCmdClass("ilobjchatgui");
if($cmd == '') $ilCtrl->setCmd("showFrames");
$next_class = $ilCtrl->getNextClass($this);
}
if(strpos(trim(ilUtil::stripSlashes($_POST['invitation'])), '_') !== false)
{
$param = trim(ilUtil::stripSlashes($_POST['invitation']));
$_GET['ref_id'] = (int)substr($param, 0, strpos($param, '_'));
$_REQUEST['room_id'] = (int)substr($param, strrpos($param, '_') + 1);
}
// add entry to navigation history
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$ilNavigationHistory->addItem($_GET["ref_id"],
"ilias.php?baseClass=ilChatPresentationGUI&cmd=infoScreen&ref_id=".$_GET["ref_id"], "chat");
}
switch ($next_class)
{
case 'ilobjchatgui':
include_once("./Modules/Chat/classes/class.ilObjChatGUI.php");
$chat_gui = new ilObjChatGUI(array(), $_GET["ref_id"], true, false);
$chat_gui->object->chat_room->setRoomId((int) $_REQUEST["room_id"]);
$chat_gui->object->chat_room->setUserId($_SESSION["AccountId"]);
// check room access
if(!$chat_gui->object->chat_room->checkAccess())
{
unset($_REQUEST["room_id"]);
unset($_REQUEST["message"]);
ilUtil::sendInfo("You are not entitled to view this room",true);
}
// check server accessibility
if(!$chat_gui->object->server_conf->getActiveStatus())
{
$tmp_tpl = new ilTemplate('tpl.chat_srv_off_redirect_js.html', true, true, 'Modules/Chat');
$tmp_tpl->setVariable('OPENER_LOCATION', 'goto.php?target=chat_'.(int)$_GET['ref_id'].'&client_id='.CLIENT_ID);
echo $tmp_tpl->get();
exit();
}
$chat_gui->object->server_comm->setRecipientId((int) $_GET["p_id"]);
$ret = $ilCtrl->forwardCommand($chat_gui);
break;
}
$tpl->show();
}

+ Here is the call graph for this function:


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