25 $xoops->preload()->triggerEvent(
'core.viewpmsg.start');
30 $xoops->redirect(
"user.php", 2, $errormessage);
33 if (isset($_POST[
'delete_messages']) && (isset($_POST[
'msg_id']) || isset($_POST[
'msg_ids']))) {
34 if (!
$xoops->security()->check()) {
35 echo implode(
'<br />',
$xoops->security()->getErrors());
38 if (empty($_REQUEST[
'ok'])) {
39 $xoops->header(
'module:system/system_viewpmsg.tpl');
41 $xoops->theme()->addStylesheet(
'modules/system/css/admin.css');
42 echo
$xoops->confirm(array(
43 'ok' => 1,
'delete_messages' => 1,
44 'msg_ids' => json_encode(array_map(
"intval", $_POST[
'msg_id']))
50 $clean_msg_id = json_decode($_POST[
'msg_ids'],
true, 2);
51 if (!empty($clean_msg_id)) {
52 $clean_msg_id = array_map(
"intval", $clean_msg_id);
54 $size = count($clean_msg_id);
55 $msg =& $clean_msg_id;
56 for (
$i = 0;
$i < $size; ++
$i) {
58 if ($pm->getVar(
'to_userid') ==
$xoops->user->getVar(
'uid')) {
65 $xoops->header(
'module:system/system_viewpmsg.tpl');
71 $xoops->tpl()->assign(
'display',
true);
72 $xoops->tpl()->assign(
'anonymous',
$xoops->getConfig(
'anonymous'));
73 $xoops->tpl()->assign(
'uid',
$xoops->user->getVar(
"uid"));
77 $messages[
'msg_id'] =
$pm_arr[
$i]->getVar(
"msg_id");
78 $messages[
'read_msg'] =
$pm_arr[
$i]->getVar(
"read_msg");
79 $messages[
'msg_image'] =
$pm_arr[
$i]->getVar(
"msg_image");
80 $messages[
'posteruid'] =
$pm_arr[
$i]->getVar(
'from_userid');
82 $messages[
'subject'] =
$pm_arr[
$i]->getVar(
"subject");
85 $xoops->tpl()->append(
'messages', $messages);
88 $xoops->tpl()->assign(
'token',
$xoops->security()->getTokenHTML());
static formatTimestamp($time, $format= 'l', $timeoffset=null)
const S_YOUR_MESSAGES_DELETED
defined('DS') or define('DS' DIRECTORY_SEPARATOR
static getUnameFromId($userid, $usereal=0)
const E_REGISTER_FIRST_TO_SEND_PRIVATE_MESSAGES
const Q_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_MESSAGES
const E_YOU_ARE_NOT_REGISTERED
if(!is_object($module)||!$module->getVar('isactive')) $msg