if ($origin != 'learnpath') { echo '<div class="actions">'; echo '<span style="float:right;">' . search_link() . '</span>'; echo '<a href="viewthread.php?' . api_get_cidreq() . '&forum=' . Security::remove_XSS($_GET['forum']) . '&gradebook=' . $gradebook . '&thread=' . Security::remove_XSS($_GET['thread']) . '&origin=' . $origin . '">' . Display::return_icon('back.png', get_lang('BackToThread'), '', ICON_SIZE_MEDIUM) . '</a>'; echo '</div>'; } else { echo '<div style="height:15px"> </div>'; } /*New display forum div*/ echo '<div class="forum_title">'; echo '<h1><a href="viewforum.php?&origin=' . $origin . '&forum=' . $current_forum['forum_id'] . '" ' . class_visible_invisible($current_forum['visibility']) . '>' . prepare4display($current_forum['forum_title']) . '</a></h1>'; echo '<p class="forum_description">' . prepare4display($current_forum['forum_comment']) . '</p>'; echo '</div>'; /* End new display forum */ // The form for the reply $my_action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : ''; $my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : ''; $my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : ''; $values = show_add_post_form($current_forum, $forum_setting, $my_action, $my_post, $my_elements); if (!empty($values) and isset($_POST['SubmitPost'])) { $result = store_reply($current_forum, $values); //@todo split the show_add_post_form function $url = 'viewthread.php?forum=' . $current_thread['forum_id'] . '&gradebook=' . $gradebook . '&thread=' . intval($_GET['thread']) . '&gidReq=' . api_get_group_id() . '&origin=' . $origin . '&msg=' . $result['msg'] . '&type=' . $result['type']; echo ' <script> window.location = "' . $url . '"; </script>'; } if (isset($origin) && $origin != 'learnpath') { Display::display_footer(); }
} else { // The last element of the breadcrumb navigation is already set in interbreadcrumb, so give an empty string. Display::display_header(''); } /* Action links */ if ($origin != 'learnpath') { echo '<div class="actions">'; echo '<span style="float:right;">' . search_link() . '</span>'; echo '<a href="viewthread.php?forum=' . Security::remove_XSS($_GET['forum']) . '&gradebook=' . $gradebook . '&thread=' . Security::remove_XSS($_GET['thread']) . '&origin=' . $origin . '">' . Display::return_icon('back.png', get_lang('BackToThread'), '', ICON_SIZE_MEDIUM) . '</a>'; echo '</div>'; } else { echo '<div style="height:15px"> </div>'; } // The form for the reply $my_action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : ''; $my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : ''; $my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : ''; $values = show_add_post_form($my_action, $my_post, $my_elements); // Note: This has to be cleaned first. if (!empty($values) and isset($_POST['SubmitPost'])) { $result = store_reply($values); //@todo split the show_add_post_form function $url = 'viewthread.php?forum=' . $current_thread['forum_id'] . '&gradebook=' . $gradebook . '&thread=' . intval($_GET['thread']) . '&gidReq=' . api_get_group_id() . '&origin=' . $origin . '&msg=' . $result['msg'] . '&type=' . $result['type']; echo ' <script> window.location = "' . $url . '"; </script>'; } if ($origin != 'learnpath') { Display::display_footer(); }