function llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='') { global $user, $conf, $langs, $mysoc; top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers print '<body id="mainbody">'; // Print logo $urllogo=DOL_URL_ROOT.'/theme/login_logo.png'; if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small); } elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=companylogo&file='.urlencode($mysoc->logo); $width=128; } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) { $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; } print '<center>'; print '<img alt="Logo" title="" src="'.$urllogo.'" />'; print '</center><br>'; print '<div style="margin-left: 50px; margin-right: 50px;">'; }
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(); }
/** * Show header for new member * * @param string $title Title * @param string $head Head array * @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 * @return void */ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') { top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers print '<body id="mainbody" class="publicnewmemberform" style="margin-top: 10px;">'; showlogo(); print '<div style="margin-left: 50px; margin-right: 50px;">'; }
/** * 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(); }
/** * Show header for demo * * @param string $title Title * @param string $head Head string * @return void */ function llxHeaderVierge($title, $head = "") { global $user, $conf, $langs; top_httphead(); top_htmlhead($head,$title); print '<body style="margin: 20px;">'."\n"; }
if (GETPOST('lang')) { $langs->setDefaultLang(GETPOST('lang')); } // If language was forced on URL by the main.inc.php $langs->load("main"); $right = $langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right'; $left = $langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'; /* * View */ $title = $langs->trans("Search"); // URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests $head = '<!-- Quick access -->' . "\n"; $arrayofjs = array(); $arrayofcss = array(); top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); print '<body>' . "\n"; print '<div>'; //print '<br>'; $nbofsearch = 0; // Instantiate hooks of thirdparty module $hookmanager->initHooks(array('searchform')); // Define $searchform $searchform = ''; // TODO Mutualize code here with function left_menu into main.inc.php page if ((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) || !empty($conf->fournisseur->enabled)) && !empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) { $langs->load("companies"); $searchform .= printSearchForm(DOL_URL_ROOT . '/societe/societe.php', DOL_URL_ROOT . '/societe/societe.php', img_object('', 'company') . ' ' . $langs->trans("ThirdParties"), 'soc', 'socname'); $nbofsearch++; } if (!empty($conf->societe->enabled) && !empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire) {
<?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");
*/ require ("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/includes/nusoap/lib/nusoap.php"); $langs->load("companies"); //http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl $WS_DOL_URL='http://ec.europa.eu/taxation_customs/vies/services/checkVatService'; //$WS_DOL_URL_WSDL=$WS_DOL_URL.'?wsdl'; $WS_DOL_URL_WSDL='http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'; $WS_METHOD ='checkVat'; top_htmlhead("", $langs->trans("VATIntraCheckableOnEUSite")); print '<body style="margin: 10px">'; print '<div>'; print '<div>'; print_fiche_titre($langs->trans("VATIntraCheckableOnEUSite"),'','setup'); if (! $_REQUEST["vatNumber"]) { print '<br>'; print '<font class="error">'.$langs->transnoentities("ErrorFieldRequired",$langs->trans("VATIntraShort")).'</font><br>'; } else { $countryCode=substr($_REQUEST["vatNumber"],0,2);
require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/cashdesk/include/environnement.php'; // Test if already logged if ($_SESSION['uid'] <= 0) { header('Location: index.php'); exit; } $langs->load("cashdesk"); /* * View */ //header("Content-type: text/html; charset=UTF-8"); header("Content-type: text/html; charset=" . $conf->file->character_set_client); $arrayofjs = array(); $arrayofcss = array('/cashdesk/css/style.css'); top_htmlhead($head, $langs->trans("CashDesk"), 0, 0, $arrayofjs, $arrayofcss); print '<body>' . "\n"; if (!empty($error)) { print $error; print '</body></html>'; exit; } print '<div class="conteneur">' . "\n"; print '<div class="conteneur_img_gauche">' . "\n"; print '<div class="conteneur_img_droite">' . "\n"; print '<h1 class="entete"><span>POINT OF SALE</span></h1>' . "\n"; print '<div class="menu_principal">' . "\n"; include_once 'tpl/menu.tpl.php'; print '</div>' . "\n"; print '<div class="contenu">' . "\n"; include_once 'affContenu.php';
$usertxt = $user->login; //$pwdtxt=$user->pass; //hacer un getpost para recoger usuario, pass y terminal y que redireccione a verify.php Tú lo vales!!! if (GETPOST("username")) { $_SESSION["username"] = GETPOST("username", "alpha"); $_SESSION["password"] = GETPOST("password", "alpha"); $_SESSION["terminal"] = GETPOST("terminal", "int"); header('Location: ' . dol_buildpath('/pos/frontend/verify.php', 1)); exit; } $openterminal = GETPOST("openterminal"); /* * View */ $arrayofcss = array('/pos/frontend/css/pos.css'); top_htmlhead('', '', 0, 0, '', $arrayofcss); ?> <!-- Basic Page Needs ================================================== --> <meta charset="utf-8"> <title>DoliPOS</title> <meta name="description" content=""> <meta name="author" content=""> <!-- Mobile Specific Metas ================================================== --> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <!-- CSS ================================================== -->
$conf->dol_hide_leftmenu = 1; } if (GETPOST('dol_optimize_smallscreen')) { $conf->dol_optimize_smallscreen = 1; } if (GETPOST('dol_no_mouse_hover')) { $conf->dol_no_mouse_hover = 1; } if (GETPOST('dol_use_jmobile')) { $conf->dol_use_jmobile = 1; } // If we force to use jmobile, then we reenable javascript if (!empty($conf->dol_use_jmobile)) { $conf->use_javascript_ajax = 1; } print top_htmlhead('', $langs->trans('Login') . ' ' . $title); ?> <!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP --> <body class="bodylogin"> <?php if (empty($conf->dol_use_jmobile)) { ?> <script type="text/javascript"> $(document).ready(function () { // Set focus on correct field <?php if ($focus_element) { ?> $('#<?php
/** * Show an HTML header + a BODY + The top menu bar * * @param string $head Lines in the HEAD * @param string $title Title of web page * @param string $target Target to use in menu links (Example: '' or '_top') * @param int $disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax) * @param int $disablehead Do not output head section * @param array $arrayofjs Array of js files to add in header * @param array $arrayofcss Array of css files to add in header * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) * @return void */ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '') { global $user, $conf, $langs, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; global $hookmanager, $menumanager; // Instantiate hooks of thirdparty module $hookmanager->initHooks(array('toprightmenu')); $toprightmenu = ''; // For backward compatibility with old modules if (empty($conf->headerdone)) { top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); } print '<body id="mainbody">'; if ($conf->use_javascript_ajax) { if (empty($conf->dol_use_jmobile) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<script type="text/javascript"> jQuery(document).ready(function () { jQuery("body").layout(layoutSettings); }); var layoutSettings = { name: "mainlayout", defaults: { useStateCookie: true, size: "auto", resizable: false, //paneClass: "none", //resizerClass: "resizer", //togglerClass: "toggler", //buttonClass: "button", //contentSelector: ".content", //contentIgnoreSelector: "span", togglerTip_open: "Close This Pane", togglerTip_closed: "Open This Pane", resizerTip: "Resize This Pane", fxSpeed: "fast" }, west: { paneClass: "leftContent", //spacing_closed: 14, //togglerLength_closed: 14, //togglerAlign_closed: "auto", //togglerLength_open: 0, // effect defaults - overridden on some panes //slideTrigger_open: "mouseover", initClosed: ' . (empty($conf->dol_optimize_smallscreen) ? 'false' : 'true') . ', fxName: "drop", fxSpeed: "fast", fxSettings: { easing: "" } }, north: { paneClass: "none", resizerClass: "none", togglerClass: "none", spacing_open: 0, togglerLength_open: 0, togglerLength_closed: -1, slidable: false, fxName: "none", fxSpeed: "fast" }, center: { paneSelector: "#mainContent" } } </script>'; } // Wrapper to show tooltips print "\n" . '<script type="text/javascript"> jQuery(document).ready(function () { jQuery(".classfortooltip").tipTip({maxWidth: "' . dol_size(600, 'width') . 'px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50}); }); </script>'; } /* * Top menu */ print "\n" . '<!-- Start top horizontal -->' . "\n"; if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<div class="ui-layout-north"> <!-- Begin top layout -->' . "\n"; } if (empty($conf->dol_hide_topmenu)) { print '<div class="side-nav-vert"><div id="id-top">'; // Show menu entries print '<div id="tmenu_tooltip' . (empty($conf->global->MAIN_MENU_INVERT) ? '' : 'invert') . '" class="tmenu">' . "\n"; $menumanager->atarget = $target; $menumanager->showmenu('top'); // This contains a \n print "</div>\n"; $form = new Form($db); // Define link to login card $appli = 'Dolibarr'; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $conf->global->MAIN_APPLICATION_TITLE; if (preg_match('/\\d\\.\\d/', $appli)) { if (!preg_match('/' . preg_quote(DOL_VERSION) . '/', $appli)) { $appli .= " (" . DOL_VERSION . ")"; } // If new title contains a version that is different than core } else { $appli .= " " . DOL_VERSION; } } else { $appli .= " " . DOL_VERSION; } if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { $appli .= "<br>" . $langs->trans("LevelOfFeature") . ': ' . $conf->global->MAIN_FEATURES_LEVEL; } $logouttext = ''; $logouthtmltext = $appli . '<br>'; if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouthtmltext .= $langs->trans("Logout") . '<br>'; $logouttext .= '<a href="' . DOL_URL_ROOT . '/user/logout.php">'; $logouttext .= img_picto($langs->trans('Logout') . ":" . $langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1); $logouttext .= '</a>'; } else { $logouthtmltext .= $langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]); $logouttext .= img_picto($langs->trans('Logout') . ":" . $langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1); } print '<div class="login_block">' . "\n"; // Add login user link $toprightmenu .= '<div class="login_block_user">'; // User photo $toprightmenu .= '<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">'; $toprightmenu .= $user->getPhotoUrl(16, 16, 'loginphoto'); $toprightmenu .= '</div></div>'; // Login name with tooltip $toprightmenu .= '<div class="inline-block nowrap"><div class="inline-block login_block_elem" style="padding: 0px;">'; $toprightmenu .= $user->getNomurl(0, '', true, 0, 11); $toprightmenu .= '</div></div>'; $toprightmenu .= '</div>'; $toprightmenu .= '<div class="login_block_other">'; // Execute hook printTopRightMenu (hooks should output string like '<div class="login"><a href="">mylink</a></div>') $parameters = array(); $result = $hookmanager->executeHooks('printTopRightMenu', $parameters); // Note that $action and $object may have been modified by some hooks if (is_numeric($result)) { if (empty($result)) { $toprightmenu .= $hookmanager->resPrint; } else { $toprightmenu = $hookmanager->resPrint; } // replace } else { $toprightmenu .= $result; } // For backward compatibility // Link to print main content area if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone)) { $qs = $_SERVER["QUERY_STRING"]; $qs .= ($qs && $morequerystring ? '&' : '') . $morequerystring; $text = '<a href="' . $_SERVER["PHP_SELF"] . '?' . $qs . ($qs ? '&' : '') . 'optioncss=print" target="_blank">'; $text .= img_picto(":" . $langs->trans("PrintContentArea"), 'printer.png', 'class="printer"'); $text .= '</a>'; $toprightmenu .= $form->textwithtooltip('', $langs->trans("PrintContentArea"), 2, 1, $text, 'login_block_elem', 2); } // Logout link $toprightmenu .= $form->textwithtooltip('', $logouthtmltext, 2, 1, $logouttext, 'login_block_elem', 2); $toprightmenu .= '</div>'; print $toprightmenu; print "</div>\n"; print '</div></div>'; unset($form); } if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print "</div><!-- End top layout -->\n"; } print '<div style="clear: both;"></div>'; print "<!-- End top horizontal menu -->\n\n"; if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile) && empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<div id="id-container">'; } }
/** * 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); }
/** * Show an HTML header + a BODY + The top menu bar * * @param string $head Lines in the HEAD * @param string $title Title of web page * @param string $target Target to use in menu links (Example: '' or '_top') * @param int $disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax) * @param int $disablehead Do not output head section * @param array $arrayofjs Array of js files to add in header * @param array $arrayofcss Array of css files to add in header * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) * @param string $helppagename Name of wiki page for help ('' by default). * Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage * For other external page: http://server/url * @return void */ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $helppagename = '') { global $user, $conf, $langs, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; global $hookmanager, $menumanager; // Instantiate hooks of thirdparty module $hookmanager->initHooks(array('toprightmenu')); $toprightmenu = ''; // For backward compatibility with old modules if (empty($conf->headerdone)) { top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); } print '<body id="mainbody">' . "\n"; if ($conf->use_javascript_ajax) { if (empty($conf->dol_use_jmobile) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<script type="text/javascript"> jQuery(document).ready(function () { jQuery("body").layout(layoutSettings); }); var layoutSettings = { name: "mainlayout", defaults: { useStateCookie: true, size: "auto", resizable: false, //paneClass: "none", //resizerClass: "resizer", //togglerClass: "toggler", //buttonClass: "button", //contentSelector: ".content", //contentIgnoreSelector: "span", togglerTip_open: "Close This Pane", togglerTip_closed: "Open This Pane", resizerTip: "Resize This Pane", fxSpeed: "fast" }, west: { paneClass: "leftContent", //spacing_closed: 14, //togglerLength_closed: 14, //togglerAlign_closed: "auto", //togglerLength_open: 0, // effect defaults - overridden on some panes //slideTrigger_open: "mouseover", initClosed: ' . (empty($conf->dol_optimize_smallscreen) ? 'false' : 'true') . ', fxName: "drop", fxSpeed: "fast", fxSettings: { easing: "" } }, north: { paneClass: "none", resizerClass: "none", togglerClass: "none", spacing_open: 0, togglerLength_open: 0, togglerLength_closed: -1, slidable: false, fxName: "none", fxSpeed: "fast" }, center: { paneSelector: "#mainContent" } } </script>' . "\n"; } // Raven.js for client-side Sentry logging support if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && !empty($conf->global->SYSLOG_SENTRY_DSN)) { // Filter out secret key $dsn = parse_url($conf->global->SYSLOG_SENTRY_DSN); $public_dsn = $dsn['scheme'] . '://' . $dsn['user'] . '@' . $dsn['host'] . $dsn['path']; print '<script type="text/javascript">' . "\n"; print "Raven.config('" . $public_dsn . "').install()\n"; print "Raven.setUserContext({username: '******'})\n"; print "Raven.setTagsContext({version: '" . DOL_VERSION . "'})\n"; print "</script>\n"; } } /* * Top menu */ print "\n" . '<!-- Start top horizontal -->' . "\n"; if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<div class="ui-layout-north"> <!-- Begin top layout -->' . "\n"; } if (empty($conf->dol_hide_topmenu)) { print '<div class="side-nav-vert"><div id="id-top">'; // Show menu entries print '<div id="tmenu_tooltip' . (empty($conf->global->MAIN_MENU_INVERT) ? '' : 'invert') . '" class="tmenu">' . "\n"; $menumanager->atarget = $target; $menumanager->showmenu('top'); // This contains a \n print "</div>\n"; //$form=new Form($db); // Define link to login card $appli = constant('DOL_APPLICATION_TITLE'); if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $conf->global->MAIN_APPLICATION_TITLE; if (preg_match('/\\d\\.\\d/', $appli)) { if (!preg_match('/' . preg_quote(DOL_VERSION) . '/', $appli)) { $appli .= " (" . DOL_VERSION . ")"; } // If new title contains a version that is different than core } else { $appli .= " " . DOL_VERSION; } } else { $appli .= " " . DOL_VERSION; } if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { $appli .= "<br>" . $langs->trans("LevelOfFeature") . ': ' . $conf->global->MAIN_FEATURES_LEVEL; } $logouttext = ''; $logouthtmltext = $appli . '<br>'; if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouthtmltext .= $langs->trans("Logout") . '<br>'; $logouttext .= '<a href="' . DOL_URL_ROOT . '/user/logout.php">'; $logouttext .= img_picto($langs->trans('Logout') . ":" . $langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1); $logouttext .= '</a>'; } else { $logouthtmltext .= $langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]); $logouttext .= img_picto($langs->trans('Logout') . ":" . $langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1); } print '<div class="login_block">' . "\n"; // Add login user link $toprightmenu .= '<div class="login_block_user">'; // Login name with photo and tooltip $mode = -1; $toprightmenu .= '<div class="inline-block nowrap"><div class="inline-block login_block_elem login_block_elem_name" style="padding: 0px;">'; $toprightmenu .= $user->getNomUrl($mode, '', true, 0, 11, 0, $user->firstname ? 'firstname' : -1, 'atoplogin'); $toprightmenu .= '</div></div>'; $toprightmenu .= '</div>'; $toprightmenu .= '<div class="login_block_other">'; // Execute hook printTopRightMenu (hooks should output string like '<div class="login"><a href="">mylink</a></div>') $parameters = array(); $result = $hookmanager->executeHooks('printTopRightMenu', $parameters); // Note that $action and $object may have been modified by some hooks if (is_numeric($result)) { if (empty($result)) { $toprightmenu .= $hookmanager->resPrint; } else { $toprightmenu = $hookmanager->resPrint; } // replace } else { $toprightmenu .= $result; } // For backward compatibility // Link to print main content area if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone)) { $qs = $_SERVER["QUERY_STRING"]; $qs .= ($qs && $morequerystring ? '&' : '') . $morequerystring; $text = '<a href="' . $_SERVER["PHP_SELF"] . '?' . $qs . ($qs ? '&' : '') . 'optioncss=print" target="_blank">'; $text .= img_picto(":" . $langs->trans("PrintContentArea"), 'printer_top.png', 'class="printer"'); $text .= '</a>'; $toprightmenu .= Form::textwithtooltip('', $langs->trans("PrintContentArea"), 2, 1, $text, 'login_block_elem', 2); } // Link to Dolibarr wiki pages if (empty($conf->global->MAIN_HELP_DISABLELINK)) { $langs->load("help"); $helpbaseurl = ''; $helppage = ''; $mode = ''; if (empty($helppagename)) { $helppagename = 'EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios'; } // Get helpbaseurl, helppage and mode from helppagename and langs $arrayres = getHelpParamFor($helppagename, $langs); $helpbaseurl = $arrayres['helpbaseurl']; $helppage = $arrayres['helppage']; $mode = $arrayres['mode']; // Link to help pages if ($helpbaseurl && $helppage) { $text = ''; $title = ''; //$text.='<div id="blockvmenuhelpwiki" class="blockvmenuhelp">'; $title .= $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage'); if ($mode == 'wiki') { $title .= ' - ' . $langs->trans("PageWiki") . ' "' . dol_escape_htmltag(strtr($helppage, '_', ' ')) . '"'; } $text .= '<a class="help" target="_blank" href="'; if ($mode == 'wiki') { $text .= sprintf($helpbaseurl, urlencode(html_entity_decode($helppage))); } else { $text .= sprintf($helpbaseurl, $helppage); } $text .= '">'; $text .= img_picto('', 'helpdoc_top') . ' '; //$toprightmenu.=$langs->trans($mode == 'wiki' ? 'OnlineHelp': 'Help'); //if ($mode == 'wiki') $text.=' ('.dol_trunc(strtr($helppage,'_',' '),8).')'; $text .= '</a>'; //$toprightmenu.='</div>'."\n"; $toprightmenu .= Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2); } } // Logout link $toprightmenu .= Form::textwithtooltip('', $logouthtmltext, 2, 1, $logouttext, 'login_block_elem', 2); $toprightmenu .= '</div>'; print $toprightmenu; print "</div>\n"; print '</div></div>'; //unset($form); } if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print "</div><!-- End top layout -->\n"; } print '<div style="clear: both;"></div>'; print "<!-- End top horizontal menu -->\n\n"; if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile) && empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<div id="id-container">'; } }
/** * Show an HTML header + a BODY + The top menu bar * * @param string $head Lines in the HEAD * @param string $title Title of web page * @param string $target Target to use in menu links (Example: '' or '_top') * @param int $disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax) * @param int $disablehead Do not output head section * @param array $arrayofjs Array of js files to add in header * @param array $arrayofcss Array of css files to add in header * @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) * @return void */ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '') { global $user, $conf, $langs, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; global $hookmanager, $menumanager; // Instantiate hooks of thirdparty module $hookmanager->initHooks(array('toprightmenu')); $toprightmenu = ''; // For backward compatibility with old modules if (empty($conf->headerdone)) { top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); } print '<body id="mainbody">'; if ($conf->use_javascript_ajax) { if (empty($conf->dol_use_jmobile) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<script type="text/javascript"> jQuery(document).ready(function () { jQuery("body").layout(layoutSettings); }); var layoutSettings = { name: "mainlayout", defaults: { useStateCookie: true, size: "auto", resizable: false, //paneClass: "none", //resizerClass: "resizer", //togglerClass: "toggler", //buttonClass: "button", //contentSelector: ".content", //contentIgnoreSelector: "span", togglerTip_open: "Close This Pane", togglerTip_closed: "Open This Pane", resizerTip: "Resize This Pane", fxSpeed: "fast" }, west: { paneClass: "leftContent", //spacing_closed: 14, //togglerLength_closed: 14, //togglerAlign_closed: "auto", //togglerLength_open: 0, // effect defaults - overridden on some panes //slideTrigger_open: "mouseover", initClosed: ' . (empty($conf->dol_optimize_smallscreen) ? 'false' : 'true') . ', fxName: "drop", fxSpeed: "fast", fxSettings: { easing: "" } }, north: { paneClass: "none", resizerClass: "none", togglerClass: "none", spacing_open: 0, togglerLength_open: 0, togglerLength_closed: -1, slidable: false, fxName: "none", fxSpeed: "fast" }, center: { paneSelector: "#mainContent" } } </script>'; } // Wrapper to show tooltips print "\n" . '<script type="text/javascript"> jQuery(document).ready(function () { jQuery(function() { jQuery(".classfortooltip").tipTip({maxWidth: "' . dol_size(600, 'width') . 'px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50}); }); }); </script>'; } /* * Top menu */ print "\n" . '<!-- Start top horizontal -->' . "\n"; if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<div class="ui-layout-north"> <!-- Begin top layout -->' . "\n"; } if (empty($conf->dol_hide_topmenu)) { // Show menu entries print '<div id="tmenu_tooltip' . (empty($conf->global->MAIN_MENU_INVERT) ? '' : 'invert') . '" class="tmenu">' . "\n"; $menumanager->atarget = $target; $menumanager->showmenu('top'); // This contains a \n print "</div>\n"; $form = new Form($db); // Define link to login card $loginhtmltext = ''; $logintext = ''; if ($user->societe_id) { $thirdpartystatic = new Societe($db); $thirdpartystatic->fetch($user->societe_id); $companylink = ' (' . $thirdpartystatic->getNomUrl('', '') . ')'; $company = ' (' . $langs->trans("Company") . ': ' . $thirdpartystatic->name . ')'; } $logintext = '<div class="login"><a href="' . DOL_URL_ROOT . '/user/card.php?id=' . $user->id . '"'; $logintext .= $target ? ' target="' . $target . '"' : ''; $logintext .= '>' . $user->login . '</a>'; if ($user->societe_id) { $logintext .= $companylink; } $logintext .= '</div>'; $loginhtmltext .= '<u>' . $langs->trans("User") . '</u>'; $loginhtmltext .= '<br><b>' . $langs->trans("Name") . '</b>: ' . $user->getFullName($langs); $loginhtmltext .= '<br><b>' . $langs->trans("Login") . '</b>: ' . $user->login; $loginhtmltext .= '<br><b>' . $langs->trans("EMail") . '</b>: ' . $user->email; $loginhtmltext .= '<br><b>' . $langs->trans("Administrator") . '</b>: ' . yn($user->admin); $type = $user->societe_id ? $langs->trans("External") . $company : $langs->trans("Internal"); $loginhtmltext .= '<br><b>' . $langs->trans("Type") . '</b>: ' . $type; $loginhtmltext .= '<br><b>' . $langs->trans("IPAddress") . '</b>: ' . $_SERVER["REMOTE_ADDR"]; $loginhtmltext .= '<br>'; $loginhtmltext .= '<br><u>' . $langs->trans("Connection") . '</u>'; if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY)) { $loginhtmltext .= '<br><b>' . $langs->trans("ConnectedOnMultiCompany") . '</b>: ' . $conf->entity . ' (user entity ' . $user->entity . ')'; } $loginhtmltext .= '<br><b>' . $langs->trans("AuthenticationMode") . '</b>: ' . $_SESSION["dol_authmode"] . (empty($dolibarr_main_demo) ? '' : ' (demo)'); $loginhtmltext .= '<br><b>' . $langs->trans("ConnectedSince") . '</b>: ' . dol_print_date($user->datelastlogin, "dayhour"); $loginhtmltext .= '<br><b>' . $langs->trans("PreviousConnexion") . '</b>: ' . dol_print_date($user->datepreviouslogin, "dayhour"); $loginhtmltext .= '<br><b>' . $langs->trans("CurrentTheme") . '</b>: ' . $conf->theme; $loginhtmltext .= '<br><b>' . $langs->trans("CurrentMenuManager") . '</b>: ' . $menumanager->name; $s = picto_from_langcode($langs->getDefaultLang()); $loginhtmltext .= '<br><b>' . $langs->trans("CurrentUserLanguage") . '</b>: ' . ($s ? $s . ' ' : '') . $langs->getDefaultLang(); $loginhtmltext .= '<br><b>' . $langs->trans("Browser") . '</b>: ' . $conf->browser->name . ($conf->browser->version ? ' ' . $conf->browser->version : '') . ' (' . $_SERVER['HTTP_USER_AGENT'] . ')'; if (!empty($conf->browser->phone)) { $loginhtmltext .= '<br><b>' . $langs->trans("Phone") . '</b>: ' . $conf->browser->phone; } if (!empty($_SESSION["disablemodules"])) { $loginhtmltext .= '<br><b>' . $langs->trans("DisabledModules") . '</b>: <br>' . join(', ', explode(',', $_SESSION["disablemodules"])); } $appli = 'Dolibarr'; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) { $appli = $conf->global->MAIN_APPLICATION_TITLE; if (preg_match('/\\d\\.\\d/', $appli)) { if (!preg_match('/' . preg_quote(DOL_VERSION) . '/', $appli)) { $appli .= " (" . DOL_VERSION . ")"; } // If new title contains a version that is different than core } else { $appli .= " " . DOL_VERSION; } } else { $appli .= " " . DOL_VERSION; } if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { $appli .= "<br>" . $langs->trans("LevelOfFeature") . ': ' . $conf->global->MAIN_FEATURES_LEVEL; } $logouttext = ''; $logouthtmltext = $appli . '<br>'; if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouthtmltext .= $langs->trans("Logout") . '<br>'; $logouttext .= '<a href="' . DOL_URL_ROOT . '/user/logout.php">'; $logouttext .= img_picto($langs->trans('Logout') . ":" . $langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1); $logouttext .= '</a>'; } else { $logouthtmltext .= $langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]); $logouttext .= img_picto($langs->trans('Logout') . ":" . $langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1); } print '<div class="login_block">' . "\n"; $toprightmenu .= '<div class="login_block_user">'; // Add login user link $toprightmenu .= $form->textwithtooltip('', $loginhtmltext, 2, 1, $logintext, 'login_block_elem2', 2); // This include div class="login" $toprightmenu .= '</div>'; $toprightmenu .= '<div class="login_block_other">'; // Execute hook printTopRightMenu (hooks should output string like '<div class="login"><a href="">mylink</a></div>') $parameters = array(); $result = $hookmanager->executeHooks('printTopRightMenu', $parameters); // Note that $action and $object may have been modified by some hooks if (is_numeric($result)) { if (empty($result)) { $toprightmenu .= $hookmanager->resPrint; } else { $toprightmenu = $hookmanager->resPrint; } // replace } else { $toprightmenu .= $result; } // For backward compatibility // Logout link $toprightmenu .= $form->textwithtooltip('', $logouthtmltext, 2, 1, $logouttext, 'login_block_elem', 2); // Link to print main content area if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone)) { $qs = $_SERVER["QUERY_STRING"]; $qs .= ($qs && $morequerystring ? '&' : '') . $morequerystring; $text = '<a href="' . $_SERVER["PHP_SELF"] . '?' . $qs . ($qs ? '&' : '') . 'optioncss=print" target="_blank">'; $text .= img_picto(":" . $langs->trans("PrintContentArea"), 'printer.png', 'class="printer"'); $text .= '</a>'; $toprightmenu .= $form->textwithtooltip('', $langs->trans("PrintContentArea"), 2, 1, $text, 'login_block_elem', 2); } $toprightmenu .= '</div>'; print $toprightmenu; print "</div>\n"; unset($form); } if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print "</div><!-- End top layout -->\n"; } print '<div style="clear: both;"></div>'; print "<!-- End top horizontal menu -->\n\n"; if (empty($conf->dol_hide_leftmenu) && empty($conf->dol_use_jmobile) && empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) { print '<div id="id-container">'; } }
/** * Show an HTML header + a BODY + The top menu bar * @param head Lines in the HEAD * @param title Title of web page * @param target Target to use in menu links * @param disablejs Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax) * @param disablehead Do not output head section * @param arrayofjs Array of js files to add in header * @param arrayofcss Array of css files to add in header * @param morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails) */ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '') { global $user, $conf, $langs, $db, $dolibarr_main_authentication; $html = new Form($db); if (!$conf->top_menu) { $conf->top_menu = 'eldy_backoffice.php'; } // For backward compatibility with old modules if (empty($conf->headerdone)) { top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); } print '<body id="mainbody">'; if ($conf->use_javascript_ajax) { if ($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) { print '<script type="text/javascript"> jQuery(document).ready(function () { jQuery("body").layout( layoutSettings ); }); var layoutSettings = { name: "mainlayout", defaults: { useStateCookie: true, size: "auto", resizable: false, //paneClass: "none", //resizerClass: "resizer", //togglerClass: "toggler", //buttonClass: "button", //contentSelector: ".content", //contentIgnoreSelector: "span", togglerTip_open: "Close This Pane", togglerTip_closed: "Open This Pane", resizerTip: "Resize This Pane" }, west: { paneClass: "leftContent", spacing_closed: 14, togglerLength_closed: 14, togglerAlign_closed: "top", //togglerLength_open: 0, // effect defaults - overridden on some panes //slideTrigger_open: "mouseover", //initClosed: true, fxName: "drop", fxSpeed: "normal", fxSettings: { easing: "" } }, north: { paneClass: "none", resizerClass: "none", togglerClass: "none", spacing_open: 0, togglerLength_open: 0, togglerLength_closed: -1, slidable: false, fxName: "none" }, center: { paneSelector: "#mainContent" } } </script>'; } if (!empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION)) { print "\n" . '<script type="text/javascript"> jQuery(document).ready(function () { jQuery( ".vmenu" ).accordion({ autoHeight: false, event: "mouseover", //collapsible: true, //active: 2, header: "> .blockvmenupair > .menu_titre" }); }); </script>'; } // Wrapper to show tooltips print "\n" . '<script type="text/javascript"> jQuery(document).ready(function () { jQuery(function() { $(".classfortooltip").tipTip({maxWidth: "600px", edgeOffset: 10, delay: 50, fadeIn: 50, fadeOut: 50}); }); }); </script>'; } /* * Top menu */ $top_menu = isset($conf->browser->phone) ? $conf->smart_menu : $conf->top_menu; if (GETPOST('menu')) { $top_menu = GETPOST('menu'); } // menu=eldy_backoffice.php // Load the top menu manager $result = dol_include_once("/includes/menus/standard/" . $top_menu); if (!$result) { $top_menu = 'eldy_backoffice.php'; include_once DOL_DOCUMENT_ROOT . "/includes/menus/standard/" . $top_menu; } print "\n" . '<!-- Start top horizontal menu ' . $top_menu . ' -->' . "\n"; if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) { print '<div class="ui-layout-north"> <!-- Begin top layout -->' . "\n"; } print '<div id="tmenu_tooltip" class="tmenu">' . "\n"; // Show menu $menutop = new MenuTop($db); $menutop->atarget = $target; $menutop->showmenu(); // This contains a \n print "</div>\n"; // Link to login card $loginhtmltext = ''; $logintext = ''; if ($user->societe_id) { $thirdpartystatic = new Societe($db); $thirdpartystatic->fetch($user->societe_id); $companylink = ' (' . $thirdpartystatic->getNomUrl('', '') . ')'; $company = ' (' . $langs->trans("Company") . ': ' . $thirdpartystatic->name . ')'; } $logintext = '<div class="login"><a href="' . DOL_URL_ROOT . '/user/fiche.php?id=' . $user->id . '"'; $logintext .= $menutop->atarget ? ' target="' . $menutop->atarget . '"' : ''; $logintext .= '>' . $user->login . '</a>'; if ($user->societe_id) { $logintext .= $companylink; } $logintext .= '</div>'; $loginhtmltext .= '<u>' . $langs->trans("User") . '</u>'; $loginhtmltext .= '<br><b>' . $langs->trans("Name") . '</b>: ' . $user->getFullName($langs); $loginhtmltext .= '<br><b>' . $langs->trans("Login") . '</b>: ' . $user->login; $loginhtmltext .= '<br><b>' . $langs->trans("Administrator") . '</b>: ' . yn($user->admin); $type = $user->societe_id ? $langs->trans("External") . $company : $langs->trans("Internal"); $loginhtmltext .= '<br><b>' . $langs->trans("Type") . '</b>: ' . $type; $loginhtmltext .= '<br><b>' . $langs->trans("IPAddress") . '</b>: ' . $_SERVER["REMOTE_ADDR"]; $loginhtmltext .= '<br>'; $loginhtmltext .= '<br><u>' . $langs->trans("Connection") . '</u>'; if ($conf->global->MAIN_MODULE_MULTICOMPANY) { $loginhtmltext .= '<br><b>' . $langs->trans("ConnectedOnMultiCompany") . '</b>: ' . $conf->entity . ' (user entity ' . $user->entity . ')'; } $loginhtmltext .= '<br><b>' . $langs->trans("ConnectedSince") . '</b>: ' . dol_print_date($user->datelastlogin, "dayhour"); $loginhtmltext .= '<br><b>' . $langs->trans("PreviousConnexion") . '</b>: ' . dol_print_date($user->datepreviouslogin, "dayhour"); $loginhtmltext .= '<br><b>' . $langs->trans("AuthenticationMode") . '</b>: ' . $_SESSION["dol_authmode"]; $loginhtmltext .= '<br><b>' . $langs->trans("CurrentTheme") . '</b>: ' . $conf->theme; $s = picto_from_langcode($langs->getDefaultLang()); $loginhtmltext .= '<br><b>' . $langs->trans("CurrentUserLanguage") . '</b>: ' . ($s ? $s . ' ' : '') . $langs->getDefaultLang(); $loginhtmltext .= '<br><b>' . $langs->trans("Browser") . '</b>: ' . $conf->browser->name . ' (' . $_SERVER['HTTP_USER_AGENT'] . ')'; if (!empty($conf->browser->phone)) { $loginhtmltext .= '<br><b>' . $langs->trans("Phone") . '</b>: ' . $conf->browser->phone; } if (!empty($_SESSION["disablemodules"])) { $loginhtmltext .= '<br><b>' . $langs->trans("DisabledModules") . '</b>: <br>' . join(', ', explode(',', $_SESSION["disablemodules"])); } // Link info $logouthtmltext = ''; $logouttext = ''; $logouthtmltext = $langs->trans("Logout") . '<br>'; //$logouthtmltext.="<br>"; if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouttext .= '<a href="' . DOL_URL_ROOT . '/user/logout.php"'; $logouttext .= $menutop->atarget ? ' target="' . $menutop->atarget . '"' : ''; $logouttext .= '>'; $logouttext .= '<img class="login" border="0" width="14" height="14" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/logout.png"'; $logouttext .= ' alt="' . dol_escape_htmltag($langs->trans("Logout")) . '" title=""'; $logouttext .= '>'; $logouttext .= '</a>'; } else { $logouttext .= '<img class="login" border="0" width="14" height="14" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/logout.png"'; $logouttext .= ' alt="' . dol_escape_htmltag($langs->trans("Logout")) . '" title=""'; $logouttext .= '>'; } print '<div class="login_block">' . "\n"; print '<table class="nobordernopadding" summary=""><tr>'; print $html->textwithtooltip('', $loginhtmltext, 2, 1, $logintext, '', 1); // Select entity if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY)) { if ($user->admin && !$user->entity) { $res = @dol_include_once('/multicompany/class/actions_multicompany.class.php'); if ($res) { $mc = new ActionsMulticompany($db); $mc->showInfo($conf->entity); } } } print $html->textwithtooltip('', $logouthtmltext, 2, 1, $logouttext, '', 1); // Link to print main content area if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->browser->phone)) { $qs = $_SERVER["QUERY_STRING"] . ($_SERVER["QUERY_STRING"] ? '&' : '') . $morequerystring; $text = '<a href="' . $_SERVER["PHP_SELF"] . '?' . $qs . ($qs ? '&' : '') . 'optioncss=print" target="_blank">'; $text .= '<img class="printer" border="0" width="14" height="14" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/printer.png"'; $text .= ' title="" alt="">'; $text .= '</a>'; print $html->textwithtooltip('', $langs->trans("PrintContentArea"), 2, 1, $text, '', 1); } print '</tr></table>' . "\n"; print "</div>\n"; if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) { print "</div><!-- End top layout -->\n"; } print "<!-- End top horizontal menu -->\n"; if (!$conf->use_javascript_ajax || !$conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) { print '<table width="100%" class="notopnoleftnoright" summary="leftmenutable" id="undertopmenu"><tr>'; } }
} if (GETPOST('dol_no_mouse_hover')) { $conf->dol_no_mouse_hover = 1; } if (GETPOST('dol_use_jmobile')) { $conf->dol_use_jmobile = 1; } // If we force to use jmobile, then we reenable javascript if (!empty($conf->dol_use_jmobile)) { $conf->use_javascript_ajax = 1; } $arrayofjs = array('/core/js/dst.js' . (empty($conf->dol_use_jmobile) ? '' : '?version=' . urlencode(DOL_VERSION))); // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second $titleofloginpage = $langs->trans('Login') . ' @ ' . $title; // title is defined by dol_loginfunction in security2.lib.php. We must keep the @, some tools use it to know it is login page. print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs); ?> <!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP --> <body class="body bodylogin"> <?php if (empty($conf->dol_use_jmobile)) { ?> <script type="text/javascript"> $(document).ready(function () { // Set focus on correct field <?php if ($focus_element) { ?> $('#<?php
$conf->dol_hide_leftmenu = 1; } if (GETPOST('dol_optimize_smallscreen')) { $conf->dol_optimize_smallscreen = 1; } if (GETPOST('dol_no_mouse_hover')) { $conf->dol_no_mouse_hover = 1; } if (GETPOST('dol_use_jmobile')) { $conf->dol_use_jmobile = 1; } // If we force to use jmobile, then we reenable javascript if (!empty($conf->dol_use_jmobile)) { $conf->use_javascript_ajax = 1; } print top_htmlhead('', $langs->trans('SendNewPassword')); ?> <!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP --> <body class="bodylogin"> <?php if (empty($conf->dol_use_jmobile)) { ?> <script type="text/javascript"> $(document).ready(function () { // Set focus on correct field <?php if ($focus_element) { ?> $('#<?php