1 |
<?php
|
2 |
//$Header: /hl/cvsroots/gpl01/gpl01/webprojs/fboprime/sw/phplib/menux.inc,v 1.1 2006/07/11 01:16:54 dashley Exp $
|
3 |
//--------------------------------------------------------------------------------------------------------------
|
4 |
//menux.inc--FboPrime Menu Generation Functions Not Required from Day View Scheduler
|
5 |
//Copyright (C) 2006 David T. Ashley
|
6 |
//
|
7 |
//This program is free software; you can redistribute it and/or
|
8 |
//modify it under the terms of the GNU General Public License
|
9 |
//as published by the Free Software Foundation; either version 2
|
10 |
//of the License, or (at your option) any later version.
|
11 |
//
|
12 |
//This program is distributed in the hope that it will be useful,
|
13 |
//but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
//GNU General Public License for more details.
|
16 |
//
|
17 |
//You should have received a copy of the GNU General Public License
|
18 |
//along with this program; if not, write to the Free Software
|
19 |
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
20 |
//********************************************************************************
|
21 |
//This contains functions used to log events, both to the loge table of the
|
22 |
//database, and to the system log.
|
23 |
//--------------------------------------------------------------------------------------------------------------
|
24 |
require_once("global.inc");
|
25 |
require_once("menux.inc");
|
26 |
require_once("strfunc.inc");
|
27 |
require_once("utime.inc");
|
28 |
//
|
29 |
//--------------------------------------------------------------------------------------------------------------
|
30 |
//Generates menu text that is grouped, with the passed separator used between groups but not at the end.
|
31 |
//
|
32 |
function MENU_menu_inline_text_gen_01($userinfo_in, $menulevel_in, $dt8_in, $t4_in, $separator_in, $scriptname_in)
|
33 |
{
|
34 |
//Return value by default empty string.
|
35 |
$rv = "";
|
36 |
|
37 |
//Get the base array.
|
38 |
//
|
39 |
$menu_array = MENU_menu_gen($userinfo_in, $menulevel_in, $dt8_in, $t4_in, $scriptname_in);
|
40 |
|
41 |
//Loop through, making the string.
|
42 |
$num = count($menu_array);
|
43 |
|
44 |
for ($i=0; $i<$num; $i+=3)
|
45 |
{
|
46 |
if ($menu_array[$i] == "H")
|
47 |
{
|
48 |
//For any except the first, need the separator.
|
49 |
if ($i>0)
|
50 |
$rv = $rv . $separator_in;
|
51 |
|
52 |
//Heading.
|
53 |
$rv = $rv . "<b>" . $menu_array[$i+1] . ":</b> ";
|
54 |
}
|
55 |
else
|
56 |
{
|
57 |
//For anything except the first entry after a heading, need a space.
|
58 |
if ($menu_array[$i-3] != "H")
|
59 |
$rv = $rv . " ";
|
60 |
|
61 |
//Text entry.
|
62 |
$rv = " " . $rv . "<a href=\"" . $menu_array[$i+2] . "\">" . $menu_array[$i+1] . "</a>";
|
63 |
}
|
64 |
}
|
65 |
|
66 |
return($rv);
|
67 |
}
|
68 |
//
|
69 |
//--------------------------------------------------------------------------------------------------------------
|
70 |
//End of $RCSfile: menux.inc,v $.
|
71 |
//--------------------------------------------------------------------------------------------------------------
|
72 |
?>
|