123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <?php
- $language_file = 'forum';
- require ('../inc/global.inc.php');
- require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
- include_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php');
- $nameTools=get_lang('Forum');
- include('forumconfig.inc.php');
- include('forumfunction.inc.php');
- $current_thread=get_thread_information($_GET['thread']);
- $current_forum=get_forum_information($_GET['forum']);
- $current_forum_category=get_forumcategory_information($current_forum['forum_category']);
- $current_post=get_post_information($_GET['post']);
- $interbreadcrumb[]=array("url" => "index.php","name" => $nameTools);
- $interbreadcrumb[]=array("url" => "viewforumcategory.php?forumcategory=".$current_forum_category['cat_id'],"name" => prepare4display($current_forum_category['cat_title']));
- $interbreadcrumb[]=array("url" => "viewforum.php?forum=".$_GET['forum'],"name" => prepare4display($current_forum['forum_title']));
- $interbreadcrumb[]=array("url" => "viewthread.php?forum=".$_GET['forum']."&thread=".$_GET['thread'],"name" => prepare4display($current_thread['thread_title']));
- $interbreadcrumb[]=array("url" => "reply.php?forum=".$_GET['forum']."&thread=".$_GET['thread'],"name" => get_lang('EditPost'));
- if (isset($_POST['add_resources']) AND $_POST['add_resources']==get_lang('Resources'))
- {
- $_SESSION['formelements']=$_POST;
- $_SESSION['origin']=$_SERVER['REQUEST_URI'];
- $_SESSION['breadcrumbs']=$interbreadcrumb;
- header("Location: ../resourcelinker/resourcelinker.php");
- }
- Display :: display_header();
- api_display_tool_title($nameTools);
- if (!api_is_allowed_to_edit() AND (($current_forum_category['visibility']==0 OR $current_forum['visibility']==0)))
- {
- forum_not_allowed_here();
- }
- if (!api_is_allowed_to_edit() AND ($current_forum_category['locked']<>0 OR $current_forum['locked']<>0 OR $current_thread['locked']<>0))
- {
- forum_not_allowed_here();
- }
- if (!$_user['user_id'] AND $current_forum['allow_anonymous']==0)
- {
- forum_not_allowed_here();
- }
- if (!api_is_allowed_to_edit() AND $current_forum['allow_edit']==0)
- {
- forum_not_allowed_here();
- }
- echo "<table width='100%'>\n";
- echo "\t<tr class=\"forum_category_header\">\n\t\t<td colspan=\"2\">";
- echo '<a href="index.php" '.class_visible_invisible($current_forum_category['visibility']).'>'.prepare4display($current_forum_category['cat_title']).'</a><br />';
- echo '<span>'.prepare4display($current_forum_category['cat_comment']).'</span>';
- echo "</td>\n";
- echo "\t</tr>\n";
- echo "\t<tr class=\"forum_header\">\n";
- echo "\t\t<td colspan=\"2\">";
- echo '<a href="viewforum.php?forum='.$current_forum['forum_id'].'" '.class_visible_invisible($current_forum['visibility']).'>'.prepare4display($current_forum['forum_title']).'</a><br />';
- echo '<span>'.prepare4display($current_forum['forum_comment']).'</span>';
- echo "</td>\n";
- echo "\t</tr>\n";
- echo '</table>';
- $values=show_edit_post_form($current_post, $current_thread, $_SESSION['formelements']);
- if (!empty($values) and $_POST['SubmitPost'])
- {
- store_edit_post($values);
- }
- Display :: display_footer();
- ?>
|