<?php

// -----------------------------------------------------------------------
// This file is part of AROUNDMe
//
// Copyright (C) 2003 - 2007 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., 51 Franklin St, Fifth Floor, Boston, MA
// 02110-1301, USA.
// -----------------------------------------------------------------------


include "config/aroundme_core.config.php";
include "inc/aroundme_core.functions.php";



// START SESSION --------------------------------------------------------------
session_name($core_config['node']['php_session_name']);
session_start();


$component_path = "../core/";
$language_path = $component_path . "language/" . $_SESSION['language_id'] . "/" . $_SESSION['template_title'] . "/";

// SETUP TEMPLATE
$template_path_core = "template/" . $_SESSION['template_title'] . "/";
	
require_once('class/Template.class.php');
$tpl = & new Template($template_path_core); // outer template
$tpl->set('template_path_core', $template_path_core);
	
// GET LANGUAGES
$lang = array();
$language_path = "language/" . $_SESSION['language_id'] . "/" . $_SESSION['template_title'] . "/";
	
require_once($language_path . 'common.lang.php');
require_once($language_path . 'help.lang.php');

$tpl->set('lang', $lang); // language

// build menu
$menu = array();
$temp['name'] = 					$lang['arr_menu'][1];
$temp['link'] = 					"core_index";
array_push($menu, $temp);

// get module help files
if (!empty($core_config['module'])) {
	foreach ($core_config['module'] as $key => $i):
		$temp['name'] = 					$lang['arr_module'][$key];
		$temp['link'] = 					$core_config['module'][$key]['prefix'] . "_index";
		array_push($menu, $temp);
	endforeach;
}

$temp['name'] = 					$lang['arr_menu'][2];
$temp['link'] = 					"core_ties";
array_push($menu, $temp);

$temp['name'] = 					$lang['arr_menu'][3];
$temp['link'] = 					"core_tags";
array_push($menu, $temp);

$temp['name'] = 					$lang['arr_menu'][8];
$temp['link'] = 					"core_comments";
array_push($menu, $temp);

$temp['name'] = 					$lang['arr_menu'][4];
$temp['link'] = 					"core_bookmarks";
array_push($menu, $temp);

$temp['name'] = 					$lang['arr_menu'][7];
$temp['link'] = 					"core_html_formatting";
array_push($menu, $temp);

$temp['name'] = 					$lang['arr_menu'][5];
$temp['link'] = 					"core_barnraiser";
array_push($menu, $temp);

$temp['name'] = 					$lang['arr_menu'][6];
$temp['link'] = 					"core_support";
array_push($menu, $temp);

$tpl->set('menu', $menu); // language


$outer_template_file = "help_menu.tpl.php";

echo $tpl->fetch($outer_template_file);


?>