-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_function.drawMenu.php
More file actions
executable file
·44 lines (39 loc) · 1.64 KB
/
Copy path_function.drawMenu.php
File metadata and controls
executable file
·44 lines (39 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
// +----------------------------------------------------------------------+
// | MicroFrabster v0.9.7 |
// +----------------------------------------------------------------------+
// | Copyright (c) 2005 - 2011 Selincite.com |
// +----------------------------------------------------------------------+
// | This code is released under the Mozilla Public License Version 1.1
// | See http://www.mozilla.org/MPL/MPL-1.1.html for full details.
// | For more informatino about licensing, and/or further development |
// | we encourage you to contact us - we're not evil. :) |
// +----------------------------------------------------------------------+
// | Authors: Jocke Selin <jocke@selincite.com> |
// +----------------------------------------------------------------------+
//
/* File purpose:
Function that draws the menu
*/
function drawMenu($aMenu)
{
$mReturn = FALSE;
$iSize = count($aMenu);
// print("iSize: $iSize");
foreach ($aMenu as $iIndex => $aMenuItem) {
// print("iIndex: " . ($iIndex + 1));
if (($iIndex + 1) == 1) {
$sPosition = 'first';
} elseif (($iIndex + 1) == $iSize) {
$sPosition = 'last';
} else {
$sPosition = 'middle';
}
$bIsCurrent = FALSE;
if ((APP_ROOT . $aMenuItem['href']) == ($_SERVER['PHP_SELF'])) {
$bIsCurrent = TRUE;
}
drawMenuItemLink($aMenuItem['href'], $aMenuItem['label'], $aMenuItem['title'], $sPosition, $bIsCurrent);
}
}
?>