<?php
/**
 * This file is part of 
 * pragmaMx - Web Content Management System.
 * Copyright by pragmaMx Developer Team - http://www.pragmamx.org
 *
 * pragmaMx 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 3 of the License, or
 * (at your option) any later version.
 *
 * $Revision: 1.6.6.1 $
 * $Author: tora60 $
 * $Date: 2009/03/06 03:32:49 $
 *
 * this file based on:
 * php-nuke Web Portal System - http://phpnuke.org/
 * Thatware - http://thatware.org/
 */
// Blockcache ermoeglichen
$mxblockcache = true;
// Modulname
$module_name = 'Content';
// Anzahl der angezeigten Links, 0 um alle Links anzuzeigen
$limit = 15;

defined('mxMainFileLoaded') or die('access denied');

global $prefix;
$limit = ($limit) ? ' LIMIT ' . intval($limit) : '';
$content = '';
$result = sql_query("SELECT cid, title FROM " . $prefix . "_pages_categories WHERE cid IN (SELECT pid FROM " . $prefix . "_pages WHERE active='1') ORDER BY cid ASC" . $limit . "");
while (list($cid, $title) = sql_fetch_row($result)) {
    $content .= '<li><a href="modules.php?name=' . $module_name . '&amp;cid=' . $cid . '">' . $title . '</a></li>';
}

if ($content) {
    $content = '<ul class="list">' . $content . '</ul>';
}

?>