$tbl_forums = $tbl_cdb_names['bb_forums']; $sql = "SELECT pt.post_id,\n pt.post_text,\n p.nom AS lastname,\n p.prenom AS firstname,\n p.`poster_id`,\n p.post_time,\n t.topic_id,\n t.topic_title,\n f.forum_id,\n f.forum_name,\n f.group_id\n FROM `" . $tbl_posts_text . "` AS pt,\n `" . $tbl_posts . "` AS p,\n `" . $tbl_topics . "` AS t,\n `" . $tbl_forums . "` AS f\n WHERE ( " . $sqlClauseString . ")\n AND pt.post_id = p.post_id\n AND p.topic_id = t.topic_id\n AND t.forum_id = f.forum_id\n ORDER BY p.post_time DESC, t.topic_id"; $searchResultList = claro_sql_query_fetch_all($sql); $userGroupList = get_user_group_list(claro_get_current_user_id()); $userGroupList = array_keys($userGroupList); $tutorGroupList = get_tutor_group_list(claro_get_current_user_id()); } else { $searchResultList = array(); } $pagetype = 'viewsearch'; ClaroBreadCrumbs::getInstance()->prepend(get_lang('Forums'), 'index.php'); CssLoader::getInstance()->load('clfrm', 'screen'); $noPHP_SELF = true; $out = ''; $out .= claro_html_tool_title(get_lang('Forums'), $is_allowedToEdit ? get_help_page_url('blockForumsHelp', 'CLFRM') : false); $out .= claro_html_menu_horizontal(disp_forum_toolbar($pagetype, null)) . disp_forum_breadcrumb($pagetype, null, null, null) . '<h4>' . get_lang('Search result') . ' : ' . (isset($_REQUEST['searchPattern']) ? claro_htmlspecialchars($_REQUEST['searchPattern']) : '') . '</h4>' . "\n"; if (count($searchResultList) < 1) { $out .= '<p>' . get_lang('No result') . '</p>'; } else { foreach ($searchResultList as $thisPost) { // PREVENT USER TO CONSULT POST FROM A GROUP THEY ARE NOT ALLOWED if (!is_null($thisPost['group_id']) && $is_groupPrivate && !(in_array($thisPost['group_id'], $userGroupList) || in_array($thisPost['group_id'], $tutorGroupList) || claro_is_course_manager())) { continue; } else { // notify if is new message $post_time = datetime_to_timestamp($thisPost['post_time']); if ($post_time < $last_visit) { $class = ' class="item"'; } else { $class = ' class="item hot"'; }
$cmdList[] = array('name' => get_lang('Full review'), 'url' => claro_htmlspecialchars(Url::Contextualize($viewallUrl))); } } } $out .= $postLister->disp_pager_tool_bar($pagerUrl); try { $display = new ModuleTemplate('CLFRM', 'forum_viewtopic.tpl.php'); $display->assign('forum_id', $forumId); $display->assign('topic_id', $topicId); $display->assign('topic_subject', $topicSettingList['topic_title']); $display->assign('postList', $postList); $display->assign('is_allowedToEdit', $is_allowedToEdit); $display->assign('anonymity', $anonymityStatus); $display->assign('claro_notifier', $claro_notifier); $display->assign('is_post_allowed', $is_postAllowed); $out .= $display->render(); } catch (Exception $ex) { $dialogBox->error($ex); } if ($is_postAllowed) { $replyUrl = Url::Contextualize($_SERVER['PHP_SELF'] . '?topic=' . $topicId . '&cmd=rqPost' . '&mode=reply'); $toolBar[] = claro_html_cmd_link(claro_htmlspecialchars($replyUrl), '<img src="' . get_icon_url('reply') . '" alt="" />' . ' ' . get_lang('Reply')); $out .= '<p>' . claro_html_menu_horizontal($toolBar) . '</p>'; } $out .= $postLister->disp_pager_tool_bar($pagerUrl); } // Page title $out = claro_html_tool_title($nameTools, $is_allowedToEdit ? get_help_page_url('blockForumsHelp', 'CLFRM') : false, $cmdList) . $out; ClaroBreadCrumbs::getInstance()->setCurrent(get_lang('Forums'), 'index.php'); $claroline->display->body->appendContent($out); echo $claroline->display->render();
$searchCmdUrl = ''; if (isset($_REQUEST['searchPattern'])) { $searchCmdUrl = '&cmd=exSearch&searchPattern=' . rawurlencode($_REQUEST['searchPattern']); } $out .= claro_html_document_breadcrumb($curDirPath) . '<table class="claroTable emphaseLine" width="100%">' . '<thead>' . "\n"; // CURRENT DIRECTORY LINE if ($cmd == 'exSearch') { $curDirLine = get_lang('Search result'); } elseif ($curDirName) { $curDirLine = '<img src="' . get_icon_url('opendir') . '" alt="" />' . "\n" . $dspCurDirName . "\n"; } else { $curDirLine = ' '; } $docViewToolbar[] = '<span class="claroCmdDisabled">' . '<img src="' . get_icon_url('document') . '" alt="" />' . "\n" . get_lang('File list') . '</span>'; $docViewToolbar[] = '<a class="claroCmd" href="' . claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?docView=thumbnails&cwd=' . $curDirPath . $searchCmdUrl)) . '">' . '<img src="' . get_icon_url('image') . '" alt="" /> ' . "\n" . get_lang('Thumbnails') . '</a>'; $out .= '<!-- current dir name line -->' . "\n" . '<tr>' . "\n" . '<th class="superHeader" colspan="' . $colspan . '" align="left">' . "\n" . '<div style="float: right;">' . claro_html_menu_horizontal($docViewToolbar) . '</div>' . $curDirLine . '</th>' . "\n" . '</tr>' . "\n" . '<tr align="center" valign="top">' . "\n"; # Patch to avoid E_NOTICE when no files in directory empty # FIXME find a more elegant way to solve the problem if (count($sortUrlList) > 0) { $out .= '<th><a href="' . claro_htmlspecialchars(Url::Contextualize($sortUrlList['path'])) . '">' . get_lang('Name') . '</a></th>' . "\n" . '<th><a href="' . claro_htmlspecialchars(Url::Contextualize($sortUrlList['size'])) . '">' . get_lang('Size') . '</a></th>' . "\n" . '<th><a href="' . claro_htmlspecialchars(Url::Contextualize($sortUrlList['date'])) . '">' . get_lang('Last modification date') . '</a></th>' . "\n"; } else { $out .= '<th>' . get_lang('Name') . '</th>' . "\n" . '<th>' . get_lang('Size') . '</th>' . "\n" . '<th>' . get_lang('Date') . '</th>' . "\n"; } if ($is_allowedToEdit) { $out .= '<th>' . get_lang('Modify') . '</th>' . "\n" . '<th>' . get_lang('Delete') . '</th>' . "\n" . '<th>' . get_lang('Move') . '</th>' . "\n"; if ($courseContext) { $out .= '<th>' . get_lang('Visibility') . '</th>' . "\n"; } elseif ($groupContext) { $out .= '<th>' . get_lang('Publish') . '</th>' . "\n"; } }
//------------------------------------ // Javascript confirm pop up declaration for header JavascriptLanguage::getInstance()->addLangVar('Are you sure you want to unregister %name ?'); JavascriptLoader::getInstance()->load('admin'); $displayBackToCU = false; $displayBackToUC = false; if ('culist' == $ccfrom) { $displayBackToCU = TRUE; } elseif ('uclist' == $ccfrom) { $displayBackToUC = TRUE; } $cmd_menu[] = '<a class="claroCmd" href="adminuserunregistered.php' . '?cidToEdit=' . $cidToEdit . '&cmd=UnReg' . '&uidToEdit=' . $uidToEdit . '" ' . ' onclick="return ADMIN.confirmationUnReg(\'' . clean_str_for_javascript(claro_htmlspecialchars($courseUserProperties['firstName']) . ' ' . claro_htmlspecialchars($courseUserProperties['lastName'])) . '\');">' . get_lang('Unsubscribe') . '</a>'; $cmd_menu[] = '<a class="claroCmd" href="admin_profile.php' . '?uidToEdit=' . $uidToEdit . '">' . get_lang('User settings') . '</a>'; //link to go back to list : depend where we come from... if ($displayBackToCU) { $cmd_menu[] = '<a class="claroCmd" href="admincourseusers.php' . '?cidToEdit=' . $cidToEdit . '&uidToEdit=' . $uidToEdit . '">' . get_lang('Back to list') . '</a> '; } elseif ($displayBackToUC) { $cmd_menu[] = '<a class="claroCmd" href="adminusercourses.php' . '?cidToEdit=' . $cidToEdit . '&uidToEdit=' . $uidToEdit . '">' . get_lang('Back to list') . '</a> '; } //------------------------------------ // DISPLAY //------------------------------------ $out = ''; // Display tool title $out .= claro_html_tool_title(array('mainTitle' => $nameTools, 'subTitle' => get_lang('Course') . ' : ' . claro_htmlspecialchars($courseUserProperties['courseName']) . '<br />' . get_lang('User') . ' : ' . claro_htmlspecialchars($courseUserProperties['firstName']) . ' ' . claro_htmlspecialchars($courseUserProperties['lastName']))); // Display Forms or dialog box(if needed) $out .= $dialogBox->render(); $hidden_param = array('uidToEdit' => $uidToEdit, 'cidToEdit' => $cidToEdit, 'cfrom' => $cfrom, 'ccfrom' => $ccfrom); $out .= course_user_html_form($courseUserProperties, $cidToEdit, $uidToEdit, $hidden_param) . '<p>' . claro_html_menu_horizontal($cmd_menu) . '</p>'; $claroline->display->body->appendContent($out); echo $claroline->display->render();
Display Section =================================================================*/ ClaroBreadCrumbs::getInstance()->prepend(get_lang('Forums'), 'index.php'); $noPHP_SELF = true; $out = ''; // display tool title $out .= claro_html_tool_title(get_lang('Forums'), $is_allowedToEdit ? 'help_forum.php' : false); if (!$allowed) { $out .= $dialogBox->render(); } else { // Display new topic page if (isset($_REQUEST['submit']) && !$error) { // Display success message $out .= disp_confirmation_message(get_lang('Your message has been entered'), $forum_id, $topic_id); } else { if ($error) { // display error message $out .= $dialogBox->render(); } $out .= disp_forum_breadcrumb($pagetype, $forum_id, $forum_name) . claro_html_menu_horizontal(disp_forum_toolbar($pagetype, $forum_id, 0, 0)) . '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . "\n" . '<input type="hidden" name="forum" value="' . $forum_id . '" />' . "\n" . claro_form_relay_context() . '<table border="0" width="100%">' . "\n" . '<tr valign="top">' . "\n" . '<td align="right"><label for="subject">' . get_lang('Subject') . '</label> : </td>' . '<td><input type="text" name="subject" id="subject" size="50" maxlength="100" value="' . htmlspecialchars($subject) . '" /></td>' . '</tr>' . '<tr valign="top">' . "\n" . '<td align="right"><br />' . get_lang('Message body') . ' :</td>'; if (!empty($message)) { $content = $message; } else { $content = ''; } $out .= '<td>' . claro_html_textarea_editor('message', $content) . '</td>' . '</tr>' . '<tr valign="top"><td> </td>' . '<td><input type="submit" name="submit" value="' . get_lang('Ok') . '" /> ' . ' <input type="submit" name="cancel" value="' . get_lang('Cancel') . '" />' . "\n" . '</td></tr>' . '</table>' . '</form>' . "\n"; } } // end allowed $claroline->display->body->appendContent($out); echo $claroline->display->render();
* @package CLCHT * * @author Claro Team <*****@*****.**> * @author Christophe Gesché <*****@*****.**> * @copyright (c) 2001-2011, Universite catholique de Louvain (UCL) * */ require '../inc/claro_init_global.inc.php'; $is_allowedToManage = claro_is_course_manager() || claro_is_in_a_group() && claro_is_group_tutor(); // header $htmlHeadXtra[] = ' <script type="text/javascript"> function prepare_message() { document.chatForm.chatLine.value=document.chatForm.msg.value; document.chatForm.msg.value = ""; document.chatForm.msg.focus(); return true; } </script>'; $cmdMenu = array(); if ($is_allowedToManage) { $cmdMenu[] = claro_html_cmd_link('messageList.php?cmd=reset' . claro_url_relay_context('&'), get_lang('Reset'), array('target' => "messageList")); $cmdMenu[] = claro_html_cmd_link('messageList.php?cmd=store' . claro_url_relay_context('&'), get_lang('Store Chat'), array('target' => "messageList")); } $hide_banner = TRUE; // Turn off session lost $warnSessionLost = false; include get_path('incRepositorySys') . '/claro_init_header.inc.php'; echo '<form name="chatForm" action="messageList.php#final" method="post" target="messageList" onsubmit="return prepare_message();">' . "\n" . claro_form_relay_context() . '<input type="text" name="msg" size="80" />' . "\n" . '<input type="hidden" name="chatLine" />' . "\n" . '<input type="submit" value=" >> " />' . "\n" . '<br />' . "\n" . '' . "\n" . claro_html_menu_horizontal($cmdMenu) . '</form>'; include get_path('incRepositorySys') . '/claro_init_footer.inc.php';
if (isset($_REQUEST['cfrom']) && $_REQUEST['cfrom'] == 'ulist') { ClaroBreadCrumbs::getInstance()->prepend(get_lang('User list'), get_path('rootAdminWeb') . 'adminusers.php'); } ClaroBreadCrumbs::getInstance()->prepend(get_lang('Administration'), get_path('rootAdminWeb')); $htmlHeadXtra[] = "<script>\n function confirmation (name)\n {\n if (confirm(\"" . clean_str_for_javascript(get_lang('Are you sure to delete')) . " \"+ name + \"? \"))\n {return true;}\n else\n {return false;}\n }\n </script>"; $user_data['is_admin'] = user_is_admin($userId); $cmd_menu[] = '<a class="claroCmd" href="../auth/courses.php' . '?cmd=rqReg' . '&uidToEdit=' . $userId . '&fromAdmin=settings' . '&category=" >' . '<img src="' . get_icon_url('enroll') . '" />' . get_lang('Enrol to a new course') . '</a>'; $cmd_menu[] = '<a class="claroCmd" href="../auth/lostPassword.php' . '?Femail=' . urlencode($user_data['email']) . '&searchPassword=1" >' . '<img src="' . get_icon_url('mail_close') . '" />' . get_lang('Send account information to user by email') . '</a>'; $cmd_menu[] = '<a class="claroCmd" href="adminuserdeleted.php' . '?uidToEdit=' . $userId . '&cmd=rqDelete" ' . ' id="delete" >' . '<img src="' . get_icon_url('deluser') . '" /> ' . get_lang('Delete user') . '</a>'; $cmd_menu[] = '<a class="claroCmd" href="../messaging/sendmessage.php' . '?cmd=rqMessageToUser' . '&userId=' . $userId . '">' . get_lang('Send a message to the user') . '</a>'; if (isset($_REQUEST['cfrom']) && $_REQUEST['cfrom'] == 'ulist') { $cmd_menu[] = '<a class="claroCmd" href="adminusers.php" >' . get_lang('Back to user list') . '</a>'; } /** * DISPLAY */ $out = ''; // Display tool title $out .= claro_html_tool_title($nameTools) . $dialogBox->render() . '<p>' . claro_html_menu_horizontal($cmd_menu) . '</p>' . user_html_form_admin_user_profile($user_data); if (!is_null($dgExtra)) { $out .= $dgExtra->render(); } $out .= '<script type="text/javascript"> $(document).ready(function(){ $("#delete").click(function(){ return confirmation("' . $user_data['firstname'] . " " . $user_data['lastname'] . '"); }).attr("href","adminuserdeleted.php?uidToEdit=' . $userId . '&cmd=exDelete"); }); </script>'; $claroline->display->body->appendContent($out); echo $claroline->display->render();
$claroline->log('DELETE_USER', array('USER' => $req['uidToEdit'])); if (false !== ($deletionResult = user_delete($req['uidToEdit']))) { $dialogBox->success(get_lang('Deletion of the user was done sucessfully')); } else { switch (claro_failure::get_last_failure()) { case 'user_cannot_remove_himself': $dialogBox->error(get_lang('You can not change your own settings!')); break; default: $dialogBox->error(get_lang('Unable to delete')); } } } elseif ($cmd == 'rqDelete' && $req['uidToEdit']) { $user_properties = user_get_properties($req['uidToEdit']); if (is_array($user_properties)) { $dialogBox->question(get_lang('Are you sure to delete user %firstname %lastname', array('%firstname' => $user_properties['firstname'], '%lastname' => $user_properties['lastname'])) . '<br/><br/>' . "\n" . '<a href="adminuserdeleted.php?cmd=exDelete&uidToEdit=' . $req['uidToEdit'] . '">' . get_lang('Yes') . '</a>' . ' | ' . '<a href="admin_profile.php?uidToEdit=' . $req['uidToEdit'] . '">' . get_lang('No') . '</a>' . "\n"); } } else { $dialogBox->error(get_lang('Unable to delete')); } //------------------------------------ // DISPLAY //------------------------------------ $out = ''; $out .= claro_html_tool_title(get_lang('Delete user')); if (isset($dialogBox)) { $out .= $dialogBox->render(); } $out .= '<p>' . claro_html_menu_horizontal($cmdList) . '</p>'; $claroline->display->body->appendContent($out); echo $claroline->display->render();
Display Section =================================================================*/ ClaroBreadCrumbs::getInstance()->prepend(get_lang('Forums'), 'index.php'); $noPHP_SELF = true; $out = ''; // Forum Title $out .= claro_html_tool_title(get_lang('Forums'), $is_allowedToEdit ? 'help_forum.php' : false); if (!$allowed || !$is_allowedToEdit) { $out .= $dialogBox->render(); } else { if (isset($_REQUEST['submit']) && !$error) { if (!isset($_REQUEST['delete'])) { $out .= disp_confirmation_message(get_lang('Your message has been entered'), $forum_id, $topic_id); } else { $out .= disp_confirmation_message(get_lang('Your message has been deleted'), $forum_id); } } else { $first_post = is_first_post($topic_id, $post_id); if ($error) { $out .= $dialogBox->render(); } $out .= disp_forum_breadcrumb($pagetype, $forum_id, $forum_name, $topic_id, $subject) . claro_html_menu_horizontal(disp_forum_toolbar($pagetype, $forum_id, $topic_id, 0)) . '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post" >' . "\n" . claro_form_relay_context() . '<input type="hidden" name="post_id" value="' . $post_id . '" />' . "\n" . '<table border="0" width="100%" >' . "\n"; if ($first_post) { $out .= '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<label for="subject">' . get_lang('Subject') . '</label> : ' . '</td>' . "\n" . '<td>' . "\n" . '<input type="text" name="subject" id="subject" size="50" maxlength="100" value="' . htmlspecialchars($subject) . '" />' . '</td>' . "\n" . '</tr>' . "\n"; } $out .= '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<br />' . get_lang('Message body') . ' : ' . "\n" . '</td>' . "\n" . '<td>' . "\n" . claro_html_textarea_editor('message', $message) . '</td>' . "\n" . '</tr>' . "\n" . '<tr valign="top">' . "\n" . '<td align="right">' . "\n" . '<label for="delete" >' . get_lang('Delete') . '</label>' . "\n" . ' : ' . "\n" . '</td>' . "\n" . '<td>' . "\n" . '<input type="checkbox" name="delete" id="delete" />' . "\n" . '</td>' . "\n" . '</tr>' . "\n" . '<tr>' . '<td> </td>' . "\n" . '<td>' . '<input type="submit" name="submit" value="' . get_lang('Ok') . '" /> ' . '<input type="submit" name="cancel" value="' . get_lang('Cancel') . '" />' . '</td>' . "\n" . '</tr>' . "\n" . '</table>' . "\n" . '</form>' . "\n" . '<br />' . "\n" . '<center>' . '<a href="' . htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $topic_id)) . '" target="_blank">' . get_lang('Topic review') . '</a>' . '</center>' . '<br />' . "\n"; } // end // else if ! isset submit } $claroline->display->body->appendContent($out); echo $claroline->display->render();
/** * @param int $gid * @param string $courseId * @param boolean $active if set to true, only actvated tool will be considered for display */ function get_group_tool_menu($gid = null, $courseId = null, $active = true) { $toolList = array(); if (is_null($gid)) { $gid = claro_get_current_group_id(); } if (is_null($courseId)) { $courseId = claro_get_current_course_id(); } require_once dirname(__FILE__) . '/../group.lib.inc.php'; $groupToolList = get_group_tool_list($courseId, $active); // group space links /* $toolList[] = claro_html_cmd_link( claro_htmlspecialchars(Url::Contextualize( get_module_url('CLGRP').'/group_space.php' )) , '<img src="' . get_icon_url('group') . '" alt="" /> ' . get_lang('Group area') ); */ $courseGroupData = claro_get_main_group_properties($courseId); foreach ($groupToolList as $groupTool) { if (is_tool_activated_in_groups($courseId, $groupTool['label']) && (isset($courseGroupData['tools'][$groupTool['label']]) && $courseGroupData['tools'][$groupTool['label']])) { $toolList[] = claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize(get_module_url($groupTool['label']) . '/' . $groupTool['url'])), '<img src="' . get_module_url($groupTool['label']) . '/' . $groupTool['icon'] . '" alt="" />' . ' ' . claro_get_tool_name($groupTool['label']), array('class' => $groupTool['visibility'] ? 'visible' : 'invisible')); } } if (count($toolList)) { return claro_html_menu_horizontal($toolList); } else { return ''; } }
$out = ''; $nameTools = get_lang('Chat'); $out .= claro_html_tool_title($nameTools); if (claro_is_javascript_enabled() && $_uid) { $jsloader = JavascriptLoader::getInstance(); $jsloader->load('jquery'); $jsloader->load('clchat'); // init var with values from get_conf before including tool library $htmlHeaders = '<script type="text/javascript">' . "\n" . 'var refreshRate = "' . get_conf('msg_list_refresh_rate', 5) * 1000 . '";' . "\n" . 'var userListRefresh = "' . get_conf('user_list_refresh_rate') * 1000 . '";' . "\n" . 'var cidReq = "' . claro_get_current_course_id() . '";' . "\n"; if (claro_is_in_a_group()) { $htmlHeaders .= 'var gidReq = "' . claro_get_current_group_id() . '";' . "\n"; } $htmlHeaders .= 'var lang = new Array();' . "\n" . 'lang["confirmFlush"] = "' . clean_str_for_javascript(get_lang('Are you sure to delete all logs ?')) . '";' . '</script>'; $claroline->display->header->addHtmlHeader($htmlHeaders); // dialog box $out .= '<div id="clchat_user_list"></div>' . "\n" . '<div id="clchat_chatarea">' . "\n" . ' <div id="clchat_log"></div>' . "\n" . ' <div id="clchat_connectTime">' . get_lang('Start of this chat session (%connectTime)', array('%connectTime' => claro_html_localised_date(get_locale('dateTimeFormatLong'), $_SESSION['chat_connectionTime']))) . '</div>' . "\n" . ' <div id="clchat_text"></div>' . "\n" . '</div>' . "\n"; // display form $out .= '<form action="#" id="clchat_form" method="get" >' . "\n" . claro_form_relay_context() . "\n" . '<img src="' . get_module_url('CLCHAT') . '/img/loading.gif" alt="' . get_lang('Loading...') . '" id="clchat_loading" width="16" height="16" />' . "\n" . '<input id="clchat_msg" type="text" name="message" maxlength="200" size="80" />' . "\n" . '<input type="submit" name="Submit" value=" >> " />' . "\n" . '</form>' . "\n" . claro_html_menu_horizontal($cmdMenu) . "\n" . '<p id="clchat_dialogBox"></p>' . "\n"; } else { if (!claro_is_javascript_enabled()) { $dialogBox = new DialogBox(); $dialogBox->error(get_lang('Javascript must be enabled in order to use this tool.')); $out .= $dialogBox->render(); } elseif (!$_uid) { $dialogBox = new DialogBox(); $dialogBox->error(get_lang('Anonymous users cannot use this tool.')); $out .= $dialogBox->render(); } } $claroline->display->body->appendContent($out); echo $claroline->display->render();
} /*================================================================= Display Section =================================================================*/ ClaroBreadCrumbs::getInstance()->prepend(get_lang('Forums'), 'index.php'); $noPHP_SELF = true; $out = ''; $pagetype = 'reply'; $is_allowedToEdit = claro_is_allowed_to_edit(); $out .= claro_html_tool_title(get_lang('Forums'), $is_allowedToEdit ? 'help_forum.php' : false); if (!$allowed) { // not allowed $out .= $dialogBox->render(); } else { if (isset($_REQUEST['submit']) && !$error) { // DISPLAY SUCCES MESSAGE $out .= disp_confirmation_message(get_lang('Your message has been entered'), $forum_id, $topic_id); } else { if ($error) { $out .= $dialogBox->render(); } $out .= claro_html_menu_horizontal(disp_forum_toolbar($pagetype, $forum_id, 0, $topic_id)); $out .= disp_forum_breadcrumb($pagetype, $forum_id, $forum_name, $topic_id, $topic_title); $out .= '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . "\n" . claro_form_relay_context() . '<input type="hidden" name="forum" value="' . $forum_id . '" />' . "\n" . '<input type="hidden" name="topic" value="' . $topic_id . '" />' . "\n"; $out .= '<table border="0" width="100%">' . "\n" . '<tr valign="top">' . "\n" . '<td align="right"><br />' . get_lang('Message body') . ' :</td>' . '<td>' . claro_html_textarea_editor('message', $message) . '</td>' . '</tr>' . '<tr valign="top"><td> </td>' . '<td>' . '<input type="submit" name="submit" value="' . get_lang('Ok') . '" /> ' . '<input type="submit" name="cancel" value="' . get_lang('Cancel') . '" />' . '</td>' . '</tr>' . '</table>' . '</form>'; $out .= '<p style="text-align: center;"><a href="' . htmlspecialchars(Url::Contextualize(get_module_url('CLFRM') . '/viewtopic.php?topic=' . $topic_id . '&forum=' . $forum_id)) . '" target="_blank">' . get_lang('Topic review') . '</a></p>'; } // end else if submit } $claroline->display->body->appendContent($out); echo $claroline->display->render();
{ return false; } } </script>'; $claroline->display->header->addHtmlHeader($javascriptDelete); $action[] = ' <a href="' . $_SERVER['PHP_SELF'] . '?cmd=rqDelete&messageId=' . $messageId . '&type=' . $type . '&userId=' . $userId . '" onclick="return deleteMessage(\'' . $_SERVER['PHP_SELF'] . '?cmd=exDelete&messageId=' . $messageId . '&type=' . $type . '&userId=' . $userId . '\')">' . '<img src="' . get_icon_url('user-trash-full') . '" alt="" />' . get_lang('Move to trash') . '</a>'; } } else { //tothing to do } } else { // nothing to do } $content .= DisplayMessage::display($message, claro_html_menu_horizontal($action)); if ($type == "received") { if ($message->isDeleted()) { $claroline->display->banner->breadcrumbs->append(get_lang('My messages'), './messagebox.php?box=trashbox&userId=' . $userId); } else { $claroline->display->banner->breadcrumbs->append(get_lang('My messages'), './messagebox.php?box=inbox&userId=' . $userId); } } else { $claroline->display->banner->breadcrumbs->append(get_lang('My messages'), './messagebox.php?box=outbox&userId=' . $userId); } $claroline->display->banner->breadcrumbs->append(get_lang('Message')); $claroline->display->body->appendContent(claro_html_tool_title(get_lang('Message'))); $claroline->display->body->appendContent(getBarMessageBox($userId, $currentSection)); $claroline->display->body->appendContent($content); // ------------- Display page ----------------------------- echo $claroline->display->render();
$toolTitle['subTitle'] = get_lang("Search in pages"); break; default: break; } // Command list $cmdList = array(); // Check javascript $javascriptEnabled = claro_is_javascript_enabled(); // Wiki navigation bar $cmdWikiNavigationBar[] = claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . $wiki->getWikiId() . '&action=show' . '&title=__MainPage__')), '<img src="' . get_icon_url('wiki') . '" alt="edit" /> ' . get_lang("Main page")); $cmdWikiNavigationBar[] = claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . $wiki->getWikiId() . '&action=recent')), '<img src="' . get_icon_url('history') . '" ' . ' alt="recent changes" /> ' . get_lang("Recent changes")); $cmdWikiNavigationBar[] = claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . $wiki->getWikiId() . '&action=all')), '<img src="' . get_icon_url('allpages') . '" ' . ' alt="all pages" /> ' . get_lang("All pages")); $cmdWikiNavigationBar[] = claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize('wiki.php')), '<img src="' . get_icon_url('list') . '" ' . ' alt="all pages" />' . ' ' . get_lang("List of Wiki")); $cmdWikiNavigationBar[] = claro_html_cmd_link(claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . $wiki->getWikiId() . '&action=rqSearch')), '<img src="' . get_icon_url('search') . '" ' . ' alt="all pages" /> ' . get_lang("Search")); $out .= '<p>' . claro_html_menu_horizontal($cmdWikiNavigationBar) . '</p>'; if ('recent' != $action && 'all' != $action && 'rqSearch' != $action && 'exSearch' != $action) { if ('show' == $action || 'edit' == $action || 'history' == $action) { $cmdList[] = array('img' => 'back', 'name' => get_lang("Back to page"), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . $wiki->getWikiId() . '&action=show' . '&title=' . rawurlencode($title)))); } if ($is_allowedToEdit || $is_allowedToCreate) { // Show context if ('show' == $action || 'edit' == $action || 'diff' == $action) { $cmdList[] = array('img' => 'edit', 'name' => get_lang("Edit this page"), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . $wiki->getWikiId() . '&action=edit' . '&title=' . rawurlencode($title) . '&versionId=' . $versionId))); } } if ('show' == $action || 'edit' == $action || 'history' == $action || 'diff' == $action) { // active $cmdList[] = array('img' => 'versions', 'name' => get_lang("Page history"), 'url' => claro_htmlspecialchars(Url::Contextualize($_SERVER['PHP_SELF'] . '?wikiId=' . $wiki->getWikiId() . '&action=history' . '&title=' . rawurlencode($title)))); } if ('edit' == $action || 'diff' == $action) {
$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; } else { return false; } } </script>'; $claroline->display->header->addHtmlHeader($javascriptDelete); $content .= "<br />"; $menu[] = '<a href="' . $linkToRqEmptyTrashBox . '" onclick="return emptyTrashBox(\'' . $linkToExEmptyTrashBox . '\')" class="claroCmd" >' . get_lang('Empty trashbox') . '</a>'; $content .= claro_html_menu_horizontal($menu); $content .= "<br /><br />\n\n"; } // ------------------ end of fonction of the trash box