<?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 RSS parser (gathers and parses RSS feeds or channels)
require_once($c_node['dir']['class_path'] . 'LastRss.class.php');
$rss = new lastRSS($db);
$rss->cache_dir = 'cache/feed'; 
$rss->cache_time = 3600; // one hour


//setup RSS database class
require_once($c_node['dir']['class_path'] . 'Channel.class.php');
$channel = new Channel($db);


//a channel 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
	$rss->group_id = $group_id;
	
	$channel->language_id = $output_group['language_id'];
}
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
	$rss->user_id = $me['user_id'];
	
	$channel->language_id = $me['language_id'];
}


?>
