[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2003 Éric Seigne <erics@rycks.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: osccommande.class.php,v 1.6 2005/07/09 14:34:44 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/commande/osccommande.class.php,v $ 21 * 22 */ 23 24 class OscCommande { 25 var $db ; 26 27 var $id ; 28 var $client_name ; 29 30 function OscCommande($DB, $id=0) { 31 $this->db = $DB; 32 $this->id = $id ; 33 } 34 /* 35 * 36 * 37 * 38 */ 39 function fetch ($id) 40 { 41 42 $sql = "SELECT o.orders_id, o.customers_name, o.orders_status FROM ".OSC_DB_NAME.".orders as o"; 43 $sql .= " WHERE o.orders_id = $id"; 44 45 $result = $this->db->query($sql) ; 46 47 if ( $result ) 48 { 49 $result = $this->db->fetch_array(); 50 51 $this->id = $result["rowid"]; 52 $this->client_name = $result["customers_name"]; 53 54 $this->nom_url = '<a href="'.DOL_URL_ROOT.'/commande/fiche.php?id='.$result["rowid"].'">'.$result["nom"].'</a>'; 55 } 56 $this->db->free(); 57 58 return $result; 59 } 60 /* 61 * 62 * 63 */ 64 function liste_products () 65 { 66 $ga = array(); 67 68 $sql = "SELECT a.rowid, a.title FROM ".MAIN_DB_PREFIX."album as a, ".MAIN_DB_PREFIX."album_to_groupart as l"; 69 $sql .= " WHERE a.rowid = l.fk_album AND l.fk_groupart = ".$this->id; 70 $sql .= " ORDER BY a.title"; 71 72 if ($this->db->query($sql) ) 73 { 74 $nump = $this->db->num_rows(); 75 76 if ($nump) 77 { 78 $i = 0; 79 while ($i < $nump) 80 { 81 $obj = $this->db->fetch_object(); 82 83 $ga[$obj->rowid] = $obj->title; 84 $i++; 85 } 86 } 87 return $ga; 88 } 89 else 90 { 91 print $this->db->error(); 92 } 93 } 94 /* 95 * 96 * 97 */ 98 } 99 ?>
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 |
![]() |