Cheetah
modules
cheetah
chat
classes
ChChatModule.php
Go to the documentation of this file.
1
<?
php
2
8
require_once(CH_DIRECTORY_PATH_CLASSES .
'ChWsbModule.php'
);
9
10
class
ChChatModule
extends
ChWsbModule
11
{
15
function
__construct
(
$aModule
)
16
{
17
parent::__construct(
$aModule
);
18
19
//--- Define Membership Actions ---//
20
$aActions = $this->_oDb->getMembershipActions();
21
foreach
($aActions
as
$aAction) {
22
$sName
=
'ACTION_ID_'
. strtoupper(str_replace(
' '
,
'_'
, $aAction[
'name'
]));
23
if
(!defined(
$sName
))
24
define(
$sName
, $aAction[
'id'
]);
25
}
26
}
27
function
getContent
(
$iId
)
28
{
29
$sPassword
=
$iId
> 0 ? $_COOKIE[
'memberPassword'
] :
""
;
30
31
$aResult
=
checkAction
(
$iId
, ACTION_ID_USE_CHAT,
true
);
32
if
(
$aResult
[
CHECK_ACTION_RESULT
] ==
CHECK_ACTION_RESULT_ALLOWED
)
33
$sResult
=
getApplicationContent
(
'chat'
,
'user'
, array(
'id'
=>
$iId
,
'password'
=>
$sPassword
),
true
);
34
else
35
$sResult
=
MsgBox
(
$aResult
[
CHECK_ACTION_MESSAGE
]);
36
37
$sResult
=
DesignBoxContent
(
_t
(
'_chat_box_caption'
),
$sResult
, 11);
38
39
return
$sResult
;
40
}
41
}
MsgBox
MsgBox($sText, $iTimer=0)
Definition:
design.inc.php:175
CHECK_ACTION_RESULT_ALLOWED
const CHECK_ACTION_RESULT_ALLOWED
Definition:
membership_levels.inc.php:60
$sResult
$sResult
Definition:
advanced_settings.php:26
$aModule
$aModule
Definition:
classifieds.php:21
$aResult
$aResult
Definition:
index.php:19
CHECK_ACTION_RESULT
const CHECK_ACTION_RESULT
Definition:
membership_levels.inc.php:54
CHECK_ACTION_MESSAGE
const CHECK_ACTION_MESSAGE
Definition:
membership_levels.inc.php:55
php
$iId
$iId
Definition:
license.php:15
$sPassword
$sPassword
Definition:
actions.inc.php:10
ChChatModule\getContent
getContent($iId)
Definition:
ChChatModule.php:27
ChChatModule\__construct
__construct($aModule)
Definition:
ChChatModule.php:15
ChWsbModule
Definition:
ChWsbModule.php:41
_t
_t($key, $arg0="", $arg1="", $arg2="")
Definition:
languages.inc.php:509
getApplicationContent
getApplicationContent($sModule, $sApp, $aParamValues=array(), $bInline=false, $bEmbedCode=false, $sHtmlId="")
Definition:
content.inc.php:166
checkAction
checkAction($iMemberId, $actionID, $performAction=false, $iForcedProfID=0, $isCheckMemberStatus=true)
Definition:
membership_levels.inc.php:313
DesignBoxContent
DesignBoxContent($title, $content, $db_num=0, $caption_item='', $bottom_item='')
Definition:
design.inc.php:78
as
as
Definition:
Filter.ExtractStyleBlocks.Escaping.txt:10
$sName
$sName
Definition:
ChWsbAdminTools.php:853
ChChatModule
Definition:
ChChatModule.php:11
Generated by
1.8.20