<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.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 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
defined('MAXIMUS') or Header("Location: index.php");

	global $currentlang, $multilingual;
	if ($multilingual == 1) {
		$querylang = "WHERE `flanguage`='".$GLOBALS['db']->XMFlang($currentlang)."'";
	} else {
		$querylang = "";
	}
	$pagetitle = "- $module_name";

	incoh( 'Faq', 'html',  "".CACHE_VFAQ."", '1' );

	Max_OpenTable();
	echo "<center><font class=\"option\">"._FAQ2."</font></center>";
	br('2');
	echo "<table width=\"100%\" cellpadding=\"4\" cellspacing=\"0\" border=\"0\">"
	."<tr><td bgcolor=\"$bgcolor2\"><font class=\"option\"><b>"._CATEGORIES."</b></font></td></tr><tr><td>";
	$sql = "SELECT `id_cat`, `categories` FROM `".TABLE_FAQCATEGORIES."` $querylang";
	if ( !($result = $GLOBALS['db']->sql_query($sql)) )
{ query_die(GENERAL_ERROR, 'Could not obtain faqcategories modules', '', __LINE__, __FILE__, $sql);}
	while ($row = $GLOBALS['db']->sql_fetchrow($result)) {
		$id_cat     = $GLOBALS['db']->XMFnum($row['id_cat']);
		$categories = stripslashes(check_html($row['categories'], "nohtml"));
	echo "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=FAQ&amp;op=detailsfaq&amp;id_cat=$id_cat\">$categories</a>";
	br('1');
	}
	echo "</td></tr></table>";
	Max_CloseTable();

	incof( 'Faq', 'html',  "".CACHE_VFAQ."", '1' );