From 88acbc51342e9096f4bef499b296c4e659720805 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Aug 2004 17:14:42 +0000 Subject: [PATCH] =?UTF-8?q?Renomage=20dans=20tout=20le=20code=20du=20mot?= =?UTF-8?q?=20d=E9claratif=20de=20fonction=20php=20"Function"=20(avec=20F?= =?UTF-8?q?=20majuscule)=20par=20"function"=20(avec=20f=20minuscule),=20qu?= =?UTF-8?q?i=20est=20le=20mot=20correct=20(bien=20que=20cela=20ne=20g=E8ne?= =?UTF-8?q?=20pas=20le=20php,=20cela=20g=E8ne=20doxygen=20et=20autres=20ou?= =?UTF-8?q?tils=20d'analyse=20syntaxique).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/adherents/adherent.class.php | 50 ++++++++-------- htdocs/adherents/adherent_options.class.php | 59 +++++++++---------- htdocs/adherents/adherent_type.class.php | 21 ++++--- htdocs/adherents/cotisation.class.php | 28 ++++----- htdocs/admin/sql.php | 4 +- htdocs/boutique/auteur/auteur.class.php | 14 ++--- htdocs/boutique/client/client.class.php | 6 +- htdocs/boutique/commande/commande.class.php | 4 +- htdocs/boutique/editeur/editeur.class.php | 14 ++--- htdocs/boutique/livre/livre.class.php | 28 ++++----- .../boutique/newsletter/newsletter.class.php | 18 +++--- .../notification/notification.class.php | 12 ++-- htdocs/comm/action/rapport/rapport.pdf.php | 8 +-- .../comm/propal/stats/propalestats.class.php | 10 ++-- htdocs/comm/propal_model_pdf.class.php | 4 +- htdocs/commande/commande.class.php | 40 ++++++------- htdocs/commande/osccommande.class.php | 6 +- htdocs/commande/stats/commandestats.class.php | 12 ++-- htdocs/compta/bank/account.class.php | 24 ++++---- htdocs/compta/bank/account.php | 2 +- htdocs/compta/bank/functions.lib.php | 4 +- .../compta/deplacement/deplacement.class.php | 10 ++-- htdocs/compta/facture/facture-rec.class.php | 26 ++++---- .../facture/stats/facturestats.class.php | 10 ++-- htdocs/compta/voyage/reduc.class.php | 4 +- htdocs/conf/conf.class.php | 24 ++++---- htdocs/contrat/contrat.class.php | 12 ++-- htdocs/expedition/expedition.class.php | 20 +++---- htdocs/expedition/liste.php | 2 +- .../stats/expeditionstats.class.php | 8 +-- htdocs/fichinter/fichinter.class.php | 16 ++--- htdocs/fourn/facture/paiementfourn.class.php | 8 +-- .../modules/DolibarrModules.class.php | 6 +- .../modules/commande/mod_commande_ivoire.php | 4 +- .../modules/facture/pdf_adytek.modules.php | 14 ++--- .../modules/facture/pdf_bernique.modules.php | 14 ++--- .../modules/facture/pdf_bigorneau.modules.php | 10 ++-- .../modules/facture/pdf_bulot.modules.php | 14 ++--- .../modules/facture/pdf_crabe.modules.php | 35 ++++++----- .../modules/facture/pdf_tourteau.modules.php | 10 ++-- .../modules/fichinter/pdf_soleil.modules.php | 4 +- htdocs/includes/modules/modAdherent.class.php | 6 +- htdocs/includes/modules/modBanque.class.php | 6 +- htdocs/includes/modules/modBoutique.class.php | 6 +- htdocs/includes/modules/modCaisse.class.php | 6 +- htdocs/includes/modules/modCommande.class.php | 6 +- .../includes/modules/modCommercial.class.php | 6 +- .../modules/modComptabilite.class.php | 6 +- htdocs/includes/modules/modContrat.class.php | 6 +- htdocs/includes/modules/modDon.class.php | 6 +- .../includes/modules/modExpedition.class.php | 6 +- .../includes/modules/modExternalRss.class.php | 6 +- htdocs/includes/modules/modFacture.class.php | 6 +- .../includes/modules/modFicheinter.class.php | 6 +- .../includes/modules/modFournisseur.class.php | 6 +- htdocs/includes/modules/modLdap.class.php | 6 +- htdocs/includes/modules/modPostnuke.class.php | 6 +- htdocs/includes/modules/modProduit.class.php | 6 +- htdocs/includes/modules/modProjet.class.php | 6 +- htdocs/includes/modules/modPropale.class.php | 6 +- htdocs/includes/modules/modService.class.php | 6 +- htdocs/includes/modules/modSociete.class.php | 6 +- htdocs/includes/modules/modStock.class.php | 6 +- .../includes/modules/modWebcalendar.class.php | 6 +- .../modules/propale/mod_propale_ivoire.php | 2 +- .../modules/propale/mod_propale_jade.php | 2 +- .../propale/pdf_propale_adytek.modules.php | 8 +-- .../propale/pdf_propale_bleu.modules.php | 8 +-- .../propale/pdf_propale_jaune.modules.php | 8 +-- .../propale/pdf_propale_rouge.modules.php | 8 +-- .../propale/pdf_propale_vert.modules.php | 8 +-- .../modules/rapport/pdf_paiement.class.php | 8 +-- htdocs/includes/pear/Auth/Auth.php | 14 ++--- htdocs/includes/pear/Auth/Container/DB.php | 6 +- htdocs/install/inc.php | 6 +- htdocs/lib/functions.inc.php | 58 ++---------------- htdocs/lib/webcal.class.php | 2 +- htdocs/postnuke/articles/pnarticle.class.php | 6 +- htdocs/product/album/album.class.php | 16 ++--- htdocs/product/categorie/categorie.class.php | 18 +++--- htdocs/product/categorie/index.php | 4 +- htdocs/product/concert/concert.class.php | 10 ++-- htdocs/product/concert/lieuconcert.class.php | 12 ++-- htdocs/product/critiques/critique.class.php | 4 +- htdocs/product/groupart/groupart.class.php | 16 ++--- htdocs/product/promotion/promotion.class.php | 14 ++--- htdocs/product/stats/commandestats.class.php | 10 ++-- htdocs/product/stock/entrepot.class.php | 12 ++-- htdocs/product/stock/mouvementstock.class.php | 6 +- htdocs/projet/project.class.php | 16 ++--- htdocs/rapport/Atome.class.php | 4 +- htdocs/rapport/AtomeFactureValidee.class.php | 4 +- htdocs/rapport/AtomePropaleValidee.class.php | 4 +- 93 files changed, 504 insertions(+), 547 deletions(-) diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index a108fec5f56..2f39ae7c01c 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -67,7 +67,7 @@ class Adherent \param id id de l'adhérent */ - Function Adherent($DB, $id='') + function Adherent($DB, $id='') { $this->db = $DB ; $this->id = $id; @@ -93,7 +93,7 @@ class Adherent \remarks etc.. */ - Function send_an_email($recipients,$text,$subject="Vos coordonnees sur %SERVEUR%") + function send_an_email($recipients,$text,$subject="Vos coordonnees sur %SERVEUR%") { $patterns = array ( '/%PRENOM%/', @@ -151,7 +151,7 @@ class Adherent \brief imprime une liste d'erreur. */ - Function print_error_list() + function print_error_list() { $num = sizeof($this->errorstr); for ($i = 0 ; $i < $num ; $i++) @@ -166,7 +166,7 @@ class Adherent \param morphy nature physique ou morale de l'adhérent */ - Function getmorphylib($morphy='') + function getmorphylib($morphy='') { if (! $morphy) { $morphy=$this->morphy; } if ($morphy == 'phy') { return "Physique"; } @@ -179,7 +179,7 @@ class Adherent \param minimum */ - Function check($minimum=0) + function check($minimum=0) { $err = 0; @@ -280,7 +280,7 @@ class Adherent \param userid userid de l'adhérent */ - Function create($userid) + function create($userid) { /* * Insertion dans la base @@ -310,7 +310,7 @@ class Adherent \brief fonction qui met à jour l'adhérent */ - Function update() + function update() { $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET "; @@ -372,7 +372,7 @@ class Adherent \param rowid */ - Function delete($rowid) + function delete($rowid) { $result = 0; @@ -415,7 +415,7 @@ class Adherent \param login login de l'adhérent */ - Function fetch_login($login) + function fetch_login($login) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent WHERE login='$login' LIMIT 1"; if ( $this->db->query( $sql) ) @@ -438,7 +438,7 @@ class Adherent */ - Function fetch($rowid) + function fetch($rowid) { $sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.statut, d.public, d.adresse, d.cp, d.ville, d.pays, d.note, d.email, d.login, d.pass, d.naiss, d.photo, d.fk_adherent_type, d.morphy, t.libelle as type"; $sql .= ",".$this->db->pdate("d.datefin")." as datefin"; @@ -487,7 +487,7 @@ class Adherent \param rowid */ - Function fetch_optionals($rowid) + function fetch_optionals($rowid) { $tab=array(); $sql = "SELECT *"; @@ -516,7 +516,7 @@ class Adherent /* * fetch optional attribute name */ - Function fetch_name_optionals() + function fetch_name_optionals() { $array_name_options=array(); $sql = "SHOW COLUMNS FROM ".MAIN_DB_PREFIX."adherent_options"; @@ -547,7 +547,7 @@ class Adherent \param montant */ - Function cotisation($date, $montant) + function cotisation($date, $montant) { @@ -588,7 +588,7 @@ class Adherent \param userid userid de l'adhérent */ - Function validate($userid) + function validate($userid) { $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET "; @@ -616,7 +616,7 @@ class Adherent \param userid userid de de l'adhérent */ - Function resiliate($userid) + function resiliate($userid) { $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET "; @@ -646,7 +646,7 @@ class Adherent \remarks mailing-list, spip, glasnost, etc... */ - Function add_to_abo($adht) + function add_to_abo($adht) { $err=0; // mailman @@ -690,7 +690,7 @@ class Adherent \remarks mailing-list, spip, glasnost, etc... */ - Function del_to_abo($adht) + function del_to_abo($adht) { $err=0; // mailman @@ -730,7 +730,7 @@ class Adherent \brief fonction qui donne les droits rédacteurs dans spip */ - Function add_to_spip() + function add_to_spip() { if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 && defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' && @@ -762,7 +762,7 @@ class Adherent \brief fonction qui enlève les droits rédacteurs dans spip */ - Function del_to_spip() + function del_to_spip() { if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 && defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' && @@ -791,7 +791,7 @@ class Adherent \brief fonction qui dit si cet utilisateur est rédacteur dans spip */ - Function is_in_spip() + function is_in_spip() { if (defined("ADHERENT_USE_SPIP") && ADHERENT_USE_SPIP ==1 && defined('ADHERENT_SPIP_SERVEUR') && ADHERENT_SPIP_SERVEUR != '' && @@ -828,7 +828,7 @@ class Adherent \brief fonction qui ajoute l'utilisateur dans glasnost */ - Function add_to_glasnost() + function add_to_glasnost() { if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 && defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' && @@ -893,7 +893,7 @@ class Adherent \brief fonction qui enlève l'utilisateur de glasnost */ - Function del_to_glasnost() + function del_to_glasnost() { if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 && defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' && @@ -998,7 +998,7 @@ class Adherent \brief fonction qui vérifie si l'utilisateur est dans glasnost */ - Function is_in_glasnost() + function is_in_glasnost() { if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 && defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' && @@ -1055,7 +1055,7 @@ class Adherent \brief fonction qui rajoute l'utilisateur dans mailman */ - Function add_to_mailman($listes='') + function add_to_mailman($listes='') { if (defined("ADHERENT_MAILMAN_URL") && ADHERENT_MAILMAN_URL != '' && defined("ADHERENT_MAILMAN_LISTS") && ADHERENT_MAILMAN_LISTS != '') { @@ -1121,7 +1121,7 @@ class Adherent \ remarks utilie lors de la résiliation d'adhésion */ - Function del_to_mailman($listes='') + function del_to_mailman($listes='') { if (defined("ADHERENT_MAILMAN_UNSUB_URL") && ADHERENT_MAILMAN_UNSUB_URL != '' && defined("ADHERENT_MAILMAN_LISTS") && ADHERENT_MAILMAN_LISTS != '') { diff --git a/htdocs/adherents/adherent_options.class.php b/htdocs/adherents/adherent_options.class.php index a5e854f6960..e66f61200b6 100644 --- a/htdocs/adherents/adherent_options.class.php +++ b/htdocs/adherents/adherent_options.class.php @@ -59,7 +59,7 @@ class AdherentOptions \param id id de l'adhérent */ - Function AdherentOptions($DB, $id='') + function AdherentOptions($DB, $id='') { $this->db = $DB ; $this->id = $id; @@ -71,8 +71,7 @@ class AdherentOptions /*! \brief fonction qui imprime un liste d'erreurs */ - - Function print_error_list() + function print_error_list() { $num = sizeof($this->errorstr); for ($i = 0 ; $i < $num ; $i++) @@ -85,8 +84,7 @@ class AdherentOptions \brief fonction qui vérifie les données entrées \param minimum */ - - Function check($minimum=0) + function check($minimum=0) { $err = 0; @@ -123,15 +121,15 @@ class AdherentOptions } /*! - \brief fonction qui crée un attribut optionnel + \brief fonction qui crée un attribut optionnel \param attrname nom de l'atribut - \param type type de l'attribut + \param type type de l'attribut \param length longuer de l'attribut \remarks Ceci correspond a une modification de la table et pas a un rajout d'enregistrement */ - Function create($attrname,$type='varchar',$length=255) { + function create($attrname,$type='varchar',$length=255) { /* * Insertion dans la base */ @@ -173,25 +171,24 @@ class AdherentOptions \param label nom du label */ - Function create_label($attrname,$label='') { + function create_label($attrname,$label='') { /* * Insertion dans la base */ - if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){ - $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label SET "; - $escaped_label=mysql_escape_string($label); - $sql .= " name='$attrname',label='$escaped_label' "; - - if ($this->db->query($sql)) - { - return 1; - } - else - { - print $this->db->error(); - print "


$sql

"; - return 0; - } + if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)) { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label SET "; + $escaped_label=mysql_escape_string($label); + $sql .= " name='$attrname',label='$escaped_label' "; + + if ($this->db->query($sql)) + { + return 1; + } + else + { + print dolibarr_print_error($this->db); + return 0; + } } } @@ -200,7 +197,7 @@ class AdherentOptions \param attrname nom de l'atribut */ - Function delete($attrname) + function delete($attrname) { if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){ $sql = "ALTER TABLE ".MAIN_DB_PREFIX."adherent_options DROP COLUMN $attrname"; @@ -226,7 +223,7 @@ class AdherentOptions \param attrname nom du label */ - Function delete_label($attrname) + function delete_label($attrname) { if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){ $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options_label WHERE name='$attrname'"; @@ -254,7 +251,7 @@ class AdherentOptions \param length longuer de l'attribut */ - Function update($attrname,$type='varchar',$length=255) + function update($attrname,$type='varchar',$length=255) { if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){ $sql = "ALTER TABLE ".MAIN_DB_PREFIX."adherent_options "; @@ -296,7 +293,7 @@ class AdherentOptions \param label nom du label */ - Function update_label($attrname,$label='') + function update_label($attrname,$label='') { if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){ $escaped_label=mysql_escape_string($label); @@ -318,13 +315,13 @@ class AdherentOptions } - Function fetch_optionals() + function fetch_optionals() { $this->fetch_name_optionals(); $this->fetch_name_optionals_label(); } - Function fetch_name_optionals() + function fetch_name_optionals() { $array_name_options=array(); $sql = "SHOW COLUMNS FROM ".MAIN_DB_PREFIX."adherent_options"; @@ -353,7 +350,7 @@ class AdherentOptions } - Function fetch_name_optionals_label() + function fetch_name_optionals_label() { $array_name_label=array(); $sql = "SELECT name,label FROM ".MAIN_DB_PREFIX."adherent_options_label"; diff --git a/htdocs/adherents/adherent_type.class.php b/htdocs/adherents/adherent_type.class.php index 45298c332b3..e704663c498 100644 --- a/htdocs/adherents/adherent_type.class.php +++ b/htdocs/adherents/adherent_type.class.php @@ -44,17 +44,20 @@ class AdherentType /*! \brief AdherentType - \param DB base de données - \param soc_idp + \param DB handler accès base de données */ - Function AdherentType($DB, $soc_idp="") + function AdherentType($DB) { $this->db = $DB ; $this->statut = 1; } - Function print_error_list() +/*! + \brief print_error_list +*/ + + function print_error_list() { $num = sizeof($this->errorstr); for ($i = 0 ; $i < $num ; $i++) @@ -68,7 +71,7 @@ class AdherentType \param userid userid de l'adhérent */ - Function create($userid) + function create($userid) { /* * Insertion dans la base @@ -92,7 +95,7 @@ class AdherentType } } - Function update() + function update() { $sql = "UPDATE ".MAIN_DB_PREFIX."adherent_type SET "; @@ -124,7 +127,7 @@ class AdherentType \param rowid */ - Function delete($rowid) + function delete($rowid) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type WHERE rowid = $rowid"; @@ -152,7 +155,7 @@ class AdherentType \param rowid */ - Function fetch($rowid) + function fetch($rowid) { $sql = "SELECT *"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; @@ -181,7 +184,7 @@ class AdherentType } - Function liste_array() + function liste_array() { $projets = array(); diff --git a/htdocs/adherents/cotisation.class.php b/htdocs/adherents/cotisation.class.php index dad84a25919..8521a313986 100644 --- a/htdocs/adherents/cotisation.class.php +++ b/htdocs/adherents/cotisation.class.php @@ -60,7 +60,7 @@ class Cotisation \param soc_idp */ - Function Cotisation($DB, $soc_idp="") + function Cotisation($DB, $soc_idp="") { $this->db = $DB ; $this->modepaiementid = 0; @@ -72,7 +72,7 @@ class Cotisation * */ - Function print_error_list() + function print_error_list() { $num = sizeof($this->errorstr); for ($i = 0 ; $i < $num ; $i++) @@ -86,7 +86,7 @@ class Cotisation * */ - Function check($minimum=0) + function check($minimum=0) { $err = 0; @@ -176,7 +176,7 @@ class Cotisation \param userid userid de l'adhérent */ - Function create($userid) + function create($userid) { /* * Insertion dans la base @@ -206,7 +206,7 @@ class Cotisation \param userid userid de l'adhérent */ - Function update($userid) + function update($userid) { $this->date = $this->db->idate($this->date); @@ -249,7 +249,7 @@ class Cotisation \param rowid */ - Function delete($rowid) + function delete($rowid) { @@ -278,7 +278,7 @@ class Cotisation \param rowid */ - Function fetch($rowid) + function fetch($rowid) { $sql = "SELECT d.rowid, ".$this->db->pdate("d.datedon")." as datedon, d.prenom, d.nom, d.societe, d.amount, p.libelle as projet, d.fk_statut, d.adresse, d.cp, d.ville, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.fk_don_projet"; $sql .= " FROM ".MAIN_DB_PREFIX."don as d, ".MAIN_DB_PREFIX."don_projet as p, ".MAIN_DB_PREFIX."c_paiement as cp"; @@ -325,7 +325,7 @@ class Cotisation \param userid userid de l'adhérent */ - Function valid_promesse($rowid, $userid) + function valid_promesse($rowid, $userid) { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 1, fk_user_valid = $userid WHERE rowid = $rowid AND fk_statut = 0;"; @@ -354,7 +354,7 @@ class Cotisation \param modedepaiement */ - Function set_paye($rowid, $modepaiement='') + function set_paye($rowid, $modepaiement='') { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2"; @@ -388,7 +388,7 @@ class Cotisation \param commentaire */ - Function set_commentaire($rowid, $commentaire='') + function set_commentaire($rowid, $commentaire='') { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET note = '$commentaire'"; @@ -417,7 +417,7 @@ class Cotisation \param rowid */ - Function set_encaisse($rowid) + function set_encaisse($rowid) { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 3 WHERE rowid = $rowid AND fk_statut = 2;"; @@ -444,7 +444,7 @@ class Cotisation * Somme des dons encaissés */ - Function sum_actual() + function sum_actual() { $sql = "SELECT sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."don"; @@ -462,7 +462,7 @@ class Cotisation * * */ - Function sum_pending() + function sum_pending() { $sql = "SELECT sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."don"; @@ -482,7 +482,7 @@ class Cotisation * */ - Function sum_intent() + function sum_intent() { $sql = "SELECT sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."don"; diff --git a/htdocs/admin/sql.php b/htdocs/admin/sql.php index a11e995c80e..2855f7c9abd 100644 --- a/htdocs/admin/sql.php +++ b/htdocs/admin/sql.php @@ -19,7 +19,7 @@ * $Source$ */ -Function db_create_table($db, $table) +function db_create_table($db, $table) { $sql = ""; @@ -33,7 +33,7 @@ Function db_create_table($db, $table) return $db->query($sql); } -Function db_drop_table($db, $table) +function db_drop_table($db, $table) { return $db->query("DROP table $table"); diff --git a/htdocs/boutique/auteur/auteur.class.php b/htdocs/boutique/auteur/auteur.class.php index 8b3641a9abf..75e53982d98 100644 --- a/htdocs/boutique/auteur/auteur.class.php +++ b/htdocs/boutique/auteur/auteur.class.php @@ -36,7 +36,7 @@ class Auteur { var $id ; var $nom; - Function Auteur($DB, $id=0) { + function Auteur($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -47,7 +47,7 @@ class Auteur { * */ - Function create($user) { + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."auteur (fk_user_author) VALUES (".$user->id.")"; @@ -68,7 +68,7 @@ class Auteur { * */ - Function liste_array () + function liste_array () { $ga = array(); @@ -103,7 +103,7 @@ class Auteur { * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."auteur "; @@ -124,7 +124,7 @@ class Auteur { * */ - Function liste_livre($id_type='', $status=0) + function liste_livre($id_type='', $status=0) { $ga = array(); if ($id_type == 'oscid') @@ -172,7 +172,7 @@ class Auteur { * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."auteur WHERE rowid = $id"; @@ -201,7 +201,7 @@ class Auteur { * */ - Function delete() { + function delete() { $livres = $this->liste_livre(); diff --git a/htdocs/boutique/client/client.class.php b/htdocs/boutique/client/client.class.php index 0d2378f5ce7..8c53015312e 100644 --- a/htdocs/boutique/client/client.class.php +++ b/htdocs/boutique/client/client.class.php @@ -20,7 +20,7 @@ * */ -/*! \file Client.class.php +/*! \file client.class.php \brief Classe permettant de gèrer des clients de la boutique online \author Rodolphe Quiedeville \version $Revision$ @@ -36,7 +36,7 @@ class Client { var $id ; var $nom; - Function Client($DB, $id=0) { + function Client($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -46,7 +46,7 @@ class Client { \param id id du client */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT customers_id, customers_lastname, customers_firstname FROM ".DB_NAME_OSC.".customers WHERE customers_id = $id"; diff --git a/htdocs/boutique/commande/commande.class.php b/htdocs/boutique/commande/commande.class.php index c7201c01934..a687ac6a1de 100644 --- a/htdocs/boutique/commande/commande.class.php +++ b/htdocs/boutique/commande/commande.class.php @@ -26,7 +26,7 @@ class Commande { var $id ; var $nom; - Function Commande($DB, $id=0) { + function Commande($DB, $id=0) { $this->db = $DB; $this->id = $id ; @@ -41,7 +41,7 @@ class Commande { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, ".$this->db->pdate("date_purchased") . " as date_purchased, orders_status, orders_date_finished, currency, currency_value"; diff --git a/htdocs/boutique/editeur/editeur.class.php b/htdocs/boutique/editeur/editeur.class.php index 602f9a89a72..b7001983d33 100644 --- a/htdocs/boutique/editeur/editeur.class.php +++ b/htdocs/boutique/editeur/editeur.class.php @@ -26,7 +26,7 @@ class Editeur { var $id ; var $nom; - Function Editeur($DB, $id=0) { + function Editeur($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -35,7 +35,7 @@ class Editeur { * * */ - Function create($user) { + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."editeur (fk_user_author) VALUES (".$user->id.")"; @@ -55,7 +55,7 @@ class Editeur { * * */ - Function liste_array () + function liste_array () { $ga = array(); @@ -89,7 +89,7 @@ class Editeur { * * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."editeur "; @@ -108,7 +108,7 @@ class Editeur { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."editeur WHERE rowid = $id"; @@ -135,7 +135,7 @@ class Editeur { * * */ - Function liste_livre() + function liste_livre() { $ga = array(); @@ -169,7 +169,7 @@ class Editeur { * * */ - Function delete() { + function delete() { $livres = $this->liste_livre(); diff --git a/htdocs/boutique/livre/livre.class.php b/htdocs/boutique/livre/livre.class.php index 5a0ea46112e..53208382bd5 100644 --- a/htdocs/boutique/livre/livre.class.php +++ b/htdocs/boutique/livre/livre.class.php @@ -36,7 +36,7 @@ class Livre { var $price ; var $status ; - Function Livre($DB, $id=0) { + function Livre($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -45,7 +45,7 @@ class Livre { * * */ - Function create($user) { + function create($user) { if (strlen($this->annee)) { @@ -110,7 +110,7 @@ class Livre { * * */ - Function linkga($id, $gaid) + function linkga($id, $gaid) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."livre_to_auteur (fk_livre, fk_auteur) values ($id, $gaid)"; @@ -128,7 +128,7 @@ class Livre { * * */ - Function liste_auteur() + function liste_auteur() { $ga = array(); @@ -162,7 +162,7 @@ class Livre { * * */ - Function auteur_unlink($auteur_id) + function auteur_unlink($auteur_id) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."livre_to_auteur "; @@ -183,7 +183,7 @@ class Livre { * * */ - Function unlinkcategorie($categories_id) + function unlinkcategorie($categories_id) { $sql = "DELETE FROM ".DB_NAME_OSC.".products_to_categories "; @@ -204,7 +204,7 @@ class Livre { * * */ - Function linkcategorie($categories_id) + function linkcategorie($categories_id) { $sql = "INSERT INTO ".DB_NAME_OSC.".products_to_categories "; @@ -225,7 +225,7 @@ class Livre { * * */ - Function listcategorie() + function listcategorie() { global $conf; @@ -281,7 +281,7 @@ class Livre { * * */ - Function update_status($status) + function update_status($status) { $sql = "UPDATE ".DB_NAME_OSC.".products "; $sql .= " SET products_status = ".$status; @@ -309,7 +309,7 @@ class Livre { * * */ - Function updateosc($noupdate_other=0) + function updateosc($noupdate_other=0) { $desc = trim(addslashes($this->description)); $desc .= "

"; @@ -434,7 +434,7 @@ class Livre { * * */ - Function update($id, $user) + function update($id, $user) { if (strlen($this->annee)==0) @@ -467,7 +467,7 @@ class Livre { * * */ - Function fetch ($id, $oscid=0) { + function fetch ($id, $oscid=0) { $sql = "SELECT rowid, fk_editeur, ref, prix, annee, oscid, title, description, frais_de_port FROM ".MAIN_DB_PREFIX."livre"; if ($id) @@ -537,7 +537,7 @@ class Livre { * * */ - Function update_image($file_name) + function update_image($file_name) { $sql = "UPDATE ".DB_NAME_OSC.".products SET products_image='".$file_name."'"; $sql .= " WHERE products_id = " . $this->oscid; @@ -553,7 +553,7 @@ class Livre { * * */ - Function delete() + function delete() { $sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = ".$this->oscid; $result = $this->db->query($sql) ; diff --git a/htdocs/boutique/newsletter/newsletter.class.php b/htdocs/boutique/newsletter/newsletter.class.php index b8d9c5d7771..b47d10f5b1d 100644 --- a/htdocs/boutique/newsletter/newsletter.class.php +++ b/htdocs/boutique/newsletter/newsletter.class.php @@ -30,7 +30,7 @@ class Newsletter { var $email_body; var $status; - Function Newsletter($DB, $id=0) { + function Newsletter($DB, $id=0) { $this->db = $DB; $this->id = $id ; @@ -46,7 +46,7 @@ class Newsletter { * * */ - Function create($user) { + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."newsletter (fk_user_author, datec, nbsent) VALUES (".$user->id.",now(), 0)"; @@ -65,7 +65,7 @@ class Newsletter { * * */ - Function update($id, $user) + function update($id, $user) { if (strlen(trim($this->email_replyto))==0) @@ -97,7 +97,7 @@ class Newsletter { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid, email_subject, email_from_name, email_from_email, email_replyto, email_body, target, sql_target, status, date_send_request,".$this->db->pdate("date_send_begin")." as date_send_begin,".$this->db->pdate("date_send_end")." as date_send_end, nbsent, nberror"; $sql .= " FROM ".MAIN_DB_PREFIX."newsletter WHERE rowid=$id"; @@ -136,7 +136,7 @@ class Newsletter { * * */ - Function liste_array () + function liste_array () { $ga = array(); @@ -170,7 +170,7 @@ class Newsletter { * * */ - Function validate($user) { + function validate($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."newsletter SET status=1, fk_user_valid = $user->id WHERE rowid = $this->id"; $return = $this->db->query($sql) ; @@ -180,7 +180,7 @@ class Newsletter { * * */ - Function send($user) { + function send($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."newsletter SET status=2, date_send_request=now() WHERE rowid = $this->id"; $return = $this->db->query($sql) ; @@ -190,7 +190,7 @@ class Newsletter { * * */ - Function build_sql($target) + function build_sql($target) { if ($target == 1) { @@ -207,7 +207,7 @@ class Newsletter { * * */ - Function delete() { + function delete() { $sql = "DELETE FROM ".MAIN_DB_PREFIX."newsletter WHERE rowid = $this->id "; $return = $this->db->query($sql) ; diff --git a/htdocs/boutique/notification/notification.class.php b/htdocs/boutique/notification/notification.class.php index 014704a1fb2..f6242367c41 100644 --- a/htdocs/boutique/notification/notification.class.php +++ b/htdocs/boutique/notification/notification.class.php @@ -26,7 +26,7 @@ class Editeur { var $id ; var $nom; - Function Editeur($DB, $id=0) { + function Editeur($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -35,7 +35,7 @@ class Editeur { * * */ - Function create($user) { + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."editeur (fk_user_author) VALUES (".$user->id.")"; @@ -55,7 +55,7 @@ class Editeur { * * */ - Function liste_array () + function liste_array () { $ga = array(); @@ -89,7 +89,7 @@ class Editeur { * * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."editeur "; @@ -108,7 +108,7 @@ class Editeur { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid, nom FROM ".MAIN_DB_PREFIX."editeur WHERE rowid = $id"; @@ -136,7 +136,7 @@ class Editeur { * * */ - Function delete($user) { + function delete($user) { $sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc "; diff --git a/htdocs/comm/action/rapport/rapport.pdf.php b/htdocs/comm/action/rapport/rapport.pdf.php index 15eb07eb566..1857f5659ad 100644 --- a/htdocs/comm/action/rapport/rapport.pdf.php +++ b/htdocs/comm/action/rapport/rapport.pdf.php @@ -25,7 +25,7 @@ require (DOL_DOCUMENT_ROOT ."/includes/fpdf/fpdf_html.php"); Class CommActionRapport { - Function CommActionRapport($db=0, $month, $year) + function CommActionRapport($db=0, $month, $year) { $this->db = $db; $this->description = ""; @@ -34,7 +34,7 @@ Class CommActionRapport { $this->year = $year; } - Function generate($socid = 0, $catid = 0) + function generate($socid = 0, $catid = 0) { global $user; @@ -102,7 +102,7 @@ Class CommActionRapport { * * */ - Function _cover(&$pdf) + function _cover(&$pdf) { $pdf->AddPage(); $pdf->SetAutoPageBreak(false); @@ -131,7 +131,7 @@ Class CommActionRapport { /* * */ - Function _pages(&$pdf) + function _pages(&$pdf) { $pdf->AddPage(); $pdf->SetAutoPageBreak(true); diff --git a/htdocs/comm/propal/stats/propalestats.class.php b/htdocs/comm/propal/stats/propalestats.class.php index c897fdef91c..e52acb1b8a1 100644 --- a/htdocs/comm/propal/stats/propalestats.class.php +++ b/htdocs/comm/propal/stats/propalestats.class.php @@ -26,7 +26,7 @@ class PropaleStats extends Stats { var $db ; - Function PropaleStats($DB) + function PropaleStats($DB) { $this->db = $DB; } @@ -36,7 +36,7 @@ class PropaleStats extends Stats * Renvoie le nombre de proposition par mois pour une année donnée * */ - Function getNbByMonth($year) + function getNbByMonth($year) { $sql = "SELECT date_format(datep,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."propal"; $sql .= " WHERE date_format(datep,'%Y') = $year AND fk_statut > 0"; @@ -49,7 +49,7 @@ class PropaleStats extends Stats * Renvoie le nombre de propale par année * */ - Function getNbByYear() + function getNbByYear() { $sql = "SELECT date_format(datep,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."propal GROUP BY dm DESC WHERE fk_statut > 0"; @@ -59,7 +59,7 @@ class PropaleStats extends Stats * Renvoie le nombre de propale par mois pour une année donnée * */ - Function getAmountByMonth($year) + function getAmountByMonth($year) { $sql = "SELECT date_format(datep,'%m') as dm, sum(price) FROM ".MAIN_DB_PREFIX."propal"; $sql .= " WHERE date_format(datep,'%Y') = $year AND fk_statut > 0"; @@ -71,7 +71,7 @@ class PropaleStats extends Stats * * */ - Function getAverageByMonth($year) + function getAverageByMonth($year) { $sql = "SELECT date_format(datep,'%m') as dm, avg(price) FROM ".MAIN_DB_PREFIX."propal"; $sql .= " WHERE date_format(datep,'%Y') = $year AND fk_statut > 0"; diff --git a/htdocs/comm/propal_model_pdf.class.php b/htdocs/comm/propal_model_pdf.class.php index 5a77033e51b..206c3faf189 100644 --- a/htdocs/comm/propal_model_pdf.class.php +++ b/htdocs/comm/propal_model_pdf.class.php @@ -24,7 +24,7 @@ class Propal_Model_Pdf { var $nom; - Function Propal_Model_Pdf($DB) + function Propal_Model_Pdf($DB) { $this->db = $DB ; } @@ -34,7 +34,7 @@ class Propal_Model_Pdf { * */ - Function liste_array() + function liste_array() { $projets = array(); diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index 595af9d3204..ba4d3654e84 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -29,7 +29,7 @@ class Commande * Initialisation * */ - Function Commande($DB) + function Commande($DB) { $this->db = $DB; @@ -51,7 +51,7 @@ class Commande * Créé la facture depuis une propale existante * */ - Function create_from_propale($user, $propale_id) + function create_from_propale($user, $propale_id) { $propal = new Propal($this->db); $propal->fetch($propale_id); @@ -90,7 +90,7 @@ class Commande * Valide la commande * */ - Function valid($user) + function valid($user) { $result = 0; if ($user->rights->commande->valider) @@ -135,7 +135,7 @@ class Commande * Cloture la commande * */ - Function cloture($user) + function cloture($user) { if ($user->rights->commande->valider) { @@ -158,7 +158,7 @@ class Commande * Annule la commande * */ - Function cancel($user) + function cancel($user) { if ($user->rights->commande->valider) { @@ -181,7 +181,7 @@ class Commande * Créé la commande * */ - Function create($user) + function create($user) { /* On positionne en mode brouillon la commande */ $this->brouillon = 1; @@ -274,7 +274,7 @@ class Commande * Ajoute un produit * */ - Function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0) + function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0) { if ($this->statut == 0) { @@ -320,7 +320,7 @@ class Commande * Ajoute une ligne de commande * */ - Function addline( $desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0) + function addline( $desc, $pu, $qty, $txtva, $fk_product=0, $remise_percent=0) { if ($this->brouillon && strlen(trim($desc))) { @@ -369,7 +369,7 @@ class Commande * Ajoute un produit dans la commande * */ - Function add_product($idproduct, $qty, $remise_percent=0) + function add_product($idproduct, $qty, $remise_percent=0) { if ($idproduct > 0) { @@ -388,7 +388,7 @@ class Commande * Lit une commande * */ - Function fetch ($id) + function fetch ($id) { $sql = "SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva"; $sql .= ", ".$this->db->pdate("c.date_commande")." as date_commande, c.fk_projet, c.remise_percent, c.source, c.facture"; @@ -453,7 +453,7 @@ class Commande * * */ - Function fetch_lignes($only_product=0) + function fetch_lignes($only_product=0) { $this->lignes = array(); @@ -502,7 +502,7 @@ class Commande * * */ - Function livraison_array() + function livraison_array() { $this->livraisons = array(); @@ -531,7 +531,7 @@ class Commande * Renvoie un tableau avec les livraison par ligne * */ - Function nb_expedition() + function nb_expedition() { $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."expedition as e"; $sql .=" WHERE e.fk_commande = $this->id"; @@ -549,7 +549,7 @@ class Commande * Supprime une ligne de la commande * */ - Function delete_line($idligne) + function delete_line($idligne) { if ($this->statut == 0) { @@ -571,7 +571,7 @@ class Commande * * */ - Function set_remise($user, $remise) + function set_remise($user, $remise) { if ($user->rights->commande->creer) { @@ -597,7 +597,7 @@ class Commande * Classe la facture comme facturée * */ - Function classer_facturee() + function classer_facturee() { $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET facture = 1"; $sql .= " WHERE rowid = ".$this->id." AND fk_statut > 0 ;"; @@ -616,7 +616,7 @@ class Commande * Mettre à jour le prix * */ - Function update_price() + function update_price() { include_once DOL_DOCUMENT_ROOT . "/lib/price.lib.php"; @@ -673,7 +673,7 @@ class Commande * Mets à jour une ligne de commande * */ - Function update_line($rowid, $desc, $pu, $qty, $remise_percent=0) + function update_line($rowid, $desc, $pu, $qty, $remise_percent=0) { if ($this->brouillon) { @@ -711,7 +711,7 @@ class Commande * Supprime la commande * */ - Function delete() + function delete() { $err = 0; @@ -750,7 +750,7 @@ class Commande * Classe la commande * */ - Function classin($cat_id) + function classin($cat_id) { $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_projet = $cat_id"; $sql .= " WHERE rowid = $this->id;"; diff --git a/htdocs/commande/osccommande.class.php b/htdocs/commande/osccommande.class.php index a35c212c34a..50867cd0fb8 100644 --- a/htdocs/commande/osccommande.class.php +++ b/htdocs/commande/osccommande.class.php @@ -27,7 +27,7 @@ class OscCommande { var $id ; var $client_name ; - Function OscCommande($DB, $id=0) { + function OscCommande($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -36,7 +36,7 @@ class OscCommande { * * */ - Function fetch ($id) + function fetch ($id) { $sql = "SELECT o.orders_id, o.customers_name, o.orders_status FROM ".DB_NAME_OSC.".orders as o"; @@ -61,7 +61,7 @@ class OscCommande { * * */ - Function liste_products () + function liste_products () { $ga = array(); diff --git a/htdocs/commande/stats/commandestats.class.php b/htdocs/commande/stats/commandestats.class.php index 18b0948c201..2368ab9a0dd 100644 --- a/htdocs/commande/stats/commandestats.class.php +++ b/htdocs/commande/stats/commandestats.class.php @@ -24,13 +24,13 @@ class CommandeStats { var $db ; - Function CommandeStats($DB, $socidp) + function CommandeStats($DB, $socidp) { $this->db = $DB; $this->socidp = $socidp; } - Function getNbCommandeByMonthWithPrevYear($year) + function getNbCommandeByMonthWithPrevYear($year) { $data1 = $this->getNbCommandeByMonth($year - 1); $data2 = $this->getNbCommandeByMonth($year); @@ -49,7 +49,7 @@ class CommandeStats * Renvoie le nombre de commande par mois pour une année donnée * */ - Function getNbCommandeByMonth($year) + function getNbCommandeByMonth($year) { $result = array(); $sql = "SELECT date_format(date_commande,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."commande"; @@ -93,7 +93,7 @@ class CommandeStats * Renvoie le nombre de commande par année * */ - Function getNbByYear() + function getNbByYear() { $result = array(); $sql = "SELECT date_format(date_commande,'%Y') as dm, count(*), sum(total_ht) FROM ".MAIN_DB_PREFIX."commande WHERE fk_statut > 0"; @@ -121,7 +121,7 @@ class CommandeStats * Renvoie le nombre de commande par mois pour une année donnée * */ - Function getCommandeAmountByMonth($year) + function getCommandeAmountByMonth($year) { $result = array(); $sql = "SELECT date_format(date_commande,'%m') as dm, sum(total_ht) FROM ".MAIN_DB_PREFIX."commande"; @@ -157,7 +157,7 @@ class CommandeStats * Renvoie le nombre de commande par mois pour une année donnée * */ - Function getCommandeAverageByMonth($year) + function getCommandeAverageByMonth($year) { $result = array(); $sql = "SELECT date_format(date_commande,'%m') as dm, avg(total_ht) FROM ".MAIN_DB_PREFIX."commande"; diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index 0eda2240767..76c3c8c9edd 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -38,7 +38,7 @@ class Account var $proprio; var $adresse_proprio; - Function Account($DB, $rowid=0) + function Account($DB, $rowid=0) { global $config; @@ -55,7 +55,7 @@ class Account * Efface une entree dans la table ".MAIN_DB_PREFIX."bank */ - Function deleteline($rowid) + function deleteline($rowid) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=$rowid"; $result = $this->db->query($sql); @@ -70,7 +70,7 @@ class Account * * */ - Function add_url_line($line_id, $url_id, $url, $label) + function add_url_line($line_id, $url_id, $url, $label) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (fk_bank, url_id, url, label)"; $sql .= " VALUES ('$line_id', '$url_id', '$url', '$label')"; @@ -91,7 +91,7 @@ class Account /* * */ - Function get_url($line_id) + function get_url($line_id) { $lines = array(); $sql = "SELECT fk_bank, url_id, url, label FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank = $line_id"; @@ -116,7 +116,7 @@ class Account * Ajoute une entree dans la table ".MAIN_DB_PREFIX."bank * */ - Function addline($date, $oper, $label, $amount, $num_chq='', $categorie='',$user) + function addline($date, $oper, $label, $amount, $num_chq='', $categorie='',$user) { if ($this->rowid) { @@ -181,7 +181,7 @@ class Account * Creation du compte bancaire * */ - Function create() + function create() { // Chargement librairie pour acces fonction controle RIB require_once DOL_DOCUMENT_ROOT . '/compta/bank/bank.lib.php'; @@ -224,7 +224,7 @@ class Account * * */ - Function update($user='') + function update($user='') { // Chargement librairie pour acces fonction controle RIB require_once DOL_DOCUMENT_ROOT . '/compta/bank/bank.lib.php'; @@ -272,7 +272,7 @@ class Account * * */ - Function fetch($id) + function fetch($id) { $this->id = $id; $sql = "SELECT rowid, label, bank, number, courant, clos, code_banque, code_guichet, cle_rib, bic, iban_prefix, domiciliation, proprio, adresse_proprio FROM ".MAIN_DB_PREFIX."bank_account"; @@ -312,7 +312,7 @@ class Account * * */ - Function error() + function error() { return $this->error; } @@ -321,7 +321,7 @@ class Account * * */ - Function solde() + function solde() { $sql = "SELECT sum(amount) FROM ".MAIN_DB_PREFIX."bank WHERE fk_account=$this->id AND dateo <=" . $this->db->idate(time() ); @@ -342,7 +342,7 @@ class Account * * */ - Function datev_next($rowid) + function datev_next($rowid) { $sql = "UPDATE ".MAIN_DB_PREFIX."bank SET "; @@ -370,7 +370,7 @@ class Account * * */ - Function datev_previous($rowid) + function datev_previous($rowid) { $sql = "UPDATE ".MAIN_DB_PREFIX."bank SET "; diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index d876ff7462d..b4b8b8e71b3 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -316,7 +316,7 @@ llxFooter("Dernière modification $Date$ révision $Revision$db = $DB; @@ -40,7 +40,7 @@ class Deplacement /* * */ - Function create($user) + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."deplacement (datec, fk_user_author) VALUES (now(), $user->id)"; @@ -57,7 +57,7 @@ class Deplacement /* * */ - Function update($user) + function update($user) { if (strlen($this->km)==0) $this->km = 0; @@ -84,7 +84,7 @@ class Deplacement /* * */ - Function fetch ($id) + function fetch ($id) { $sql = "SELECT fk_user, km, fk_soc,".$this->db->pdate("dated")." as dated"; $sql .= " FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = $id"; @@ -111,7 +111,7 @@ class Deplacement /* * */ - Function delete($id) + function delete($id) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = $id"; diff --git a/htdocs/compta/facture/facture-rec.class.php b/htdocs/compta/facture/facture-rec.class.php index 6dbd95d3476..1f6483fcbd9 100644 --- a/htdocs/compta/facture/facture-rec.class.php +++ b/htdocs/compta/facture/facture-rec.class.php @@ -43,7 +43,7 @@ class FactureRec * Initialisation de la class * */ - Function FactureRec($DB, $facid=0) + function FactureRec($DB, $facid=0) { $this->db = $DB ; $this->facid = $facid; @@ -53,7 +53,7 @@ class FactureRec * * */ - Function create($user) + function create($user) { /* * @@ -128,7 +128,7 @@ class FactureRec * * */ - Function fetch($rowid, $societe_id=0) + function fetch($rowid, $societe_id=0) { $sql = "SELECT f.fk_soc,f.titre,f.amount,f.tva,f.total,f.total_ttc,f.remise,f.remise_percent,f.fk_projet, c.rowid as crid, c.libelle, c.libelle_facture, f.note, f.fk_user_author"; @@ -228,7 +228,7 @@ class FactureRec * Recupére l'objet client lié à la facture * */ - Function fetch_client() + function fetch_client() { $client = new Societe($this->db); $client->fetch($this->socidp); @@ -240,7 +240,7 @@ class FactureRec * * */ - Function valid($userid, $dir) + function valid($userid, $dir) { $sql = "UPDATE ".MAIN_DB_PREFIX."facture SET fk_statut = 1, date_valid=now(), fk_user_valid=$userid"; $sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;"; @@ -259,7 +259,7 @@ class FactureRec * Supprime la facture * */ - Function delete($rowid) + function delete($rowid) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = $rowid;"; @@ -287,7 +287,7 @@ class FactureRec * Valide la facture * */ - Function set_valid($rowid, $user, $soc) + function set_valid($rowid, $user, $soc) { if ($this->brouillon) { @@ -344,7 +344,7 @@ class FactureRec * Ajoute un produit dans la facture * */ - Function add_product($idproduct, $qty, $remise_percent) + function add_product($idproduct, $qty, $remise_percent) { if ($idproduct > 0) { @@ -362,7 +362,7 @@ class FactureRec * Ajoute une ligne de facture * */ - Function addline($facid, $desc, $pu, $qty, $txtva, $fk_product='NULL', $remise_percent=0) + function addline($facid, $desc, $pu, $qty, $txtva, $fk_product='NULL', $remise_percent=0) { if ($this->brouillon) { @@ -398,7 +398,7 @@ class FactureRec * Mets à jour une ligne de facture * */ - Function updateline($rowid, $desc, $pu, $qty, $remise_percent=0) + function updateline($rowid, $desc, $pu, $qty, $remise_percent=0) { if ($this->brouillon) { @@ -429,7 +429,7 @@ class FactureRec * Supprime une ligne * */ - Function deleteline($rowid) + function deleteline($rowid) { if ($this->brouillon) { @@ -443,7 +443,7 @@ class FactureRec * Mise à jour des sommes de la facture * */ - Function updateprice($facid) + function updateprice($facid) { include_once DOL_DOCUMENT_ROOT . "/lib/price.lib.php"; $err=0; @@ -512,7 +512,7 @@ class FactureRec * Applique une remise * */ - Function set_remise($user, $remise) + function set_remise($user, $remise) { if ($user->rights->facture->creer) { diff --git a/htdocs/compta/facture/stats/facturestats.class.php b/htdocs/compta/facture/stats/facturestats.class.php index 41c5bf333cd..16ed3f4e4c3 100644 --- a/htdocs/compta/facture/stats/facturestats.class.php +++ b/htdocs/compta/facture/stats/facturestats.class.php @@ -26,7 +26,7 @@ class FactureStats extends Stats { var $db ; - Function FactureStats($DB, $socidp=0) + function FactureStats($DB, $socidp=0) { $this->db = $DB; $this->socidp = $socidp; @@ -37,7 +37,7 @@ class FactureStats extends Stats * Renvoie le nombre de facture par mois pour une année donnée * */ - Function getNbByMonth($year) + function getNbByMonth($year) { $sql = "SELECT date_format(datef,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."facture"; $sql .= " WHERE date_format(datef,'%Y') = $year AND fk_statut > 0"; @@ -55,7 +55,7 @@ class FactureStats extends Stats * Renvoie le nombre de facture par année * */ - Function getNbByYear() + function getNbByYear() { $sql = "SELECT date_format(datef,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."facture GROUP BY dm DESC WHERE fk_statut > 0"; @@ -65,7 +65,7 @@ class FactureStats extends Stats * Renvoie le nombre de facture par mois pour une année donnée * */ - Function getAmountByMonth($year) + function getAmountByMonth($year) { $sql = "SELECT date_format(datef,'%m') as dm, sum(total) FROM ".MAIN_DB_PREFIX."facture"; $sql .= " WHERE date_format(datef,'%Y') = $year AND fk_statut > 0"; @@ -81,7 +81,7 @@ class FactureStats extends Stats * * */ - Function getAverageByMonth($year) + function getAverageByMonth($year) { $sql = "SELECT date_format(datef,'%m') as dm, avg(total) FROM ".MAIN_DB_PREFIX."facture"; $sql .= " WHERE date_format(datef,'%Y') = $year AND fk_statut > 0"; diff --git a/htdocs/compta/voyage/reduc.class.php b/htdocs/compta/voyage/reduc.class.php index 8236178424b..c5a4263001f 100644 --- a/htdocs/compta/voyage/reduc.class.php +++ b/htdocs/compta/voyage/reduc.class.php @@ -25,7 +25,7 @@ class Reduc { var $price; var $label; - Function Reduc($DB, $rowid=0) { + function Reduc($DB, $rowid=0) { global $config; $this->db = $DB; @@ -34,7 +34,7 @@ class Reduc { return 1; } - Function fetch($id) { + function fetch($id) { $sql = "SELECT b.rowid,".$this->db->pdate("b.date_debut")." as debut,".$this->db->pdate("b.date_fin")." as fin, b.amount, b.label "; $sql .= " FROM ".MAIN_DB_PREFIX."voyage_reduc as b WHERE rowid = $id"; diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php index 0721aa7f6c6..c3d6b5ef3fc 100644 --- a/htdocs/conf/conf.class.php +++ b/htdocs/conf/conf.class.php @@ -30,7 +30,7 @@ class Conf var $readonly; var $dbi; - Function Conf() + function Conf() { $this->db = new DbConf(); @@ -52,7 +52,7 @@ class Conf class ComptaConf { - Function ComptaConf() + function ComptaConf() { $this->tva = 1; } @@ -60,7 +60,7 @@ class ComptaConf class PropalConf { - Function PropalConf() + function PropalConf() { } @@ -71,7 +71,7 @@ class PropalConf */ class DbConf { - Function DbConf() + function DbConf() { $this->type = "mysql"; $this->host = ""; @@ -109,7 +109,7 @@ class DbConf { /** return the dsn according to the pear syntax */ - Function getdsn() + function getdsn() { return ($this->type.'://'.$this->user.':'.$this->pass.'@'.$this->host.'/'.$this->name); } @@ -121,7 +121,7 @@ class DbConf { */ class WebcalConf { - Function WebcalConf() + function WebcalConf() { $this->enabled = 0; $this->url = defined("PHPWEBCALENDAR_URL")?PHPWEBCALENDAR_URL:""; @@ -140,7 +140,7 @@ class WebcalConf */ class FactureConf { - Function FactureConf() + function FactureConf() { $this->enabled = 0; } @@ -152,7 +152,7 @@ class FactureConf */ class DonConf { - Function DonConf() + function DonConf() { $this->enabled = 0; @@ -174,7 +174,7 @@ class DonConf */ class ProduitConf { - Function ProduitConf() + function ProduitConf() { $this->enabled = 0; } @@ -185,7 +185,7 @@ class ProduitConf */ class ServiceConf { - Function ServiceConf() + function ServiceConf() { $this->enabled = 0; } @@ -195,7 +195,7 @@ class ServiceConf * */ class AdherentConf { - Function AdherentConf() { + function AdherentConf() { $this->enabled = 0; $this->email_new = "Merci de votre inscription. Votre adhesion devrait etre rapidement validee.\nVoici le rappel des coordonnees que vous avez rentrees (toute information erronee entrainera la non validation de votre inscription) :\n\n%INFO%\n\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l'adresse suivante :\n%SERVEUR%public/adherents/\n\n"; $this->email_new_subject = 'Vos coordonnees sur %SERVEUR%'; @@ -214,7 +214,7 @@ class AdherentConf { */ class DomaineConf { - Function DomaineConf() + function DomaineConf() { $this->enabled = 0; } diff --git a/htdocs/contrat/contrat.class.php b/htdocs/contrat/contrat.class.php index 921f82d83ab..7e556a7332b 100644 --- a/htdocs/contrat/contrat.class.php +++ b/htdocs/contrat/contrat.class.php @@ -31,7 +31,7 @@ class Contrat * */ - Function Contrat($DB) + function Contrat($DB) { $this->db = $DB ; $this->product = new Product($DB); @@ -45,7 +45,7 @@ class Contrat * Si la duree est renseignée, date_start=date_start et date_end=date_start+duree * sinon date_start=date_start et date_end=date_end */ - Function mise_en_service($user, $date_start, $duree=0, $date_end) + function mise_en_service($user, $date_start, $duree=0, $date_end) { if ($duree) { // Si duree renseignee @@ -89,7 +89,7 @@ class Contrat * * */ - Function cloture($user) + function cloture($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET enservice = 2"; $sql .= " , date_cloture = now(), fk_user_cloture = ".$user->id; @@ -101,7 +101,7 @@ class Contrat * * */ - Function annule($user) + function annule($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET enservice = 0"; $sql .= " , date_cloture = now(), fk_user_cloture = ".$user->id; @@ -113,7 +113,7 @@ class Contrat * * */ - Function fetch ($id) + function fetch ($id) { $sql = "SELECT rowid, enservice, fk_soc, fk_product, ".$this->db->pdate("mise_en_service")." as datemise"; $sql .= ", fk_user_mise_en_service, ".$this->db->pdate("date_cloture")." as datecloture"; @@ -155,7 +155,7 @@ class Contrat * Crée autant de contrats que de lignes de facture, pour une facture donnée * */ - Function create_from_facture($factureid, $user, $socid) + function create_from_facture($factureid, $user, $socid) { $sql = "SELECT p.rowid as rowid, fd.rowid as fdrowid FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."facturedet as fd"; $sql .= " WHERE p.rowid = fd.fk_product AND p.fk_product_type = 1 AND fd.fk_facture = ".$factureid; diff --git a/htdocs/expedition/expedition.class.php b/htdocs/expedition/expedition.class.php index 8489f2e5078..50e1d31093b 100644 --- a/htdocs/expedition/expedition.class.php +++ b/htdocs/expedition/expedition.class.php @@ -30,7 +30,7 @@ class Expedition * Initialisation * */ - Function Expedition($DB) + function Expedition($DB) { $this->db = $DB; $this->lignes = array(); @@ -52,7 +52,7 @@ class Expedition * * */ - Function create($user) + function create($user) { require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; $error = 0; @@ -133,7 +133,7 @@ class Expedition * * */ - Function create_line($transaction, $commande_ligne_id, $qty) + function create_line($transaction, $commande_ligne_id, $qty) { $error = 0; @@ -166,7 +166,7 @@ class Expedition * Lit une commande * */ - Function fetch ($id) + function fetch ($id) { $sql = "SELECT e.rowid, e.date_creation, e.ref, e.fk_user_author, e.fk_statut, e.fk_commande, e.fk_entrepot"; $sql .= ", ".$this->db->pdate("e.date_expedition")." as date_expedition "; @@ -205,7 +205,7 @@ class Expedition * * */ - Function valid($user) + function valid($user) { require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; @@ -256,7 +256,7 @@ class Expedition * Ajoute un produit * */ - Function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0) + function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $p_product_id=0, $remise_percent=0) { if ($this->statut == 0) { @@ -302,7 +302,7 @@ class Expedition * Ajoute une ligne * */ - Function addline( $id, $qty ) + function addline( $id, $qty ) { $num = sizeof($this->lignes); $ligne = new ExpeditionLigne(); @@ -317,7 +317,7 @@ class Expedition * * */ - Function delete_line($idligne) + function delete_line($idligne) { if ($this->statut == 0) { @@ -339,7 +339,7 @@ class Expedition * Supprime la fiche * */ - Function delete() + function delete() { $this->db->begin(); @@ -369,7 +369,7 @@ class Expedition * * */ - Function classin($cat_id) + function classin($cat_id) { $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_projet = $cat_id"; $sql .= " WHERE rowid = $this->id;"; diff --git a/htdocs/expedition/liste.php b/htdocs/expedition/liste.php index 43cfb61d2df..eb7a60e2088 100644 --- a/htdocs/expedition/liste.php +++ b/htdocs/expedition/liste.php @@ -90,7 +90,7 @@ if ( $db->query($sql) ) print ''; - print_liste_field_titre_new ("Réf","liste.php","e.ref","","&socidp=$socidp",'width="15%"',$sortfield); + print_liste_field_titre_new ($langs->trans("Ref"),"liste.php","e.ref","","&socidp=$socidp",'width="15%"',$sortfield); print_liste_field_titre_new ("Date","liste.php","e.date_expedition","","&socidp=$socidp", 'width="25%" align="right" colspan="2"',$sortfield); diff --git a/htdocs/expedition/stats/expeditionstats.class.php b/htdocs/expedition/stats/expeditionstats.class.php index d5d248f6f1f..fe7ca2eb393 100644 --- a/htdocs/expedition/stats/expeditionstats.class.php +++ b/htdocs/expedition/stats/expeditionstats.class.php @@ -24,7 +24,7 @@ class ExpeditionStats { var $db ; - Function ExpeditionStats($DB) + function ExpeditionStats($DB) { $this->db = $DB; } @@ -32,7 +32,7 @@ class ExpeditionStats * Renvoie le nombre de expedition par année * */ - Function getNbExpeditionByYear() + function getNbExpeditionByYear() { $result = array(); $sql = "SELECT date_format(date_expedition,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."expedition GROUP BY dm DESC WHERE fk_statut > 0"; @@ -55,7 +55,7 @@ class ExpeditionStats * Renvoie le nombre de expedition par mois pour une année donnée * */ - Function getNbExpeditionByMonth($year) + function getNbExpeditionByMonth($year) { $result = array(); $sql = "SELECT date_format(date_expedition,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."expedition"; @@ -92,7 +92,7 @@ class ExpeditionStats } - Function getNbExpeditionByMonthWithPrevYear($year) + function getNbExpeditionByMonthWithPrevYear($year) { $data1 = $this->getNbExpeditionByMonth($year); $data2 = $this->getNbExpeditionByMonth($year - 1); diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php index 9555fd29e07..1cdb46b1f94 100644 --- a/htdocs/fichinter/fichinter.class.php +++ b/htdocs/fichinter/fichinter.class.php @@ -32,7 +32,7 @@ class Fichinter var $note; var $projet_id; - Function Fichinter($DB, $soc_idp="") + function Fichinter($DB, $soc_idp="") { $this->db = $DB ; $this->socidp = $soc_idp; @@ -40,7 +40,7 @@ class Fichinter $this->projet_id = 0; } - Function add_product($idproduct) + function add_product($idproduct) { if ($idproduct > 0) { @@ -53,7 +53,7 @@ class Fichinter * * */ - Function create() + function create() { /* * Insertion dans la base @@ -75,7 +75,7 @@ class Fichinter * * */ - Function update($id) + function update($id) { if (! strlen($this->projet_id)) { @@ -104,7 +104,7 @@ class Fichinter * * */ - Function get_new_num($prefix_comm) + function get_new_num($prefix_comm) { $sql = "SELECT max(ref) FROM ".MAIN_DB_PREFIX."fichinter WHERE ref like 'FI-".$prefix_comm."-%'"; @@ -141,7 +141,7 @@ class Fichinter * * */ - Function fetch($rowid) + function fetch($rowid) { $sql = "SELECT ref,note,fk_soc,fk_statut,duree,".$this->db->pdate(datei)."as di, fk_projet FROM ".MAIN_DB_PREFIX."fichinter WHERE rowid=$rowid;"; @@ -176,7 +176,7 @@ class Fichinter * * */ - Function valid($userid, $outputdir) + function valid($userid, $outputdir) { $action_notify = 1; // ne pas modifier cette valeur @@ -230,7 +230,7 @@ class Fichinter * * */ - Function fetch_client() + function fetch_client() { $client = new Societe($this->db); $client->fetch($this->societe_id); diff --git a/htdocs/fourn/facture/paiementfourn.class.php b/htdocs/fourn/facture/paiementfourn.class.php index 75e00afa3bf..3b2c9f7e140 100644 --- a/htdocs/fourn/facture/paiementfourn.class.php +++ b/htdocs/fourn/facture/paiementfourn.class.php @@ -41,7 +41,7 @@ class PaiementFourn * * */ - Function PaiementFourn($DB) + function PaiementFourn($DB) { $this->db = $DB ; } @@ -50,7 +50,7 @@ class PaiementFourn * * */ - Function create($user) + function create($user) { /* * Insertion dans la base @@ -99,7 +99,7 @@ class PaiementFourn * * */ - Function select($name, $filtre='', $id='') + function select($name, $filtre='', $id='') { $form = new Form($this->db); @@ -123,7 +123,7 @@ class PaiementFourn * * */ - Function delete($id) + function delete($id) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementfourn WHERE rowid = $id"; diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index 15216e402d3..f112a708667 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -28,7 +28,7 @@ class DolibarrModules * */ - Function DolibarrModules($DB) + function DolibarrModules($DB) { $this->db = $DB ; } @@ -38,7 +38,7 @@ class DolibarrModules * */ - Function _init($array_sql) + function _init($array_sql) { /* * Activation du module: @@ -146,7 +146,7 @@ class DolibarrModules * * */ - Function _remove($array_sql) + function _remove($array_sql) { $err = 0; diff --git a/htdocs/includes/modules/commande/mod_commande_ivoire.php b/htdocs/includes/modules/commande/mod_commande_ivoire.php index 58b7286e1d1..be3db1462b0 100644 --- a/htdocs/includes/modules/commande/mod_commande_ivoire.php +++ b/htdocs/includes/modules/commande/mod_commande_ivoire.php @@ -23,12 +23,12 @@ Class mod_commande_ivoire { - Function mod_commande_ivoire() + function mod_commande_ivoire() { $this->nom = "Ivoire"; } - Function info() + function info() { return "Renvoie le numéro sous la forme numérique C0M1, COM2, COM3, ..."; } diff --git a/htdocs/includes/modules/facture/pdf_adytek.modules.php b/htdocs/includes/modules/facture/pdf_adytek.modules.php index 6ef52f48f39..776f3d78416 100644 --- a/htdocs/includes/modules/facture/pdf_adytek.modules.php +++ b/htdocs/includes/modules/facture/pdf_adytek.modules.php @@ -24,7 +24,7 @@ Class pdf_adytek extends FPDF{ - Function pdf_adytek($db=0) + function pdf_adytek($db=0) { $this->db = $db; $this->description = "Modèle de facture avec remise et infos réglement à la mode de chez nous"; @@ -34,13 +34,13 @@ Class pdf_adytek extends FPDF{ /*! \brief Renvoi le dernier message d'erreur de création de facture */ - Function error() + function error() { return $this->error; } - Function write_pdf_file($facid) + function write_pdf_file($facid) { global $user; $fac = new Facture($this->db,"",$facid); @@ -263,7 +263,7 @@ Class pdf_adytek extends FPDF{ $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k)); } /////////////////////////////// - Function _tableau_compl(&$pdf, $fac) + function _tableau_compl(&$pdf, $fac) { $tab3_top = 240; $tab3_height = 18; @@ -287,7 +287,7 @@ Class pdf_adytek extends FPDF{ $pdf->MultiCell(20, 6, "Banque", 0, 'L', 0); } - Function _tableau_tot(&$pdf, $fac) + function _tableau_tot(&$pdf, $fac) { $tab2_top = 212; $tab2_hl = 5; @@ -360,7 +360,7 @@ Class pdf_adytek extends FPDF{ /* * */ - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',10); @@ -403,7 +403,7 @@ Class pdf_adytek extends FPDF{ } - Function _pagehead(&$pdf, $fac) + function _pagehead(&$pdf, $fac) { $tab4_top = 60; $tab4_hl = 6; diff --git a/htdocs/includes/modules/facture/pdf_bernique.modules.php b/htdocs/includes/modules/facture/pdf_bernique.modules.php index f53cb20b6bf..59b625f955f 100644 --- a/htdocs/includes/modules/facture/pdf_bernique.modules.php +++ b/htdocs/includes/modules/facture/pdf_bernique.modules.php @@ -24,7 +24,7 @@ Class pdf_bernique { - Function pdf_bernique($db=0) + function pdf_bernique($db=0) { $this->db = $db; $this->description = "Modèle pour les factures avec plusieurs taux de tva, inclus aussi le numéro de TVA Intracommunautaire"; @@ -34,13 +34,13 @@ Class pdf_bernique { /*! \brief Renvoi le dernier message d'erreur de création de facture */ - Function error() + function error() { return $this->error; } - Function write_pdf_file($facid) + function write_pdf_file($facid) { global $user; $fac = new Facture($this->db,"",$facid); @@ -189,7 +189,7 @@ Class pdf_bernique { * * */ - Function _tableau_compl(&$pdf, $fac) + function _tableau_compl(&$pdf, $fac) { $tab3_top = 240; $tab3_height = 18; @@ -218,7 +218,7 @@ Class pdf_bernique { $pdf->MultiCell(120, 5, $titre, 0, 'J'); } - Function _tableau_tot(&$pdf, $fac, $top, $height) + function _tableau_tot(&$pdf, $fac, $top, $height) { $tab2_top = $top + $height; $tab2_hl = 5; @@ -282,7 +282,7 @@ Class pdf_bernique { /* * */ - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',10); @@ -309,7 +309,7 @@ Class pdf_bernique { * * */ - Function _pagehead(&$pdf, $fac) + function _pagehead(&$pdf, $fac) { $pdf->SetXY(10,5); diff --git a/htdocs/includes/modules/facture/pdf_bigorneau.modules.php b/htdocs/includes/modules/facture/pdf_bigorneau.modules.php index a9e4205e52e..b708b7a88e0 100644 --- a/htdocs/includes/modules/facture/pdf_bigorneau.modules.php +++ b/htdocs/includes/modules/facture/pdf_bigorneau.modules.php @@ -24,7 +24,7 @@ Class pdf_bigorneau { - Function pdf_bigorneau($db=0) + function pdf_bigorneau($db=0) { $this->db = $db; $this->description = "Modèle de facture sans boite info réglement"; @@ -34,13 +34,13 @@ Class pdf_bigorneau { /*! \brief Renvoi le dernier message d'erreur de création de facture */ - Function error() + function error() { return $this->error; } - Function write_pdf_file($facid) + function write_pdf_file($facid) { global $user; $fac = new Facture($this->db,"",$facid); @@ -227,7 +227,7 @@ Class pdf_bigorneau { * * */ - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',12); @@ -254,7 +254,7 @@ Class pdf_bigorneau { * * */ - Function _pagehead(&$pdf, $fac) + function _pagehead(&$pdf, $fac) { $pdf->SetXY(10,5); diff --git a/htdocs/includes/modules/facture/pdf_bulot.modules.php b/htdocs/includes/modules/facture/pdf_bulot.modules.php index 2ba131e2370..de4ec5b3d7e 100644 --- a/htdocs/includes/modules/facture/pdf_bulot.modules.php +++ b/htdocs/includes/modules/facture/pdf_bulot.modules.php @@ -24,7 +24,7 @@ Class pdf_bulot { - Function pdf_bulot($db=0) + function pdf_bulot($db=0) { $this->db = $db; $this->description = "Modèle de facture avec remise et infos réglement"; @@ -34,13 +34,13 @@ Class pdf_bulot { /*! \brief Renvoi le dernier message d'erreur de création de facture */ - Function error() + function error() { return $this->error; } - Function write_pdf_file($facid) + function write_pdf_file($facid) { global $user; $fac = new Facture($this->db,"",$facid); @@ -193,7 +193,7 @@ Class pdf_bulot { * * */ - Function _tableau_compl(&$pdf, $fac) + function _tableau_compl(&$pdf, $fac) { $tab3_top = 240; $tab3_height = 18; @@ -217,7 +217,7 @@ Class pdf_bulot { $pdf->MultiCell(20, 6, "Banque", 0, 'L', 0); } - Function _tableau_tot(&$pdf, $fac) + function _tableau_tot(&$pdf, $fac) { $tab2_top = 212; $tab2_hl = 5; @@ -290,7 +290,7 @@ Class pdf_bulot { /* * */ - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',10); @@ -317,7 +317,7 @@ Class pdf_bulot { * * */ - Function _pagehead(&$pdf, $fac) + function _pagehead(&$pdf, $fac) { $pdf->SetXY(10,5); diff --git a/htdocs/includes/modules/facture/pdf_crabe.modules.php b/htdocs/includes/modules/facture/pdf_crabe.modules.php index 367fef16279..cef9f3b8b45 100644 --- a/htdocs/includes/modules/facture/pdf_crabe.modules.php +++ b/htdocs/includes/modules/facture/pdf_crabe.modules.php @@ -21,22 +21,29 @@ * */ -require_once(DOL_DOCUMENT_ROOT."/product.class.php"); - /*! \file pdf_crabe.modules.php - \brief Classe permettant de générer lune facture au modèle Crabe + \brief Fichier de la classe permettant de générer les factures au modèle Crabe \author Laurent Destailleur \version $Revision$ */ + +require_once(DOL_DOCUMENT_ROOT."/product.class.php"); + + + +/*! \class pdf_crabe + \brief Classe permettant de générer les factures au modèle Crabe +*/ + Class pdf_crabe { var $error=''; /*! - \brief Constructeur - \param db objet base de donnée + \brief Constructeur + \param db handler accès base de donnée */ - Function pdf_crabe($db=0) + function pdf_crabe($db) { $this->db = $db; $this->description = "Modèle de facture complet (Gère l'option fiscale de facturation TVA, le choix du mode de règlement à afficher, logo...)"; @@ -52,15 +59,16 @@ Class pdf_crabe { /*! \brief Renvoi le dernier message d'erreur de création de facture */ - Function error() + function error() { return $this->error; } /*! - \brief Fonction générant la facture sur le disque + \brief Fonction générant la facture sur le disque \param facid id de la facture à générer + \return int 1=ok, 0=ko \remarks Variables utilisées \remarks FAC_OUTPUTDIR \remarks FAC_PDF_LOGO @@ -77,9 +85,8 @@ Class pdf_crabe { \remarks MAIN_INFO_RCS \remarks MAIN_INFO_CAPITAL \remarks MAIN_INFO_TVAINTRA - \return 1=ok, 0=ko */ - Function write_pdf_file($facid) + function write_pdf_file($facid) { global $user; $fac = new Facture($this->db,"",$facid); @@ -304,7 +311,7 @@ Class pdf_crabe { * * */ - Function _tableau_versements(&$pdf, $fac) + function _tableau_versements(&$pdf, $fac) { $tab3_posx = 120; $tab3_top = 240; @@ -386,7 +393,7 @@ Class pdf_crabe { } - Function _tableau_tot(&$pdf, $fac, $deja_regle) + function _tableau_tot(&$pdf, $fac, $deja_regle) { $tab2_top = 207; $tab2_hl = 5; @@ -459,7 +466,7 @@ Class pdf_crabe { /* * Grille des lignes de factures */ - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->Rect( 10, $tab_top, 190, $tab_height); $pdf->line( 10, $tab_top+8, 200, $tab_top+8 ); @@ -489,7 +496,7 @@ Class pdf_crabe { * * */ - Function _pagehead(&$pdf, $fac) + function _pagehead(&$pdf, $fac) { $pdf->SetXY(10,5); diff --git a/htdocs/includes/modules/facture/pdf_tourteau.modules.php b/htdocs/includes/modules/facture/pdf_tourteau.modules.php index afe56949bc4..aebd7688af3 100644 --- a/htdocs/includes/modules/facture/pdf_tourteau.modules.php +++ b/htdocs/includes/modules/facture/pdf_tourteau.modules.php @@ -24,7 +24,7 @@ Class pdf_tourteau { - Function pdf_tourteau($db=0) + function pdf_tourteau($db=0) { $this->db = $db; $this->description = "Modèle de facture sans remise"; @@ -33,13 +33,13 @@ Class pdf_tourteau { /*! \brief Renvoi le dernier message d'erreur de création de facture */ - Function error() + function error() { return $this->error; } - Function write_pdf_file($facid) + function write_pdf_file($facid) { global $user; $fac = new Facture($this->db,"",$facid); @@ -278,7 +278,7 @@ Class pdf_tourteau { * * */ - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',12); @@ -305,7 +305,7 @@ Class pdf_tourteau { * * */ - Function _pagehead(&$pdf, $fac) + function _pagehead(&$pdf, $fac) { $pdf->SetXY(10,5); diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index 9a54a412287..6c93717a648 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -24,14 +24,14 @@ Class pdf_soleil { - Function pdf_soleil($db=0) + function pdf_soleil($db=0) { $this->db = $db; $this->description = "Modèle de fiche d'intervention stantdard"; } - Function write_pdf_file($id) + function write_pdf_file($id) { $fich = new Fichinter($this->db,"",$id); diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php index 431f188ec4c..97fe9aecc41 100644 --- a/htdocs/includes/modules/modAdherent.class.php +++ b/htdocs/includes/modules/modAdherent.class.php @@ -32,7 +32,7 @@ class modAdherent extends DolibarrModules * */ - Function modAdherent($DB) + function modAdherent($DB) { $this->db = $DB ; $this->numero = 310 ; @@ -95,7 +95,7 @@ class modAdherent extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -114,7 +114,7 @@ class modAdherent extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'adherent';" diff --git a/htdocs/includes/modules/modBanque.class.php b/htdocs/includes/modules/modBanque.class.php index 208a828c9cb..3a72650fc5a 100644 --- a/htdocs/includes/modules/modBanque.class.php +++ b/htdocs/includes/modules/modBanque.class.php @@ -31,7 +31,7 @@ class modBanque extends DolibarrModules * */ - Function modBanque($DB) + function modBanque($DB) { $this->db = $DB ; $this->numero = 85 ; @@ -55,7 +55,7 @@ class modBanque extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -73,7 +73,7 @@ class modBanque extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'banque';"); diff --git a/htdocs/includes/modules/modBoutique.class.php b/htdocs/includes/modules/modBoutique.class.php index aa48953d0e2..72e6ad8bde6 100644 --- a/htdocs/includes/modules/modBoutique.class.php +++ b/htdocs/includes/modules/modBoutique.class.php @@ -31,7 +31,7 @@ class modBoutique extends DolibarrModules * */ - Function modBoutique($DB) + function modBoutique($DB) { $this->db = $DB ; $this->numero = 86 ; @@ -62,7 +62,7 @@ class modBoutique extends DolibarrModules * * */ - Function init() + function init() { /* * Activation du module @@ -76,7 +76,7 @@ class modBoutique extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/modCaisse.class.php b/htdocs/includes/modules/modCaisse.class.php index b85435a0e9d..9d577ce6128 100644 --- a/htdocs/includes/modules/modCaisse.class.php +++ b/htdocs/includes/modules/modCaisse.class.php @@ -30,7 +30,7 @@ class modCaisse extends DolibarrModules * */ - Function modCaisse($DB) + function modCaisse($DB) { $this->db = $DB ; $this->numero = 84 ; @@ -54,7 +54,7 @@ class modCaisse extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -72,7 +72,7 @@ class modCaisse extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'caisse';"); diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php index a2f567acc18..86bf2b7bb12 100644 --- a/htdocs/includes/modules/modCommande.class.php +++ b/htdocs/includes/modules/modCommande.class.php @@ -31,7 +31,7 @@ class modCommande extends DolibarrModules * */ - Function modCommande($DB) + function modCommande($DB) { $this->db = $DB ; $this->numero = 25 ; @@ -60,7 +60,7 @@ class modCommande extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -80,7 +80,7 @@ class modCommande extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php index 3f498dad460..aea5545f8a3 100644 --- a/htdocs/includes/modules/modCommercial.class.php +++ b/htdocs/includes/modules/modCommercial.class.php @@ -31,7 +31,7 @@ class modCommercial extends DolibarrModules * */ - Function modCommercial($DB) + function modCommercial($DB) { $this->db = $DB ; $this->numero = 2 ; @@ -59,7 +59,7 @@ class modCommercial extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -72,7 +72,7 @@ class modCommercial extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/modComptabilite.class.php b/htdocs/includes/modules/modComptabilite.class.php index d73499d4e18..ad0ad380b5c 100644 --- a/htdocs/includes/modules/modComptabilite.class.php +++ b/htdocs/includes/modules/modComptabilite.class.php @@ -31,7 +31,7 @@ class modComptabilite extends DolibarrModules * */ - Function modComptabilite($DB) + function modComptabilite($DB) { $this->db = $DB ; $this->numero = 10 ; @@ -58,7 +58,7 @@ class modComptabilite extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -78,7 +78,7 @@ class modComptabilite extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'compta';"); diff --git a/htdocs/includes/modules/modContrat.class.php b/htdocs/includes/modules/modContrat.class.php index eb6841197aa..93e6d45b59e 100644 --- a/htdocs/includes/modules/modContrat.class.php +++ b/htdocs/includes/modules/modContrat.class.php @@ -30,7 +30,7 @@ class modContrat extends DolibarrModules * */ - Function modcontrat($DB) + function modcontrat($DB) { $this->db = $DB ; $this->numero = 54 ; @@ -55,7 +55,7 @@ class modContrat extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -70,7 +70,7 @@ class modContrat extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( diff --git a/htdocs/includes/modules/modDon.class.php b/htdocs/includes/modules/modDon.class.php index 377d0d1575d..36f50121531 100644 --- a/htdocs/includes/modules/modDon.class.php +++ b/htdocs/includes/modules/modDon.class.php @@ -29,7 +29,7 @@ class modDon extends DolibarrModules * Initialisation * */ - Function modDon($DB) + function modDon($DB) { $this->db = $DB ; $this->numero = 700 ; @@ -61,7 +61,7 @@ class modDon extends DolibarrModules * * */ - Function init() + function init() { /* * Activation du module @@ -75,7 +75,7 @@ class modDon extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/modExpedition.class.php b/htdocs/includes/modules/modExpedition.class.php index 307d4ad0eb2..c080697c976 100644 --- a/htdocs/includes/modules/modExpedition.class.php +++ b/htdocs/includes/modules/modExpedition.class.php @@ -31,7 +31,7 @@ class modExpedition extends DolibarrModules * */ - Function modExpedition($DB) + function modExpedition($DB) { $this->db = $DB ; $this->numero = 80 ; @@ -58,7 +58,7 @@ class modExpedition extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -78,7 +78,7 @@ class modExpedition extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( diff --git a/htdocs/includes/modules/modExternalRss.class.php b/htdocs/includes/modules/modExternalRss.class.php index 0e7ec7bba7a..83ce79533b8 100644 --- a/htdocs/includes/modules/modExternalRss.class.php +++ b/htdocs/includes/modules/modExternalRss.class.php @@ -30,7 +30,7 @@ class modExternalRss extends DolibarrModules * */ - Function modExternalRss($DB) + function modExternalRss($DB) { $this->db = $DB ; $this->numero = 320; @@ -63,7 +63,7 @@ class modExternalRss extends DolibarrModules * */ - Function init() + function init() { /* * Activation du module @@ -77,7 +77,7 @@ class modExternalRss extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/modFacture.class.php b/htdocs/includes/modules/modFacture.class.php index d2d32a7fcf5..cc895034b65 100644 --- a/htdocs/includes/modules/modFacture.class.php +++ b/htdocs/includes/modules/modFacture.class.php @@ -30,7 +30,7 @@ class modFacture extends DolibarrModules * */ - Function modFacture($DB) + function modFacture($DB) { $this->db = $DB ; $this->numero = 30 ; @@ -105,7 +105,7 @@ class modFacture extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -127,7 +127,7 @@ class modFacture extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'facture';" diff --git a/htdocs/includes/modules/modFicheinter.class.php b/htdocs/includes/modules/modFicheinter.class.php index 5d594303ad5..8022872cff2 100644 --- a/htdocs/includes/modules/modFicheinter.class.php +++ b/htdocs/includes/modules/modFicheinter.class.php @@ -30,7 +30,7 @@ class modFicheinter extends DolibarrModules * */ - Function modFicheinter($DB) + function modFicheinter($DB) { $this->db = $DB ; $this->numero = 70 ; @@ -57,7 +57,7 @@ class modFicheinter extends DolibarrModules * */ - Function init() + function init() { /* * Activation du module @@ -79,7 +79,7 @@ class modFicheinter extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'ficheinter';"); diff --git a/htdocs/includes/modules/modFournisseur.class.php b/htdocs/includes/modules/modFournisseur.class.php index 6d5761f816c..a47f9bcc0f3 100644 --- a/htdocs/includes/modules/modFournisseur.class.php +++ b/htdocs/includes/modules/modFournisseur.class.php @@ -31,7 +31,7 @@ class modFournisseur extends DolibarrModules * */ - Function modFournisseur($DB) + function modFournisseur($DB) { $this->db = $DB ; $this->numero = 40 ; @@ -57,7 +57,7 @@ class modFournisseur extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -70,7 +70,7 @@ class modFournisseur extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/modLdap.class.php b/htdocs/includes/modules/modLdap.class.php index 94dbfe794b2..59c11632c96 100644 --- a/htdocs/includes/modules/modLdap.class.php +++ b/htdocs/includes/modules/modLdap.class.php @@ -28,7 +28,7 @@ class modLdap extends DolibarrModules * Initialisation * */ - Function modLdap($DB) + function modLdap($DB) { $this->db = $DB ; $this->numero = 200 ; @@ -54,7 +54,7 @@ class modLdap extends DolibarrModules * * */ - Function init() + function init() { /* * Activation du module @@ -69,7 +69,7 @@ class modLdap extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/modPostnuke.class.php b/htdocs/includes/modules/modPostnuke.class.php index 6e0c72579d3..750ab1c6efa 100644 --- a/htdocs/includes/modules/modPostnuke.class.php +++ b/htdocs/includes/modules/modPostnuke.class.php @@ -30,7 +30,7 @@ class modPostnuke extends DolibarrModules * */ - Function modPostnuke($DB) + function modPostnuke($DB) { $this->db = $DB ; $this->numero = 210; @@ -54,7 +54,7 @@ class modPostnuke extends DolibarrModules * */ - Function init() + function init() { /* * Activation du module @@ -69,7 +69,7 @@ class modPostnuke extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/modProduit.class.php b/htdocs/includes/modules/modProduit.class.php index c3cc66fcd8a..4ef42533ccd 100644 --- a/htdocs/includes/modules/modProduit.class.php +++ b/htdocs/includes/modules/modProduit.class.php @@ -31,7 +31,7 @@ class modProduit extends DolibarrModules * */ - Function modProduit($DB) + function modProduit($DB) { $this->db = $DB ; $this->numero = 50 ; @@ -57,7 +57,7 @@ class modProduit extends DolibarrModules * * */ - Function init() + function init() { /* * Activation du module @@ -79,7 +79,7 @@ class modProduit extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'produit';", diff --git a/htdocs/includes/modules/modProjet.class.php b/htdocs/includes/modules/modProjet.class.php index 1054aac04f6..1c751429077 100644 --- a/htdocs/includes/modules/modProjet.class.php +++ b/htdocs/includes/modules/modProjet.class.php @@ -31,7 +31,7 @@ class modProjet extends DolibarrModules * */ - Function modProjet($DB) + function modProjet($DB) { $this->db = $DB ; $this->numero = 400 ; @@ -55,7 +55,7 @@ class modProjet extends DolibarrModules * */ - Function init() + function init() { /* * Activation du module @@ -77,7 +77,7 @@ class modProjet extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array("DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'projet';"); diff --git a/htdocs/includes/modules/modPropale.class.php b/htdocs/includes/modules/modPropale.class.php index 56f7e95d87b..55321a697b7 100644 --- a/htdocs/includes/modules/modPropale.class.php +++ b/htdocs/includes/modules/modPropale.class.php @@ -31,7 +31,7 @@ class modPropale extends DolibarrModules * */ - Function modPropale($DB) + function modPropale($DB) { $this->db = $DB ; $this->numero = 20 ; @@ -76,7 +76,7 @@ class modPropale extends DolibarrModules * */ - Function init() + function init() { /* * Permissions et valeurs par défaut @@ -100,7 +100,7 @@ class modPropale extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'propale';" diff --git a/htdocs/includes/modules/modService.class.php b/htdocs/includes/modules/modService.class.php index 7ef1545ee0c..e6238c2b4d6 100644 --- a/htdocs/includes/modules/modService.class.php +++ b/htdocs/includes/modules/modService.class.php @@ -31,7 +31,7 @@ class modService extends DolibarrModules * */ - Function modService($DB) + function modService($DB) { $this->db = $DB ; $this->numero = 53 ; @@ -58,7 +58,7 @@ class modService extends DolibarrModules * */ - Function init() + function init() { /* * Activation du module @@ -80,7 +80,7 @@ class modService extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'produit';", diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php index e365b1bdd4f..f8ff01c061d 100644 --- a/htdocs/includes/modules/modSociete.class.php +++ b/htdocs/includes/modules/modSociete.class.php @@ -30,7 +30,7 @@ class modSociete extends DolibarrModules * Initialisation * */ - Function modSociete($DB) + function modSociete($DB) { $this->db = $DB ; $this->numero = 1 ; @@ -54,7 +54,7 @@ class modSociete extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -72,7 +72,7 @@ class modSociete extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."rights_def WHERE module = 'societe';", diff --git a/htdocs/includes/modules/modStock.class.php b/htdocs/includes/modules/modStock.class.php index e62d0f00218..1eebc968dbd 100644 --- a/htdocs/includes/modules/modStock.class.php +++ b/htdocs/includes/modules/modStock.class.php @@ -31,7 +31,7 @@ class modStock extends DolibarrModules * */ - Function modStock($DB) + function modStock($DB) { $this->db = $DB ; $this->numero = 52 ; @@ -56,7 +56,7 @@ class modStock extends DolibarrModules * */ - Function init() + function init() { /* * Permissions @@ -71,7 +71,7 @@ class modStock extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array( diff --git a/htdocs/includes/modules/modWebcalendar.class.php b/htdocs/includes/modules/modWebcalendar.class.php index da1af0b8084..7c1f87711a6 100644 --- a/htdocs/includes/modules/modWebcalendar.class.php +++ b/htdocs/includes/modules/modWebcalendar.class.php @@ -31,7 +31,7 @@ class modWebcalendar extends DolibarrModules * */ - Function modWebcalendar($DB) + function modWebcalendar($DB) { $this->db = $DB ; $this->numero = 410 ; @@ -58,7 +58,7 @@ class modWebcalendar extends DolibarrModules * */ - Function init() + function init() { /* * Activation du module @@ -73,7 +73,7 @@ class modWebcalendar extends DolibarrModules * * */ - Function remove() + function remove() { $sql = array(); diff --git a/htdocs/includes/modules/propale/mod_propale_ivoire.php b/htdocs/includes/modules/propale/mod_propale_ivoire.php index 18c24cfcade..17cafce5575 100644 --- a/htdocs/includes/modules/propale/mod_propale_ivoire.php +++ b/htdocs/includes/modules/propale/mod_propale_ivoire.php @@ -23,7 +23,7 @@ Class mod_propale_ivoire { - Function info() + function info() { return "Renvoie le numéro sous la forme PR0012"; } diff --git a/htdocs/includes/modules/propale/mod_propale_jade.php b/htdocs/includes/modules/propale/mod_propale_jade.php index d4f44e6941d..67326ea2af0 100644 --- a/htdocs/includes/modules/propale/mod_propale_jade.php +++ b/htdocs/includes/modules/propale/mod_propale_jade.php @@ -23,7 +23,7 @@ Class mod_propale_jade { - Function info() + function info() { return "Renvoie le numéro sous la forme PROP2, PROP3"; } diff --git a/htdocs/includes/modules/propale/pdf_propale_adytek.modules.php b/htdocs/includes/modules/propale/pdf_propale_adytek.modules.php index d0b10dec889..90e6198b536 100644 --- a/htdocs/includes/modules/propale/pdf_propale_adytek.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_adytek.modules.php @@ -24,14 +24,14 @@ Class pdf_propale_adytek { - Function pdf_propale_adytek($db=0) + function pdf_propale_adytek($db=0) { $this->db = $db; $this->name = "Adytek"; $this->description = "Modèle de proposition Adytek"; } - Function write_pdf_file($id) + function write_pdf_file($id) { global $user; $propale = new Propal($this->db,"",$id); @@ -189,7 +189,7 @@ Class pdf_propale_adytek } } - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',11); @@ -234,7 +234,7 @@ Class pdf_propale_adytek } - Function _pagehead(&$pdf, $propale) + function _pagehead(&$pdf, $propale) { //insertion de la variable FAC_PDF_INTITULE FAC_PDF_MEL FAC_PDF_WWW FAC_PDF_LOGO diff --git a/htdocs/includes/modules/propale/pdf_propale_bleu.modules.php b/htdocs/includes/modules/propale/pdf_propale_bleu.modules.php index 8548e660d8f..78b0f461dc6 100644 --- a/htdocs/includes/modules/propale/pdf_propale_bleu.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_bleu.modules.php @@ -24,14 +24,14 @@ Class pdf_propale_bleu { - Function pdf_propale_bleu($db=0) + function pdf_propale_bleu($db=0) { $this->db = $db; $this->name = "bleu"; $this->description = "Modèle de propale sans remise."; } - Function write_pdf_file($id) + function write_pdf_file($id) { global $user; $propale = new Propal($this->db,"",$id); @@ -175,7 +175,7 @@ Class pdf_propale_bleu } } - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',11); @@ -205,7 +205,7 @@ Class pdf_propale_bleu } - Function _pagehead(&$pdf, $propale) + function _pagehead(&$pdf, $propale) { $pdf->SetXY(10,5); if (defined("FAC_PDF_INTITULE")) diff --git a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php index f8a314ee039..7ed55af0ea0 100644 --- a/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_jaune.modules.php @@ -24,14 +24,14 @@ Class pdf_propale_jaune { - Function pdf_propale_jaune($db=0) + function pdf_propale_jaune($db=0) { $this->db = $db; $this->name = "Jaune"; $this->description = "Modèle de proposition Jaune"; } - Function write_pdf_file($id) + function write_pdf_file($id) { global $user; $propale = new Propal($this->db,"",$id); @@ -173,7 +173,7 @@ Class pdf_propale_jaune } } - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',11); @@ -208,7 +208,7 @@ Class pdf_propale_jaune $pdf->Text(10,280, $titre); } - Function _pagehead(&$pdf, $propale) + function _pagehead(&$pdf, $propale) { $pdf->SetXY(12,42); if (defined("FAC_PDF_INTITULE")) diff --git a/htdocs/includes/modules/propale/pdf_propale_rouge.modules.php b/htdocs/includes/modules/propale/pdf_propale_rouge.modules.php index 55ccc929ef6..f03f9f0e7dd 100644 --- a/htdocs/includes/modules/propale/pdf_propale_rouge.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_rouge.modules.php @@ -25,14 +25,14 @@ Class pdf_propale_rouge { - Function pdf_propale_rouge($db=0) + function pdf_propale_rouge($db=0) { $this->db = $db; $this->name = "rouge"; $this->description = "Modèle de propale par défaut"; } - Function write_pdf_file($id) + function write_pdf_file($id) { global $user; $propale = new Propal($this->db,"",$id); @@ -197,7 +197,7 @@ Class pdf_propale_rouge } } - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $pdf->SetFont('Arial','',11); @@ -227,7 +227,7 @@ Class pdf_propale_rouge } - Function _pagehead(&$pdf, $propale) + function _pagehead(&$pdf, $propale) { $pdf->SetXY(10,5); if (defined("FAC_PDF_INTITULE")) diff --git a/htdocs/includes/modules/propale/pdf_propale_vert.modules.php b/htdocs/includes/modules/propale/pdf_propale_vert.modules.php index 3525d419122..503607236bc 100644 --- a/htdocs/includes/modules/propale/pdf_propale_vert.modules.php +++ b/htdocs/includes/modules/propale/pdf_propale_vert.modules.php @@ -24,14 +24,14 @@ Class pdf_propale_vert { - Function pdf_propale_vert($db=0) + function pdf_propale_vert($db=0) { $this->db = $db; $this->name = "vert"; $this->description = "Affichage de la remise par produit"; } - Function write_pdf_file($id) + function write_pdf_file($id) { global $user; $propale = new Propal($this->db,"",$id); @@ -191,7 +191,7 @@ Class pdf_propale_vert } } - Function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY) { $yt = 100; $pdf->SetFont('Arial','',10); @@ -237,7 +237,7 @@ Class pdf_propale_vert $pdf->MultiCell(120,3,$texte,0,'J'); } - Function _pagehead(&$pdf, $propale) + function _pagehead(&$pdf, $propale) { $pdf->SetXY(10,5); if (defined("FAC_PDF_INTITULE")) diff --git a/htdocs/includes/modules/rapport/pdf_paiement.class.php b/htdocs/includes/modules/rapport/pdf_paiement.class.php index 352b251c188..52e9aaf0ba2 100644 --- a/htdocs/includes/modules/rapport/pdf_paiement.class.php +++ b/htdocs/includes/modules/rapport/pdf_paiement.class.php @@ -23,7 +23,7 @@ Class pdf_paiement { - Function pdf_paiement($db=0) + function pdf_paiement($db=0) { $this->db = $db; $this->description = "Liste des paiements"; @@ -38,7 +38,7 @@ Class pdf_paiement { } - Function print_link() + function print_link() { if (file_exists($this->file)) { @@ -88,7 +88,7 @@ Class pdf_paiement { } - Function Body(&$pdf, $page, $lines) + function Body(&$pdf, $page, $lines) { $pdf->SetFont('Arial','', 9); $oldprowid = 0; @@ -148,7 +148,7 @@ Class pdf_paiement { } } - Function write_pdf_file($_dir, $month, $year) + function write_pdf_file($_dir, $month, $year) { if (! file_exists($_dir)) { diff --git a/htdocs/includes/pear/Auth/Auth.php b/htdocs/includes/pear/Auth/Auth.php index 4f9ff737542..8f5d92f1ca5 100644 --- a/htdocs/includes/pear/Auth/Auth.php +++ b/htdocs/includes/pear/Auth/Auth.php @@ -84,11 +84,11 @@ class DOLIAuth { var $storage = ""; /** - * Function defined by the user, that creates the login screen + * function defined by the user, that creates the login screen * * @var string */ - var $loginFunction = ""; + var $loginfunction = ""; /** * Should the login form be displayed? @@ -151,10 +151,10 @@ class DOLIAuth { * @param boolean Should the login form be displayed if neccessary? * @return void */ - function DOLIAuth($storageDriver, $options = "", $loginFunction = "", $showLogin = true) + function DOLIAuth($storageDriver, $options = "", $loginfunction = "", $showLogin = true) { - if ($loginFunction != "" && function_exists($loginFunction)) { - $this->loginFunction = $loginFunction; + if ($loginfunction != "" && function_exists($loginfunction)) { + $this->loginfunction = $loginfunction; } if (is_bool($showLogin)) { @@ -562,8 +562,8 @@ class DOLIAuth { */ function drawLogin($username = "") { - if ($this->loginFunction != "") { - call_user_func($this->loginFunction, $username, $this->status); + if ($this->loginfunction != "") { + call_user_func($this->loginfunction, $username, $this->status); } else { $server = &$this->_importGlobalVariable("server"); diff --git a/htdocs/includes/pear/Auth/Container/DB.php b/htdocs/includes/pear/Auth/Container/DB.php index 1a6d2d396df..f6da86614c2 100644 --- a/htdocs/includes/pear/Auth/Container/DB.php +++ b/htdocs/includes/pear/Auth/Container/DB.php @@ -327,9 +327,9 @@ class Auth_Container_DB extends Auth_Container function addUser($username, $password, $additional = "") { if (function_exists($this->options['cryptType'])) { - $cryptFunction = $this->options['cryptType']; + $cryptfunction = $this->options['cryptType']; } else { - $cryptFunction = 'md5'; + $cryptfunction = 'md5'; } $additional_key = ''; @@ -348,7 +348,7 @@ class Auth_Container_DB extends Auth_Container $this->options['passwordcol'], $additional_key, $username, - $cryptFunction($password), + $cryptfunction($password), $additional_value ); diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index f57324385cd..46cb6576418 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -23,7 +23,7 @@ $etapes=5; $docurl = 'documentation'; -Function pHeader($soutitre,$next) +function pHeader($soutitre,$next) { print ' @@ -46,7 +46,7 @@ print '

'.$soutitre.'
} -Function pFooter($nonext=0) +function pFooter($nonext=0) { print '
'; if ($nonext == 0) @@ -60,7 +60,7 @@ print ' } -Function dolibarr_syslog($message) +function dolibarr_syslog($message) { define_syslog_variables(); diff --git a/htdocs/lib/functions.inc.php b/htdocs/lib/functions.inc.php index b0bf29ccc19..bf1025c3742 100644 --- a/htdocs/lib/functions.inc.php +++ b/htdocs/lib/functions.inc.php @@ -56,7 +56,7 @@ function dolibarr_syslog($message) \brief Affiche le header d'une fiche \param links liens \param active 0 par défaut - \param title + \param title titre ("" par defaut) */ @@ -1154,7 +1154,7 @@ function print_heure_select($prefix,$begin=1,$end=23) { /*! \brief Fonction servant a afficher une durée dans une liste déroulante - \param prefix + \param prefix prefix */ function print_duree_select($prefix) @@ -1203,8 +1203,8 @@ function price($amount, $html=0) /*! \brief Fonction qui convertit des euros en francs - \param euros somme en euro à convertir - \return price + \param euros somme en euro à convertir + \return price prix converti et formaté */ function francs($euros) @@ -1249,56 +1249,6 @@ function yn($yesno, $case=1) { return "unknown"; } -/*! - \brief Fonction qui affiche des statistiques - \param basename - \param bc1 - \param bc2 - \param ftc - \param jour -*/ -function stat_print($basename,$bc1,$bc2,$ftc, $jour) { - - $db = pg_Connect("","","","","$basename"); - if (!$db) { - echo "Pas de connexion a la base\n"; - exit ; - } - - $offset = $jour * 9; - - $sql="SELECT s.date, s.nb, l.libelle FROM stat_base as s, stat_cat as l WHERE s.cat = l.id ORDER by s.date DESC, s.cat ASC LIMIT 9 OFFSET $offset"; - - $result = $db->query($sql); - if (!$result) { - print "Erreur SELECT

$sql


"; - return 1; - } - - print ""; - print ""; - print ""; - print ""; - - $num = $db->num_rows(); - $i = 0; - - $tag = 1; - while ( $i < $num) { - $obj = $db->fetch_object( $i); - - $tag = !$tag; - - print "\n"; - print "\n"; - $i++; - } - print "
base $basenamelibelle
$obj->date$obj->libelle$obj->nb
"; - $db->free(); - - $db->close(); - -} /*! \brief Fonction qui permet d'envoyer les infos dans un fichier de log diff --git a/htdocs/lib/webcal.class.php b/htdocs/lib/webcal.class.php index b2ffa2ea6a0..fcd3d581a27 100644 --- a/htdocs/lib/webcal.class.php +++ b/htdocs/lib/webcal.class.php @@ -111,7 +111,7 @@ class Webcal { /*! \brief obtient l'id suivant dans le webcalendar - \retval id retourne l'id suivant dans le webcalendar + \return id retourne l'id suivant dans le webcalendar */ diff --git a/htdocs/postnuke/articles/pnarticle.class.php b/htdocs/postnuke/articles/pnarticle.class.php index 986c665678a..6f9693a3ec9 100644 --- a/htdocs/postnuke/articles/pnarticle.class.php +++ b/htdocs/postnuke/articles/pnarticle.class.php @@ -28,7 +28,7 @@ class pnArticle { var $titre; var $body; - Function pnArticle($DB, $id=0) { + function pnArticle($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -37,7 +37,7 @@ class pnArticle { * * */ - Function update($id, $user) + function update($id, $user) { if (strlen($this->annee)==0) @@ -66,7 +66,7 @@ class pnArticle { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT p.pn_sid, p.pn_title, p.pn_hometext FROM " . PN_DB_NAME . "." . PN_TABLE_STORIES_NAME . " as p"; diff --git a/htdocs/product/album/album.class.php b/htdocs/product/album/album.class.php index cc19fdec5d8..97bedd920a4 100644 --- a/htdocs/product/album/album.class.php +++ b/htdocs/product/album/album.class.php @@ -32,7 +32,7 @@ class Album { var $price ; var $status ; - Function Album($DB, $id=0) { + function Album($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -41,7 +41,7 @@ class Album { * * */ - Function create($user) { + function create($user) { if (strlen($this->annee)) { @@ -106,7 +106,7 @@ class Album { * * */ - Function linkga($id, $gaid) + function linkga($id, $gaid) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."album_to_groupart (fk_album, fk_groupart) values ($id, $gaid)"; @@ -121,7 +121,7 @@ class Album { * * */ - Function liste_groupart() + function liste_groupart() { $ga = array(); @@ -156,7 +156,7 @@ class Album { * * */ - Function updateosc() + function updateosc() { $sql = "UPDATE ".DB_NAME_OSC.".products_description "; @@ -224,7 +224,7 @@ class Album { * * */ - Function update($id, $user) + function update($id, $user) { if (strlen($this->annee)==0) @@ -251,7 +251,7 @@ class Album { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid, ref, annee, osc_id, title, description FROM ".MAIN_DB_PREFIX."album WHERE rowid = $id"; @@ -303,7 +303,7 @@ class Album { * * */ - Function delete($user) { + function delete($user) { $sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc "; diff --git a/htdocs/product/categorie/categorie.class.php b/htdocs/product/categorie/categorie.class.php index 6f5c0709445..d3e1760b498 100644 --- a/htdocs/product/categorie/categorie.class.php +++ b/htdocs/product/categorie/categorie.class.php @@ -32,7 +32,7 @@ class Categorie { var $price ; var $status ; - Function Categorie($DB, $id=0) { + function Categorie($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -41,7 +41,7 @@ class Categorie { * * */ - Function create($user) { + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."album (osc_id, fk_user_author) VALUES ($idosc, ".$user->id.")"; @@ -65,7 +65,7 @@ class Categorie { * * */ - Function linkga($id, $gaid) + function linkga($id, $gaid) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."album_to_groupart (fk_album, fk_groupart) values ($id, $gaid)"; @@ -80,7 +80,7 @@ class Categorie { * * */ - Function liste_array() + function liste_array() { $cl = array(); @@ -115,7 +115,7 @@ class Categorie { /* * */ - Function printc($id, $level) + function printc($id, $level) { $cr = array(); $cat = new Categorie($this->db); @@ -150,7 +150,7 @@ class Categorie { * * */ - Function liste_childs_array() + function liste_childs_array() { $ga = array(); @@ -191,7 +191,7 @@ class Categorie { * * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."album "; @@ -211,7 +211,7 @@ class Categorie { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT c.categories_id, cd.categories_name, c.parent_id"; $sql .= " FROM ".DB_NAME_OSC.".categories as c,".DB_NAME_OSC.".categories_description as cd"; @@ -239,7 +239,7 @@ class Categorie { * * */ - Function delete($user) { + function delete($user) { $sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc "; diff --git a/htdocs/product/categorie/index.php b/htdocs/product/categorie/index.php index f408b96ab7c..c886732d067 100644 --- a/htdocs/product/categorie/index.php +++ b/htdocs/product/categorie/index.php @@ -164,7 +164,7 @@ llxFooter("Dernière modification $Date$ révision $Revision$db = $DB; $this->id = $id ; } @@ -38,7 +38,7 @@ class Concert { * * */ - Function create($user) + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."concert (fk_user_author) VALUES (".$user->id.")"; @@ -64,7 +64,7 @@ class Concert { * * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."concert "; @@ -86,7 +86,7 @@ class Concert { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid,".$this->db->pdate("date_concert")." as dc, description, fk_groupart, fk_lieu_concert"; $sql .= " FROM ".MAIN_DB_PREFIX."concert WHERE rowid = $id"; @@ -119,7 +119,7 @@ class Concert { * * */ - Function liste_groupart() + function liste_groupart() { $ga = array(); diff --git a/htdocs/product/concert/lieuconcert.class.php b/htdocs/product/concert/lieuconcert.class.php index ea4300971af..8a51c29eb05 100644 --- a/htdocs/product/concert/lieuconcert.class.php +++ b/htdocs/product/concert/lieuconcert.class.php @@ -28,7 +28,7 @@ class LieuConcert { var $ville; var $description; - Function LieuConcert($DB, $id=0) + function LieuConcert($DB, $id=0) { $this->db = $DB; $this->id = $id ; @@ -38,7 +38,7 @@ class LieuConcert { * * */ - Function create($user) + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."lieu_concert (fk_user_author) VALUES (".$user->id.")"; @@ -64,7 +64,7 @@ class LieuConcert { * * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."lieu_concert "; @@ -85,7 +85,7 @@ class LieuConcert { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid, nom, ville, description FROM ".MAIN_DB_PREFIX."lieu_concert WHERE rowid = $id"; @@ -111,7 +111,7 @@ class LieuConcert { * * */ - Function delete($user) { + function delete($user) { @@ -122,7 +122,7 @@ class LieuConcert { * * */ - Function liste() + function liste() { $ga = array(); diff --git a/htdocs/product/critiques/critique.class.php b/htdocs/product/critiques/critique.class.php index 5605d28ac26..c335aa43258 100644 --- a/htdocs/product/critiques/critique.class.php +++ b/htdocs/product/critiques/critique.class.php @@ -26,7 +26,7 @@ class Critique { var $id ; var $nom; - Function Critique($DB, $id=0) { + function Critique($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -35,7 +35,7 @@ class Critique { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT r.reviews_id, r.reviews_rating, d.reviews_text, p.products_name"; diff --git a/htdocs/product/groupart/groupart.class.php b/htdocs/product/groupart/groupart.class.php index d72d6ad8115..ce2f62b6dd4 100644 --- a/htdocs/product/groupart/groupart.class.php +++ b/htdocs/product/groupart/groupart.class.php @@ -29,7 +29,7 @@ class Groupart { var $desc ; var $grar ; - Function Groupart($DB, $id=0) { + function Groupart($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -38,7 +38,7 @@ class Groupart { * * */ - Function create($user) { + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."groupart (fk_user_author) VALUES (".$user->id.")"; @@ -64,7 +64,7 @@ class Groupart { * * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."groupart "; @@ -84,7 +84,7 @@ class Groupart { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT rowid, nom, groupart, description FROM ".MAIN_DB_PREFIX."groupart WHERE rowid = $id"; @@ -109,7 +109,7 @@ class Groupart { * * */ - Function liste_albums () + function liste_albums () { $ga = array(); @@ -143,7 +143,7 @@ class Groupart { * * */ - Function updateosc() + function updateosc() { $albs = array(); $albs = $this->liste_albums(); @@ -159,7 +159,7 @@ class Groupart { * * */ - Function liste_array () + function liste_array () { $ga = array(); @@ -196,7 +196,7 @@ class Groupart { * * */ - Function delete($user) { + function delete($user) { $sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc "; diff --git a/htdocs/product/promotion/promotion.class.php b/htdocs/product/promotion/promotion.class.php index b1d01391d8c..9362d609651 100644 --- a/htdocs/product/promotion/promotion.class.php +++ b/htdocs/product/promotion/promotion.class.php @@ -32,7 +32,7 @@ class Promotion { var $price ; var $status ; - Function Promotion($DB, $id=0) { + function Promotion($DB, $id=0) { $this->db = $DB; $this->id = $id ; } @@ -41,7 +41,7 @@ class Promotion { * * */ - Function create($user, $pid, $percent) { + function create($user, $pid, $percent) { $sql = "SELECT products_price "; $sql .= " FROM ".DB_NAME_OSC.".products as p"; @@ -79,7 +79,7 @@ class Promotion { * * */ - Function update($id, $user) + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."album "; $sql .= " SET title = '" . trim($this->titre) ."'"; @@ -98,7 +98,7 @@ class Promotion { * * */ - Function set_active($id) + function set_active($id) { $sql = "UPDATE ".DB_NAME_OSC.".specials"; $sql .= " SET status = 1"; @@ -114,7 +114,7 @@ class Promotion { /* * */ - Function set_inactive($id) + function set_inactive($id) { $sql = "UPDATE ".DB_NAME_OSC.".specials"; $sql .= " SET status = 0"; @@ -132,7 +132,7 @@ class Promotion { * * */ - Function fetch ($id) { + function fetch ($id) { $sql = "SELECT c.categories_id, cd.categories_name, c.parent_id"; $sql .= " FROM ".DB_NAME_OSC.".categories as c,".DB_NAME_OSC.".categories_description as cd"; @@ -160,7 +160,7 @@ class Promotion { * * */ - Function delete($user) { + function delete($user) { $sql = "DELETE FROM ".DB_NAME_OSC.".products WHERE products_id = $idosc "; diff --git a/htdocs/product/stats/commandestats.class.php b/htdocs/product/stats/commandestats.class.php index 4d2b2d86fbb..2832f479495 100644 --- a/htdocs/product/stats/commandestats.class.php +++ b/htdocs/product/stats/commandestats.class.php @@ -24,7 +24,7 @@ class CommandeStats { var $db ; - Function CommandeStats($DB) + function CommandeStats($DB) { $this->db = $DB; } @@ -32,7 +32,7 @@ class CommandeStats * Renvoie le nombre de commande par année * */ - Function getNbCommandeByYear() + function getNbCommandeByYear() { $result = array(); $sql = "SELECT date_format(date_commande,'%Y') as dm, count(*) FROM ".MAIN_DB_PREFIX."commande GROUP BY dm DESC WHERE fk_statut > 0"; @@ -55,7 +55,7 @@ class CommandeStats * Renvoie le nombre de commande par mois pour une année donnée * */ - Function getNbCommandeByMonth($year) + function getNbCommandeByMonth($year) { $result = array(); $sql = "SELECT date_format(date_commande,'%m') as dm, count(*) FROM ".MAIN_DB_PREFIX."commande"; @@ -87,7 +87,7 @@ class CommandeStats * Renvoie le nombre de commande par mois pour une année donnée * */ - Function getCommandeAmountByMonth($year) + function getCommandeAmountByMonth($year) { $result = array(); $sql = "SELECT date_format(date_commande,'%m') as dm, sum(total_ht) FROM ".MAIN_DB_PREFIX."commande"; @@ -119,7 +119,7 @@ class CommandeStats * Renvoie le nombre de commande par mois pour une année donnée * */ - Function getCommandeAverageByMonth($year) + function getCommandeAverageByMonth($year) { $result = array(); $sql = "SELECT date_format(date_commande,'%m') as dm, avg(total_ht) FROM ".MAIN_DB_PREFIX."commande"; diff --git a/htdocs/product/stock/entrepot.class.php b/htdocs/product/stock/entrepot.class.php index 2186bbc3e3a..bedcd41e4cd 100644 --- a/htdocs/product/stock/entrepot.class.php +++ b/htdocs/product/stock/entrepot.class.php @@ -30,7 +30,7 @@ class Entrepot var $description; var $statut; - Function Entrepot($DB) + function Entrepot($DB) { $this->db = $DB; @@ -41,7 +41,7 @@ class Entrepot * * */ - Function create($user) + function create($user) { // Si libelle non defini, erreur if ($this->libelle == '') { @@ -83,7 +83,7 @@ class Entrepot /* * */ - Function update($id, $user) + function update($id, $user) { if (strlen(trim($this->libelle))) { @@ -114,7 +114,7 @@ class Entrepot * * */ - Function fetch ($id) + function fetch ($id) { $sql = "SELECT rowid, label, description, statut"; $sql .= " FROM ".MAIN_DB_PREFIX."entrepot WHERE rowid = $id"; @@ -144,7 +144,7 @@ class Entrepot * Renvoie la liste des entrepôts ouverts * */ - Function list_array() + function list_array() { $liste = array(); @@ -170,7 +170,7 @@ class Entrepot * Renvoie la liste des entrepôts ouverts * */ - Function nb_products() + function nb_products() { $sql = "SELECT sum(reel) FROM llx_product_stock WHERE fk_entrepot = ".$this->id; diff --git a/htdocs/product/stock/mouvementstock.class.php b/htdocs/product/stock/mouvementstock.class.php index 3e2de8f9ca1..52f0b8379f0 100644 --- a/htdocs/product/stock/mouvementstock.class.php +++ b/htdocs/product/stock/mouvementstock.class.php @@ -23,7 +23,7 @@ class MouvementStock { - Function MouvementStock($DB) + function MouvementStock($DB) { $this->db = $DB; } @@ -31,7 +31,7 @@ class MouvementStock * * */ - Function _create($user, $product_id, $entrepot_id, $qty, $type, $transaction=1) + function _create($user, $product_id, $entrepot_id, $qty, $type, $transaction=1) { if ($this->db->begin($transaction) ) @@ -70,7 +70,7 @@ class MouvementStock * * */ - Function livraison($user, $product_id, $entrepot_id, $qty, $transaction=1) + function livraison($user, $product_id, $entrepot_id, $qty, $transaction=1) { return $this->_create($user, $product_id, $entrepot_id, (0 - $qty), 2, $transaction); diff --git a/htdocs/projet/project.class.php b/htdocs/projet/project.class.php index 5e1870904a2..1e2d4672c76 100644 --- a/htdocs/projet/project.class.php +++ b/htdocs/projet/project.class.php @@ -28,7 +28,7 @@ class Project { var $socidp; var $societe; - Function Project($DB) + function Project($DB) { $this->db = $DB; $this->societe = new Societe($DB); @@ -39,7 +39,7 @@ class Project { * */ - Function create($creatorid) + function create($creatorid) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet (ref, title, fk_soc, fk_user_creat, dateo) "; $sql .= " VALUES ('$this->ref', '$this->title', $this->socidp, $creatorid, now()) ;"; @@ -58,7 +58,7 @@ class Project { * * */ - Function update() + function update() { $sql = "UPDATE ".MAIN_DB_PREFIX."projet "; $sql .= " SET ref = '$this->ref', title = '$this->title'"; @@ -73,7 +73,7 @@ class Project { * * */ - Function delete() + function delete() { $sql = "DELETE FROM ".MAIN_DB_PREFIX."projet WHERE rowid = $this->id"; @@ -96,7 +96,7 @@ class Project { * * */ - Function fetch($rowid) + function fetch($rowid) { $sql = "SELECT fk_soc, title, ref FROM ".MAIN_DB_PREFIX."projet WHERE rowid=$rowid;"; @@ -125,7 +125,7 @@ class Project { * * */ - Function get_propal_list() + function get_propal_list() { $propales = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."propal WHERE fk_projet=$this->id;"; @@ -161,7 +161,7 @@ class Project { * * */ - Function get_facture_list() + function get_facture_list() { $factures = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture WHERE fk_projet=$this->id;"; @@ -197,7 +197,7 @@ class Project { * * */ - Function get_commande_list() + function get_commande_list() { $commandes = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande WHERE fk_projet=$this->id;"; diff --git a/htdocs/rapport/Atome.class.php b/htdocs/rapport/Atome.class.php index e67dfb7f5a7..cb0b817f631 100644 --- a/htdocs/rapport/Atome.class.php +++ b/htdocs/rapport/Atome.class.php @@ -34,7 +34,7 @@ class Atome * */ - Function AtomeInitialize($periode, $name, $daystart) + function AtomeInitialize($periode, $name, $daystart) { $this->year = strftime("%Y", $daystart); $this->month = strftime("%m", $daystart); @@ -46,7 +46,7 @@ class Atome * * */ - Function BarGraph() + function BarGraph() { $filename = DOL_DOCUMENT_ROOT.'/document/'; diff --git a/htdocs/rapport/AtomeFactureValidee.class.php b/htdocs/rapport/AtomeFactureValidee.class.php index 50865e9b4fe..14d9f888d96 100644 --- a/htdocs/rapport/AtomeFactureValidee.class.php +++ b/htdocs/rapport/AtomeFactureValidee.class.php @@ -32,7 +32,7 @@ class AtomeFactureValidee extends Atome * Initialisation de la classe * */ - Function AtomeFactureValidee($DB, $periode, $daystart) + function AtomeFactureValidee($DB, $periode, $daystart) { $this->db = $DB ; $this->name = 'AtomeFactureValidee'; @@ -45,7 +45,7 @@ class AtomeFactureValidee extends Atome * * */ - Function fetch() + function fetch() { if ($this->periode == 'year') { diff --git a/htdocs/rapport/AtomePropaleValidee.class.php b/htdocs/rapport/AtomePropaleValidee.class.php index f7b9f524d0c..82f704ecc29 100644 --- a/htdocs/rapport/AtomePropaleValidee.class.php +++ b/htdocs/rapport/AtomePropaleValidee.class.php @@ -32,7 +32,7 @@ class AtomePropaleValidee extends Atome * Initialisation de la classe * */ - Function AtomePropaleValidee($DB,$periode, $daystart) + function AtomePropaleValidee($DB,$periode, $daystart) { $this->db = $DB ; $this->AtomeInitialize($periode, 'AtomePropaleValidee', $daystart); @@ -43,7 +43,7 @@ class AtomePropaleValidee extends Atome * * */ - Function fetch() + function fetch() { $sql = "SELECT date_format(f.datep,'%Y%m'), sum(f.price) as am"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as f";