<?php
// ======================================================================== //
//                                                                          //
//   KooBI- Webportalsystem                                                 //
//   SCRiPTMAFiA 2005 - THE DiRTY HANDS ON YOUR SCRiPTS                     //
//                                                                          //
//   ====================================================================   //
//                                                                          //   
//   dream4 | webservices - Am Michelsgrund 7 - 69469 Weinheim - Germany    //    
//   tel. +49(0) 6201 - 980442 / fax. +49(0) 6201 - 64809                   //
//                                                                          //
// ======================================================================== //
if(!checkactive('faq')) include(dirname(__FILE__)."/lib/notactive.php" );
$sname = simpletitle($lang['userfaq']);
if (!permission('showfaq')) {
	$EOUT = stderror("nopermission", $lang['nopermission_t'], str_replace("__URL__", redir(), $lang['redirect']), redir(), 1);
	$error = 1;
	$NOOUT = 1;
}

$tmpl->assign('lang', $lang);
$tmpl->assign('theme', $THEME);
$tmpl->assign('area', $area);

if( (isset($_REQUEST['faq_id'])) && (is_numeric($_REQUEST['faq_id'])) ){
	
	$fid = $_REQUEST['faq_id']; 
	} else {
	$fid = 0;
}


$faq = array();
$curr_faq = 0;
getFaq($fid, '', $faq, $area, '1', '', '', 1, '','', $curr_faq);

$tmpl->assign('faq', $faq);
$tmpl->assign('curr_faq', $curr_faq);
$tmpl->assign('navigation', getNavigationPath($fid, 'faq', 'faq', 'faq_id','id','faq'));
$header_nav = getNavigationPath($fid, 'faq', 'faq', 'faq_id','id','faq');

if($_REQUEST['faq_id']!=""){
		$hnav = '<a class="boxnavi" href="index.php?p=faq&amp;area='.$area.'">'.$lang['userfaqhome'].'</a>' . SEPARATOR . $header_nav;

	} else {
	$hnav = $lang['userfaqhome'];
}

if($fid!=0){
	
	$sname = simpletitle($lang['userfaq'] . $lang['f_navi_separator'] . getNavigationptitle($fid, 'faq', '', '','id','faq') . $sep );
}
$tmpl->assign("content", parsetrue("container/".container('faq'), $hnav , $tmpl->fetch('faq/showfaq.tpl')));
?>