-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_function.drawMenuItemLink.php
More file actions
executable file
·35 lines (33 loc) · 1.49 KB
/
Copy path_function.drawMenuItemLink.php
File metadata and controls
executable file
·35 lines (33 loc) · 1.49 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
<?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 a linked menu item
*/
function drawMenuItemLink($sHref, $sLabel, $sTitle, $sPosition, $bIsActive = FALSE)
{
// Position can be 'first', 'last' or 'middle'
$sAClass = "";
if ($bIsActive === TRUE) {
$sAClass = "selected ";
}
if ($sPosition == 'first' OR $sPosition == 'last' OR $sPosition == 'middle') {
$sAClass .= $sPosition;
$sLink = "<a href=\"" . $sHref . "\" title=\"" . $sTitle . "\" class=\"" . $sAClass ."\">" . $sLabel . "</a>\n";
print($sLink);
} else {
print("Error: Menu item position is not one of 'first', 'last' or 'middle'!");
}
}
?>