2
0
forked from Wavyzz/dolibarr

ajout des copyrights, cleanup code, changement des noms de fichiers pour

les rendres plus generiques
This commit is contained in:
opensides
2004-09-10 22:59:06 +00:00
parent 808aa2a480
commit 7725d155b0
13 changed files with 65 additions and 49 deletions

View File

@@ -350,9 +350,9 @@ class Adherent
if (sizeof($this->array_options) > 0 ) 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); $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"; //$sql = "REPLACE INTO ".MAIN_DB_PREFIX."adherent_options SET adhid = $this->id";
foreach($this->array_options as $key => $value) foreach($this->array_options as $key => $value)
{ {

View File

@@ -302,11 +302,11 @@ class AdherentOptions
{ {
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){ if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-]*$/",$attrname)){
$escaped_label=mysql_escape_string($label); $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';"; '$attrname';";
$this->db->query($sql_del); $this->db->query($sql_del);
$sql = "insert into ".MAIN_DB_PREFIX."adherent_options_label (name,label) $sql = "INSERT INTO ".MAIN_DB_PREFIX."adherent_options_label (name,label)
values ('$attrname','$escaped_label');"; VALUES ('$attrname','$escaped_label');";
//$sql = "REPLACE INTO ".MAIN_DB_PREFIX."adherent_options_label SET name='$attrname',label='$escaped_label'"; //$sql = "REPLACE INTO ".MAIN_DB_PREFIX."adherent_options_label SET name='$attrname',label='$escaped_label'";
if ( $this->db->query( $sql) ) if ( $this->db->query( $sql) )

View File

@@ -110,7 +110,7 @@ if ($result)
$pdf->Output(); $pdf->Output();
}else{ }else{
llxHeader(); llxHeader();
print "Erreur mysql"; print "Erreur de la base de donn<6E>es";
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
} }
?> ?>

View File

@@ -80,7 +80,7 @@ if ($result)
$pdf->Output(); $pdf->Output();
}else{ }else{
llxHeader(); llxHeader();
print "Erreur mysql ".$db->error(); print "Erreur de la base de donn<6E>es : ".$db->error();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
} }
?> ?>

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -60,9 +62,9 @@ function llxHeader($head = "", $urlp = "") {
$menu->add("pear.php", $langs->trans("Pear")); $menu->add("pear.php", $langs->trans("Pear"));
$menu->add_submenu("pear_packages.php", $langs->trans("PearPackages")); $menu->add_submenu("pear_packages.php", $langs->trans("PearPackages"));
$menu->add("mysql.php", $langs->trans("Database")); $menu->add("database.php", $langs->trans("Database"));
$menu->add_submenu("mysql-tables.php", $langs->trans("Tables")); $menu->add_submenu("database-tables.php", $langs->trans("Tables"));
$menu->add_submenu("mysql-tables-contraintes.php", $langs->trans("Constraints")); $menu->add_submenu("database-tables-contraintes.php", $langs->trans("Constraints"));
left_menu($menu->liste); left_menu($menu->liste);
} }

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -79,11 +81,11 @@ class modProjet extends DolibarrModules
*/ */
$this->remove(); $this->remove();
$sql = array( $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 (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 (41,'Lire les projets','projet','r',1);",
"insert into ".MAIN_DB_PREFIX."rights_def values (42,'Cr<43>er modifier les projets','projet','w',0);", "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (42,'Cr<43>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 (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 (44,'Supprimer les projets','projet','d',0);"
); );
return $this->_init($sql); return $this->_init($sql);

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -97,18 +99,18 @@ class modPropale extends DolibarrModules
*/ */
$this->remove(); $this->remove();
$sql = array( $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 (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 (21,'Lire les propositions commerciales','propale','r',1);",
"insert into ".MAIN_DB_PREFIX."rights_def values (22,'Cr<43>er modifier les propositions commerciales','propale','w',0);", "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (22,'Cr<43>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 (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 (25,'Envoyer les propositions commerciales aux clients','propale','d',0);",
"insert into ".MAIN_DB_PREFIX."rights_def values (26,'Cl<43>turer les propositions commerciales','propale','d',0);", "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (26,'Cl<43>turer les propositions commerciales','propale','d',0);",
"insert into ".MAIN_DB_PREFIX."rights_def values (27,'Supprimer 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]."'", "DELETE FROM ".MAIN_DB_PREFIX."propal_model_pdf WHERE nom = '".$this->const[0][2]."'",
"insert INTO ".MAIN_DB_PREFIX."propal_model_pdf (nom) "INSERT INTO ".MAIN_DB_PREFIX."propal_model_pdf (nom)
values('".$this->const[0][2]."');", 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); return $this->_init($sql);

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -82,10 +84,10 @@ class modService extends DolibarrModules
*/ */
$this->remove(); $this->remove();
$sql = array( $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 (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 (31,'Lire les produits/services','produit','r',1);",
"insert into ".MAIN_DB_PREFIX."rights_def values (32,'Cr<43>er modifier les produits/services','produit','w',0);", "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (32,'Cr<43>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 (34,'Supprimer les produits/services','produit','d',0);"
); );
return $this->_init($sql); return $this->_init($sql);

View File

@@ -1,6 +1,8 @@
<?PHP <?PHP
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -75,10 +77,10 @@ class modSociete extends DolibarrModules
*/ */
$this->remove(); $this->remove();
$sql = array( $sql = array(
"insert into ".MAIN_DB_PREFIX."rights_def values (120,'Tous les droits sur les soci<63>t<EFBFBD>s','societe','a',0);", "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (120,'Tous les droits sur les soci<63>t<EFBFBD>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 (121,'Lire les societes','societe','r',1);",
"insert into ".MAIN_DB_PREFIX."rights_def values (122,'Cr<43>er modifier les societes','societe','w',0);", "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (122,'Cr<43>er modifier les societes','societe','w',0);",
"insert INTO ".MAIN_DB_PREFIX."rights_def values (129,'Supprimer les soci<63>t<EFBFBD>s','societe','d',0);" "INSERT INTO ".MAIN_DB_PREFIX."rights_def VALUES (129,'Supprimer les soci<63>t<EFBFBD>s','societe','d',0);"
); );
return $this->_init($sql); return $this->_init($sql);

View File

@@ -75,9 +75,9 @@ class modTelephonie extends DolibarrModules
*/ */
$this->remove(); $this->remove();
$sql = array( $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 (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 (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 (142,'Configurer la telephonie','telephonie','w',0);");
return $this->_init($sql); return $this->_init($sql);
} }