| [ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2005 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: task.class.php,v 1.1 2005/08/21 12:39:46 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/task.class.php,v $ 20 * 21 */ 22 23 /** 24 \file htdocs/task.class.php 25 \ingroup projet 26 \brief Fichier de la classe de gestion des taches 27 \version $Revision: 1.1 $ 28 */ 29 30 /** 31 \class Task 32 \brief Classe permettant la gestion des taches 33 */ 34 35 class Task { 36 var $id; 37 var $db; 38 39 /** 40 * \brief Constructeur de la classe 41 * \param DB handler accès base de données 42 */ 43 function Task($DB) 44 { 45 $this->db = $DB; 46 } 47 48 /* 49 * \brief Charge objet projet depuis la base 50 * \param rowid id du projet à charger 51 */ 52 53 function fetch($rowid) 54 { 55 56 $sql = "SELECT title, fk_projet, duration_effective, statut"; 57 $sql .= " FROM ".MAIN_DB_PREFIX."projet_task"; 58 $sql .= " WHERE rowid=".$rowid; 59 60 $resql = $this->db->query($sql); 61 if ($resql) 62 { 63 if ($this->db->num_rows($resql)) 64 { 65 $obj = $this->db->fetch_object($resql); 66 67 $this->id = $rowid; 68 $this->title = $obj->title; 69 $this->statut = $obj->statut; 70 $this->projet_id = $obj->fk_projet; 71 72 $this->db->free($resql); 73 74 return 0; 75 } 76 else 77 { 78 return -1; 79 } 80 } 81 else 82 { 83 print $this->db->error(); 84 return -2; 85 } 86 } 87 } 88 ?>
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 |
|