mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
83 lines
1.8 KiB
PHP
83 lines
1.8 KiB
PHP
<?PHP
|
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
*
|
|
* 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
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* $Id$
|
|
* $Source$
|
|
*
|
|
*/
|
|
|
|
class modFacture {
|
|
|
|
/*
|
|
* Initialisation
|
|
*
|
|
*/
|
|
|
|
Function modFacture($DB) {
|
|
$this->db = $DB ;
|
|
}
|
|
/*
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
|
|
Function init() {
|
|
/*
|
|
* Activation du module
|
|
*/
|
|
$const[0][0] = "FAC_PDF_INTITULE";
|
|
$const[0][1] = "chaine";
|
|
$const[1][0] = "FAC_PDF_ADRESSE";
|
|
$const[1][1] = "texte";
|
|
$const[2][0] = "FAC_PDF_TEL";
|
|
$const[2][1] = "chaine";
|
|
$const[3][0] = "FAC_PDF_FAX";
|
|
$const[3][1] = "chaine";
|
|
$const[4][0] = "FAC_PDF_SIREN";
|
|
$const[4][1] = "chaine";
|
|
$const[5][0] = "FAC_PDF_SIRET";
|
|
$const[5][1] = "chaine";
|
|
|
|
foreach ($const as $key => $value)
|
|
{
|
|
$name = $const[$key][0];
|
|
$type = $const[$key][1];
|
|
|
|
|
|
$sql = "SELECT count(*) FROM llx_const WHERE name ='".$name."'";
|
|
|
|
if ( $this->db->query($sql) )
|
|
{
|
|
$row = $this->db->fetch_row($sql);
|
|
|
|
if ($row[0] == 0)
|
|
{
|
|
|
|
$sql = "INSERT INTO llx_const (name,type) VALUES ('".$name."','".$type."')";
|
|
|
|
if ( $this->db->query($sql) )
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
?>
|