function llxHeader($head = '', $title='', $help_url='', $morehtml='') { global $conf,$langs,$user; $langs->load("ftp"); top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers $menu = new Menu(); $MAXFTP=20; $i=1; while ($i <= $MAXFTP) { $paramkey='FTP_NAME_'.$i; //print $paramkey; if (! empty($conf->global->$paramkey)) { $link="/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; $menu->add($link, dol_trunc($conf->global->$paramkey,24)); } $i++; } left_menu($menu->liste, $help_url, $morehtml, '', 1); main_area(); }
/** * Replace the default llxHeader function * @param $head * @param $title * @param $help_url * @param $target * @param $disablejs * @param $disablehead * @param $arrayofjs * @param $arrayofcss */ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') { global $db, $user, $conf, $langs; top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers $menu = new Menu(); // Entry for each bank account if ($user->rights->banque->lire) { $sql = "SELECT rowid, label, courant, rappro, courant"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; $sql.= " WHERE entity = ".$conf->entity; $sql.= " AND clos = 0"; $sql.= " ORDER BY label"; $resql = $db->query($sql); if ($resql) { $numr = $db->num_rows($resql); $i = 0; if ($numr > 0) $menu->add('/compta/bank/index.php',$langs->trans("BankAccounts"),0,$user->rights->banque->lire); while ($i < $numr) { $objp = $db->fetch_object($resql); $menu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire); if ($objp->rappro && $objp->courant != 2 && ! $objp->clos) // If not cash account and not closed and can be reconciliate { $menu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate); } $i++; } } else dol_print_error($db); $db->free($resql); } left_menu('', $help_url, '', $menu->liste, 1); main_area(); }
<?php /* Copyright (C) 2001-2003 Rodolphe Quiedeville <*****@*****.**> * Copyright (C) 2010 Laurent Destailleur <*****@*****.**> * * 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 <http://www.gnu.org/licenses/>. */ /** * \file htdocs/externalsite/frametop.php * \ingroup externalsite * \brief Top frame to show external web application */ require "../main.inc.php"; $langs->load("externalsite"); top_htmlhead("", ""); top_menu("", "", "_top");
if ($GLOBALS["VERBOSE"]) { echo __LINE__ . "::Includes...()<br>\n"; } include_once dirname(__FILE__) . "/ressources/class.users.menus.inc"; include_once dirname(__FILE__) . "/ressources/class.mini.admin.inc"; include_once dirname(__FILE__) . "/ressources/class.user.inc"; include_once dirname(__FILE__) . "/ressources/class.tcpip.inc"; if (isset($_GET["logoff"])) { unset($_SESSION); } if (!CheckRights()) { logon(); exit; } if (isset($_GET["top-menu"])) { top_menu(); exit; } if (isset($_GET["content"])) { content(); exit; } if (isset($_GET["events-list"])) { events_search(); exit; } startpage(); function logon() { if ($GLOBALS["VERBOSE"]) { echo __LINE__ . "::LOGON...()<br>\n";
/** * Show HTML header HTML + BODY + Top menu + left menu + DIV * * @param string $head Optionnal head lines * @param string $title HTML title * @param string $help_url Url links to help page * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage * For other external page: http://server/url * @param string $target Target to use on links * @param int $disablejs More content into html header * @param int $disablehead More content into html header * @param array $arrayofjs Array of complementary js files * @param array $arrayofcss Array of complementary css files * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) * @return void */ function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '') { global $conf; // html header top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // top menu and left menu area if (empty($conf->dol_hide_topmenu)) { top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring); } if (empty($conf->dol_hide_leftmenu)) { left_menu('', $help_url, '', '', 1, $title); } // main area main_area($title); }
/** * Show HTML header HTML + BODY + Top menu + left menu + DIV * * @param string $head Optionnal head lines * @param string $title HTML title * @param string $help_url Url links to help page * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage * For other external page: http://server/url * @param string $target Target to use on links * @param int $disablejs More content into html header * @param int $disablehead More content into html header * @param array $arrayofjs Array of complementary js files * @param array $arrayofcss Array of complementary css files * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) * @return void */ function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '') { top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring); main_area($title); }
/** * \brief Function called by page to show menus (top and left) */ function llxHeader($head = "") { global $db, $user, $conf, $langs, $menumanager; require_once DOL_DOCUMENT_ROOT . "/core/class/menu.class.php"; //top_menu($head); $menu = new Menu(); $leftmenu = GETPOST('leftmenu', 'alpha'); $sql = "SELECT m.rowid"; $sql .= " FROM " . MAIN_DB_PREFIX . "menu as m WHERE module = 'reports' AND entity=" . $conf->entity; $sql .= " ORDER BY rowid DESC LIMIT 1"; $resql = $db->query($sql); $objr = $db->fetch_object($resql); $menu_report_id = $objr->rowid; $sql = "SELECT m.rowid"; $sql .= " FROM " . MAIN_DB_PREFIX . "menu as m"; $sql .= " ORDER BY rowid DESC LIMIT 1"; $resql = $db->query($sql); $obji = $db->fetch_object($resql); $start_id = $obji->rowid; $start_id++; $sql = "SELECT rowid, code, name, active FROM " . MAIN_DB_PREFIX . "reports_group"; $resql = $db->query($sql); if ($resql) { $cont = count($menumanager->tabMenu); $numr = $db->num_rows($resql); $i = 0; while ($i < $numr) { $objp = $db->fetch_object($resql); if ($objp->active) { if ($objp->name == 'noAssigned') { $name = $langs->trans("NoAssigned"); } else { $key = $langs->trans("group" . strtoupper($objp->code)); $namegroup = $objp->code && $key != "group" . strtoupper($objp->code) ? $key : $objp->name; } $sql2 = "SELECT code, name, xmlin FROM " . MAIN_DB_PREFIX . "reports_report"; $sql2 .= " WHERE active = 1 AND fk_group=" . $objp->rowid; //$sql2.= " AND entity =".$conf->entity; $resql2 = $db->query($sql2); if ($resql2) { $numg = $db->num_rows($resql2); $j = 0; if ($numg) { //$menu->add('/reports/index.php?leftmenu='.$objp->name.'&mainmenu=Reports', $namegroup,0,1,'',$objp->name); // We complete tabMenu $menumanager->tabMenu[$cont]['rowid'] = $start_id; $menumanager->tabMenu[$cont]['module'] = 'reports'; $menumanager->tabMenu[$cont]['fk_menu'] = $menu_report_id; $menumanager->tabMenu[$cont]['url'] = '/reports/index.php?leftmenu=' . $objp->name . '&mainmenu=reports'; $menumanager->tabMenu[$cont]['titre'] = $namegroup; $menumanager->tabMenu[$cont]['target'] = ''; $menumanager->tabMenu[$cont]['mainmenu'] = 'reports'; $menumanager->tabMenu[$cont]['leftmenu'] = ''; $menumanager->tabMenu[$cont]['perms'] = $user->rights->reports->use; $menumanager->tabMenu[$cont]['enabled'] = $conf->reports->enabled; $menumanager->tabMenu[$cont]['type'] = 'left'; $menumanager->tabMenu[$cont]['fk_mainmenu'] = ''; $menumanager->tabMenu[$cont]['fk_leftmenu'] = ''; $menumanager->tabMenu[$cont]['position'] = 100; $rowid_group = $start_id; $cont++; $start_id++; } while ($j < $numg) { $objr = $db->fetch_object($resql2); $key = $langs->trans("report" . strtoupper($objr->code)); $name = $objr->code && $key != "report" . strtoupper($objr->code) ? $key : $objr->name; $code = $objr->code; if ($user->rights->reports->{$code}) { if ($leftmenu == $objp->name || $menumanager->name == 'oblyon') { // We complete tabMenu $menumanager->tabMenu[$cont]['rowid'] = $start_id; $menumanager->tabMenu[$cont]['module'] = 'reports'; $menumanager->tabMenu[$cont]['fk_menu'] = $rowid_group; $menumanager->tabMenu[$cont]['url'] = '/reports/report.php?leftmenu=' . $objp->name . '&execute_mode=PREPARE&project=Dolibarr&target_output=HTML&xmlin=' . $objr->xmlin; $menumanager->tabMenu[$cont]['titre'] = $name; $menumanager->tabMenu[$cont]['target'] = ''; $menumanager->tabMenu[$cont]['mainmenu'] = 'reports'; $menumanager->tabMenu[$cont]['leftmenu'] = ''; $menumanager->tabMenu[$cont]['perms'] = '$user->rights->reports->' . $objr->code; $menumanager->tabMenu[$cont]['enabled'] = $conf->reports->enabled; $menumanager->tabMenu[$cont]['type'] = 'left'; $menumanager->tabMenu[$cont]['fk_mainmenu'] = ''; $menumanager->tabMenu[$cont]['fk_leftmenu'] = ''; $menumanager->tabMenu[$cont]['position'] = 100; $cont++; $start_id++; } //$menu->add('/reports/report.php?leftmenu='.$objp->name.'&execute_mode=PREPARE&project=Dolibarr&target_output=HTML&xmlin='.$objr->xmlin, $name,1); } $j++; } } } $i++; } $menumanager->tabMenu[$cont]['rowid'] = $start_id; $menumanager->tabMenu[$cont]['module'] = 'reports'; $menumanager->tabMenu[$cont]['fk_menu'] = $menu_report_id; $menumanager->tabMenu[$cont]['url'] = '/reports/askreport.php'; $menumanager->tabMenu[$cont]['titre'] = $langs->trans("MoreReports"); $menumanager->tabMenu[$cont]['target'] = ''; $menumanager->tabMenu[$cont]['mainmenu'] = 'reports'; $menumanager->tabMenu[$cont]['leftmenu'] = ''; $menumanager->tabMenu[$cont]['perms'] = $user->rights->reports->use; $menumanager->tabMenu[$cont]['enabled'] = $conf->reports->enabled; $menumanager->tabMenu[$cont]['type'] = 'left'; $menumanager->tabMenu[$cont]['fk_mainmenu'] = ''; $menumanager->tabMenu[$cont]['fk_leftmenu'] = ''; $menumanager->tabMenu[$cont]['position'] = 100; //$menu->add('/reports/askreport.php', $langs->trans("MoreReports")); } top_menu($head); $helpurl = 'EN:Module_Reports|FR:Module_Reports_FR|ES:Módulo_Reports'; left_menu($menu->liste, $helpurl); }