[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * $Id: reduc.class.php,v 1.5 2004/10/23 17:01:21 eldy Exp $ 5 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/compta/voyage/reduc.class.php,v $ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 */ 22 23 class Reduc { 24 var $id; 25 var $price; 26 var $label; 27 28 function Reduc($DB, $rowid=0) { 29 global $config; 30 31 $this->db = $DB; 32 $this->rowid = $rowid; 33 34 return 1; 35 } 36 37 function fetch($id) { 38 $sql = "SELECT b.rowid,".$this->db->pdate("b.date_debut")." as debut,".$this->db->pdate("b.date_fin")." as fin, b.amount, b.label "; 39 $sql .= " FROM ".MAIN_DB_PREFIX."voyage_reduc as b WHERE rowid = $id"; 40 41 $result = $this->db->query($sql); 42 43 if ($result) { 44 if ($this->db->num_rows()) { 45 $obj = $this->db->fetch_object($result); 46 47 $this->id = $obj->rowid; 48 $this->price = $obj->amount; 49 $this->label = $obj->label; 50 } 51 $this->db->free(); 52 } 53 } 54 55 56 } 57 58 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |