mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Removed deprecated code
This commit is contained in:
parent
971a470dde
commit
d48bfc3fcb
|
|
@ -24,7 +24,7 @@
|
|||
\remarks La construction d'un gestionnaire pour le menu du haut est simple:
|
||||
\remarks Toutes les entrees de menu a faire apparaitre dans la barre du haut
|
||||
\remarks doivent etre affichees par <a class="tmenu" href="...?mainmenu=...">...</a>
|
||||
\remarks ou si menu selectionne <a class="tmenusel" href="...?mainmenu=...">...</a>
|
||||
\remarks ou si menu selectionne <a class="tmenusel" href="...?mainmenu=...">...</a>
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -38,42 +38,38 @@ class MenuTop {
|
|||
var $require_left=array("auguria_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
|
||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur
|
||||
* \param db Handler d'acc<EFBFBD>s base de donn<EFBFBD>e
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
global $langs;
|
||||
$this->db=$db;
|
||||
|
||||
$langs->setTransFromTab("Company",$langs->trans("ThirdParty"));
|
||||
$langs->setTransFromTab("NewCompany",$langs->trans("NewThirdParty"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Affiche le menu
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/menubase.class.php");
|
||||
|
||||
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;;
|
||||
|
||||
|
||||
|
||||
// On sauve en session le menu principal choisi
|
||||
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
|
||||
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
|
||||
$_SESSION["leftmenuopened"]="";
|
||||
|
||||
|
||||
|
||||
$menuArbo = new Menubase($this->db,'auguria','top');
|
||||
$tabMenu = $menuArbo->menuTopCharger(0,$_SESSION['mainmenu'], 'auguria');
|
||||
|
||||
|
||||
print '<ul>';
|
||||
|
||||
|
||||
for($i=0; $i<count($tabMenu); $i++)
|
||||
{
|
||||
if ($tabMenu[$i]['enabled'] == true)
|
||||
|
|
@ -96,11 +92,11 @@ class MenuTop {
|
|||
{
|
||||
print '<li><div class="tmenudisabled">'.$tabMenu[$i]['titre'].'</div></li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print '</ul>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
\remarks La construction d'un gestionnaire pour le menu du haut est simple:
|
||||
\remarks Toutes les entrees de menu a faire apparaitre dans la barre du haut
|
||||
\remarks doivent etre affichees par <a class="tmenu" href="...?mainmenu=...">...</a>
|
||||
\remarks ou si menu selectionne <a class="tmenusel" href="...?mainmenu=...">...</a>
|
||||
\remarks ou si menu selectionne <a class="tmenusel" href="...?mainmenu=...">...</a>
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -38,41 +38,37 @@ class MenuTop {
|
|||
var $require_left=array("auguria_backoffice"); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
|
||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur
|
||||
* \param db Handler d'acc<EFBFBD>s base de donn<EFBFBD>e
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
global $langs;
|
||||
$this->db=$db;
|
||||
|
||||
$langs->setTransFromTab("Company",$langs->trans("ThirdParty"));
|
||||
$langs->setTransFromTab("NewCompany",$langs->trans("NewThirdParty"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Affiche le menu
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/menubase.class.php");
|
||||
|
||||
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;;
|
||||
|
||||
|
||||
// On sauve en session le menu principal choisi
|
||||
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
|
||||
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
|
||||
$_SESSION["leftmenuopened"]="";
|
||||
|
||||
|
||||
|
||||
$menuArbo = new Menubase($this->db,'auguria','top');
|
||||
$tabMenu = $menuArbo->menuTopCharger(1,$_SESSION['mainmenu'], 'auguria');
|
||||
|
||||
print '<ul>';
|
||||
|
||||
|
||||
for($i=0; $i<count($tabMenu); $i++)
|
||||
{
|
||||
if ($tabMenu[$i]['enabled'] == true)
|
||||
|
|
@ -97,7 +93,7 @@ class MenuTop {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print '</ul>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,11 +47,7 @@ class MenuTop {
|
|||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
global $langs;
|
||||
$this->db=$db;
|
||||
|
||||
$langs->setTransFromTab("Company",$langs->trans("ThirdParty"));
|
||||
$langs->setTransFromTab("NewCompany",$langs->trans("NewThirdParty"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -47,11 +47,7 @@ class MenuTop {
|
|||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
global $langs;
|
||||
$this->db=$db;
|
||||
|
||||
$langs->setTransFromTab("Company",$langs->trans("ThirdParty"));
|
||||
$langs->setTransFromTab("NewCompany",$langs->trans("NewThirdParty"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,33 +30,32 @@ class MenuTop {
|
|||
|
||||
var $require_left=array("empty"); // If this top menu handler must be used with a particular left menu handler
|
||||
var $hideifnotallowed=false; // Put 0 for back office menu, 1 for front office menu
|
||||
|
||||
|
||||
var $atarget=""; // To store arget to use in menu links
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructor
|
||||
* \param db Dabatase handler
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
global $langs;
|
||||
$this->db=$db;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Show menu
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;;
|
||||
|
||||
|
||||
print '<table class="tmenu"><tr class="tmenu">';
|
||||
|
||||
// Menu Home
|
||||
print '<td class="tmenu"><a href="'.DOL_URL_ROOT.'/index.php?mainmenu=home">'.$langs->trans("Home").'</a></td>';
|
||||
|
||||
|
||||
// Put here top menu entries
|
||||
// ***** START *****
|
||||
|
||||
|
|
@ -65,7 +64,7 @@ class MenuTop {
|
|||
// ...
|
||||
|
||||
// ***** END *****
|
||||
|
||||
|
||||
/*
|
||||
// Code to show personalized menus
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/menubase.class.php");
|
||||
|
|
@ -95,13 +94,13 @@ class MenuTop {
|
|||
{
|
||||
if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$tabMenu[$i]['titre'].'</a></td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
print '</tr></table>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
\remarks La construction d'un gestionnaire pour le menu du haut est simple:
|
||||
\remarks Toutes les entrees de menu a faire apparaitre dans la barre du haut
|
||||
\remarks doivent etre affichees par <a class="tmenu" href="...?mainmenu=...">...</a>
|
||||
\remarks ou si menu selectionne <a class="tmenusel" href="...?mainmenu=...">...</a>
|
||||
\remarks ou si menu selectionne <a class="tmenusel" href="...?mainmenu=...">...</a>
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -37,37 +37,33 @@ class MenuTop {
|
|||
|
||||
var $require_left=array(); // Si doit etre en phase avec un gestionnaire de menu gauche particulier
|
||||
var $hideifnotallowed=false; // Put 0 for back office menu, 1 for front office menu
|
||||
|
||||
|
||||
var $atarget=""; // Valeur du target a utiliser dans les liens
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur
|
||||
* \param db Handler d'acces base de donnee
|
||||
*/
|
||||
function MenuTop($db)
|
||||
{
|
||||
global $langs;
|
||||
$this->db=$db;
|
||||
|
||||
$langs->setTransFromTab("Company",$langs->trans("ThirdParty"));
|
||||
$langs->setTransFromTab("NewCompany",$langs->trans("NewThirdParty"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Affiche le menu
|
||||
*/
|
||||
function showmenu()
|
||||
{
|
||||
global $user,$conf,$langs,$dolibarr_main_db_name;;
|
||||
|
||||
|
||||
// On sauve en session le menu principal choisi
|
||||
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
|
||||
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
|
||||
$_SESSION["leftmenuopened"]="";
|
||||
|
||||
|
||||
|
||||
print '<table class="tmenu"><tr class="tmenu">';
|
||||
|
||||
// Home
|
||||
|
|
@ -89,7 +85,7 @@ class MenuTop {
|
|||
{
|
||||
$langs->load("companies");
|
||||
$langs->load("suppliers");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies")
|
||||
{
|
||||
|
|
@ -117,7 +113,7 @@ class MenuTop {
|
|||
if ($conf->produit->enabled || $conf->service->enabled)
|
||||
{
|
||||
$langs->load("products");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "products")
|
||||
{
|
||||
|
|
@ -131,7 +127,7 @@ class MenuTop {
|
|||
if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); }
|
||||
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
|
||||
if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); }
|
||||
|
||||
|
||||
$idsel='id="products" ';
|
||||
if ($user->rights->produit->lire)
|
||||
{
|
||||
|
|
@ -154,7 +150,7 @@ class MenuTop {
|
|||
if ($conf->commercial->enabled)
|
||||
{
|
||||
$langs->load("commercial");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "commercial")
|
||||
{
|
||||
|
|
@ -164,7 +160,7 @@ class MenuTop {
|
|||
{
|
||||
$class = 'class="tmenu"';
|
||||
}
|
||||
|
||||
|
||||
$idsel='id="commercial" ';
|
||||
if($user->rights->societe->lire)
|
||||
{
|
||||
|
|
@ -181,7 +177,7 @@ class MenuTop {
|
|||
|| $conf->facture->enabled)
|
||||
{
|
||||
$langs->load("compta");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "accountancy")
|
||||
{
|
||||
|
|
@ -191,7 +187,7 @@ class MenuTop {
|
|||
{
|
||||
$class = 'class="tmenu"';
|
||||
}
|
||||
|
||||
|
||||
$idsel='id="accountancy" ';
|
||||
if ($user->rights->compta->resultat->lire || $user->rights->comptaexpert->plancompte->lire
|
||||
|| $user->rights->facture->lire || $user->rights->banque->lire)
|
||||
|
|
@ -208,7 +204,7 @@ class MenuTop {
|
|||
if ($conf->projet->enabled)
|
||||
{
|
||||
$langs->load("projects");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "project")
|
||||
{
|
||||
|
|
@ -218,7 +214,7 @@ class MenuTop {
|
|||
{
|
||||
$class = 'class="tmenu"';
|
||||
}
|
||||
|
||||
|
||||
$idsel='id="project" ';
|
||||
if ($user->rights->projet->lire)
|
||||
{
|
||||
|
|
@ -234,7 +230,7 @@ class MenuTop {
|
|||
if ($conf->mailing->enabled || $conf->export->enabled || $conf->global->MAIN_MODULE_IMPORT || $conf->global->MAIN_MODULE_DOMAIN)
|
||||
{
|
||||
$langs->load("other");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "tools")
|
||||
{
|
||||
|
|
@ -244,7 +240,7 @@ class MenuTop {
|
|||
{
|
||||
$class = 'class="tmenu"';
|
||||
}
|
||||
|
||||
|
||||
$idsel='id="tools" ';
|
||||
if ($user->rights->mailing->lire || $user->rights->bookmark->lire || $user->rights->export->lire)
|
||||
{
|
||||
|
|
@ -255,7 +251,7 @@ class MenuTop {
|
|||
if (! $this->hideifnotallowed) print '<td class="tmenu"><a class="tmenudisabled" '.$idsel.'href="#">'.$langs->trans("Tools").'</a></td>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Telephonie
|
||||
if ($conf->telephonie->enabled && $user->rights->telephonie->lire)
|
||||
{
|
||||
|
|
@ -290,12 +286,12 @@ class MenuTop {
|
|||
$idsel='id="energie" ';
|
||||
print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/energie/index.php?mainmenu=energie"'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Energy").'</a></td>';
|
||||
}
|
||||
|
||||
|
||||
// OSCommerce 1
|
||||
if ($conf->boutique->enabled)
|
||||
{
|
||||
$langs->load("shop");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "shop")
|
||||
{
|
||||
|
|
@ -305,16 +301,16 @@ class MenuTop {
|
|||
{
|
||||
$class = 'class="tmenu"';
|
||||
}
|
||||
|
||||
|
||||
$idsel='id="shop" ';
|
||||
print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/boutique/index.php?mainmenu=shop&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("OSCommerce").'</a></td>';
|
||||
}
|
||||
|
||||
|
||||
// OSCommerce WS
|
||||
if ($conf->oscommercews->enabled)
|
||||
{
|
||||
$langs->load("shop");
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "shop")
|
||||
{
|
||||
|
|
@ -324,16 +320,16 @@ class MenuTop {
|
|||
{
|
||||
$class = 'class="tmenu"';
|
||||
}
|
||||
|
||||
|
||||
$idsel='id="shop" ';
|
||||
print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/oscommerce_ws/index.php?mainmenu=shop&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("OSCommerce").'</a></td>';
|
||||
}
|
||||
|
||||
|
||||
// Members
|
||||
if ($conf->adherent->enabled)
|
||||
{
|
||||
// $langs->load("members"); Added in main file
|
||||
|
||||
|
||||
$class="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members")
|
||||
{
|
||||
|
|
@ -343,7 +339,7 @@ class MenuTop {
|
|||
{
|
||||
$class = 'class="tmenu"';
|
||||
}
|
||||
|
||||
|
||||
$idsel='id="members" ';
|
||||
if ($user->rights->adherent->lire)
|
||||
{
|
||||
|
|
@ -386,8 +382,8 @@ class MenuTop {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
print '</tr></table>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,17 +39,13 @@ function llxHeader($head = "")
|
|||
if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
{
|
||||
$langs->load("companies");
|
||||
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"));
|
||||
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("ThirdParties"));
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewCompany"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewThirdParty"));
|
||||
}
|
||||
|
||||
if(is_dir("societe/groupe"))
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
|
||||
}
|
||||
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -31,25 +31,25 @@ require ("../../main.inc.php");
|
|||
function llxHeader($head = "")
|
||||
{
|
||||
global $langs, $user, $conf;
|
||||
|
||||
|
||||
top_menu($head);
|
||||
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
if ($conf->societe->enabled)
|
||||
{
|
||||
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"),"company");
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("ThirdParties"),"company");
|
||||
|
||||
if ($conf->rights->societe->creer)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/soc.php?&action=create", $langs->trans("NewCompany"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/soc.php?&action=create", $langs->trans("NewThirdParty"));
|
||||
}
|
||||
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/contact.php", $langs->trans("Contacts"));
|
||||
|
||||
|
||||
$menu->add_submenu("index.php", $langs->trans("Notifications"));
|
||||
}
|
||||
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user