<?php

// -----------------------------------------------------------------------
// This file is part of aroundme
// 
// Copyright (C) 2003, 2005 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
// 
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option) any
// later version.
// 
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
// -----------------------------------------------------------------------

include_once "inc/header.inc.php";

//setup forum
require_once($c_node['dir']['class_path'] . 'Forum.class.php');
$forum = new Forum($db, null, $date, $file);


if (isset($_REQUEST['topic_id'])) {
	$forum->topic_id = $_REQUEST['topic_id'];
}

if (isset($_REQUEST['subject_id'])) {
	$forum->subject_id = $_REQUEST['subject_id'];
}

//a blog item can sit under either a group, social net, my sections of aroundme
// if so we swap out menus and include group info
if (!empty($_REQUEST['group_id'])) { // page under group section
    //setup group
	$group_id = $_REQUEST['group_id'];
	include "inc/header_group.inc.php";
	require_once($languagePath . 'g_common.lang.php');
	
	//apply group to schedule
	$forum->group_id = $group_id;
	$forum->file = $file;
}
else {
	require_once($languageArrayPath . 'arr_user.lang.php');
	include "inc/header_my.inc.php";
	require_once($languagePath . 'my_common.lang.php');
	$menu_section = "my"; //sets menu in default template
	$forum->user_id = $me['user_id'];
}


//append language setup
require_once($languageArrayPath . 'arr_language_name.lang.php');


?>
