Jeff PHP framework  0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
menu_admin.php
Go to the documentation of this file.
00001 <?php
00016 ?>
00017 <ul id="nav">
00018 <?php $continue = true; $parsed = $voices; $tree = array(); $last = null; ?>
00019 <?php while ($continue === true): ?>
00020         <?php if (is_array(current($parsed))): ?>
00021                 <li><a href="#"><?= key($parsed) ?></a>
00022                 <ul>
00023                 <?php $tree[] = $parsed; $parsed = current($parsed); end($parsed); $last = key($parsed); reset($parsed); ?>
00024         <?php elseif(current($parsed) !== false) : ?>
00025                 <li><a href="<?= current($parsed) ?>"><?= key($parsed) ?></a></li>
00026                 <?php if (key($parsed)==$last): ?>
00027                         </ul></li>
00028                         <?php $parsed = array_pop($tree); ?>
00029                 <?php endif ?>
00030                 <?php next($parsed); ?>
00031         <?php else: ?>
00032                 </ul></li>
00033                 <?php $parsed = array_pop($tree);next($parsed); ?>
00034         <?php endif ?>
00035         <?php if (count($tree)==0 && current($parsed)==false): ?>
00036                 <?php $continue = false; ?>
00037         <?php endif ?>
00038 <?php endwhile ?>
00039 </ul>
00040 <script>
00041 window.addEvent('load', function() { var myMenu = new MenuMatic('nav'); });
00042 </script>