mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-18 07:21:30 +01:00
128 lines
3.2 KiB
PHP
128 lines
3.2 KiB
PHP
<?PHP
|
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
*
|
|
* 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 2 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, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* $Id$
|
|
* $Source$
|
|
*
|
|
*/
|
|
|
|
if (defined('MAIN_MODULE_COMMERCIAL') && MAIN_MODULE_COMMERCIAL == 1)
|
|
{
|
|
if (strstr($GLOBALS["SCRIPT_URL"],DOL_URL_ROOT.'/comm/'))
|
|
{
|
|
print '<TD width="15%" class="menusel" align="center">';
|
|
if ($user->comm > 0 && $conf->commercial )
|
|
{
|
|
print '<A class="menusel" href="'.DOL_URL_ROOT.'/comm/index.php">Commercial</A></TD>';
|
|
}
|
|
else
|
|
{
|
|
print '-</td>';
|
|
}
|
|
}
|
|
else
|
|
{
|
|
print '<TD width="15%" class="menu" align="center">';
|
|
if ($user->comm > 0 && $conf->commercial )
|
|
{
|
|
print '<A class="menu" href="'.DOL_URL_ROOT.'/comm/index.php">Commercial</A></TD>';
|
|
}
|
|
else
|
|
{
|
|
print '-</td>';
|
|
}
|
|
}
|
|
}
|
|
elseif (defined('MAIN_MODULE_ADHERENT') && MAIN_MODULE_ADHERENT == 1)
|
|
{
|
|
print '<TD width="15%" class="menu" align="center">';
|
|
print '<A class="menu" href="'.DOL_URL_ROOT.'/adherents/index.php">Adhérents</A></TD>';
|
|
}
|
|
else
|
|
{
|
|
print '<TD width="15%" class="menu" align="center">-</td>';
|
|
}
|
|
|
|
|
|
if (defined('MAIN_MODULE_COMPTABILITE') && MAIN_MODULE_COMPTABILITE == 1)
|
|
{
|
|
if (strstr($GLOBALS["SCRIPT_URL"],DOL_URL_ROOT.'/compta/'))
|
|
{
|
|
print '<TD width="15%" class="menusel" align="center">';
|
|
if ($user->compta > 0)
|
|
{
|
|
print '<A class="menusel" href="'.DOL_URL_ROOT.'/compta/index.php">Compta</A></TD>';
|
|
}
|
|
else
|
|
{
|
|
print '-';
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
print '<TD width="15%" class="menu" align="center">';
|
|
if ($user->compta > 0)
|
|
{
|
|
print '<A class="menu" href="'.DOL_URL_ROOT.'/compta/index.php">Compta</A></TD>';
|
|
}
|
|
else
|
|
{
|
|
print '-';
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
print '<TD width="15%" class="menu" align="center">-</td>';
|
|
}
|
|
|
|
if (strstr($GLOBALS["SCRIPT_URL"],DOL_URL_ROOT.'/product/'))
|
|
{
|
|
$class = "menusel";
|
|
}
|
|
else
|
|
{
|
|
$class = "menu";
|
|
}
|
|
|
|
print '<TD width="15%" class="'.$class.'" align="center">';
|
|
if ($conf->produit->enabled || $conf->service->enabled)
|
|
{
|
|
$chaine="";
|
|
if ($conf->produit->enabled) { $chaine.="Produits"; }
|
|
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
|
|
if ($conf->service->enabled) { $chaine.="Services"; }
|
|
print '<A class="'.$class.'" href="'.DOL_URL_ROOT.'/product/?type=0">'.$chaine.'</a>';
|
|
}
|
|
else
|
|
{
|
|
print '-';
|
|
}
|
|
|
|
|
|
print '</td><td width="15%" class="menu" align="center">';
|
|
|
|
if(defined("MAIN_MODULE_WEBCALENDAR") && MAIN_MODULE_WEBCALENDAR)
|
|
{
|
|
print '<a class="menu" href="'. PHPWEBCALENDAR_URL .'">Calendrier</a>';
|
|
};
|
|
print ' </TD>';
|
|
|
|
?>
|