25 $xoops->preload()->triggerEvent(
'core.pmlite.start');
27 $reply = !empty($_GET[
'reply']) ? 1 : 0;
28 $send = !empty($_GET[
'send']) ? 1 : 0;
29 $send2 = !empty($_GET[
'send2']) ? 1 : 0;
31 $to_userid = isset($_GET[
'to_userid']) ? intval($_GET[
'to_userid']) : 0;
32 $msg_id = isset($_GET[
'msg_id']) ? intval($_GET[
'msg_id']) : 0;
34 if (empty($_GET[
'refresh']) && isset($_POST[
'op']) && $_POST[
'op'] !=
"submit") {
35 $jump =
"pmlite.php?refresh=" . time();
37 $jump .=
"&send={$send}";
40 $jump .=
"&send2={$send2}&to_userid={$to_userid}";
43 $jump .=
"&reply={$reply}&msg_id={$msg_id}";
48 header(
'location: ' . $jump);
58 if (isset($_POST[
'op']) && $_POST[
'op'] ==
"submit") {
65 $error_message .=
"<br />[ <a href='javascript:history.go(-1)'>" .
XoopsLocale::GO_BACK .
"</a> ]";
66 $tpl->assign(
'error_message', $error_message);
68 if (
$xoops->security()->check()) {
71 $pm->setVar(
"msg_time", time());
72 if (isset($_POST[
'msg_image'])) {
73 $pm->setVar(
"msg_image", $_POST[
'msg_image']);
75 $pm->setVar(
"subject", $_POST[
'subject']);
76 $pm->setVar(
"msg_text", $_POST[
'message']);
77 $pm->setVar(
"to_userid", $_POST[
'to_userid']);
78 $pm->setVar(
"from_userid",
$xoops->user->getVar(
"uid"));
80 $error_message = $pm->getHtmlErrors();
82 $tpl->assign(
'error_message', $error_message);
86 $info_message .=
"<br />";
89 $tpl->assign(
'info_message', $info_message);
92 $error_message = implode(
'<br />',
$xoops->security()->getErrors());
94 $tpl->assign(
'error_message', $error_message);
97 $tpl->display(
"module:system/system_pmlite.tpl");
106 if ($pm->getVar(
"to_userid") ==
$xoops->user->getVar(
'uid')) {
108 $message =
"[quote]\n";
110 $message .=
"\n" . $pm->getVar(
"msg_text",
"E") .
"\n[/quote]";
122 $subject = $pm->getVar(
'subject',
'E');
127 $form->addElement(
new Xoops\Form\Hidden(
'to_userid', $pm->getVar(
"from_userid")));
131 $form->addElement(
new Xoops\Form\Hidden(
'to_userid', $_POST[
"to_userid"]));
132 $subject =
$myts->htmlSpecialChars(
$myts->stripSlashesGPC($_POST[
'subject']));
133 $message =
$myts->htmlSpecialChars(
$myts->stripSlashesGPC($_POST[
'message']));
148 $subject_icons = XoopsLists::getSubjectsList();
149 foreach (array_keys($subject_icons) as
$i) {
150 $icons->addOption($i,
"<img src='" .
$xoops->url(
"images/subject/") . $i .
"' alt='" . $i .
"' />");
154 $form->addElement(
new Xoops\Form\Hidden(
'op',
'submit'));
160 $cancel_send->setExtra(
"onclick='javascript:window.close();'");
161 $buttons ->addElement($cancel_send);
162 $form->addElement($buttons);
164 $tpl->display(
"module:system/system_pmlite.tpl");
if($uname== ''||$pass== '') $member_handler
defined('DS') or define('DS' DIRECTORY_SEPARATOR
const S_MESSAGED_HAS_BEEN_POSTED
static getUnameFromId($userid, $usereal=0)
const E_NO_ACCESS_PERMISSION
const OR_CLICK_HERE_TO_CLOSE_WINDOW
const CLICK_HERE_TO_VIEW_YOU_PRIVATE_MESSAGES
const E_SELECTED_USER_DOES_NOT_EXIST
const E_GO_BACK_AND_TRY_AGAIN