21 if (!defined(
'XOOPS_MAINFILE_INCLUDED')) {
24 chdir(XOOPS_ROOT_PATH .
'/modules/pm/');
36 $jump =
"pmlite.php?refresh=" . time();
38 $jump .=
"&send={$send}";
40 $jump .=
"&send2={$send2}&to_userid={$to_userid}";
42 $jump .=
"&reply={$reply}&msg_id={$msg_id}";
45 header(
'location: ' . $jump);
49 if (!is_object(
$GLOBALS[
'xoopsUser'])) {
60 echo
"<br /><br /><div><h4>"._PM_USERNOEXIST.
"<br />";
62 echo
"[ <a href='javascript:history.go(-1)'>"._PM_GOBACK.
"</a> ]</div>";
63 }
else if (
$GLOBALS[
'xoopsSecurity']->check()) {
64 $pm_handler =& xoops_getModuleHandler(
'message',
'pm');
66 $pm->setVar(
"msg_time", time());
68 if (isset(
$_POST[
'icon'])) {
69 $pm->setVar(
"msg_image",
$_POST[
'icon']);
73 $pm->setVar(
"subject",
$_POST[
'subject']);
74 $pm->setVar(
"msg_text",
$_POST[
'message']);
75 $pm->setVar(
"to_userid",
$_POST[
'to_userid']);
76 $pm->setVar(
"from_userid",
$GLOBALS[
'xoopsUser']->getVar(
"uid"));
79 $pm->setVar(
'from_delete', 0);
82 echo $pm->getHtmlErrors();
83 echo
"<br /><a href='javascript:history.go(-1)'>"._PM_GOBACK.
"</a>";
87 echo
"<br /><br /><div style='text-align:center;'><h4>" .
_PM_MESSAGEPOSTED .
"</h4><br /><a href=\"javascript:window.opener.location='".XOOPS_URL.
"/viewpmsg.php';window.close();\">".
_PM_CLICKHERE.
"</a><br /><br /><a href=\"javascript:window.close();\">".
_PM_ORCLOSEWINDOW.
"</a></div>";
90 echo implode(
'<br />',
$GLOBALS[
'xoopsSecurity']->getErrors());
91 echo
"<br /><a href=\"javascript:window.close();\">"._PM_ORCLOSEWINDOW.
"</a>";
96 $pm_handler =& xoops_getModuleHandler(
'message',
'pm');
98 if ($pm->getVar(
"to_userid") ==
$GLOBALS[
'xoopsUser']->getVar(
'uid')) {
100 $message =
"[quote]\n";
102 $message .=
"\n" . $pm->getVar(
"msg_text",
"E") .
"\n[/quote]";
109 include_once
$GLOBALS[
'xoops']->path(
'class/template.php');
111 include_once
$GLOBALS[
'xoops']->path(
'class/xoopsformloader.php');
115 $subject = $pm->getVar(
'subject',
'E');
116 if (!preg_match(
"/^" .
_RE .
"/i", $subject)) {
117 $subject =
_RE .
' ' . $subject;
119 $GLOBALS[
'xoopsTpl']->assign(
'to_username', $pm_uname);
124 $subject =
$myts->htmlSpecialChars(
$myts->stripSlashesGPC(
$_POST[
'subject']));
125 $message =
$myts->htmlSpecialChars(
$myts->stripSlashesGPC(
$_POST[
'message']));
132 $GLOBALS[
'xoopsTpl']->assign(
'to_username', $to_username->render());
160 $cancel_send->setExtra(
"onclick='javascript:window.close();'");
161 $pmform->addElement($cancel_send);
163 $GLOBALS[
'xoopsTpl']->display(
"db:pm_pmlite.html");