Go to the documentation of this file.
40 $aRecipient =
db_arr(
"SELECT * FROM `Profiles` WHERE `NickName` = '$sRecipient'");
48 'send_copy' =>
'recipient' == $sSendTo ||
'both' == $sSendTo ?
true :
false,
49 'notification' =>
false,
50 'send_copy_to_me' =>
'me' == $sSendTo ||
'both' == $sSendTo ?
true :
false,
63 $iMsgId = (int)$iMsgId;
64 $sFieldsAdd = $isInbox ?
", `m`.`Sender` AS `AuthorID`" :
", `m`.`Recipient` AS `AuthorID` ";
66 `m`.`ID`, UNIX_TIMESTAMP(`m`.`Date`) AS `Date`, `m`.`Sender`, `m`.`Recipient`, `m`.`Subject`, `m`.`Text`, `m`.`New` $sFieldsAdd
67 FROM `sys_messages` AS `m`
68 WHERE `m`.`ID` = '$iMsgId'");
74 'Sender' =>
new xmlrpcval($aRow[
'Sender']),
75 'Recipient' =>
new xmlrpcval($aRow[
'Recipient']),
76 'Subject' =>
new xmlrpcval($aRow[
'Subject']),
83 if ($isInbox && $aRow[
'New'])
84 db_res(
"UPDATE `sys_messages` SET `New` = 0 WHERE `ID` = '$iMsgId'");
100 $sWhere =
"`Recipient` = '$iId' AND NOT FIND_IN_SET('recipient', `Trash`)";
102 $sWhere =
"`Sender` = '$iId' AND NOT FIND_IN_SET('sender', `Trash`)";
104 $sFieldsAdd = $isInbox ?
", `m`.`Sender` AS `AuthorID`" :
", `m`.`Recipient` AS `AuthorID` ";
106 `m`.`ID`, UNIX_TIMESTAMP(`m`.`Date`) AS `Date`, `m`.`Sender`, `m`.`Recipient`, `m`.`Subject`, `m`.`New` $sFieldsAdd
107 FROM `sys_messages` AS `m`
108 INNER JOIN `Profiles` as `p` ON (`p`.`ID` = `m`.`Sender`)
110 ORDER BY `Date` DESC");
111 while ($aRow = $r->fetch()) {
116 'Sender' =>
new xmlrpcval($aRow[
'Sender']),
117 'Recipient' =>
new xmlrpcval($aRow[
'Recipient']),
118 'Subject' =>
new xmlrpcval($aRow[
'Subject']),
124 $aMsgs[] =
new xmlrpcval($aMsg,
'struct');
process_db_input($sText, $iStripTags=0)
sendMessage($sUser, $sPwd, $sRecipient, $sSubj, $sText, $sSendTo)
_getMessage($sUser, $sPwd, $iMsgId, $isInbox)
if( $sMessagesList) $aMailBoxSettings
defineTimeInterval($iTime, $bAutoDateConvert=true, $bShort=false)
getMessagesInbox($sUser, $sPwd)
_getMessages($sUser, $sPwd, $isInbox)
getMessagesSent($sUser, $sPwd)
ch_import($sClassName, $aModule=array())
const CH_MAILBOX_SEND_UNKNOWN_RECIPIENT
const CH_SLASHES_NO_ACTION
getMessageSent($sUser, $sPwd, $iMsgId)
db_arr($query, $bindings=[])
getMessageInbox($sUser, $sPwd, $iMsgId)
db_res($query, $bindings=[])
static checkLogin($sUser, $sPwd)
if(isset($_GET['messages_types'])) switch($aMailBoxSettings['mailbox_mode']) $oMailBox
static getThumbLink($iId, $sType='thumb')