diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php
index 43e65768764..701e84b1f66 100644
--- a/htdocs/adherents/adherent.class.php
+++ b/htdocs/adherents/adherent.class.php
@@ -350,9 +350,9 @@ class Adherent
if (sizeof($this->array_options) > 0 )
{
- $sql_del = "delete from ".MAIN_DB_PREFIX."adherent_options where adhid = $this->id;";
+ $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options WHERE adhid = $this->id;";
$this->db->query($sql_del);
- $sql = "insert into ".MAIN_DB_PREFIX."adherent_options (adhid) VALUES ($this->id);";
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options (adhid) VALUES ($this->id);";
//$sql = "REPLACE INTO ".MAIN_DB_PREFIX."adherent_options SET adhid = $this->id";
foreach($this->array_options as $key => $value)
{
diff --git a/htdocs/adherents/adherent_options.class.php b/htdocs/adherents/adherent_options.class.php
index 8e521100ccf..c65da06bdb7 100644
--- a/htdocs/adherents/adherent_options.class.php
+++ b/htdocs/adherents/adherent_options.class.php
@@ -302,11 +302,11 @@ class AdherentOptions
{
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){
$escaped_label=mysql_escape_string($label);
- $sql_del = "delete from ".MAIN_DB_PREFIX."adherent_options_label where name =
+ $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."adherent_options_label WHERE name =
'$attrname';";
$this->db->query($sql_del);
- $sql = "insert into ".MAIN_DB_PREFIX."adherent_options_label (name,label)
- values ('$attrname','$escaped_label');";
+ $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label (name,label)
+ VALUES ('$attrname','$escaped_label');";
//$sql = "REPLACE INTO ".MAIN_DB_PREFIX."adherent_options_label SET name='$attrname',label='$escaped_label'";
if ( $this->db->query( $sql) )
diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php
index 5742842fe3f..796e7128b11 100755
--- a/htdocs/adherents/cartes/carte.php
+++ b/htdocs/adherents/cartes/carte.php
@@ -21,12 +21,12 @@
*
*/
-/*! \file htdocs/adherents/cartes/carte.php
- \ingroup adherent
- \brief Page de creation d'une carte PDF
- \version $Revision$
-*/
-
+/*! \file htdocs/adherents/cartes/carte.php
+ \ingroup adherent
+ \brief Page de creation d'une carte PDF
+ \version $Revision$
+*/
+
require("./pre.inc.php");
require(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
@@ -110,7 +110,7 @@ if ($result)
$pdf->Output();
}else{
llxHeader();
- print "Erreur mysql";
+ print "Erreur de la base de données";
llxFooter("Dernière modification $Date$ révision $Revision$");
}
?>
diff --git a/htdocs/adherents/cartes/etiquette.php b/htdocs/adherents/cartes/etiquette.php
index 48337cec883..edc9594d283 100755
--- a/htdocs/adherents/cartes/etiquette.php
+++ b/htdocs/adherents/cartes/etiquette.php
@@ -21,12 +21,12 @@
*
*/
-/*! \file htdocs/adherents/cartes/etiquette.php
- \ingroup adherent
- \brief Page de creation d'etiquettes
- \version $Revision$
-*/
-
+/*! \file htdocs/adherents/cartes/etiquette.php
+ \ingroup adherent
+ \brief Page de creation d'etiquettes
+ \version $Revision$
+*/
+
require("./pre.inc.php");
require(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php");
@@ -80,7 +80,7 @@ if ($result)
$pdf->Output();
}else{
llxHeader();
- print "Erreur mysql ".$db->error();
+ print "Erreur de la base de données : ".$db->error();
llxFooter("Dernière modification $Date$ révision $Revision$");
}
?>
diff --git a/htdocs/admin/system/mysql-tables-contraintes.php b/htdocs/admin/system/database-tables-contraintes.php
similarity index 93%
rename from htdocs/admin/system/mysql-tables-contraintes.php
rename to htdocs/admin/system/database-tables-contraintes.php
index 8afafdddf36..8a1fd635b06 100644
--- a/htdocs/admin/system/mysql-tables-contraintes.php
+++ b/htdocs/admin/system/database-tables-contraintes.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/htdocs/admin/system/mysql-tables.php b/htdocs/admin/system/database-tables.php
similarity index 96%
rename from htdocs/admin/system/mysql-tables.php
rename to htdocs/admin/system/database-tables.php
index 0b20d4de159..1baa2ebf68b 100644
--- a/htdocs/admin/system/mysql-tables.php
+++ b/htdocs/admin/system/database-tables.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/htdocs/admin/system/mysql.php b/htdocs/admin/system/database.php
similarity index 93%
rename from htdocs/admin/system/mysql.php
rename to htdocs/admin/system/database.php
index 181da553389..807291044ce 100644
--- a/htdocs/admin/system/mysql.php
+++ b/htdocs/admin/system/database.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/htdocs/admin/system/pre.inc.php b/htdocs/admin/system/pre.inc.php
index 0b9ddea9479..e2707bdcc0a 100644
--- a/htdocs/admin/system/pre.inc.php
+++ b/htdocs/admin/system/pre.inc.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -60,9 +62,9 @@ function llxHeader($head = "", $urlp = "") {
$menu->add("pear.php", $langs->trans("Pear"));
$menu->add_submenu("pear_packages.php", $langs->trans("PearPackages"));
- $menu->add("mysql.php", $langs->trans("Database"));
- $menu->add_submenu("mysql-tables.php", $langs->trans("Tables"));
- $menu->add_submenu("mysql-tables-contraintes.php", $langs->trans("Constraints"));
+ $menu->add("database.php", $langs->trans("Database"));
+ $menu->add_submenu("database-tables.php", $langs->trans("Tables"));
+ $menu->add_submenu("database-tables-contraintes.php", $langs->trans("Constraints"));
left_menu($menu->liste);
}
diff --git a/htdocs/includes/modules/modProjet.class.php b/htdocs/includes/modules/modProjet.class.php
index 1bb5f2386a2..861b5a172f1 100644
--- a/htdocs/includes/modules/modProjet.class.php
+++ b/htdocs/includes/modules/modProjet.class.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -79,11 +81,11 @@ class modProjet extends DolibarrModules
*/
$this->remove();
$sql = array(
- "insert into ".MAIN_DB_PREFIX."rights_def values (40,'Tous les droits sur les projets','projet','a',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (41,'Lire les projets','projet','r',1);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (42,'Créer modifier les projets','projet','w',0);",
- //"insert into ".MAIN_DB_PREFIX."rights_def values (43,'Modifier les projets d\'autrui','projet','m',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (44,'Supprimer les projets','projet','d',0);"
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (40,'Tous les droits sur les projets','projet','a',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (41,'Lire les projets','projet','r',1);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (42,'Créer modifier les projets','projet','w',0);",
+ //"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (43,'Modifier les projets d\'autrui','projet','m',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (44,'Supprimer les projets','projet','d',0);"
);
return $this->_init($sql);
diff --git a/htdocs/includes/modules/modPropale.class.php b/htdocs/includes/modules/modPropale.class.php
index d461aa33c9a..b04de9d63c9 100644
--- a/htdocs/includes/modules/modPropale.class.php
+++ b/htdocs/includes/modules/modPropale.class.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -97,18 +99,18 @@ class modPropale extends DolibarrModules
*/
$this->remove();
$sql = array(
- "insert into ".MAIN_DB_PREFIX."rights_def values (20,'Tous les droits sur les propositions commerciales','propale','a',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (21,'Lire les propositions commerciales','propale','r',1);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (22,'Créer modifier les propositions commerciales','propale','w',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (24,'Valider les propositions commerciales','propale','d',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (25,'Envoyer les propositions commerciales aux clients','propale','d',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (26,'Clôturer les propositions commerciales','propale','d',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (27,'Supprimer les propositions commerciales','propale','d',0);",
- "delete from ".MAIN_DB_PREFIX."propal_model_pdf where nom = '".$this->const[0][2]."'",
- "insert INTO ".MAIN_DB_PREFIX."propal_model_pdf (nom)
- values('".$this->const[0][2]."');",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (20,'Tous les droits sur les propositions commerciales','propale','a',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (21,'Lire les propositions commerciales','propale','r',1);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (22,'Créer modifier les propositions commerciales','propale','w',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (24,'Valider les propositions commerciales','propale','d',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (25,'Envoyer les propositions commerciales aux clients','propale','d',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (26,'Clôturer les propositions commerciales','propale','d',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (27,'Supprimer les propositions commerciales','propale','d',0);",
+ "DELETE FROM ".MAIN_DB_PREFIX."propal_model_pdf WHERE nom = '".$this->const[0][2]."'",
+ "INSERT INTO ".MAIN_DB_PREFIX."propal_model_pdf (nom)
+ VALUES('".$this->const[0][2]."');",
);
- //"insert into ".MAIN_DB_PREFIX."rights_def values (23,'Modifier les propositions commerciales d\'autrui','propale','m',0);",
+ //"INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (23,'Modifier les propositions commerciales d\'autrui','propale','m',0);",
return $this->_init($sql);
diff --git a/htdocs/includes/modules/modService.class.php b/htdocs/includes/modules/modService.class.php
index 50be337fee0..27c00725627 100644
--- a/htdocs/includes/modules/modService.class.php
+++ b/htdocs/includes/modules/modService.class.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -82,10 +84,10 @@ class modService extends DolibarrModules
*/
$this->remove();
$sql = array(
- "insert into ".MAIN_DB_PREFIX."rights_def values (30,'Tous les droits sur les produits/services','produit','a',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (31,'Lire les produits/services','produit','r',1);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (32,'Créer modifier les produits/services','produit','w',0);",
- "insert INTO ".MAIN_DB_PREFIX."rights_def values (34,'Supprimer les produits/services','produit','d',0);"
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (30,'Tous les droits sur les produits/services','produit','a',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (31,'Lire les produits/services','produit','r',1);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (32,'Créer modifier les produits/services','produit','w',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (34,'Supprimer les produits/services','produit','d',0);"
);
return $this->_init($sql);
diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php
index 46db860d33c..28d278e127f 100644
--- a/htdocs/includes/modules/modSociete.class.php
+++ b/htdocs/includes/modules/modSociete.class.php
@@ -1,6 +1,8 @@
* Copyright (C) 2004 Laurent Destailleur
+ * Copyright (C) 2004 Sebastien Di Cintio
+ * Copyright (C) 2004 Benoit Mortier
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -75,10 +77,10 @@ class modSociete extends DolibarrModules
*/
$this->remove();
$sql = array(
- "insert into ".MAIN_DB_PREFIX."rights_def values (120,'Tous les droits sur les sociétés','societe','a',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (121,'Lire les societes','societe','r',1);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (122,'Créer modifier les societes','societe','w',0);",
- "insert INTO ".MAIN_DB_PREFIX."rights_def values (129,'Supprimer les sociétés','societe','d',0);"
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (120,'Tous les droits sur les sociétés','societe','a',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (121,'Lire les societes','societe','r',1);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (122,'Créer modifier les societes','societe','w',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (129,'Supprimer les sociétés','societe','d',0);"
);
return $this->_init($sql);
diff --git a/htdocs/includes/modules/modTelephonie.class.php b/htdocs/includes/modules/modTelephonie.class.php
index 93171f6a714..f476783a54e 100644
--- a/htdocs/includes/modules/modTelephonie.class.php
+++ b/htdocs/includes/modules/modTelephonie.class.php
@@ -75,9 +75,9 @@ class modTelephonie extends DolibarrModules
*/
$this->remove();
$sql = array(
- "insert into ".MAIN_DB_PREFIX."rights_def values (140,'Tous les droits sur la telephonie','telephonie','a',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (141,'Consulter la telephonie','telephonie','r',0);",
- "insert into ".MAIN_DB_PREFIX."rights_def values (142,'Configurer la telephonie','telephonie','w',0);");
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (140,'Tous les droits sur la telephonie','telephonie','a',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (141,'Consulter la telephonie','telephonie','r',0);",
+ "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (142,'Configurer la telephonie','telephonie','w',0);");
return $this->_init($sql);
}