Nettoyage du code

This commit is contained in:
Rodolphe Quiedeville 2003-08-27 10:58:49 +00:00
parent a40b5f4657
commit 45f6b5bd3c
19 changed files with 20 additions and 55 deletions

View File

@ -42,7 +42,6 @@ print '<tr><td>user</td><td>' . $conf->db->user . '&nbsp;</td><td>&nbsp;</td></t
print '<tr><td>pass</td><td>' . $conf->db->pass . '&nbsp;</td><td>&nbsp;</td></tr>'; print '<tr><td>pass</td><td>' . $conf->db->pass . '&nbsp;</td><td>&nbsp;</td></tr>';
print '<tr><td>Database name</td><td>' . $conf->db->name . '</td><td>&nbsp;</td></tr>'; print '<tr><td>Database name</td><td>' . $conf->db->name . '</td><td>&nbsp;</td></tr>';
print '</table>'; print '</table>';
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

@ -22,8 +22,6 @@
require("./pre.inc.php"); require("./pre.inc.php");
$db = new Db();
if ($action == 'add') { if ($action == 'add') {
$editeur = new Editeur($db); $editeur = new Editeur($db);

View File

@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader(); llxHeader();
$db = new Db();
if ($sortfield == "") { if ($sortfield == "") {
$sortfield="lower(e.nom)"; $sortfield="lower(e.nom)";
} }

View File

@ -25,8 +25,6 @@ require("../service.class.php3");
llxHeader(); llxHeader();
$db = new Db();
if ($action == 'add') { if ($action == 'add') {
$service = new Service($db); $service = new Service($db);

View File

@ -23,8 +23,6 @@ require("./pre.inc.php3");
llxHeader(); llxHeader();
$db = new Db();
function valeur($sql) function valeur($sql)
{ {
global $db; global $db;
@ -41,7 +39,6 @@ function valeur($sql)
/* /*
* *
*/ */
$db = new Db();
print_titre("Charges"); print_titre("Charges");

View File

@ -30,10 +30,8 @@ if ($user->societe_id > 0)
exit; exit;
} }
llxHeader(); llxHeader();
$db = new Db();
/* /*
* *

View File

@ -1,8 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* $Id$
* $Source$
* *
* 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
@ -18,13 +15,14 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id$
* $Source$
*
*/ */
require("./pre.inc.php3"); require("./pre.inc.php3");
llxHeader(); llxHeader();
$db = new Db();
function valeur($sql) function valeur($sql)
{ {
global $db; global $db;
@ -41,8 +39,6 @@ function valeur($sql)
/* /*
* *
*/ */
$db = new Db();
if ($action == 'add') if ($action == 'add')
{ {

View File

@ -1,8 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* $Id$
* $Source$
* *
* 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
@ -18,6 +15,9 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id$
* $Source$
*
*/ */
require("./pre.inc.php3"); require("./pre.inc.php3");
@ -25,7 +25,6 @@ require("./reduc.class.php3");
llxHeader(); llxHeader();
$db = new Db();
if ($action == 'add') { if ($action == 'add') {
$author = $GLOBALS["REMOTE_USER"]; $author = $GLOBALS["REMOTE_USER"];

View File

@ -1,8 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* $Id$
* $Source$
* *
* 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
@ -18,12 +15,14 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id$
* $Source$
*
*/ */
require("./pre.inc.php3"); require("./pre.inc.php3");
llxHeader(); llxHeader();
$db = new Db();
if ($action == 'add') { if ($action == 'add') {
$author = $GLOBALS["REMOTE_USER"]; $author = $GLOBALS["REMOTE_USER"];

View File

@ -1,8 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* $Id$
* $Source$
* *
* 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
@ -18,24 +15,17 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id$
* $Source$
*
*/ */
require("./pre.inc.php3"); require("./pre.inc.php3");
llxHeader(); llxHeader();
$db = new Db();
if ($vline) {
$viewline = $vline;
} else {
$viewline = 20;
}
print_titre ("Abonnement de réduction"); print_titre ("Abonnement de réduction");
print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">"; print "<TABLE border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";
print "<TR class=\"liste_titre\">"; print "<TR class=\"liste_titre\">";
print "<td>Date</td><td>Description</TD>"; print "<td>Date</td><td>Description</TD>";

View File

@ -1,8 +1,5 @@
<?PHP <?PHP
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* $Id$
* $Source$
* *
* 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
@ -18,13 +15,14 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id$
* $Source$
*
*/ */
require("./pre.inc.php3"); require("./pre.inc.php3");
llxHeader(); llxHeader();
$db = new Db();
?> ?>

View File

@ -26,7 +26,6 @@ require("../facture.class.php3");
llxHeader(); llxHeader();
$db = new Db();
$mesg = ''; $mesg = '';
if ($action == 'add') if ($action == 'add')

View File

@ -21,8 +21,6 @@
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
$db = new Db();
llxHeader(); llxHeader();

View File

@ -23,7 +23,6 @@
require("./pre.inc.php3"); require("./pre.inc.php3");
llxHeader(); llxHeader();
$db = new Db();
if ($action == 'add') { if ($action == 'add') {
$author = $GLOBALS["REMOTE_USER"]; $author = $GLOBALS["REMOTE_USER"];

View File

@ -23,8 +23,6 @@ require("./pre.inc.php3");
require("./fichinter.class.php3"); require("./fichinter.class.php3");
require("../project.class.php3"); require("../project.class.php3");
$db = new Db();
/* /*
* Sécurité accés client * Sécurité accés client
*/ */

View File

@ -22,9 +22,7 @@
require("./pre.inc.php3"); require("./pre.inc.php3");
require("../contact.class.php3"); require("../contact.class.php3");
llxHeader(); llxHeader();
$db = new Db();
/* /*
* Liste * Liste

View File

@ -32,8 +32,6 @@ if ($user->societe_id > 0)
$socid = $user->societe_id; $socid = $user->societe_id;
} }
$db = new Db();
if ($sortorder == "") if ($sortorder == "")
{ {
$sortorder="ASC"; $sortorder="ASC";

View File

@ -21,7 +21,6 @@
*/ */
require("./pre.inc.php3"); require("./pre.inc.php3");
$db = new Db();
if ($sortorder == "") if ($sortorder == "")
{ {
$sortfield="lower(s.nom)"; $sortfield="lower(s.nom)";

View File

@ -72,6 +72,11 @@ define('FPDF_FONTPATH',DOL_DOCUMENT_ROOT .'/includes/fpdf/font/');
$db = new DoliDb(); $db = new DoliDb();
// PEAR
//require("DB.php");
//$dbpear = new DB();
//
//
$user = new User($db); $user = new User($db);
$user->fetch($GLOBALS["REMOTE_USER"]); $user->fetch($GLOBALS["REMOTE_USER"]);