diff --git a/htdocs/compta/bank/pre.inc.php b/htdocs/compta/bank/pre.inc.php index f995c226c4d..a507c4c0a71 100644 --- a/htdocs/compta/bank/pre.inc.php +++ b/htdocs/compta/bank/pre.inc.php @@ -51,6 +51,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php'; $menu = new Menu(); // Entry for each bank account diff --git a/htdocs/compta/paiement/cheque/pre.inc.php b/htdocs/compta/paiement/cheque/pre.inc.php index ad915f21299..bc730c9740d 100644 --- a/htdocs/compta/paiement/cheque/pre.inc.php +++ b/htdocs/compta/paiement/cheque/pre.inc.php @@ -50,6 +50,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php'; $menu = new Menu(); // Entry for each bank account diff --git a/htdocs/core/menus/smartphone/index.php b/htdocs/core/menus/smartphone/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/menus/smartphone/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/menus/smartphone/smartphone.lib.php b/htdocs/core/menus/smartphone/smartphone.lib.php deleted file mode 100755 index ad71482fe10..00000000000 --- a/htdocs/core/menus/smartphone/smartphone.lib.php +++ /dev/null @@ -1,215 +0,0 @@ - - * Copyright (C) 2010 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ - */ - -/** - * \file htdocs/core/menus/smartphone/smartphone.lib.php - * \brief Library for file smartphone menus - */ - - -/** - * Core function to output top menu smartphone - * - * @param DoliDB $db Database handler - * @param string $atarget Target - * @param int $type_user 0=Internal,1=External,2=All - * @param string $limitmenuto To limit menu to a top or left menu value - * @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) - * @return void - */ -function print_smartphone_menu($db,$atarget,$type_user,$limitmenuto,&$tabMenu,&$menu) -{ - require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; - - global $user,$conf,$langs,$dolibarr_main_db_name; - - $mainmenu=$_SESSION["mainmenu"]; - $leftmenu=$_SESSION["leftmenu"]; - - $submenus=''; - - //$tabMenu=array(); - - $menutop = new Menubase($db,'smartphone'); - $menuleft = new Menubase($db,'smartphone'); - $newTabMenu = $menutop->menuTopCharger('', '', $type_user, 'smartphone',$tabMenu); - $numTabMenu = count($newTabMenu); - - print_start_menu_array(); - for($i=0; $i<$numTabMenu; $i++) - { - if ($newTabMenu[$i]['enabled'] == true) - { - if ($newTabMenu[$i]['perms'] == true) // Is allowed - { - // Define url - if (preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url'])) - { - $url = dol_buildpath($newTabMenu[$i]['url'],1); - $url=preg_replace('/&.*/i','',$url); - } - else - { - $menus=''; - - if ($limitmenuto > 0) - { - $newmenu = new Menu(); - $leftmenu = $menuleft->menuLeftCharger($newmenu,$newTabMenu[$i]['mainmenu'],'',($user->societe_id?1:0),'smartphone',$tabMenu); - $menus = $leftmenu->liste; - //var_dump($menus); - } - - print_start_menu_entry(); - - if (is_array($menus) && !empty($menus) && $limitmenuto > 0) - { - $title=$newTabMenu[$i]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($newTabMenu[$i]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - - $num = count($menus); - //var_dump($menus); - - if ($num > 0) print_start_submenu_array(); - - for($j=0; $j<$num; $j++) - { - $url=dol_buildpath($menus[$j]['url'],1); - $url=preg_replace('/&.*/i','',$url); - - if ($menus[$j]['level'] == 0) - { - print_start_menu_entry(); - if (empty($menus[$j+1]['level'])) print ''; - $title=$menus[$j]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($menus[$j]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - if (empty($menus[$j+1]['level'])) print ''; - } - - if ($menus[$j]['level'] > 0) - { - if ($menus[$j-1]['level'] == 0) print_start_submenu_array(); - - print_start_menu_entry(); - print ''; - $title=$menus[$j]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($menus[$j]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - print ''; - print_end_menu_entry(); - - if (empty($menus[$j+1]['level'])) print_end_menu(); - } - - if (empty($menus[$j+1]['level'])) print_end_menu_entry(); - } - - if ($num > 0) print_end_menu(); - } - else - { - $url=dol_buildpath($newTabMenu[$i]['url'],1); - $url=preg_replace('/&.*/i','',$url); - - print ''; - $title=$newTabMenu[$i]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($newTabMenu[$i]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - print ''; - } - - print_end_menu_entry(); - } - } - } - } - - print_end_menu(); - print "\n"; -} - -/** - * Output menu entry - * - * @param string $theme Theme - * @return void - */ -function print_start_menu_array($theme='c') -{ - print '