23 if (!is_object(
$GLOBALS[
'xoopsUser'])) {
29 include
$GLOBALS[
'xoops']->path(
'header.php');
37 if (isset(
$_POST[
'delete_messages']) && isset(
$_POST[
'msg_id'])) {
38 if (!
$GLOBALS[
'xoopsSecurity']->check()) {
39 $GLOBALS[
'xoopsTpl']->assign(
'errormsg', implode(
'<br />',
$GLOBALS[
'xoopsSecurity']->getErrors()));
42 include
$GLOBALS[
'xoops']->path(
'footer.php');
46 $size = count(
$_POST[
'msg_id']);
48 for (
$i = 0;
$i < $size;
$i++) {
50 if ($pm->getVar(
'to_userid') ==
$GLOBALS[
'xoopsUser']->getVar(
'uid')) {
52 }
else if ($pm->getVar(
'from_userid') ==
$GLOBALS[
'xoopsUser']->getVar(
'uid')) {
60 if (isset(
$_POST[
'move_messages']) && isset(
$_POST[
'msg_id'])) {
61 if (!
$GLOBALS[
'xoopsSecurity']->check()) {
62 $GLOBALS[
'xoopsTpl']->assign(
'errormsg', implode(
'<br />',
$GLOBALS[
'xoopsSecurity']->getErrors()));
64 $size = count(
$_POST[
'msg_id']);
66 if (
$_POST[
'op'] ==
'save') {
67 for ($i = 0; $i < $size; $i++) {
69 if ($pm->getVar(
'to_userid') ==
$GLOBALS[
'xoopsUser']->getVar(
'uid')) {
71 }
else if ($pm->getVar(
'from_userid') ==
$GLOBALS[
'xoopsUser']->getVar(
'uid')) {
77 if (!
$GLOBALS[
'xoopsUser']->isAdmin()) {
79 $size = min($size, (
$GLOBALS[
'xoopsModuleConfig'][
'max_save'] - $total_save));
81 for ($i = 0; $i < $size; $i++) {
85 }
else if (
$_POST[
'op'] ==
'out') {
91 if (
$_POST[
'op'] ==
'save') {
93 }
else if (isset($total_save) && !
$GLOBALS[
'xoopsUser']->isAdmin()) {
100 if (isset(
$_REQUEST[
'empty_messages'])) {
101 if (!
$GLOBALS[
'xoopsSecurity']->check()) {
102 $GLOBALS[
'xoopsTpl']->assign(
'errormsg', implode(
'<br />',
$GLOBALS[
'xoopsSecurity']->getErrors()));
105 include
$GLOBALS[
'xoops']->path(
'footer.php');
108 if (
$_POST[
'op'] ==
'save') {
110 $crit_to->add(
new Criteria(
'to_save',1));
111 $crit_to->add(
new Criteria(
'to_userid',
$GLOBALS[
'xoopsUser']->getVar(
'uid')));
113 $crit_from->add(
new Criteria(
'from_save', 1));
114 $crit_from->add(
new Criteria(
'from_userid',
$GLOBALS[
'xoopsUser']->getVar(
'uid')));
117 }
else if (
$_POST[
'op'] ==
'out') {
133 foreach (array_keys($pms) as $i) {
134 if ($pms[$i]->getVar(
'to_userid') ==
$GLOBALS[
'xoopsUser']->getVar(
'uid')) {
135 if (
$_POST[
'op'] ==
'save') {
137 }
else if (
$_POST[
'op'] ==
'in') {
141 if ($pms[$i]->getVar(
'from_userid') ==
$GLOBALS[
'xoopsUser']->getVar(
'uid')) {
142 if (
$_POST[
'op']==
'save') {
144 }
else if (
$_POST[
'op']==
'out') {
160 $crit_to->add(
new Criteria(
'to_save', 1));
161 $crit_to->add(
new Criteria(
'to_userid',
$GLOBALS[
'xoopsUser']->getVar(
'uid')));
163 $crit_from->add(
new Criteria(
'from_save', 1));
164 $crit_from->add(
new Criteria(
'from_userid',
$GLOBALS[
'xoopsUser']->getVar(
'uid')));
184 include
$GLOBALS[
'xoops']->path(
'class/pagenav.php');
186 $GLOBALS[
'xoopsTpl']->assign(
'pagenav',
$nav->renderNav(4));
192 foreach (array_keys(
$pm_arr) as $i) {
200 $senders =
$member_handler->getUserList(
new Criteria(
'uid',
"(" . implode(
", ", array_unique($uids) ) .
")",
"IN"));
201 foreach (array_keys(
$pm_arr) as $i) {
205 $message[
'postername'] = $senders[
$pm_arr[
$i][
'to_userid']];
206 $message[
'posteruid'] = $pm_arr[
$i][
'to_userid'];
208 $message[
'postername'] = $senders[
$pm_arr[
$i][
'from_userid']];
209 $message[
'posteruid'] = $pm_arr[
$i][
'from_userid'];
211 $message[
'msg_no'] =
$i;
212 $GLOBALS[
'xoopsTpl']->append(
'messages', $message);
216 include_once
$GLOBALS[
'xoops']->path(
'class/xoopsformloader.php');
218 $send_button->setExtra(
"onclick='javascript:openWithSelfMain(\"" . XOOPS_URL .
"/modules/pm/pmlite.php?send=1\", \"pmlite\", 550, 450);'");
231 include
$GLOBALS[
'xoops']->path(
'footer.php');