Removed PHP warnings with E_ALL level
This commit is contained in:
parent
0befb92a12
commit
bcef81a453
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2007 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
|
||||||
@ -255,8 +255,8 @@ if ($result)
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$year=dolibarr_print_date($objp->dateadh,"%Y");
|
$year=dolibarr_print_date($objp->dateadh,"%Y");
|
||||||
$Total[$year]+=$objp->cotisation;
|
$Total[$year]=(isset($Total[$year])?$Total[$year]:0)+$objp->cotisation;
|
||||||
$Number[$year]+=1;
|
$Number[$year]=(isset($Number[$year])?$Number[$year]:0)+1;
|
||||||
$tot+=$objp->cotisation;
|
$tot+=$objp->cotisation;
|
||||||
$numb+=1;
|
$numb+=1;
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -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>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -30,13 +30,14 @@ require_once (DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
|
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:(isset($_POST["sortfield"])?$_POST["sortfield"]:'');
|
||||||
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
|
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:(isset($_POST["sortorder"])?$_POST["sortorder"]:'');
|
||||||
$page = isset($_GET["page"])?$_GET["page"]:$_POST["page"];
|
$page = isset($_GET["page"])?$_GET["page"]:(isset($_POST["page"])?$_POST["page"]:'');
|
||||||
|
|
||||||
$statut=isset($_GET["statut"])?$_GET["statut"]:1;
|
$statut=isset($_GET["statut"])?$_GET["statut"]:1;
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
$socid=0;
|
||||||
$contratid = isset($_GET["id"])?$_GET["id"]:'';
|
$contratid = isset($_GET["id"])?$_GET["id"]:'';
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contrat',$contratid,'');
|
$result = restrictedArea($user, 'contrat',$contratid,'');
|
||||||
@ -122,7 +123,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
|||||||
$companystatic=new Societe($db);
|
$companystatic=new Societe($db);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$tot_ttc = 0;
|
//$tot_ttc = 0;
|
||||||
while ($i < $num && $i < 20)
|
while ($i < $num && $i < 20)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -138,7 +139,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
|||||||
print $companystatic->getNomUrl(1,'',16);
|
print $companystatic->getNomUrl(1,'',16);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
$tot_ttc+=$obj->total_ttc;
|
//$tot_ttc+=$obj->total_ttc;
|
||||||
$i++;
|
$i++;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
}
|
}
|
||||||
@ -163,8 +164,8 @@ print '</td><td width="70%" valign="top" class="notopnoleftnoright">';
|
|||||||
$max=5;
|
$max=5;
|
||||||
$sql = 'SELECT ';
|
$sql = 'SELECT ';
|
||||||
$sql.= ' sum('.$db->ifsql("cd.statut=0",1,0).') as nb_initial,';
|
$sql.= ' sum('.$db->ifsql("cd.statut=0",1,0).') as nb_initial,';
|
||||||
$sql.= ' sum('.$db->ifsql("cd.statut=4 AND cd.date_fin_validite > ".$db->idate(mktime()),1,0).') as nb_running,';
|
$sql.= ' sum('.$db->ifsql("cd.statut=4 AND cd.date_fin_validite > ".$db->idate(gmmktime()),1,0).') as nb_running,';
|
||||||
$sql.= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite <= ".$db->idate(mktime()).")",1,0).') as nb_late,';
|
$sql.= ' sum('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite <= ".$db->idate(gmmktime()).")",1,0).') as nb_late,';
|
||||||
$sql.= ' sum('.$db->ifsql("cd.statut=5",1,0).') as nb_closed,';
|
$sql.= ' sum('.$db->ifsql("cd.statut=5",1,0).') as nb_closed,';
|
||||||
$sql.= " c.rowid as cid, c.ref, c.datec, c.tms, c.statut, s.nom, s.rowid as socid";
|
$sql.= " c.rowid as cid, c.ref, c.datec, c.tms, c.statut, s.nom, s.rowid as socid";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
@ -179,6 +180,7 @@ $sql.= " GROUP BY c.rowid, c.datec, c.statut, s.nom, s.rowid";
|
|||||||
$sql.= " ORDER BY c.tms DESC";
|
$sql.= " ORDER BY c.tms DESC";
|
||||||
$sql.= " LIMIT ".$max;
|
$sql.= " LIMIT ".$max;
|
||||||
|
|
||||||
|
dolibarr_syslog("contrat/index.php sql=".$sql, LOG_DEBUG);
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@ -327,7 +329,7 @@ if ($resql)
|
|||||||
$staticcontrat->ref=($obj->ref?$obj->ref:$obj->fk_contrat);
|
$staticcontrat->ref=($obj->ref?$obj->ref:$obj->fk_contrat);
|
||||||
$staticcontrat->id=$obj->fk_contrat;
|
$staticcontrat->id=$obj->fk_contrat;
|
||||||
print $staticcontrat->getNomUrl(1,16);
|
print $staticcontrat->getNomUrl(1,16);
|
||||||
if ($obj->nb_late) print img_warning($langs->trans("Late"));
|
//if (1 == 1) print img_warning($langs->trans("Late"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service");
|
print '<td><a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->fk_contrat.'">'.img_object($langs->trans("ShowService"),"service");
|
||||||
if ($obj->label) print ' '.dolibarr_trunc($obj->label,20).'</a></td>';
|
if ($obj->label) print ' '.dolibarr_trunc($obj->label,20).'</a></td>';
|
||||||
|
|||||||
@ -301,7 +301,7 @@ class MenuLeft {
|
|||||||
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
|
$newmenu->add_submenu(DOL_URL_ROOT."/contact/index.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
|
||||||
|
|
||||||
// Propal
|
// Propal
|
||||||
if ($conf->propal->enabled)
|
if (! empty($conf->propal->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("propal");
|
$langs->load("propal");
|
||||||
$newmenu->add(DOL_URL_ROOT."/comm/propal.php?leftmenu=propals", $langs->trans("Prop"), 0 ,$user->rights->propale->lire);
|
$newmenu->add(DOL_URL_ROOT."/comm/propal.php?leftmenu=propals", $langs->trans("Prop"), 0 ,$user->rights->propale->lire);
|
||||||
@ -317,7 +317,7 @@ class MenuLeft {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Customers orders
|
// Customers orders
|
||||||
if ($conf->commande->enabled)
|
if (! empty($conf->commande->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$newmenu->add(DOL_URL_ROOT."/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0 ,$user->rights->commande->lire);
|
$newmenu->add(DOL_URL_ROOT."/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0 ,$user->rights->commande->lire);
|
||||||
@ -331,11 +331,11 @@ class MenuLeft {
|
|||||||
if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/liste.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire);
|
if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/liste.php?leftmenu=orders&viewstatut=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->rights->commande->lire);
|
||||||
if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1 ,$user->rights->commande->lire);
|
if ($leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1 ,$user->rights->commande->lire);
|
||||||
// Statistiques de vente perso
|
// Statistiques de vente perso
|
||||||
if ($conf->global->COMMANDE_SHOWMYSTATS && $leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/comm/stats.php?leftmenu=orders", $langs->trans("Stats"), 1, $user->rights->commande->lire);
|
if (! empty($conf->global->COMMANDE_SHOWMYSTATS) && $leftmenu=="orders") $newmenu->add_submenu(DOL_URL_ROOT."/comm/stats.php?leftmenu=orders", $langs->trans("Stats"), 1, $user->rights->commande->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Suppliers orders
|
// Suppliers orders
|
||||||
if ($conf->fournisseur->enabled)
|
if (! empty($conf->fournisseur->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$newmenu->add(DOL_URL_ROOT."/fourn/commande/index.php?leftmenu=orders_suppliers",$langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire);
|
$newmenu->add(DOL_URL_ROOT."/fourn/commande/index.php?leftmenu=orders_suppliers",$langs->trans("SuppliersOrders"), 0, $user->rights->fournisseur->commande->lire);
|
||||||
@ -345,7 +345,7 @@ class MenuLeft {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Contrat
|
// Contrat
|
||||||
if ($conf->contrat->enabled)
|
if (! empty($conf->contrat->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
$newmenu->add(DOL_URL_ROOT."/contrat/index.php?leftmenu=contracts", $langs->trans("Contracts"), 0 ,$user->rights->contrat->lire);
|
$newmenu->add(DOL_URL_ROOT."/contrat/index.php?leftmenu=contracts", $langs->trans("Contracts"), 0 ,$user->rights->contrat->lire);
|
||||||
@ -359,7 +359,7 @@ class MenuLeft {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Interventions
|
// Interventions
|
||||||
if ($conf->ficheinter->enabled)
|
if (! empty($conf->ficheinter->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
$newmenu->add(DOL_URL_ROOT."/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire);
|
$newmenu->add(DOL_URL_ROOT."/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->rights->ficheinter->lire);
|
||||||
|
|||||||
@ -456,10 +456,10 @@ class DoliDb
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief D<EFBFBD>fini les limites de la requ<EFBFBD>te.
|
* \brief Defini les limites de la requete.
|
||||||
\param limit nombre maximum de lignes retourn<EFBFBD>es
|
* \param limit nombre maximum de lignes retournees
|
||||||
\param offset num<EFBFBD>ro de la ligne <EFBFBD> partir de laquelle recup<EFBFBD>rer les ligne
|
* \param offset numero de la ligne a partir de laquelle recuperer les ligne
|
||||||
\return string chaine exprimant la syntax sql de la limite
|
* \return string chaine exprimant la syntax sql de la limite
|
||||||
*/
|
*/
|
||||||
function plimit($limit=0,$offset=0)
|
function plimit($limit=0,$offset=0)
|
||||||
{
|
{
|
||||||
@ -471,12 +471,12 @@ class DoliDb
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief D<EFBFBD>fini le tri de la requ<EFBFBD>te.
|
* \brief Defini le tri de la requete.
|
||||||
\param sortfield liste des champ de tri
|
* \param sortfield liste des champ de tri
|
||||||
\param sortorder ordre du tri
|
* \param sortorder ordre du tri
|
||||||
\return string chaine exprimant la syntax sql de l'ordre de tri
|
* \return string chaine exprimant la syntax sql de l'ordre de tri
|
||||||
\TODO A mutualiser dans classe mere
|
* \TODO A mutualiser dans classe mere
|
||||||
*/
|
*/
|
||||||
function order($sortfield=0,$sortorder=0)
|
function order($sortfield=0,$sortorder=0)
|
||||||
{
|
{
|
||||||
if ($sortfield)
|
if ($sortfield)
|
||||||
@ -512,9 +512,9 @@ class DoliDb
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Formatage (par la base de donn<EFBFBD>es) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
* \brief Formatage (par la base de donnees) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
||||||
* afin de retourner une donn<EFBFBD>e toujours au format universel date TMS unix.
|
* afin de retourner une donnee toujours au format universel date TMS unix.
|
||||||
* Fonction <EFBFBD> utiliser pour g<EFBFBD>n<EFBFBD>rer les SELECT.
|
* Fonction a utiliser pour generer les SELECT.
|
||||||
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
* \param param Nom champ base de type date ou chaine 'YYYY-MM-DD HH:MM:SS'
|
||||||
* \return date Date au format TMS.
|
* \return date Date au format TMS.
|
||||||
* \TODO Remove unix_timestamp functions so use jdate instead
|
* \TODO Remove unix_timestamp functions so use jdate instead
|
||||||
@ -525,7 +525,7 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field.
|
* \brief Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
* Function to use to build INSERT, UPDATE or WHERE predica
|
||||||
* \param param Date TMS to convert
|
* \param param Date TMS to convert
|
||||||
* \return string Date in a string YYYYMMDDHHMMSS
|
* \return string Date in a string YYYYMMDDHHMMSS
|
||||||
|
|||||||
@ -1392,7 +1392,8 @@ function restrictedArea($user, $feature='societe', $objectid=0, $dbtablename='',
|
|||||||
|
|
||||||
// Check write permission from module
|
// Check write permission from module
|
||||||
$createok=1;
|
$createok=1;
|
||||||
if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
|
if ( (isset($_GET["action"]) && $_GET["action"] == 'create')
|
||||||
|
|| (isset($_POST["action"]) && $_POST["action"] == 'create') )
|
||||||
{
|
{
|
||||||
if ($feature == 'societe')
|
if ($feature == 'societe')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -58,7 +58,7 @@ else
|
|||||||
|
|
||||||
// Forcage du parametrage PHP error_reporting (Dolibarr non utilisable en mode error E_ALL)
|
// Forcage du parametrage PHP error_reporting (Dolibarr non utilisable en mode error E_ALL)
|
||||||
error_reporting(E_ALL ^ E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
|
|
||||||
|
|
||||||
// Include configuration
|
// Include configuration
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user