[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: client.class.php,v 1.9 2005/09/02 21:56:45 eldy Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/boutique/client/client.class.php,v $ 20 * 21 */ 22 23 /** 24 \file htdocs/boutique/client/client.class.php 25 \brief Classe permettant de gèrer des clients de la boutique online 26 \author Rodolphe Quiedeville 27 \version $Revision: 1.9 $ 28 */ 29 30 /** 31 \class Client 32 \brief Classe permettant de gèrer des clients de la boutique online 33 */ 34 35 class Client 36 { 37 var $db ; 38 39 var $id ; 40 var $nom; 41 42 function Client($DB, $id=0) 43 { 44 $this->db = $DB; 45 $this->id = $id ; 46 } 47 48 /** 49 \brief Fonction permettant de recupèrer les informations d'un clients de la boutique 50 \param id Id du client 51 */ 52 53 function fetch ($id) 54 { 55 56 $sql = "SELECT customers_id, customers_lastname, customers_firstname FROM ".OSC_DB_NAME.".customers WHERE customers_id = $id"; 57 58 $result = $this->db->query($sql) ; 59 60 if ( $result ) 61 { 62 $result = $this->db->fetch_array(); 63 64 $this->id = $result["customers_id"]; 65 $this->name = stripslashes($result["customers_firstname"]) . " " . stripslashes($result["customers_lastname"]); 66 67 $this->db->free(); 68 } 69 else 70 { 71 print $this->db->error(); 72 } 73 74 return $result; 75 } 76 77 } 78 ?>
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 |
![]() |