From de42d8cab06c5e202cc1ddd04d82ea74a4176336 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Aug 2004 18:51:54 +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/actioncomm.class.php | 10 ++++---- htdocs/address.class.php | 2 +- htdocs/bargraph.class.php | 6 ++--- htdocs/cactioncomm.class.php | 8 +++---- htdocs/chargesociales.class.php | 16 ++++++------- htdocs/contact.class.php | 16 ++++++------- htdocs/cyberpaiement.class.php | 8 +++---- htdocs/don.class.php | 28 +++++++++++----------- htdocs/facturefourn.class.php | 24 +++++++++---------- htdocs/graph.class.php | 24 +++++++++---------- htdocs/html.form.class.php | 34 +++++++++++++------------- htdocs/main.inc.php | 6 ++--- htdocs/menu.class.php | 8 +++---- htdocs/notify.class.php | 4 ++-- htdocs/paiement.class.php | 14 +++++------ htdocs/product.class.php | 38 ++++++++++++++--------------- htdocs/project.class.php | 10 ++++---- htdocs/projetdon.class.php | 4 ++-- htdocs/propal.class.php | 42 ++++++++++++++++----------------- htdocs/retourbplc.class.php | 14 +++++------ htdocs/service.class.php | 12 +++++----- htdocs/societe.class.php | 28 +++++++++++----------- htdocs/stats.class.php | 12 +++++----- htdocs/tva.class.php | 12 +++++----- 24 files changed, 190 insertions(+), 190 deletions(-) diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index 56b3b4e6a27..4427ec70ce3 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -40,7 +40,7 @@ class ActionComm * Initialisation * */ - Function ActionComm($db) + function ActionComm($db) { $this->db = $db; $this->societe = new Societe($db); @@ -55,7 +55,7 @@ class ActionComm * * */ - Function add($author) + function add($author) { if (! $this->contact) { @@ -92,7 +92,7 @@ class ActionComm * * */ - Function fetch($id) + function fetch($id) { $sql = "SELECT ".$this->db->pdate("a.datea")." as da, a.note, c.libelle, fk_soc, fk_user_author, fk_contact, fk_facture, a.percent "; $sql .= "FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c WHERE a.id=$id AND a.fk_action=c.id;"; @@ -135,7 +135,7 @@ class ActionComm * * */ - Function delete($id) + function delete($id) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm WHERE id=$id;"; @@ -148,7 +148,7 @@ class ActionComm * Met à jour l'action * */ - Function update() + function update() { if ($this->percent > 100) { diff --git a/htdocs/address.class.php b/htdocs/address.class.php index 9bfd3af0514..99b3c1f4e5c 100644 --- a/htdocs/address.class.php +++ b/htdocs/address.class.php @@ -28,7 +28,7 @@ class Address { var $city; var $country; - Function Address() { + function Address() { } diff --git a/htdocs/bargraph.class.php b/htdocs/bargraph.class.php index 65dd8c150e0..15b23ca90b3 100644 --- a/htdocs/bargraph.class.php +++ b/htdocs/bargraph.class.php @@ -32,7 +32,7 @@ class BarGraph extends Graph * Retour: 0 si ko, 1 si ok */ - Function BarGraph($data=array()) { + function BarGraph($data=array()) { $modules_list = get_loaded_extensions(); $isgdinstalled=0; @@ -74,7 +74,7 @@ class BarGraph extends Graph return; } - Function isGraphKo() { + function isGraphKo() { return $this->errorstr; } @@ -82,7 +82,7 @@ class BarGraph extends Graph * Dessine le graphique * */ - Function draw($file, $data, $title='') { + function draw($file, $data, $title='') { $this->prepare($file, $data, $title); if (substr($this->MaxValue,0,1) == 1) diff --git a/htdocs/cactioncomm.class.php b/htdocs/cactioncomm.class.php index e393be24250..6f14421a89a 100644 --- a/htdocs/cactioncomm.class.php +++ b/htdocs/cactioncomm.class.php @@ -24,7 +24,7 @@ class CActioncomm { var $id; var $libelle; - Function CActioncomm($DB=0) + function CActioncomm($DB=0) { $this->db = $DB; } @@ -33,7 +33,7 @@ class CActioncomm { * */ - Function fetch($db, $id) + function fetch($db, $id) { $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."c_actioncomm WHERE id=$id;"; @@ -67,7 +67,7 @@ class CActioncomm { * * */ - Function liste_array() + function liste_array() { $ga = array(); @@ -102,7 +102,7 @@ class CActioncomm { * Renvoie le nom d'une action a partir d'un id * */ - Function get_nom($id) + function get_nom($id) { $sql = "SELECT libelle nom FROM ".MAIN_DB_PREFIX."c_actioncomm WHERE id='$id';"; diff --git a/htdocs/chargesociales.class.php b/htdocs/chargesociales.class.php index feeaa257616..eb9ed0a2b2c 100644 --- a/htdocs/chargesociales.class.php +++ b/htdocs/chargesociales.class.php @@ -31,13 +31,13 @@ class PaiementCharge { var $num_paiement; var $note; - Function PaiementCharge($DB) { + function PaiementCharge($DB) { $this->db = $DB; return 1; } - Function create($user) { + function create($user) { $sql_err = 0; /* * Insertion dans la base @@ -93,7 +93,7 @@ class PaiementCharge { * Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank générée * */ - Function update_fk_bank($id_bank) { + function update_fk_bank($id_bank) { $sql = "UPDATE llx_paiementcharge set fk_bank = ".$id_bank." where rowid = ".$this->id; $result = $this->db->query($sql); if ($result) @@ -125,7 +125,7 @@ class ChargeSociales { var $paye; var $periode; - Function ChargeSociales($DB) { + function ChargeSociales($DB) { $this->db = $DB; return 1; @@ -135,7 +135,7 @@ class ChargeSociales { * Retrouve et charge une charge sociale * Retour: 1 si trouve, 0 sinon */ - Function fetch($id) { + function fetch($id) { $sql = "SELECT cs.rowid,".$this->db->pdate("cs.date_ech")." as date_ech,".$this->db->pdate("cs.date_pai")." as date_pai"; $sql .=", cs.libelle as lib, cs.fk_type, cs.amount, cs.paye, ".$this->db->pdate("cs.periode")." as periode, c.libelle"; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as cs, ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -173,7 +173,7 @@ class ChargeSociales { } } - Function solde($year = 0) { + function solde($year = 0) { $sql = "SELECT sum(f.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as f WHERE paye = 0"; @@ -204,7 +204,7 @@ class ChargeSociales { * Tag la charge comme payée complètement * */ - Function set_payed($rowid) + function set_payed($rowid) { $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales set paye=1 WHERE rowid = $rowid ;"; $return = $this->db->query( $sql); @@ -215,7 +215,7 @@ class ChargeSociales { * Renvoi le staut sous forme de libellé d'une charge * */ - Function getLibStatut() { + function getLibStatut() { if ($this->paye == 0) { return "Non Payé"; } else { return "Payé"; } } diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index c075be76f3e..b5a28aea865 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -36,7 +36,7 @@ class Contact var $email; var $birthday; - Function Contact($DB, $id=0) + function Contact($DB, $id=0) { $this->db = $DB; $this->id = $id; @@ -48,7 +48,7 @@ class Contact * Création du contact * */ - Function create($user) + function create($user) { if (!$this->socid) { @@ -75,7 +75,7 @@ class Contact * Mise à jour des infos * */ - Function update($id, $user=0) + function update($id, $user=0) { $this->id = $id; $this->error = array(); @@ -131,7 +131,7 @@ class Contact * */ - Function update_ldap($user) + function update_ldap($user) { $this->fetch($this->id); @@ -255,7 +255,7 @@ class Contact * Mise à jour des infos persos * */ - Function update_perso($id, $user=0) + function update_perso($id, $user=0) { # Mis a jour contact $sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET idp=$id "; @@ -300,7 +300,7 @@ class Contact * * */ - Function fetch($_id, $user=0) + function fetch($_id, $user=0) { $sql = "SELECT c.idp, c.fk_soc, c.civilite civilite_id, c.name, c.firstname, c.address, c.birthday as birthday, poste, phone, phone_perso, phone_mobile, fax, c.email, jabberid, c.note"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c"; @@ -391,7 +391,7 @@ class Contact * * */ - Function delete($id) + function delete($id) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople"; $sql .= " WHERE idp=$id"; @@ -439,7 +439,7 @@ class Contact * Information sur l'objet * */ - Function info($id) + function info($id) { $sql = "SELECT c.idp, ".$this->db->pdate("datec")." as datec, fk_user"; $sql .= ", ".$this->db->pdate("tms")." as tms, fk_user_modif"; diff --git a/htdocs/cyberpaiement.class.php b/htdocs/cyberpaiement.class.php index 4b498543da9..c706af66219 100644 --- a/htdocs/cyberpaiement.class.php +++ b/htdocs/cyberpaiement.class.php @@ -28,7 +28,7 @@ class Cyberpaiement { - Function Cyberpaiement($conf) + function Cyberpaiement($conf) /* * Initialisation des valeurs par défaut */ @@ -104,7 +104,7 @@ class Cyberpaiement /* */ /* ********************** */ - Function set_client($nom,$prenom,$email,$societe='') + function set_client($nom,$prenom,$email,$societe='') { /* Nom */ @@ -165,7 +165,7 @@ class Cyberpaiement /* */ /* ********************** */ - Function set_commande($ref, $montant) + function set_commande($ref, $montant) { /* Référence */ @@ -180,7 +180,7 @@ class Cyberpaiement * * */ - Function print_hidden() + function print_hidden() { print ''; print "\n"; diff --git a/htdocs/don.class.php b/htdocs/don.class.php index 70eecd03329..eb245ed4af7 100644 --- a/htdocs/don.class.php +++ b/htdocs/don.class.php @@ -52,7 +52,7 @@ class Don * * */ - Function Don($DB, $soc_idp="") + function Don($DB, $soc_idp="") { $this->db = $DB ; $this->modepaiementid = 0; @@ -62,7 +62,7 @@ class Don * * */ - Function print_error_list() + function print_error_list() { $num = sizeof($this->errorstr); for ($i = 0 ; $i < $num ; $i++) @@ -74,7 +74,7 @@ class Don * * */ - Function check($minimum=0) + function check($minimum=0) { $err = 0; @@ -163,7 +163,7 @@ class Don * * */ - Function create($userid) + function create($userid) { /* * Insertion dans la base @@ -193,7 +193,7 @@ class Don * * */ - Function update($userid) + function update($userid) { $this->date = $this->db->idate($this->date); @@ -235,7 +235,7 @@ class Don * Suppression du don * */ - Function delete($rowid) + function delete($rowid) { @@ -263,7 +263,7 @@ class Don * * */ - 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"; @@ -306,7 +306,7 @@ class Don * Suppression du don * */ - 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;"; @@ -332,7 +332,7 @@ class Don * Classé comme payé, le don a été recu * */ - Function set_paye($rowid, $modepaiement='') + function set_paye($rowid, $modepaiement='') { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2"; @@ -363,7 +363,7 @@ class Don * * */ - Function set_commentaire($rowid, $commentaire='') + function set_commentaire($rowid, $commentaire='') { $sql = "UPDATE ".MAIN_DB_PREFIX."don SET note = '$commentaire'"; @@ -390,7 +390,7 @@ class Don * Classé comme encaissé * */ - 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;"; @@ -415,7 +415,7 @@ class Don /* * Somme des dons encaissés */ - Function sum_actual() + function sum_actual() { $sql = "SELECT sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."don"; @@ -433,7 +433,7 @@ class Don * * */ - Function sum_pending() + function sum_pending() { $sql = "SELECT sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."don"; @@ -451,7 +451,7 @@ class Don * Somme des promesses de dons validées * */ - Function sum_intent() + function sum_intent() { $sql = "SELECT sum(amount)"; $sql .= " FROM ".MAIN_DB_PREFIX."don"; diff --git a/htdocs/facturefourn.class.php b/htdocs/facturefourn.class.php index e45598fab68..b1c6a6ec3a3 100644 --- a/htdocs/facturefourn.class.php +++ b/htdocs/facturefourn.class.php @@ -46,7 +46,7 @@ class FactureFourn * Initialisation * */ - Function FactureFourn($DB, $soc_idp="", $facid="") + function FactureFourn($DB, $soc_idp="", $facid="") { $this->db = $DB ; $this->socidp = $soc_idp; @@ -66,7 +66,7 @@ class FactureFourn * Création d'une facture fournisseur * */ - Function create($user) + function create($user) { /* @@ -136,7 +136,7 @@ class FactureFourn * * */ - Function fetch($rowid) + function fetch($rowid) { $sql = "SELECT fk_soc,libelle,facnumber,amount,remise,".$this->db->pdate(datef)."as df"; $sql .= ", total_ht, total_tva, total_ttc, fk_user_author"; @@ -215,7 +215,7 @@ class FactureFourn * Suppression de la facture * */ - Function delete($rowid) + function delete($rowid) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_fourn WHERE rowid = $rowid AND fk_statut = 0"; @@ -248,7 +248,7 @@ class FactureFourn * Passe une facture fournisseur a l'état validé * */ - Function set_valid($userid) + function set_valid($userid) { $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn set fk_statut = 1, fk_user_valid = $userid WHERE rowid = ".$this->id; $result = $this->db->query( $sql); @@ -261,7 +261,7 @@ class FactureFourn * Passe une facture fournisseur a l'état payé * */ - Function set_payed($userid) + function set_payed($userid) { $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn set paye = 1 WHERE rowid = ".$this->id; $result = $this->db->query( $sql); @@ -275,7 +275,7 @@ class FactureFourn * Ajoute une ligne dans la facture * */ - Function addline($desc, $pu, $tauxtva, $qty) + function addline($desc, $pu, $tauxtva, $qty) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn_det (fk_facture_fourn)"; @@ -299,7 +299,7 @@ class FactureFourn * Mise a jour ligne facture fourn * */ - Function updateline($id, $label, $puht, $tauxtva, $qty=1) + function updateline($id, $label, $puht, $tauxtva, $qty=1) { if (is_numeric($puht) && is_numeric($qty)) { @@ -331,7 +331,7 @@ class FactureFourn * Supprime une ligne de la facture * */ - Function deleteline($rowid) + function deleteline($rowid) { // Supprime ligne $sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_fourn_det "; @@ -351,7 +351,7 @@ class FactureFourn *Mets à jour le prix total de la facture * */ - Function updateprice($facid) + function updateprice($facid) { $total_ht = 0; $total_tva = 0; @@ -401,7 +401,7 @@ class FactureFourn * Génération du PDF * */ - Function pdf() + function pdf() { } @@ -410,7 +410,7 @@ class FactureFourn * Renvoi un libellé du statut * */ - Function LibStatut($paye,$statut) + function LibStatut($paye,$statut) { if (! $paye) { diff --git a/htdocs/graph.class.php b/htdocs/graph.class.php index a86a27b367e..b2dc42794e3 100644 --- a/htdocs/graph.class.php +++ b/htdocs/graph.class.php @@ -28,7 +28,7 @@ class Graph * Prépare le graphique * */ - Function prepare($file, $data, $title='') + function prepare($file, $data, $title='') { //Define the object $this->graph = new PHPlot($this->width, $this->height); @@ -115,53 +115,53 @@ class Graph // $this->graph->DrawGraph(); } - Function SetPrecisionY($which_prec) + function SetPrecisionY($which_prec) { $this->precision_y = $which_prec; return true; } - Function SetYLabel($label) + function SetYLabel($label) { $this->YLabel = $label; } - Function SetWidth($w) + function SetWidth($w) { $this->width = $w; } - Function SetLegend($legend) + function SetLegend($legend) { $this->Legend = $legend; } - Function SetMaxValue($max) + function SetMaxValue($max) { $this->MaxValue = $max; } - Function SetHeight($h) + function SetHeight($h) { $this->height = $h; } - Function ResetBgColor() + function ResetBgColor() { unset($this->bgcolor); } - Function SetBgColor($bg_color = array(255,255,255)) + function SetBgColor($bg_color = array(255,255,255)) { $this->bgcolor = $bg_color; } - Function ResetDataColor() + function ResetDataColor() { unset($this->datacolor); } - Function GetMaxValue() + function GetMaxValue() { $k = 0; $vals = array(); @@ -181,7 +181,7 @@ class Graph return $vals[0]; } - Function GetAmountMaxValue() + function GetAmountMaxValue() { $max = ceil($this->GetMaxValue()); diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index 0fb532536e5..57a389415f5 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -27,7 +27,7 @@ class Form var $errorstr; - Function Form($DB) + function Form($DB) { $this->db = $DB; @@ -40,7 +40,7 @@ class Form * avec un affichage avec rupture sur le pays * */ - Function select_departement($selected='') + function select_departement($selected='') { // On recherche les départements/cantons/province active d'une region et pays actif $sql = "SELECT d.rowid, d.code_departement as code , d.nom, d.active, p.libelle as libelle_pays, p.code as code_pays FROM "; @@ -93,7 +93,7 @@ class Form * Retourne la liste déroulante des pays actifs * */ - Function select_pays($selected='') + function select_pays($selected='') { $sql = "SELECT rowid, libelle, active FROM ".MAIN_DB_PREFIX."c_pays"; $sql .= " WHERE active = 1 ORDER BY libelle ASC"; @@ -127,7 +127,7 @@ class Form * Retourne la liste déroulante des sociétés * */ - Function select_societes($selected='',$htmlname='soc_id') + function select_societes($selected='',$htmlname='soc_id') { // On recherche les societes $sql = "SELECT s.idp, s.nom FROM "; @@ -166,7 +166,7 @@ class Form * Retourne la liste déroulante des contacts d'une société donnée * */ - Function select_contacts($socid,$selected='',$htmlname='contactid') + function select_contacts($socid,$selected='',$htmlname='contactid') { // On recherche les societes $sql = "SELECT s.idp, s.name, s.firstname FROM "; @@ -208,7 +208,7 @@ class Form * Retourne le nom d'un pays * */ - Function pays_name($id) + function pays_name($id) { $sql = "SELECT rowid, libelle FROM ".MAIN_DB_PREFIX."c_pays"; $sql .= " WHERE rowid=$id"; @@ -237,7 +237,7 @@ class Form * */ - Function select_civilite($selected='') + function select_civilite($selected='') { $sql = "SELECT rowid, civilite, active FROM ".MAIN_DB_PREFIX."c_civilite"; $sql .= " WHERE active = 1"; @@ -276,7 +276,7 @@ class Form * avec un affichage avec rupture sur le pays * */ - Function select_forme_juridique($selected='') + function select_forme_juridique($selected='') { // On recherche les formes juridiques actives des pays actifs $sql = "SELECT f.rowid, f.code as code , f.libelle as nom, f.active, p.libelle as libelle_pays, p.code as code_pays FROM llx_c_forme_juridique as f, llx_c_pays as p"; @@ -328,7 +328,7 @@ class Form * * */ - Function form_confirm($page, $title, $question, $action) + function form_confirm($page, $title, $question, $action) { global $langs; @@ -350,7 +350,7 @@ class Form * * */ - Function select_tva($name='', $defaulttx = '') + function select_tva($name='', $defaulttx = '') { if (! strlen(trim($name))) { @@ -401,7 +401,7 @@ class Form * - La date du jour si set_time vaut '' * - Aucune date (champs vides) si set_time vaut -1 */ - Function select_date($set_time='', $prefix='re', $h = 0, $m = 0, $empty=0) + function select_date($set_time='', $prefix='re', $h = 0, $m = 0, $empty=0) { if (! $set_time && ! $empty) { @@ -559,7 +559,7 @@ class Form * * */ - Function select($name, $sql, $id='') + function select($name, $sql, $id='') { $result = $this->db->query($sql); @@ -612,7 +612,7 @@ class Form \param 1 si il faut un valeur "-" dans la liste, 0 sinon \param 1 pour affiche la key dans la valeur "[key] value" */ - Function select_array($name, $array, $id='', $empty=0, $key_libelle=0) + function select_array($name, $array, $id='', $empty=0, $key_libelle=0) { print '\n"; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1388e69e337..525d9033eb1 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -131,7 +131,7 @@ else "cryptType" => "none", ); - $aDol = new DOLIAuth("DB", $params, "loginFunction"); + $aDol = new DOLIAuth("DB", $params, "loginfunction"); $aDol->start(); $result = $aDol->getAuth(); if ($result) @@ -143,7 +143,7 @@ else { /* * Le début de la page est affiché par - * loginFunction + * loginfunction */ print "\n\n\n"; die ; @@ -552,7 +552,7 @@ function top_menu($head, $title="", $target="") * * */ -Function left_menu($menu, $help_url='', $form_search='', $author='') +function left_menu($menu, $help_url='', $form_search='', $author='') { global $user, $conf, $langs; diff --git a/htdocs/menu.class.php b/htdocs/menu.class.php index 67c95048645..32d4a562b8c 100644 --- a/htdocs/menu.class.php +++ b/htdocs/menu.class.php @@ -23,16 +23,16 @@ class Menu { var $liste; - Function Menu() { + function Menu() { $this->liste = array(); } - Function clear() { + function clear() { $this->liste = array(); } - Function add($url, $titre) { + function add($url, $titre) { $i = sizeof($this->liste); @@ -41,7 +41,7 @@ class Menu { } - Function add_submenu($url, $titre) { + function add_submenu($url, $titre) { $i = sizeof($this->liste) - 1; $j = sizeof($this->liste[$i]); diff --git a/htdocs/notify.class.php b/htdocs/notify.class.php index df829b8442a..1a28dd152ed 100644 --- a/htdocs/notify.class.php +++ b/htdocs/notify.class.php @@ -33,7 +33,7 @@ class Notify var $note; var $projet_id; - Function Notify($DB) + function Notify($DB) { $this->db = $DB ; include_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php"); @@ -44,7 +44,7 @@ class Notify * * */ - Function send($action, $socid, $texte, $objet_type, $objet_id, $file="") + function send($action, $socid, $texte, $objet_type, $objet_id, $file="") { $sql = "SELECT s.nom, c.email, c.idp, c.name, c.firstname, a.titre,n.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c, ".MAIN_DB_PREFIX."action_def as a, ".MAIN_DB_PREFIX."notify_def as n, ".MAIN_DB_PREFIX."societe as s"; diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index 76a7c1b36d4..001ae50e94c 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -40,7 +40,7 @@ class Paiement * * */ - Function Paiement($DB, $soc_idp="") + function Paiement($DB, $soc_idp="") { $this->db = $DB ; } @@ -48,7 +48,7 @@ class Paiement * * */ - Function fetch($id) + function fetch($id) { $sql = "SELECT p.rowid,".$this->db->pdate("p.datep")." as dp, p.amount"; $sql .=", c.libelle as paiement_type, p.num_paiement"; @@ -87,7 +87,7 @@ class Paiement * * */ - Function create($user) + function create($user) { $sql_err = 0; /* @@ -163,7 +163,7 @@ class Paiement * * */ - Function select($name, $filtre='', $id='') + function select($name, $filtre='', $id='') { $form = new Form($this->db); @@ -187,7 +187,7 @@ class Paiement * * */ - Function delete() + function delete() { $sql = "DELETE FROM llx_paiement_facture WHERE fk_paiement = ".$this->id; @@ -212,7 +212,7 @@ class Paiement * Mise a jour du lien entre le paiement et la ligne dans llx_bank générée * */ - Function update_fk_bank($id_bank) + function update_fk_bank($id_bank) { $sql = "UPDATE llx_paiement set fk_bank = ".$id_bank." where rowid = ".$this->id; $result = $this->db->query($sql); @@ -230,7 +230,7 @@ class Paiement * Information sur l'objet * */ - Function info($id) + function info($id) { $sql = "SELECT c.rowid, ".$this->db->pdate("datec")." as datec, fk_user_creat, fk_user_modif"; $sql .= ", ".$this->db->pdate("tms")." as tms"; diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 2a9ca0ebee8..67b3c733d40 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -35,7 +35,7 @@ class Product var $duration_value; var $duration_unit; - Function Product($DB, $id=0) + function Product($DB, $id=0) { $this->db = $DB; $this->id = $id ; @@ -46,7 +46,7 @@ class Product * * */ - Function check() + function check() { $this->ref = ereg_replace("'","",stripslashes($this->ref)); $this->ref = ereg_replace("\"","",stripslashes($this->ref)); @@ -71,7 +71,7 @@ class Product * * */ - Function create($user) + function create($user) { $this->ref = ereg_replace("'","",stripslashes($this->ref)); $this->ref = ereg_replace("\"","",stripslashes($this->ref)); @@ -126,7 +126,7 @@ class Product * * */ - Function update($id, $user) + function update($id, $user) { $this->ref = ereg_replace("\"","",stripslashes($this->ref)); $this->ref = ereg_replace("'","",stripslashes($this->ref)); @@ -163,7 +163,7 @@ class Product * * */ - Function _log_price($user) + function _log_price($user) { $sql = "REPLACE INTO ".MAIN_DB_PREFIX."product_price "; @@ -188,7 +188,7 @@ class Product * * */ - Function update_price($id, $user) + function update_price($id, $user) { if (strlen(trim($this->price)) > 0 ) { @@ -219,7 +219,7 @@ class Product * * */ - Function fetch ($id) + function fetch ($id) { $sql = "SELECT rowid, ref, label, description, price, tva_tx, envente, nbvente, fk_product_type, duration, seuil_stock_alerte"; $sql .= " FROM ".MAIN_DB_PREFIX."product WHERE rowid = $id"; @@ -286,7 +286,7 @@ class Product * * */ - Function count_propale($socid=0) + function count_propale($socid=0) { $sql = "SELECT pd.fk_propal"; $sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pd, ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."propal as pr"; @@ -312,7 +312,7 @@ class Product * * */ - Function count_propale_client($socid=0) + function count_propale_client($socid=0) { $sql = "SELECT pr.fk_soc"; $sql .= " FROM ".MAIN_DB_PREFIX."propaldet as pd, ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."propal as pr"; @@ -338,7 +338,7 @@ class Product * * */ - Function count_facture($socid=0) + function count_facture($socid=0) { $sql = "SELECT pd.fk_facture"; $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as pd, ".MAIN_DB_PREFIX."product as p"; @@ -366,7 +366,7 @@ class Product * */ - Function _get_stats($sql) + function _get_stats($sql) { $result = $this->db->query($sql) ; @@ -416,7 +416,7 @@ class Product * * */ - Function get_nb_vente($socid=0) + function get_nb_vente($socid=0) { $sql = "SELECT sum(d.qty), date_format(f.datef, '%Y%m') "; $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as d, ".MAIN_DB_PREFIX."facture as f"; @@ -433,7 +433,7 @@ class Product *Renvoie le nombre de facture dans lesquelles figure le produit * */ - Function get_num_vente($socid=0) + function get_num_vente($socid=0) { $sql = "SELECT count(*), date_format(f.datef, '%Y%m') "; $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as d, ".MAIN_DB_PREFIX."facture as f"; @@ -450,7 +450,7 @@ class Product *Renvoie le nombre de proaple dans lesquelles figure le produit * */ - Function get_num_propal($socid=0) + function get_num_propal($socid=0) { $sql = "SELECT count(*), date_format(p.datep, '%Y%m') "; $sql .= " FROM ".MAIN_DB_PREFIX."propaldet as d, ".MAIN_DB_PREFIX."propal as p"; @@ -467,7 +467,7 @@ class Product * * */ - Function add_fournisseur($user, $id_fourn, $ref_fourn) + function add_fournisseur($user, $id_fourn, $ref_fourn) { $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."product_fournisseur WHERE fk_product = $this->id AND fk_soc = $id_fourn"; @@ -507,7 +507,7 @@ class Product * * */ - Function remove_fournisseur($user, $id_fourn) + function remove_fournisseur($user, $id_fourn) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur "; $sql .= " WHERE fk_product = $this->id AND fk_soc = $id_fourn;"; @@ -526,7 +526,7 @@ class Product * * */ - Function create_stock($id_entrepot, $nbpiece) + function create_stock($id_entrepot, $nbpiece) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_stock "; @@ -547,7 +547,7 @@ class Product * * */ - Function correct_stock($user, $id_entrepot, $nbpiece, $mouvement) + function correct_stock($user, $id_entrepot, $nbpiece, $mouvement) { $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."product_stock "; @@ -576,7 +576,7 @@ class Product * * */ - Function ajust_stock($user, $id_entrepot, $nbpiece, $mouvement) + function ajust_stock($user, $id_entrepot, $nbpiece, $mouvement) { /* mouvement = 0 -> ajouter * mouvement = 1 -> supprimer diff --git a/htdocs/project.class.php b/htdocs/project.class.php index d783dee84ab..e1f2f9d29de 100644 --- a/htdocs/project.class.php +++ b/htdocs/project.class.php @@ -28,7 +28,7 @@ class Project { var $title; var $socidp; - Function Project($DB) { + function Project($DB) { $this->db = $DB; } /* @@ -37,7 +37,7 @@ class Project { * */ - Function create($creatorid) { + function create($creatorid) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet (ref, title, fk_soc, fk_user_creat) "; $sql .= " VALUES ('$this->ref', '$this->title', $this->socidp, $creatorid) ;"; @@ -55,7 +55,7 @@ class Project { * */ - Function fetch($rowid) { + function fetch($rowid) { $sql = "SELECT title, ref FROM ".MAIN_DB_PREFIX."projet WHERE rowid=$rowid;"; @@ -78,7 +78,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;"; @@ -114,7 +114,7 @@ class Project { * * */ - Function liste_array($id_societe='') + function liste_array($id_societe='') { $projets = array(); diff --git a/htdocs/projetdon.class.php b/htdocs/projetdon.class.php index 294b76033eb..ac4c76311c0 100644 --- a/htdocs/projetdon.class.php +++ b/htdocs/projetdon.class.php @@ -28,7 +28,7 @@ class ProjetDon { var $title; var $socidp; - Function ProjetDon($DB) { + function ProjetDon($DB) { $this->db = $DB; } /* @@ -43,7 +43,7 @@ class ProjetDon { * * */ - Function liste_array($id_societe='') + function liste_array($id_societe='') { $projets = array(); diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 53fbcb42cf3..c8e2e571150 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -59,7 +59,7 @@ class Propal // {{{ constructor - Function Propal($DB, $soc_idp="", $propalid=0) + function Propal($DB, $soc_idp="", $propalid=0) { $this->db = $DB ; $this->socidp = $soc_idp; @@ -78,7 +78,7 @@ class Propal * @param integer $remise_percent remise effectuée sur le produit * @return void */ - Function add_product($idproduct, $qty, $remise_percent=0) + function add_product($idproduct, $qty, $remise_percent=0) { if ($idproduct > 0) { @@ -98,7 +98,7 @@ class Propal * * @return integer */ - Function insert_product($idproduct, $qty, $remise_percent=0) + function insert_product($idproduct, $qty, $remise_percent=0) { if ($this->statut == 0) { @@ -138,7 +138,7 @@ class Propal * * */ - Function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $remise_percent=0) + function insert_product_generic($p_desc, $p_price, $p_qty, $p_tva_tx=19.6, $remise_percent=0) { if ($this->statut == 0) { @@ -186,7 +186,7 @@ class Propal * * */ - Function fetch_client() + function fetch_client() { $client = new Societe($this->db); $client->fetch($this->socidp); @@ -196,7 +196,7 @@ class Propal * * */ - Function delete_product($idligne) + function delete_product($idligne) { if ($this->statut == 0) { @@ -219,7 +219,7 @@ class Propal * * */ - Function create() + function create() { /* * Insertion dans la base @@ -285,7 +285,7 @@ class Propal * * */ - Function update_price() + function update_price() { include_once DOL_DOCUMENT_ROOT . "/lib/price.lib.php"; @@ -338,7 +338,7 @@ class Propal * * */ - Function fetch($rowid) + function fetch($rowid) { $sql = "SELECT ref,total,price,remise,tva,fk_soc,fk_soc_contact,".$this->db->pdate("datep")."as dp,".$this->db->pdate("fin_validite")."as dfv, model_pdf, note, fk_projet, fk_statut, remise_percent, fk_user_author"; @@ -477,7 +477,7 @@ class Propal * * */ - Function valid($user) + function valid($user) { if ($user->rights->propale->valider) { @@ -500,7 +500,7 @@ class Propal * * */ - Function set_remise($user, $remise) + function set_remise($user, $remise) { if ($user->rights->propale->creer) { @@ -526,7 +526,7 @@ class Propal * * */ - Function set_pdf_model($user, $modelpdf) + function set_pdf_model($user, $modelpdf) { if ($user->rights->propale->creer) { @@ -549,7 +549,7 @@ class Propal * Cloture de la proposition commerciale * */ - Function cloture($user, $statut, $note) + function cloture($user, $statut, $note) { $this->statut = $statut; @@ -590,7 +590,7 @@ class Propal * Créée une commande à partir de la proposition commerciale * */ - Function create_commande($user) + function create_commande($user) { if ($this->statut == 2) { @@ -605,7 +605,7 @@ class Propal * * */ - Function reopen($userid) + function reopen($userid) { $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET fk_statut = 0"; @@ -624,7 +624,7 @@ class Propal * * */ - Function liste_array ($brouillon=0, $user='') + function liste_array ($brouillon=0, $user='') { $ga = array(); @@ -673,7 +673,7 @@ class Propal * Renvoie un tableau contenant les numéros de commandes associées * */ - Function commande_liste_array () + function commande_liste_array () { $ga = array(); @@ -705,7 +705,7 @@ class Propal * * */ - Function delete($user) + function delete($user) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = $this->id ;"; if ( $this->db->query($sql) ) @@ -730,7 +730,7 @@ class Propal * Mets à jour la note * */ - Function update_note($note) + function update_note($note) { $sql = "UPDATE ".MAIN_DB_PREFIX."propal SET note = '$note'"; $sql .= " WHERE rowid = $this->id;"; @@ -751,7 +751,7 @@ class Propal * Information sur l'objet * */ - Function info($id) + function info($id) { $sql = "SELECT c.rowid, ".$this->db->pdate("datec")." as datec"; $sql .= ", fk_user_valid, fk_user_cloture, fk_user_author"; @@ -802,7 +802,7 @@ class Propal class PropaleLigne { - Function PropaleLigne() + function PropaleLigne() { } } diff --git a/htdocs/retourbplc.class.php b/htdocs/retourbplc.class.php index 6a0ef26b565..ec0415e9a33 100644 --- a/htdocs/retourbplc.class.php +++ b/htdocs/retourbplc.class.php @@ -45,7 +45,7 @@ class Retourbplc /* * Initialisation des valeurs par défaut */ - Function Retourbplc($db) + function Retourbplc($db) { $this->db = $db; } @@ -54,7 +54,7 @@ class Retourbplc * * */ - Function insertdb() + function insertdb() { @@ -95,7 +95,7 @@ class Retourbplc * * */ - Function check_key($key) + function check_key($key) { $A = $this->montant; @@ -149,7 +149,7 @@ class Retourbplc * Table de correspondance de l'algorithme de Luhn * */ - Function corres($value) + function corres($value) { $map[0] = 0; @@ -172,7 +172,7 @@ class Retourbplc * * */ - Function cle_luhn($cle, $map) + function cle_luhn($cle, $map) { $buffer = $this->array_reverse($cle); @@ -209,7 +209,7 @@ class Retourbplc * * */ - Function calcul_pos($N1, $N0, $C5) + function calcul_pos($N1, $N0, $C5) { if ($N0 >= 0 && $N0 <= 6) { @@ -259,7 +259,7 @@ class Retourbplc * * */ - Function array_reverse($string) + function array_reverse($string) { $len = strlen($string); diff --git a/htdocs/service.class.php b/htdocs/service.class.php index 3a788ebedfe..46702bb2018 100644 --- a/htdocs/service.class.php +++ b/htdocs/service.class.php @@ -34,7 +34,7 @@ class Service { var $fin_epoch; - Function Service($DB, $id=0) { + function Service($DB, $id=0) { $this->db = $DB; $this->id = $id; @@ -45,7 +45,7 @@ class Service { * * */ - Function create($user) { + function create($user) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."service (datec, fk_user_author) VALUES (now(), ".$user->id.")"; @@ -64,7 +64,7 @@ class Service { * * */ - Function update($id, $user) { + function update($id, $user) { $sql = "UPDATE ".MAIN_DB_PREFIX."service "; $sql .= " SET label = '" . trim($this->libelle) ."'"; @@ -86,7 +86,7 @@ class Service { * * */ - Function start_comm($id, $user, $datedeb=0) { + function start_comm($id, $user, $datedeb=0) { $sql = "UPDATE ".MAIN_DB_PREFIX."service "; if ($datedeb) { @@ -109,7 +109,7 @@ class Service { * * */ - Function stop_comm($id, $user, $datefin=0) { + function stop_comm($id, $user, $datefin=0) { $sql = "UPDATE ".MAIN_DB_PREFIX."service "; if ($datefin) { @@ -132,7 +132,7 @@ class Service { * * */ - Function fetch($id) { + function fetch($id) { $sql = "SELECT s.ref,s.label,s.price,s.tms,s.debut_comm,s.fin_comm,s.description,"; $sql .= $this->db->pdate("s.debut_comm") . ' as debut_epoch,'; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 14a6dfe6242..f58c5294670 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -44,7 +44,7 @@ class Societe { var $fournisseur; - Function Societe($DB, $id=0) + function Societe($DB, $id=0) { global $config; @@ -62,7 +62,7 @@ class Societe { * * */ - Function create() + function create() { $sql = "INSERT INTO ".MAIN_DB_PREFIX."societe (nom, datec, datea, client) "; $sql .= " VALUES ('".trim($this->nom)."', now(), now(), '$this->client');"; @@ -84,7 +84,7 @@ class Societe { * * */ - Function update($id) + function update($id) { if (strlen(trim($this->nom)) == 0) { @@ -163,7 +163,7 @@ class Societe { * * */ - Function fetch($socid) + function fetch($socid) { $this->id = $socid; @@ -275,7 +275,7 @@ class Societe { * TODO: Cette fonction n'est pas utilisée.. * Attente des contraintes d'intégrité dans MySql */ - Function delete($id) + function delete($id) { $sql = "DELETE from ".MAIN_DB_PREFIX."societe "; $sql .= " WHERE idp = " . $id .";"; @@ -318,7 +318,7 @@ class Societe { * * */ - Function factures_impayes() + function factures_impayes() { $facimp = array(); /* @@ -351,7 +351,7 @@ class Societe { * */ - Function attribute_prefix() + function attribute_prefix() { $sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe WHERE idp = '$this->id'"; if ( $this->db->query( $sql) ) @@ -403,7 +403,7 @@ class Societe { * * */ - Function set_as_client() + function set_as_client() { if ($this->id) { @@ -419,7 +419,7 @@ class Societe { * Renvoie le nom d'une societe a partir d'un id * */ - Function get_nom($id) + function get_nom($id) { $sql = "SELECT nom FROM ".MAIN_DB_PREFIX."societe WHERE idp='$id';"; @@ -445,7 +445,7 @@ class Societe { * * */ - Function contact_email_array() + function contact_email_array() { $contact_email = array(); @@ -478,7 +478,7 @@ class Societe { * * */ - Function contact_array() + function contact_array() { $contacts = array(); @@ -511,7 +511,7 @@ class Societe { * * */ - Function contact_get_email($rowid) + function contact_get_email($rowid) { $sql = "SELECT idp, email, name, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE idp = '$rowid'"; @@ -541,7 +541,7 @@ class Societe { * * */ - Function effectif_array() + function effectif_array() { $effs = array(); /* @@ -569,7 +569,7 @@ class Societe { * * */ - Function forme_juridique_array() + function forme_juridique_array() { $fj = array(); /* diff --git a/htdocs/stats.class.php b/htdocs/stats.class.php index 5b6872a9f48..ce9aeea8d27 100644 --- a/htdocs/stats.class.php +++ b/htdocs/stats.class.php @@ -24,12 +24,12 @@ class Stats { var $db ; - Function Stats($DB) + function Stats($DB) { $this->db = $DB; } - Function getNbByMonthWithPrevYear($year) + function getNbByMonthWithPrevYear($year) { $data1 = $this->getNbByMonth($year - 1); $data2 = $this->getNbByMonth($year); @@ -48,7 +48,7 @@ class Stats * Renvoie le nombre de proposition par mois pour une année donnée * */ - Function _getNbByMonth($year, $sql) + function _getNbByMonth($year, $sql) { $result = array(); @@ -86,7 +86,7 @@ class Stats * Renvoie le nombre d'element par année * */ - Function _getNbByYear($sql) + function _getNbByYear($sql) { $result = array(); @@ -109,7 +109,7 @@ class Stats * Renvoie le nombre d'element par mois pour une année donnée * */ - Function _getAmountByMonth($year, $sql) + function _getAmountByMonth($year, $sql) { $result = array(); @@ -138,7 +138,7 @@ class Stats * * */ - Function _getAverageByMonth($year, $sql) + function _getAverageByMonth($year, $sql) { $result = array(); diff --git a/htdocs/tva.class.php b/htdocs/tva.class.php index 93457138b0d..8a8a564f83f 100644 --- a/htdocs/tva.class.php +++ b/htdocs/tva.class.php @@ -32,7 +32,7 @@ class Tva /* * Initialistation automatique de la classe */ - Function Tva($DB) + function Tva($DB) { $this->db = $DB; @@ -43,7 +43,7 @@ class Tva * calcluer le solde de TVA, non ? * */ - Function solde($year = 0) + function solde($year = 0) { $reglee = $this->tva_sum_reglee($year); @@ -60,7 +60,7 @@ class Tva * Total de la TVA des factures emises par la societe. * */ - Function tva_sum_collectee($year = 0) + function tva_sum_collectee($year = 0) { $sql = "SELECT sum(f.tva) as amount"; @@ -99,7 +99,7 @@ class Tva * * */ - Function tva_sum_payee($year = 0) + function tva_sum_payee($year = 0) { $sql = "SELECT sum(f.amount) as amount"; @@ -138,7 +138,7 @@ class Tva * Total de la TVA réglee aupres de qui de droit * */ - Function tva_sum_reglee($year = 0) + function tva_sum_reglee($year = 0) { $sql = "SELECT sum(f.amount) as amount"; @@ -176,7 +176,7 @@ class Tva /* * */ - Function add_payement($datep, $datev, $amount) + function add_payement($datep, $datev, $amount) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."tva (datep, datev, amount) "; $sql .= " VALUES ('".$this->db->idate($datep)."',";