<?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 die ('Access denied block content MAXIMUS directly...');

global $multilingual, $currentlang;

$multilingual = addslashes( $multilingual ) ;
$currentlang  = addslashes( $currentlang ) ;

if ($multilingual == 1) {
    	$querylang = "WHERE `active`='1' AND (`clanguage`='$currentlang' OR `clanguage`='')";
} else {
    	$querylang = "WHERE `active`='1' ";
}

if ( $content = opencacheb ( "Content$currentlang", 'html' , "".CACHE_BL_CONTENT."", '1' ) ) {
} else {

$sql = "SELECT `pid`, `title` FROM `".TABLE_PAGES."` $querylang ";
if ( !($result = $GLOBALS['db']->sql_query($sql)) )
{ query_die(BLOCK_ERROR, 'Could not obtain _pages', '', __LINE__, __FILE__, $sql);}
while ($row = $GLOBALS['db']->sql_fetchrow($result)) {
$pid   = $GLOBALS['db']->XMFnum($row['pid']);
$title = stripslashes($row['title']);
    $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=Content&amp;pa=showpage&amp;pid=$pid\">$title</a><br />";
}

closecacheb ( "".$content."", "Content$currentlang", 'html' , "".CACHE_BL_CONTENT."", '1' );
}