2003-07-18 21:38:51 +00:00
|
|
|
<?php
|
2003-08-13 22:08:12 +00:00
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once('../inc/forum.inc');
|
|
|
|
require_once('../inc/util.inc');
|
|
|
|
require_once('../inc/time.inc');
|
2004-05-30 21:47:11 +00:00
|
|
|
require_once('../inc/forum_show.inc');
|
2003-07-18 21:38:51 +00:00
|
|
|
|
2003-08-14 00:56:20 +00:00
|
|
|
if (empty($_GET['id'])) {
|
2003-11-30 21:05:57 +00:00
|
|
|
// TODO: Standard error page
|
|
|
|
echo "Invalid forum ID.<br>";
|
|
|
|
exit();
|
2003-08-14 00:56:20 +00:00
|
|
|
}
|
|
|
|
|
2003-07-18 21:38:51 +00:00
|
|
|
$_GET['id'] = stripslashes(strip_tags($_GET['id']));
|
2003-07-30 00:50:54 +00:00
|
|
|
$_GET['sort'] = stripslashes(strip_tags($_GET['sort']));
|
2003-07-18 21:38:51 +00:00
|
|
|
|
2003-08-13 22:08:12 +00:00
|
|
|
if (!array_key_exists('start', $_GET) || $_GET['start'] < 0) {
|
2004-05-24 03:40:38 +00:00
|
|
|
$start = 0;
|
|
|
|
} else {
|
|
|
|
$start = $_GET['start'];
|
2003-08-13 22:08:12 +00:00
|
|
|
}
|
2003-07-18 21:38:51 +00:00
|
|
|
|
2003-08-01 20:30:25 +00:00
|
|
|
$forum = getForum($_GET['id']);
|
2003-08-13 22:08:12 +00:00
|
|
|
$category = getCategory($forum->category);
|
2003-08-01 20:30:25 +00:00
|
|
|
|
2003-08-13 22:08:12 +00:00
|
|
|
if ($category->is_helpdesk) {
|
2003-12-08 01:19:49 +00:00
|
|
|
$sort_style = $_GET['sort'];
|
2004-01-19 01:12:53 +00:00
|
|
|
if (!$sort_style) {
|
2004-09-04 23:37:49 +00:00
|
|
|
$sort_style = getSortStyle($logged_in_user,"faq");
|
2004-01-19 01:12:53 +00:00
|
|
|
} else {
|
2004-09-04 23:37:49 +00:00
|
|
|
setSortStyle($logged_in_user,"faq",$sort_style);
|
2004-01-19 01:12:53 +00:00
|
|
|
}
|
2003-12-21 05:55:48 +00:00
|
|
|
if (!$sort_style) $sort_style = 'activity';
|
2004-01-19 01:12:53 +00:00
|
|
|
page_head('Help Desk');
|
2003-08-01 20:30:25 +00:00
|
|
|
} else {
|
2003-12-08 01:19:49 +00:00
|
|
|
$sort_style = $_GET['sort'];
|
2004-01-19 01:12:53 +00:00
|
|
|
if (!$sort_style) {
|
2004-09-04 23:37:49 +00:00
|
|
|
$sort_style = getSortStyle($logged_in_user,"forum");
|
|
|
|
//$sort_style = $_COOKIE['forum_sort_style'];
|
2004-01-19 01:12:53 +00:00
|
|
|
} else {
|
2004-09-04 23:37:49 +00:00
|
|
|
setSortStyle($logged_in_user, "forum",$sort_style);
|
|
|
|
//setcookie('forum_sort_style', $sort_style, time()+3600*24*365);
|
2004-01-19 01:12:53 +00:00
|
|
|
}
|
2003-12-08 07:36:43 +00:00
|
|
|
if (!$sort_style) $sort_style = 'modified-new';
|
2004-01-19 01:12:53 +00:00
|
|
|
page_head('Message boards : '.$forum->title);
|
2003-07-30 00:50:54 +00:00
|
|
|
}
|
2003-08-13 22:08:12 +00:00
|
|
|
|
|
|
|
echo "
|
2004-06-01 18:55:59 +00:00
|
|
|
<form action=forum_forum.php method=get>
|
2004-05-24 03:40:38 +00:00
|
|
|
<input type=hidden name=id value=", $forum->id, ">
|
2003-11-30 21:05:57 +00:00
|
|
|
<table width=100% cellspacing=0 cellpadding=0>
|
2004-05-24 03:40:38 +00:00
|
|
|
<tr valign=bottom>
|
|
|
|
<td align=left style=\"border:0px\">
|
2003-08-13 22:08:12 +00:00
|
|
|
";
|
|
|
|
|
|
|
|
show_forum_title($forum, NULL, $category->is_helpdesk);
|
|
|
|
|
2004-05-30 21:47:11 +00:00
|
|
|
echo "<p>\n<a href=\"forum_post.php?id=", $_GET['id'], "\">";
|
2003-08-13 22:08:12 +00:00
|
|
|
|
|
|
|
if ($category->is_helpdesk) {
|
2003-12-09 06:46:50 +00:00
|
|
|
echo "Submit a question or problem";
|
2003-08-13 22:08:12 +00:00
|
|
|
} else {
|
2003-11-30 21:05:57 +00:00
|
|
|
echo "Create a new thread";
|
2003-08-13 22:08:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
echo "</a>\n</p>\n</td>";
|
|
|
|
|
2003-12-08 01:19:49 +00:00
|
|
|
echo "<td align=right>";
|
|
|
|
if ($category->is_helpdesk) {
|
|
|
|
show_select_from_array("sort", $faq_sort_styles, $sort_style);
|
|
|
|
} else {
|
|
|
|
show_select_from_array("sort", $forum_sort_styles, $sort_style);
|
2003-08-13 22:08:12 +00:00
|
|
|
}
|
2003-12-08 01:19:49 +00:00
|
|
|
echo "<input type=submit value=OK></td>\n";
|
2003-08-13 22:08:12 +00:00
|
|
|
|
|
|
|
echo "</tr>\n</table>\n</form>";
|
|
|
|
|
2004-09-04 23:37:49 +00:00
|
|
|
show_forum($category, $forum, $start, $sort_style, $logged_in_user);
|
2003-07-18 21:38:51 +00:00
|
|
|
|
2003-08-15 01:01:00 +00:00
|
|
|
page_tail();
|
2003-08-13 22:08:12 +00:00
|
|
|
|
|
|
|
|
2003-11-30 21:05:57 +00:00
|
|
|
?>
|