<th class="cel_creation_date essential"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=pvmsg&sort=creation_date', T_('Date'), 'pvmsg_sort_creation_date'); ?> </th> <th class="cel_action essential"><?php echo T_('Action'); ?> </th> </tr> </thead> <tbody> <?php /* Foreach through every label that has been passed to us */ foreach ($object_ids as $pvmg_id) { $libitem = new PrivateMsg($pvmg_id); $libitem->format(); ?> <tr id="label_<?php echo $libitem->id; ?> " class="<?php echo UI::flip_class(); ?> <?php echo !$libitem->is_read ? "unread" : ""; ?> "> <?php require AmpConfig::get('prefix') . UI::find_template('show_pvmsg_row.inc.php'); ?> </tr>
foreach ($msgs as $msg_id) { $msg_id = intval($msg_id); $pvmsg = new PrivateMsg($msg_id); if ($pvmsg->id && $pvmsg->to_user === $GLOBALS['user']->id) { $pvmsg->delete(); } else { debug_event('UI::access_denied', 'Unknown or unauthorized private message #' . $msg_id . '.', '3'); UI::access_denied(); exit; } } show_confirmation(T_('Messages Deletion'), T_('Messages have been deleted.'), AmpConfig::get('web_path') . "/browse.php?action=pvmsg"); break; case 'show': default: $msg_id = intval($_REQUEST['pvmsg_id']); $pvmsg = new PrivateMsg($msg_id); if ($pvmsg->id && $pvmsg->to_user === $GLOBALS['user']->id) { $pvmsg->format(); if (!$pvmsg->is_read) { $pvmsg->set_is_read(true); } require_once AmpConfig::get('prefix') . UI::find_template('show_pvmsg.inc.php'); } else { debug_event('UI::access_denied', 'Unknown or unauthorized private message #' . $msg_id . '.', '3'); UI::access_denied(); exit; } break; } UI::show_footer();