Removed PHP warnings with E_ALL level
This commit is contained in:
parent
f15eac3a7a
commit
bdfecdc751
@ -1,4 +1,4 @@
|
|||||||
#Tue Jan 20 00:15:44 CET 2009
|
#Wed Jan 21 13:16:02 CET 2009
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//dev/initdemo/initdemo.sql=UTF-8
|
encoding//dev/initdemo/initdemo.sql=UTF-8
|
||||||
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
||||||
@ -50,7 +50,6 @@ encoding//htdocs/includes/menus/barre_left/eldy_frontoffice.php=ISO-8859-1
|
|||||||
encoding//htdocs/includes/menus/barre_top/empty.php=ISO-8859-1
|
encoding//htdocs/includes/menus/barre_top/empty.php=ISO-8859-1
|
||||||
encoding//htdocs/includes/menus/barre_top/rodolphe.php=ISO-8859-1
|
encoding//htdocs/includes/menus/barre_top/rodolphe.php=ISO-8859-1
|
||||||
encoding//htdocs/includes/modules/DolibarrModules.class.php=ISO-8859-1
|
encoding//htdocs/includes/modules/DolibarrModules.class.php=ISO-8859-1
|
||||||
encoding//htdocs/includes/modules/facture/pdf_crabe.modules.php=ISO-8859-1
|
|
||||||
encoding//htdocs/includes/modules/modAdherent.class.php=ISO-8859-1
|
encoding//htdocs/includes/modules/modAdherent.class.php=ISO-8859-1
|
||||||
encoding//htdocs/includes/modules/modBanque.class.php=ISO-8859-1
|
encoding//htdocs/includes/modules/modBanque.class.php=ISO-8859-1
|
||||||
encoding//htdocs/includes/modules/modCategorie.class.php=ISO-8859-1
|
encoding//htdocs/includes/modules/modCategorie.class.php=ISO-8859-1
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -432,6 +432,7 @@ class Menubase
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get menutopid
|
// Get menutopid
|
||||||
|
$menutopid='';
|
||||||
$sql = "SELECT m.rowid, m.titre, m.type";
|
$sql = "SELECT m.rowid, m.titre, m.type";
|
||||||
$sql.= " FROM " . MAIN_DB_PREFIX . "menu as m";
|
$sql.= " FROM " . MAIN_DB_PREFIX . "menu as m";
|
||||||
$sql.= " WHERE m.mainmenu = '".$mainmenu."'";
|
$sql.= " WHERE m.mainmenu = '".$mainmenu."'";
|
||||||
@ -440,7 +441,7 @@ class Menubase
|
|||||||
// It should have only one response
|
// It should have only one response
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
$menutop = $this->db->fetch_object($resql);
|
$menutop = $this->db->fetch_object($resql);
|
||||||
$menutopid=$menutop->rowid;
|
if ($menutop) $menutopid=$menutop->rowid;
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
//print "menutopid=".$menutopid." sql=".$sql;
|
//print "menutopid=".$menutopid." sql=".$sql;
|
||||||
|
|
||||||
@ -566,7 +567,7 @@ class Menubase
|
|||||||
|
|
||||||
$tabMenu=array();
|
$tabMenu=array();
|
||||||
|
|
||||||
$sql = "SELECT m.rowid, m.mainmenu, m.titre, m.url, m.langs, m.perms,";
|
$sql = "SELECT m.rowid, m.mainmenu, m.titre, m.url, m.langs, m.perms, m.target,";
|
||||||
$sql.= " mo.action";
|
$sql.= " mo.action";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
$sql.= " FROM ".MAIN_DB_PREFIX."menu as m";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."menu_const as mc ON m.rowid = mc.fk_menu";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."menu_const as mc ON m.rowid = mc.fk_menu";
|
||||||
@ -639,8 +640,7 @@ class Menubase
|
|||||||
$tabMenu[$b]['mainmenu'] = $objm->mainmenu;
|
$tabMenu[$b]['mainmenu'] = $objm->mainmenu;
|
||||||
$tabMenu[$b]['titre'] = $chaine; // Title
|
$tabMenu[$b]['titre'] = $chaine; // Title
|
||||||
$tabMenu[$b]['url'] = $objm->url;
|
$tabMenu[$b]['url'] = $objm->url;
|
||||||
$tabMenu[$b]['atarget'] = $this->atarget;
|
$tabMenu[$b]['atarget'] = $objm->target;
|
||||||
$tabMenu[$b]['class'] = $class;
|
|
||||||
if (! isset($tabMenu[$b]['right'])) $tabMenu[$b]['right'] = $perms;
|
if (! isset($tabMenu[$b]['right'])) $tabMenu[$b]['right'] = $perms;
|
||||||
else $tabMenu[$b]['right'] = ($tabMenu[$b]['right'] && $perms);
|
else $tabMenu[$b]['right'] = ($tabMenu[$b]['right'] && $perms);
|
||||||
if (! isset($tabMenu[$b]['enabled'])) $tabMenu[$b]['enabled'] = $constraint;
|
if (! isset($tabMenu[$b]['enabled'])) $tabMenu[$b]['enabled'] = $constraint;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -89,7 +89,7 @@ class box_actions extends ModeleBoxes {
|
|||||||
$sql.= " ORDER BY a.datec DESC";
|
$sql.= " ORDER BY a.datec DESC";
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
dolibarr_syslog("Box_actions::loadBox boxcode=".$boxcode." sql=".$sql);
|
dolibarr_syslog("Box_actions::loadBox sql=".$sql, LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -57,7 +57,7 @@ class box_factures_fourn extends ModeleBoxes {
|
|||||||
*/
|
*/
|
||||||
function loadBox($max=5)
|
function loadBox($max=5)
|
||||||
{
|
{
|
||||||
global $user, $langs, $db;
|
global $conf, $user, $langs, $db;
|
||||||
|
|
||||||
$this->max=$max;
|
$this->max=$max;
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class box_factures_fourn extends ModeleBoxes {
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$datelimite=$db->jdate($obj->datelimite);
|
$datelimite=$db->jdate($objp->datelimite);
|
||||||
$datec=$db->jdate($objp->datec);
|
$datec=$db->jdate($objp->datec);
|
||||||
|
|
||||||
$late = '';
|
$late = '';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -171,7 +171,7 @@ class ModeleBoxes
|
|||||||
$tdparam='';
|
$tdparam='';
|
||||||
if (isset($contents[$i][$j]['td'])) $tdparam.=' '.$contents[$i][$j]['td'];
|
if (isset($contents[$i][$j]['td'])) $tdparam.=' '.$contents[$i][$j]['td'];
|
||||||
|
|
||||||
if (!$contents[$i][$j]['text']) $contents[$i][$j]['text']="";
|
if (empty($contents[$i][$j]['text'])) $contents[$i][$j]['text']="";
|
||||||
$texte=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:'';
|
$texte=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:'';
|
||||||
$textewithnotags=eregi_replace('<[^>]+>','',$texte);
|
$textewithnotags=eregi_replace('<[^>]+>','',$texte);
|
||||||
$texte2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:'';
|
$texte2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:'';
|
||||||
|
|||||||
@ -258,7 +258,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Telephonie
|
// Telephonie
|
||||||
if ($conf->telephonie->enabled && $user->rights->telephonie->lire)
|
if (! empty($conf->telephonie->enabled) && $user->rights->telephonie->lire)
|
||||||
{
|
{
|
||||||
$class="";
|
$class="";
|
||||||
if (ereg("^".DOL_URL_ROOT."\/telephonie\/",$_SERVER["PHP_SELF"]))
|
if (ereg("^".DOL_URL_ROOT."\/telephonie\/",$_SERVER["PHP_SELF"]))
|
||||||
@ -275,7 +275,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Energie
|
// Energie
|
||||||
if ($conf->energie->enabled)
|
if (! empty($conf->energie->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("energy");
|
$langs->load("energy");
|
||||||
$class="";
|
$class="";
|
||||||
@ -293,7 +293,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OSCommerce 1
|
// OSCommerce 1
|
||||||
if ($conf->boutique->enabled)
|
if (! empty($conf->boutique->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("shop");
|
$langs->load("shop");
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OSCommerce WS
|
// OSCommerce WS
|
||||||
if ($conf->oscommercews->enabled)
|
if (! empty($conf->oscommercews->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("shop");
|
$langs->load("shop");
|
||||||
|
|
||||||
|
|||||||
@ -258,7 +258,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Telephonie
|
// Telephonie
|
||||||
if ($conf->telephonie->enabled && $user->rights->telephonie->lire)
|
if (! empty($conf->telephonie->enabled) && $user->rights->telephonie->lire)
|
||||||
{
|
{
|
||||||
$class="";
|
$class="";
|
||||||
if (ereg("^".DOL_URL_ROOT."\/telephonie\/",$_SERVER["PHP_SELF"]))
|
if (ereg("^".DOL_URL_ROOT."\/telephonie\/",$_SERVER["PHP_SELF"]))
|
||||||
@ -275,7 +275,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Energie
|
// Energie
|
||||||
if ($conf->energie->enabled)
|
if (! empty($conf->energie->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("energy");
|
$langs->load("energy");
|
||||||
$class="";
|
$class="";
|
||||||
@ -293,7 +293,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OSCommerce 1
|
// OSCommerce 1
|
||||||
if ($conf->boutique->enabled)
|
if (! empty($conf->boutique->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("shop");
|
$langs->load("shop");
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ class MenuTop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OSCommerce WS
|
// OSCommerce WS
|
||||||
if ($conf->oscommercews->enabled)
|
if (! empty($conf->oscommercews->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("shop");
|
$langs->load("shop");
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -124,17 +124,18 @@ if ($user->societe_id == 0)
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
// Condition à vérifier pour affichage de chaque ligne du tableau de bord
|
// Condition à vérifier pour affichage de chaque ligne du tableau de bord
|
||||||
$conditions=array($conf->societe->enabled && $user->rights->societe->lire,
|
$conditions=array(
|
||||||
$conf->societe->enabled && $user->rights->societe->lire,
|
! empty($conf->societe->enabled) && $user->rights->societe->lire,
|
||||||
$conf->fournisseur->enabled && $user->rights->fournisseur->lire,
|
! empty($conf->societe->enabled) && $user->rights->societe->lire,
|
||||||
$conf->adherent->enabled && $user->rights->adherent->lire,
|
! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire,
|
||||||
$conf->produit->enabled && $user->rights->produit->lire,
|
! empty($conf->adherent->enabled) && $user->rights->adherent->lire,
|
||||||
$conf->service->enabled && $user->rights->produit->lire,
|
! empty($conf->produit->enabled) && $user->rights->produit->lire,
|
||||||
$conf->propal->enabled && $user->rights->propale->lire,
|
! empty($conf->service->enabled) && $user->rights->produit->lire,
|
||||||
$conf->commande->enabled && $user->rights->commande->lire,
|
! empty($conf->propal->enabled) && $user->rights->propale->lire,
|
||||||
$conf->facture->enabled && $user->rights->facture->lire,
|
! empty($conf->commande->enabled) && $user->rights->commande->lire,
|
||||||
$conf->telephonie->enabled && $user->rights->telephonie->lire,
|
! empty($conf->facture->enabled) && $user->rights->facture->lire,
|
||||||
$conf->societe->enabled && $user->rights->contrat->activer);
|
! empty($conf->telephonie->enabled) && $user->rights->telephonie->lire,
|
||||||
|
! empty($conf->societe->enabled) && $user->rights->contrat->activer);
|
||||||
// Fichier des classes qui contiennent la methode load_state_board pour chaque ligne
|
// Fichier des classes qui contiennent la methode load_state_board pour chaque ligne
|
||||||
$includes=array(DOL_DOCUMENT_ROOT."/client.class.php",
|
$includes=array(DOL_DOCUMENT_ROOT."/client.class.php",
|
||||||
DOL_DOCUMENT_ROOT."/prospect.class.php",
|
DOL_DOCUMENT_ROOT."/prospect.class.php",
|
||||||
|
|||||||
@ -260,7 +260,7 @@ function dol_syslog($message, $level=LOG_INFO)
|
|||||||
{
|
{
|
||||||
$facility = LOG_USER;
|
$facility = LOG_USER;
|
||||||
}
|
}
|
||||||
|
unset ($facility);
|
||||||
openlog("dolibarr", LOG_PID | LOG_PERROR, $facility);
|
openlog("dolibarr", LOG_PID | LOG_PERROR, $facility);
|
||||||
|
|
||||||
if (! $level)
|
if (! $level)
|
||||||
@ -2051,7 +2051,7 @@ function price($amount, $html=0, $outlangs='', $trunc=1, $rounding=2)
|
|||||||
$amount = ereg_replace(',','.',$amount); // should be useless
|
$amount = ereg_replace(',','.',$amount); // should be useless
|
||||||
//print $amount."-";
|
//print $amount."-";
|
||||||
$datas = split('\.',$amount);
|
$datas = split('\.',$amount);
|
||||||
$decpart = $datas[1];
|
$decpart = isset($datas[1])?$datas[1]:'';
|
||||||
$decpart = eregi_replace('0+$','',$decpart); // Supprime les 0 de fin de partie decimale
|
$decpart = eregi_replace('0+$','',$decpart); // Supprime les 0 de fin de partie decimale
|
||||||
//print "decpart=".$decpart."<br>";
|
//print "decpart=".$decpart."<br>";
|
||||||
$end='';
|
$end='';
|
||||||
|
|||||||
@ -921,7 +921,7 @@ function left_menu($menu_array, $helppagename='', $form_search='')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->MAIN_SHOW_BUGTRACK_LINK == 1)
|
if (! empty($conf->global->MAIN_SHOW_BUGTRACK_LINK))
|
||||||
{
|
{
|
||||||
// Lien vers le bugtrack
|
// Lien vers le bugtrack
|
||||||
$bugbaseurl='http://savannah.nongnu.org/bugs/?';
|
$bugbaseurl='http://savannah.nongnu.org/bugs/?';
|
||||||
|
|||||||
@ -134,9 +134,9 @@ $conf->db->prefix = $dolibarr_main_db_prefix;
|
|||||||
if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation='latin1_swedish_ci';
|
if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation='latin1_swedish_ci';
|
||||||
$conf->db->dolibarr_main_db_collation=$dolibarr_main_db_collation;
|
$conf->db->dolibarr_main_db_collation=$dolibarr_main_db_collation;
|
||||||
// Identifiant autres
|
// Identifiant autres
|
||||||
$conf->main_authentication = $dolibarr_main_authentication;
|
$conf->main_authentication = empty($dolibarr_main_authentication)?'':$dolibarr_main_authentication;
|
||||||
// Force https
|
// Force https
|
||||||
$conf->main_force_https = $dolibarr_main_force_https;
|
$conf->main_force_https = empty($dolibarr_main_force_https)?'':$dolibarr_main_force_https;
|
||||||
// Define charset for HTML Output (can set hidden value force_charset in conf.php file)
|
// Define charset for HTML Output (can set hidden value force_charset in conf.php file)
|
||||||
if (empty($force_charset_do_notuse)) $force_charset_do_notuse='UTF-8';
|
if (empty($force_charset_do_notuse)) $force_charset_do_notuse='UTF-8';
|
||||||
$conf->character_set_client=strtoupper($force_charset_do_notuse);
|
$conf->character_set_client=strtoupper($force_charset_do_notuse);
|
||||||
@ -284,15 +284,15 @@ if (! defined('NOREQUIRESOC'))
|
|||||||
$mysoc->fax=$conf->global->MAIN_INFO_SOCIETE_FAX;
|
$mysoc->fax=$conf->global->MAIN_INFO_SOCIETE_FAX;
|
||||||
$mysoc->url=$conf->global->MAIN_INFO_SOCIETE_WEB;
|
$mysoc->url=$conf->global->MAIN_INFO_SOCIETE_WEB;
|
||||||
// Anciens id prof
|
// Anciens id prof
|
||||||
$mysoc->siren=$conf->global->MAIN_INFO_SIREN;
|
$mysoc->siren=empty($conf->global->MAIN_INFO_SIREN)?'':$conf->global->MAIN_INFO_SIREN;
|
||||||
$mysoc->siret=$conf->global->MAIN_INFO_SIRET;
|
$mysoc->siret=empty($conf->global->MAIN_INFO_SIRET)?'':$conf->global->MAIN_INFO_SIRET;
|
||||||
$mysoc->ape=$conf->global->MAIN_INFO_APE;
|
$mysoc->ape=empty($conf->global->MAIN_INFO_APE)?'':$conf->global->MAIN_INFO_APE;
|
||||||
$mysoc->rcs=$conf->global->MAIN_INFO_RCS;
|
$mysoc->rcs=empty($conf->global->MAIN_INFO_RCS)?'':$conf->global->MAIN_INFO_RCS;
|
||||||
// Id prof génériques
|
// Id prof génériques
|
||||||
$mysoc->profid1=$conf->global->MAIN_INFO_SIREN;
|
$mysoc->profid1=empty($conf->global->MAIN_INFO_SIREN)?'':$conf->global->MAIN_INFO_SIREN;
|
||||||
$mysoc->profid2=$conf->global->MAIN_INFO_SIRET;
|
$mysoc->profid2=empty($conf->global->MAIN_INFO_SIRET)?'':$conf->global->MAIN_INFO_SIRET;
|
||||||
$mysoc->profid3=$conf->global->MAIN_INFO_APE;
|
$mysoc->profid3=empty($conf->global->MAIN_INFO_APE)?'':$conf->global->MAIN_INFO_APE;
|
||||||
$mysoc->profid4=$conf->global->MAIN_INFO_RCS;
|
$mysoc->profid4=empty($conf->global->MAIN_INFO_RCS)?'':$conf->global->MAIN_INFO_RCS;
|
||||||
$mysoc->tva_assuj=$conf->global->FACTURE_TVAOPTION;
|
$mysoc->tva_assuj=$conf->global->FACTURE_TVAOPTION;
|
||||||
$mysoc->tva_intra=$conf->global->MAIN_INFO_TVAINTRA;
|
$mysoc->tva_intra=$conf->global->MAIN_INFO_TVAINTRA;
|
||||||
$mysoc->capital=$conf->global->MAIN_INFO_CAPITAL;
|
$mysoc->capital=$conf->global->MAIN_INFO_CAPITAL;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
|
* Copyright (C) 2003 Éric Seigne <erics@rycks.com>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
* Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
||||||
*
|
*
|
||||||
@ -21,180 +21,180 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/pre.inc.php
|
\file htdocs/pre.inc.php
|
||||||
\brief File to manage left menu for home page
|
\brief File to manage left menu for home page
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
require ("./main.inc.php");
|
require ("./main.inc.php");
|
||||||
|
|
||||||
|
|
||||||
function llxHeader($head = "")
|
function llxHeader($head = "")
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs;
|
global $user, $conf, $langs;
|
||||||
|
|
||||||
top_menu($head);
|
top_menu($head);
|
||||||
|
|
||||||
$menu = new Menu();
|
$menu = new Menu();
|
||||||
|
|
||||||
if ($conf->societe->enabled && $user->rights->societe->lire)
|
if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"));
|
$menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies"));
|
||||||
|
|
||||||
if ($user->rights->societe->creer)
|
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("MenuNewCompany"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_dir("societe/groupe"))
|
if(is_dir("societe/groupe"))
|
||||||
{
|
{
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup"));
|
$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"));
|
$menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->categorie->enabled)
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$menu->add(DOL_URL_ROOT."/categories/index.php?type=0", $langs->trans("Categories"));
|
$menu->add(DOL_URL_ROOT."/categories/index.php?type=0", $langs->trans("Categories"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->commercial->enabled && isset($user->rights->commercial->lire) && $user->rights->commercial->lire)
|
if (! empty($conf->commercial->enabled) && isset($user->rights->commercial->lire) && $user->rights->commercial->lire)
|
||||||
{
|
{
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial"));
|
$menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial"));
|
||||||
|
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers"));
|
$menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers"));
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects"));
|
$menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects"));
|
||||||
|
|
||||||
if ($user->rights->propale->lire)
|
if ($user->rights->propale->lire)
|
||||||
{
|
{
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
|
$menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->compta->enabled || $conf->comptaexpert->enabled)
|
if (! empty($conf->compta->enabled) || $conf->comptaexpert->enabled)
|
||||||
{
|
{
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
$menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("MenuFinancial"));
|
$menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("MenuFinancial"));
|
||||||
|
|
||||||
if ($user->rights->facture->lire) {
|
if ($user->rights->facture->lire) {
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills"));
|
$menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire)
|
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
|
||||||
{
|
{
|
||||||
$langs->trans("interventions");
|
$langs->trans("interventions");
|
||||||
$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
|
$menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($conf->produit->enabled || $conf->service->enabled) && $user->rights->produit->lire)
|
if (($conf->produit->enabled || $conf->service->enabled) && $user->rights->produit->lire)
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$chaine="";
|
$chaine="";
|
||||||
if ($conf->produit->enabled) { $chaine.= $langs->trans("Products"); }
|
if ($conf->produit->enabled) { $chaine.= $langs->trans("Products"); }
|
||||||
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
|
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
|
||||||
if ($conf->service->enabled) { $chaine.= $langs->trans("Services"); }
|
if ($conf->service->enabled) { $chaine.= $langs->trans("Services"); }
|
||||||
$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
|
$menu->add(DOL_URL_ROOT."/product/index.php", "$chaine");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if ($conf->boutique->enabled)
|
if ($conf->boutique->enabled)
|
||||||
{
|
{
|
||||||
if ($conf->boutique->livre->enabled)
|
if ($conf->boutique->livre->enabled)
|
||||||
{
|
{
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/boutique/livre/index.php", "Livres");
|
$menu->add_submenu(DOL_URL_ROOT."/boutique/livre/index.php", "Livres");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->boutique->album->enabled)
|
if ($conf->boutique->album->enabled)
|
||||||
{
|
{
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/product/album/index.php", "Albums");
|
$menu->add_submenu(DOL_URL_ROOT."/product/album/index.php", "Albums");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($conf->commande->enabled && $user->rights->commande->lire)
|
if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders"));
|
$menu->add(DOL_URL_ROOT."/commande/index.php", $langs->trans("Orders"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->document->enabled)
|
if (! empty($conf->document->enabled))
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/docs/index.php", $langs->trans("Documents"));
|
$menu->add(DOL_URL_ROOT."/docs/index.php", $langs->trans("Documents"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->expedition->enabled && $user->rights->expedition->lire)
|
if (! empty($conf->expedition->enabled) && $user->rights->expedition->lire)
|
||||||
{
|
{
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
$menu->add(DOL_URL_ROOT."/expedition/index.php", $langs->trans("Sendings"));
|
$menu->add(DOL_URL_ROOT."/expedition/index.php", $langs->trans("Sendings"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->mailing->enabled && $user->rights->mailing->lire)
|
if (! empty($conf->mailing->enabled) && $user->rights->mailing->lire)
|
||||||
{
|
{
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
$menu->add(DOL_URL_ROOT."/comm/mailing/index.php",$langs->trans("EMailings"));
|
$menu->add(DOL_URL_ROOT."/comm/mailing/index.php",$langs->trans("EMailings"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->telephonie->enabled)
|
if (! empty($conf->telephonie->enabled))
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Téléphonie");
|
$menu->add(DOL_URL_ROOT."/telephonie/index.php", "Téléphonie");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->don->enabled)
|
if (! empty($conf->don->enabled))
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/compta/dons/index.php", $langs->trans("Donations"));
|
$menu->add(DOL_URL_ROOT."/compta/dons/index.php", $langs->trans("Donations"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire)
|
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
|
||||||
{
|
{
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->voyage->enabled && $user->societe_id == 0)
|
if (! empty($conf->voyage->enabled) && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
|
$menu->add(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
|
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/index.php","Voyages");
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/reduc.php","Reduc");
|
$menu->add_submenu(DOL_URL_ROOT."/compta/voyage/reduc.php","Reduc");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->domaine->enabled)
|
if (! empty($conf->domaine->enabled))
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines");
|
$menu->add(DOL_URL_ROOT."/domain/index.php", "Domaines");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->postnuke->enabled)
|
if (! empty($conf->postnuke->enabled))
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
|
$menu->add(DOL_URL_ROOT."/postnuke/articles/index.php", "Editorial");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->bookmark->enabled && $user->rights->bookmark->lire)
|
if (! empty($conf->bookmark->enabled) && $user->rights->bookmark->lire)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks"));
|
$menu->add(DOL_URL_ROOT."/bookmarks/liste.php", $langs->trans("Bookmarks"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->export->enabled)
|
if (! empty($conf->export->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
$menu->add(DOL_URL_ROOT."/exports/index.php", $langs->trans("Exports"));
|
$menu->add(DOL_URL_ROOT."/exports/index.php", $langs->trans("Exports"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->user->user->lire || $user->admin)
|
if ($user->rights->user->user->lire || $user->admin)
|
||||||
{
|
{
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
$menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("MenuUsersAndGroups"));
|
$menu->add(DOL_URL_ROOT."/user/home.php", $langs->trans("MenuUsersAndGroups"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->admin)
|
if ($user->admin)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("Setup"));
|
$menu->add(DOL_URL_ROOT."/admin/index.php", $langs->trans("Setup"));
|
||||||
}
|
}
|
||||||
|
|
||||||
left_menu($menu->liste);
|
left_menu($menu->liste);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1717,7 +1717,7 @@ class Propal extends CommonObject
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
if ($mode == 'opened') $delay_warning=$conf->propal->cloture->warning_delay;
|
if ($mode == 'opened') $delay_warning=$conf->propal->cloture->warning_delay;
|
||||||
if ($mode == 'signed') $delay_warning=$conf->propal->facture->warning_delay;
|
if ($mode == 'signed') $delay_warning=$conf->propal->facturation->warning_delay;
|
||||||
|
|
||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user