forked from fusionpbx/fusionpbx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.php
81 lines (67 loc) · 2.7 KB
/
menu.php
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <[email protected]>
Portions created by the Initial Developer are Copyright (C) 2008-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <[email protected]>
*/
require_once "root.php";
require_once "resources/require.php";
//define the variable
$v_menu = '';
//force the menu to generate on every page load
//$_SESSION["menu"] = '';
//build the menu if the session menu has no length
if (!isset($_SESSION["menu"])) {
$_SESSION["menu"] = '';
}
if (strlen($_SESSION["menu"]) == 0) {
$menuwidth = '110';
//echo " <!-- http://www.seoconsultants.com/css/menus/horizontal/ -->\n";
//echo " <!-- http://www.tanfa.co.uk/css/examples/css-dropdown-menus.asp -->";
$v_menu = "";
$v_menu .= " <!--[if IE]>\n";
$v_menu .= " <style type=\"text/css\" media=\"screen\">\n";
$v_menu .= " #menu{float:none;} /* This is required for IE to avoid positioning bug when placing content first in source. */\n";
$v_menu .= " /* IE Menu CSS */\n";
$v_menu .= " /* csshover.htc file version: V1.21.041022 - Available for download from: http://www.xs4all.nl/~peterned/csshover.html */\n";
$v_menu .= " body{behavior:url(/resources/csshover.htc);\n";
$v_menu .= " font-size:100%; /* to enable text resizing in IE */\n";
$v_menu .= " }\n";
$v_menu .= " #menu ul li{float:left;width:100%;}\n";
$v_menu .= " #menu h2, #menu a{height:1%;font:bold arial,helvetica,sans-serif;}\n";
$v_menu .= " </style>\n";
$v_menu .= " <![endif]-->\n";
//$v_menu .= " <style type=\"text/css\">@import url(\"/resources/menuh.css\");</style>\n";
$v_menu .= "\n";
$v_menu .= "<!-- Begin CSS Horizontal Popout Menu -->\n";
$v_menu .= "<div id=\"menu\" style=\"position: relative; z-index:199; width:100%;\" align='left'>\n";
$v_menu .= "\n";
require_once "resources/classes/menu.php";
$menu = new menu;
$menu->db = $db;
$menu->menu_uuid = $_SESSION['domain']['menu']['uuid'];
$v_menu .= $menu->build_html();
unset($menu);
$v_menu .= "</div>\n";
$_SESSION["menu"] = $v_menu;
}
else {
//echo "from session";
}
//testing
//echo $_SESSION["menu"];
?>