From 80035ab5439618fbcfeaff76274d36e436062b9d Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 20 Jul 2004 13:52:24 +0000 Subject: [PATCH] Ajout fonction info() --- htdocs/propal.class.php | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index f35fa26c534..54055b2919a 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -724,6 +724,49 @@ class Propal return -1; } } + + + /* + * Information sur l'objet + * + */ + Function info($id) + { + $sql = "SELECT c.rowid, ".$this->db->pdate("datec")." as datec"; + + $sql .= " FROM ".MAIN_DB_PREFIX."propal as c"; + $sql .= " WHERE c.rowid = $id"; + + if ($this->db->query($sql)) + { + if ($this->db->num_rows()) + { + $obj = $this->db->fetch_object($result , 0); + + $this->id = $obj->rowid; + + $cuser = new User($this->db, $obj->fk_user); + $cuser->fetch(); + $this->user_creation = $cuser; + + $muser = new User($this->db, $obj->fk_user_modif); + $muser->fetch(); + $this->user_modification = $muser; + + $this->date_creation = $obj->datec; + $this->date_modification = $obj->tms; + + } + $this->db->free(); + + } + else + { + print $this->db->error(); + } + } + + } class PropaleLigne