} else { $content .= get_lang('Course') . ' : ' . $courseInfo['officialCode'] . "; " . get_lang('Group') . ' : ' . $groupInfo['name']; } } elseif ($message->isPlatformMessage()) { $content .= get_lang('All users of the platform'); } else { $content .= get_lang('Unknown recipient'); } $content .= '</td>' . '<td>' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($message->getSendTime())) . '</td>' . "\n"; $content .= '</tr>' . "\n\n"; } } $content .= '</table>' . "\n"; // prepare the link to change of page // prepare the link to change of page if ($box->getNumberOfPage() > 1) { // number of page to display in the page before and after thecurrent page $nbPageToDisplayBeforeAndAfterCurrentPage = 1; $arg_paging = makeArgLink($link_arg, array('page')); if ($arg_paging == "") { $linkPaging = $linkPage . "?page="; } else { $linkPaging = $linkPage . "?" . $arg_paging . "&page="; } if (!isset($link_arg['page'])) { $page = 1; } else { $page = $link_arg['page']; } $content .= getPager($linkPaging, $page, $box->getNumberOfPage()); }
} </script>'; $claroline->display->header->addHtmlHeader($javascriptDelete); foreach ($box as $key => $message) { $userData = user_get_properties($message->getSender()); $content .= '<tr>' . "\n" . '<td class="im_list_selection"><input type="checkbox" name="msg[]" value="' . $message->getId() . '" /></td>' . "\n" . '<td><a href="readmessage.php?messageId=' . $message->getId() . '&type=received">' . claro_htmlspecialchars($message->getSubject()) . '</a></td>' . "\n" . '<td><a href="sendmessage.php?cmd=rqMessageToUser&userId=' . $message->getSender() . '">' . get_lang('%firstName %lastName', array('%firstName' => claro_htmlspecialchars($message->getSenderFirstName()), '%lastName' => claro_htmlspecialchars($message->getSenderLastName()))) . '</a>' . '</td>' . '<td>' . claro_htmlspecialchars($userData['username']) . '</td>' . "\n" . '<td>' . claro_html_localised_date(get_locale('dateTimeFormatLong'), strtotime($message->getSendTime())) . '</td>' . "\n" . '<td class="im_list_action"><a href="' . $linkDelete . 'cmd=rqDeleteMessage&message_id=' . $message->getId() . '" ' . 'onclick="return deleteMessage(\'' . $linkDelete . 'cmd=exDeleteMessage&message_id=' . $message->getId() . '\')"' . '><img src="' . get_icon_url('delete') . '" alt="" /></a></td>' . "\n" . '</tr>' . "\n\n"; } $content .= '</table>' . '<input type="submit" value="' . get_lang('Delete selected message(s)') . '" />' . "\n\n"; } $content .= '</form>'; // prepare the link to change of page if ($box->getNumberOfPage() > 1) { // number of page to display in the page before and after thecurrent page $nbPageToDisplayBeforeAndAfterCurrentPage = 1; $content .= '<div id="im_paging">'; $arg_paging = makeArgLink($arguments, array('page')); if ($arg_paging == "") { $linkPaging = $_SERVER['PHP_SELF'] . "?page="; } else { $linkPaging = $_SERVER['PHP_SELF'] . "?" . $arg_paging . "&page="; } if (!isset($arguments['page'])) { $page = 1; } else { $page = $arguments['page']; } $content .= getPager($linkPaging, $page, $box->getNumberOfPage()); } } // ------------------- render ---------------------------- $claroline->display->banner->breadcrumbs->append(get_lang('Administration'), get_path('rootAdminWeb'));
if ($arg_paging == "") { $linkPaging = $linkPage . "?page="; } else { $linkPaging = $linkPage . "?" . $arg_paging . "&page="; } if (!isset($link_arg['page'])) { $page = 1; } else { $page = $link_arg['page']; } $content .= getPager($linkPaging, $page, $box->getNumberOfPage()); } //------------------ function of the trashbox if ($link_arg['box'] == "trashbox") { // ---------- generate the link $arg_emptyTrashBox = makeArgLink($link_arg); $linkTOEmpltyTrashBox = $linkPage . "?" . $arg_emptyTrashBox; if ($arg_emptyTrashBox != "") { $linkTOEmpltyTrashBox .= "&"; } $linkToRqEmptyTrashBox = $linkTOEmpltyTrashBox . "cmd=rqEmptyTrashBox"; $linkToExEmptyTrashBox = $linkTOEmpltyTrashBox . "cmd=exEmptyTrashBox"; // ------------ end of generating link $javascriptDelete = ' <script type="text/javascript"> function emptyTrashBox ( localPath ) { if (confirm("' . get_lang('Are you sure to empty trashbox ?') . '")) { window.location=localPath; return false;