empty.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. <?php
  2. /* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  16. */
  17. /**
  18. * \file htdocs/core/menus/standard/empty.php
  19. * \brief This is an example of an empty top menu handler
  20. */
  21. /**
  22. * Class to manage empty menu
  23. */
  24. class MenuManager
  25. {
  26. /**
  27. * @var DoliDB Database handler.
  28. */
  29. public $db;
  30. public $type_user = 0; // Put 0 for internal users, 1 for external users
  31. public $atarget = ""; // To store default target to use onto links
  32. public $name = "empty";
  33. public $menu;
  34. public $menu_array_after;
  35. public $tabMenu;
  36. /**
  37. * Constructor
  38. *
  39. * @param DoliDB $db Database handler
  40. * @param int $type_user Type of user
  41. */
  42. public function __construct($db, $type_user)
  43. {
  44. $this->type_user = $type_user;
  45. $this->db = $db;
  46. }
  47. /**
  48. * Load this->tabMenu
  49. *
  50. * @param string $forcemainmenu To force mainmenu to load
  51. * @param string $forceleftmenu To force leftmenu to load
  52. * @return void
  53. */
  54. public function loadMenu($forcemainmenu = '', $forceleftmenu = '')
  55. {
  56. // Do nothing
  57. $this->tabMenu = array();
  58. }
  59. /**
  60. * Show menu
  61. *
  62. * @param string $mode 'top', 'left', 'jmobile'
  63. * @param array $moredata An array with more data to output
  64. * @return int 0 or nb of top menu entries if $mode = 'topnb'
  65. */
  66. public function showmenu($mode, $moredata = null)
  67. {
  68. global $user, $conf, $langs, $dolibarr_main_db_name;
  69. $id = 'mainmenu';
  70. require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
  71. $this->menu = new Menu();
  72. $res = 'ErrorBadParameterForMode';
  73. $noout = 0;
  74. //if ($mode == 'jmobile') $noout=1;
  75. if ($mode == 'topnb') {
  76. return 1;
  77. }
  78. if ($mode == 'top') {
  79. if (empty($noout)) {
  80. print_start_menu_array_empty();
  81. }
  82. $usemenuhider = 1;
  83. // Show/Hide vertical menu
  84. if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
  85. $showmode = 1;
  86. $classname = 'class="tmenu menuhider nohover"';
  87. $idsel = 'menu';
  88. $this->menu->add('#', '', 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname);
  89. }
  90. // Home
  91. $showmode = 1;
  92. $classname = 'class="tmenusel"';
  93. $idsel = 'home';
  94. $this->menu->add('/index.php', $langs->trans("Home"), 0, $showmode, $this->atarget, 'home', '', 10, $id, $idsel, $classname);
  95. // Sort on position
  96. $this->menu->liste = dol_sort_array($this->menu->liste, 'position');
  97. // Output menu entries
  98. foreach ($this->menu->liste as $menkey => $menuval) {
  99. if (empty($noout)) {
  100. print_start_menu_entry_empty($menuval['idsel'], $menuval['classname'], $menuval['enabled']);
  101. }
  102. if (empty($noout)) {
  103. print_text_menu_entry_empty($menuval['titre'], $menuval['enabled'], ($menuval['url'] != '#' ?DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget));
  104. }
  105. if (empty($noout)) {
  106. print_end_menu_entry_empty($menuval['enabled']);
  107. }
  108. }
  109. $showmode = 1;
  110. if (empty($noout)) {
  111. print_start_menu_entry_empty('', 'class="tmenuend"', $showmode);
  112. }
  113. if (empty($noout)) {
  114. print_end_menu_entry_empty($showmode);
  115. }
  116. if (empty($noout)) {
  117. print_end_menu_array_empty();
  118. }
  119. if ($mode == 'jmobile') {
  120. $this->topmenu = clone $this->menu;
  121. unset($this->menu->liste);
  122. }
  123. }
  124. if ($mode == 'jmobile') { // Used to get menu in xml ul/li
  125. // Home
  126. $showmode = 1;
  127. $classname = 'class="tmenusel"';
  128. $idsel = 'home';
  129. $this->menu->add('/index.php', $langs->trans("Home"), 0, $showmode, $this->atarget, 'home', '', 10, $id, $idsel, $classname);
  130. $substitarray = getCommonSubstitutionArray($langs, 0, null, null);
  131. // $this->menu->liste is top menu
  132. //var_dump($this->menu->liste);exit;
  133. $lastlevel = array();
  134. print '<!-- Generate menu list from menu handler '.$this->name.' -->'."\n";
  135. foreach ($this->menu->liste as $key => $val) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
  136. print '<ul class="ulmenu" data-inset="true">';
  137. print '<li class="lilevel0">';
  138. $val['url'] = make_substitutions($val['url'], $substitarray);
  139. if ($val['enabled'] == 1) {
  140. $relurl = dol_buildpath($val['url'], 1);
  141. $canonurl = preg_replace('/\?.*$/', '', $val['url']);
  142. print '<a class="alilevel0" href="#">';
  143. // Add font-awesome
  144. if ($val['level'] == 0 && $val['mainmenu'] == 'home') {
  145. print '<span class="fa fa-home fa-fw paddingright" aria-hidden="true"></span>';
  146. }
  147. print $val['titre'];
  148. print '</a>'."\n";
  149. // Search submenu fot this mainmenu entry
  150. $tmpmainmenu = $val['mainmenu'];
  151. $tmpleftmenu = 'all';
  152. $submenu = new Menu();
  153. $langs->load("admin"); // Load translation file admin.lang
  154. $submenu->add("/admin/index.php?leftmenu=setup", $langs->trans("Setup"), 0);
  155. $submenu->add("/admin/company.php", $langs->trans("MenuCompanySetup"), 1);
  156. $submenu->add("/admin/modules.php", $langs->trans("Modules"), 1);
  157. $submenu->add("/admin/menus.php", $langs->trans("Menus"), 1);
  158. $submenu->add("/admin/ihm.php", $langs->trans("GUISetup"), 1);
  159. $submenu->add("/admin/translation.php?mainmenu=home", $langs->trans("Translation"), 1);
  160. $submenu->add("/admin/defaultvalues.php?mainmenu=home", $langs->trans("DefaultValues"), 1);
  161. $submenu->add("/admin/boxes.php?mainmenu=home", $langs->trans("Boxes"), 1);
  162. $submenu->add("/admin/delais.php?mainmenu=home", $langs->trans("Alerts"), 1);
  163. $submenu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"), 1);
  164. $submenu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"), 1);
  165. $submenu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1);
  166. $submenu->add("/admin/mails.php?mainmenu=home", $langs->trans("Emails"), 1);
  167. $submenu->add("/admin/sms.php?mainmenu=home", $langs->trans("SMS"), 1);
  168. $submenu->add("/admin/dict.php?mainmenu=home", $langs->trans("DictionarySetup"), 1);
  169. $submenu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"), 1);
  170. //if ($tmpmainmenu.'-'.$tmpleftmenu == 'home-all') {
  171. //var_dump($submenu); exit;
  172. //}
  173. //if ($tmpmainmenu=='accountancy') {
  174. //var_dump($submenu->liste); exit;
  175. //}
  176. $nexturl = dol_buildpath($submenu->liste[0]['url'], 1);
  177. $canonrelurl = preg_replace('/\?.*$/', '', $relurl);
  178. $canonnexturl = preg_replace('/\?.*$/', '', $nexturl);
  179. //var_dump($canonrelurl);
  180. //var_dump($canonnexturl);
  181. print '<ul>'."\n";
  182. if (($canonrelurl != $canonnexturl && !in_array($val['mainmenu'], array('tools')))
  183. || (strpos($canonrelurl, '/product/index.php') !== false || strpos($canonrelurl, '/compta/bank/list.php') !== false)) {
  184. // We add sub entry
  185. print str_pad('', 1).'<li class="lilevel1 ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
  186. print '<a href="'.$relurl.'">';
  187. if ($langs->trans(ucfirst($val['mainmenu'])."Dashboard") == ucfirst($val['mainmenu'])."Dashboard") { // No translation
  188. if (in_array($val['mainmenu'], array('cashdesk', 'websites'))) {
  189. print $langs->trans("Access");
  190. } else {
  191. print $langs->trans("Dashboard");
  192. }
  193. } else {
  194. print $langs->trans(ucfirst($val['mainmenu'])."Dashboard");
  195. }
  196. print '</a>';
  197. print '</li>'."\n";
  198. }
  199. if ($val['level'] == 0) {
  200. if ($val['enabled']) {
  201. $lastlevel[0] = 'enabled';
  202. } elseif ($showmenu) { // Not enabled but visible (so greyed)
  203. $lastlevel[0] = 'greyed';
  204. } else {
  205. $lastlevel[0] = 'hidden';
  206. }
  207. }
  208. $lastlevel2 = array();
  209. foreach ($submenu->liste as $key2 => $val2) { // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
  210. $showmenu = true;
  211. if (!empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) && empty($val2['enabled'])) {
  212. $showmenu = false;
  213. }
  214. // If at least one parent is not enabled, we do not show any menu of all children
  215. if ($val2['level'] > 0) {
  216. $levelcursor = $val2['level'] - 1;
  217. while ($levelcursor >= 0) {
  218. if ($lastlevel2[$levelcursor] != 'enabled') {
  219. $showmenu = false;
  220. }
  221. $levelcursor--;
  222. }
  223. }
  224. if ($showmenu) { // Visible (option to hide when not allowed is off or allowed)
  225. $val2['url'] = make_substitutions($val2['url'], $substitarray);
  226. $relurl2 = dol_buildpath($val2['url'], 1);
  227. $canonurl2 = preg_replace('/\?.*$/', '', $val2['url']);
  228. //var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']);
  229. if (in_array($canonurl2, array('/admin/index.php', '/admin/tools/index.php', '/core/tools.php'))) {
  230. $relurl2 = '';
  231. }
  232. $disabled = '';
  233. if (!$val2['enabled']) {
  234. $disabled = " vsmenudisabled";
  235. }
  236. print str_pad('', $val2['level'] + 1);
  237. print '<li class="lilevel'.($val2['level'] + 1);
  238. if ($val2['level'] == 0) {
  239. print ' ui-btn-icon-right ui-btn'; // ui-btn to highlight on clic
  240. }
  241. print $disabled.'">'; // ui-btn to highlight on clic
  242. if ($relurl2) {
  243. if ($val2['enabled']) {
  244. // Allowed
  245. print '<a href="'.$relurl2.'">';
  246. $lastlevel2[$val2['level']] = 'enabled';
  247. } else {
  248. // Not allowed but visible (greyed)
  249. print '<a href="#" class="vsmenudisabled">';
  250. $lastlevel2[$val2['level']] = 'greyed';
  251. }
  252. } else {
  253. if ($val2['enabled']) { // Allowed
  254. $lastlevel2[$val2['level']] = 'enabled';
  255. } else {
  256. $lastlevel2[$val2['level']] = 'greyed';
  257. }
  258. }
  259. //var_dump($val2['level']);
  260. //var_dump($lastlevel2);
  261. print $val2['titre'];
  262. if ($relurl2) {
  263. if ($val2['enabled']) {
  264. // Allowed
  265. print '</a>';
  266. } else {
  267. // Not allowed
  268. print '</a>';
  269. }
  270. }
  271. print '</li>'."\n";
  272. }
  273. }
  274. //var_dump($submenu);
  275. print '</ul>';
  276. }
  277. if ($val['enabled'] == 2) {
  278. print '<span class="vsmenudisabled">'.$val['titre'].'</span>';
  279. }
  280. print '</li>';
  281. print '</ul>'."\n";
  282. }
  283. }
  284. if ($mode == 'left') {
  285. // Put here left menu entries
  286. // ***** START *****
  287. $langs->load("admin"); // Load translation file admin.lang
  288. $this->menu->add("/admin/index.php?leftmenu=setup", $langs->trans("Setup"), 0);
  289. $this->menu->add("/admin/company.php", $langs->trans("MenuCompanySetup"), 1);
  290. $this->menu->add("/admin/modules.php", $langs->trans("Modules"), 1);
  291. $this->menu->add("/admin/menus.php", $langs->trans("Menus"), 1);
  292. $this->menu->add("/admin/ihm.php", $langs->trans("GUISetup"), 1);
  293. $this->menu->add("/admin/translation.php?mainmenu=home", $langs->trans("Translation"), 1);
  294. $this->menu->add("/admin/defaultvalues.php?mainmenu=home", $langs->trans("DefaultValues"), 1);
  295. $this->menu->add("/admin/boxes.php?mainmenu=home", $langs->trans("Boxes"), 1);
  296. $this->menu->add("/admin/delais.php?mainmenu=home", $langs->trans("Alerts"), 1);
  297. $this->menu->add("/admin/proxy.php?mainmenu=home", $langs->trans("Security"), 1);
  298. $this->menu->add("/admin/limits.php?mainmenu=home", $langs->trans("MenuLimits"), 1);
  299. $this->menu->add("/admin/pdf.php?mainmenu=home", $langs->trans("PDF"), 1);
  300. $this->menu->add("/admin/mails.php?mainmenu=home", $langs->trans("Emails"), 1);
  301. $this->menu->add("/admin/sms.php?mainmenu=home", $langs->trans("SMS"), 1);
  302. $this->menu->add("/admin/dict.php?mainmenu=home", $langs->trans("DictionarySetup"), 1);
  303. $this->menu->add("/admin/const.php?mainmenu=home", $langs->trans("OtherSetup"), 1);
  304. // ***** END *****
  305. $menu_array_before = array();
  306. $menu_array_after = array();
  307. // do not change code after this
  308. $menu_array = $this->menu->liste;
  309. if (is_array($menu_array_before)) {
  310. $menu_array = array_merge($menu_array_before, $menu_array);
  311. }
  312. if (is_array($menu_array_after)) {
  313. $menu_array = array_merge($menu_array, $menu_array_after);
  314. }
  315. //var_dump($menu_array);exit;
  316. if (!is_array($menu_array)) {
  317. return 0;
  318. }
  319. if (empty($noout)) {
  320. $alt = 0;
  321. $altok = 0;
  322. $blockvmenuopened = false;
  323. $num = count($menu_array);
  324. for ($i = 0; $i < $num; $i++) {
  325. $alt++;
  326. if (empty($menu_array[$i]['level'])) {
  327. $altok++;
  328. $blockvmenuopened = true;
  329. $lastopened = true;
  330. for ($j = ($i + 1); $j < $num; $j++) {
  331. if (empty($menu_array[$j]['level'])) {
  332. $lastopened = false;
  333. }
  334. }
  335. $alt = 0; // For menu manager "empty", we force to not have blockvmenufirst defined
  336. $lastopened = 1; // For menu manager "empty", we force to not have blockvmenulast defined
  337. if (($alt % 2 == 0)) {
  338. print '<div class="blockvmenub lockvmenuimpair blockvmenuunique'.($lastopened ? ' blockvmenulast' : '').($alt == 1 ? ' blockvmenufirst' : '').'">'."\n";
  339. } else {
  340. print '<div class="blockvmenu blockvmenupair blockvmenuunique'.($lastopened ? ' blockvmenulast' : '').($alt == 1 ? ' blockvmenufirst' : '').'">'."\n";
  341. }
  342. }
  343. // Add tabulation
  344. $tabstring = '';
  345. $tabul = ($menu_array[$i]['level'] - 1);
  346. if ($tabul > 0) {
  347. for ($j = 0; $j < $tabul; $j++) {
  348. $tabstring .= '&nbsp; &nbsp;';
  349. }
  350. }
  351. if ($menu_array[$i]['level'] == 0) {
  352. if ($menu_array[$i]['enabled']) {
  353. print '<div class="menu_titre">'.$tabstring.'<a class="vmenu" href="'.dol_buildpath($menu_array[$i]['url'], 1).'"'.($menu_array[$i]['target'] ? ' target="'.$menu_array[$i]['target'].'"' : '').'>'.$menu_array[$i]['titre'].'</a></div>'."\n";
  354. } else {
  355. print '<div class="menu_titre">'.$tabstring.'<span class="vmenudisabled">'.$menu_array[$i]['titre'].'</span></div>'."\n";
  356. }
  357. print '<div class="menu_top"></div>'."\n";
  358. }
  359. if ($menu_array[$i]['level'] > 0) {
  360. $cssmenu = '';
  361. if ($menu_array[$i]['url']) {
  362. $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url']));
  363. }
  364. print '<div class="menu_contenu'.$cssmenu.'">';
  365. if ($menu_array[$i]['enabled']) {
  366. print $tabstring;
  367. if ($menu_array[$i]['url']) {
  368. print '<a class="vsmenu" itle="'.dol_escape_htmltag($menu_array[$i]['titre']).'" href="'.dol_buildpath($menu_array[$i]['url'], 1).'"'.($menu_array[$i]['target'] ? ' target="'.$menu_array[$i]['target'].'"' : '').'>';
  369. } else {
  370. print '<span class="vsmenu" title="'.dol_escape_htmltag($menu_array[$i]['titre']).'">';
  371. }
  372. if ($menu_array[$i]['url']) {
  373. print $menu_array[$i]['titre'].'</a>';
  374. } else {
  375. print '</span>';
  376. }
  377. } else {
  378. print $tabstring.'<span class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</span>';
  379. }
  380. // If title is not pure text and contains a table, no carriage return added
  381. if (!strstr($menu_array[$i]['titre'], '<table')) {
  382. print '<br>';
  383. }
  384. print '</div>'."\n";
  385. }
  386. // If next is a new block or end
  387. if (empty($menu_array[$i + 1]['level'])) {
  388. print '<div class="menu_end"></div>'."\n";
  389. print "</div>\n";
  390. }
  391. }
  392. if ($altok) {
  393. print '<div class="blockvmenuend"></div>';
  394. }
  395. }
  396. if ($mode == 'jmobile') {
  397. $this->leftmenu = clone $this->menu;
  398. unset($menu_array);
  399. }
  400. }
  401. unset($this->menu);
  402. return $res;
  403. }
  404. }
  405. /**
  406. * Output menu entry
  407. *
  408. * @return void
  409. */
  410. function print_start_menu_array_empty()
  411. {
  412. global $conf;
  413. print '<div class="tmenudiv">';
  414. print '<ul role="navigation" class="tmenu"'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' title="Top menu"').'>';
  415. }
  416. /**
  417. * Output start menu entry
  418. *
  419. * @param string $idsel Text
  420. * @param string $classname String to add a css class
  421. * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed
  422. * @return void
  423. */
  424. function print_start_menu_entry_empty($idsel, $classname, $showmode)
  425. {
  426. if ($showmode) {
  427. print '<li '.$classname.' id="mainmenutd_'.$idsel.'">';
  428. //print '<div class="tmenuleft tmenusep"></div>';
  429. print '<div class="tmenucenter">';
  430. }
  431. }
  432. /**
  433. * Output menu entry
  434. *
  435. * @param string $text Text
  436. * @param int $showmode 1 or 2
  437. * @param string $url Url
  438. * @param string $id Id
  439. * @param string $idsel Id sel
  440. * @param string $classname Class name
  441. * @param string $atarget Target
  442. * @return void
  443. */
  444. function print_text_menu_entry_empty($text, $showmode, $url, $id, $idsel, $classname, $atarget)
  445. {
  446. global $conf, $langs;
  447. $classnameimg = str_replace('class="', 'class="tmenuimage ', $classname);
  448. $classnametxt = str_replace('class="', 'class="tmenulabel ', $classname);
  449. if ($showmode == 1) {
  450. print '<a '.$classnameimg.' tabindex="-1" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').' title="'.dol_escape_htmltag($text).'">';
  451. print '<div class="'.$id.' '.$idsel.' topmenuimage"><span class="'.$id.' tmenuimageforpng" id="mainmenuspan_'.$idsel.'"></span></div>';
  452. print '</a>';
  453. if (empty($conf->global->THEME_TOPMENU_DISABLE_TEXT)) {
  454. print '<a '.$classnametxt.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').'>';
  455. print '<span class="mainmenuaspan">';
  456. print $text;
  457. print '</span>';
  458. print '</a>';
  459. }
  460. }
  461. if ($showmode == 2) {
  462. print '<div '.$classnameimg.' title="'.dol_escape_htmltag($text.' - '.$langs->trans("NotAllowed")).'">';
  463. print '<div class="'.$id.' '.$idsel.' topmenuimage tmenudisabled"><span class="'.$id.' tmenuimageforpng tmenudisabled" id="mainmenuspan_'.$idsel.'"></span></div>';
  464. print '</div>';
  465. if (empty($conf->global->THEME_TOPMENU_DISABLE_TEXT)) {
  466. print '<span '.$classnametxt.' id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($text.' - '.$langs->trans("NotAllowed")).'">';
  467. print '<span class="mainmenuaspan">';
  468. print $text;
  469. print '</span>';
  470. print '</span>';
  471. }
  472. }
  473. }
  474. /**
  475. * Output end menu entry
  476. *
  477. * @param int $showmode 0 = hide, 1 = allowed or 2 = not allowed
  478. * @return void
  479. */
  480. function print_end_menu_entry_empty($showmode)
  481. {
  482. if ($showmode) {
  483. print '</div></li>';
  484. print "\n";
  485. }
  486. }
  487. /**
  488. * Output menu array
  489. *
  490. * @return void
  491. */
  492. function print_end_menu_array_empty()
  493. {
  494. print '</ul>';
  495. print '</div>';
  496. print "\n";
  497. }