<?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 dyn readfolder MAXIMUS directly...');


function Nav_Folder( $folder , $prefix ) {
 $linksdir = dir("$folder");
	    global $menulist;
	    while($func=$linksdir->read()) {
	        if(substr($func, 0, 6) == "$prefix.") {
	    	    $menulist .= "$func ";
			}
	    }
	    closedir($linksdir->handle);
	    $menulist = explode(" ", $menulist);
	    sort($menulist);
	    for ($i=0; $i < sizeof($menulist); $i++) {
			if($menulist[$i]!="") {
		    	$sucounter = 0;
			$test_value = $linksdir->path."/$menulist[$i]";
		    	$test_value = eregi_replace("Array", "", $test_value);
	include($test_value);
}
}

}