noalyss Version-9
fiche_def_ref.class.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS 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 * NOALYSS 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 NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19// Copyright Author Dany De Bontridder danydb@aevalys.eu
20/*! \file
21 * \brief fiche_def_ref, a fiche is owned by fiche_def which is owned by
22 * fiche_def_ref
23 */
24/*!
25 * \brief fiche_def_ref, a fiche is owned by fiche_def which is owned by
26 * fiche_def_ref
27 */
28
30{
31 var $frd_id; /*!< $frd_id fiche_def_ref.frd_id */
32 var $frd_text; /*!< $frd_text fiche_def_ref.frd_tex */
33 var $frd_class_base; /*!< fiche_def_ref.frd_class_base */
34 var $attribut; /*!< array which containing list of attr */
35 /* it is used with dynamic variables */
36
37 function __construct($p_cn,$p_frd_id=-1)
38 {
39 $this->db=$p_cn;
40 $this->frd_id=$p_frd_id;
41 $this->attribut=array('frd_id','frd_text','frd_class_base');
42 }
43
44 /**
45 * get category of cards by model
46 * @param $p_modele if the FRD_ID
47 * @return array of category (fd_id)
48 */
49 function get_by_modele($p_modele)
50 {
51 $array = array();
52 $result = $this->db->get_array('select fd_id from fiche_def where frd_id=$1', array($p_modele));
53 for ($i = 0; $i < count($result); $i++)
54 {
55 $array[$i] = $result[$i]['fd_id'];
56 }
57 return $array;
58 }
59
60}
61?>
fiche_def_ref, a fiche is owned by fiche_def which is owned by fiche_def_ref
get_by_modele($p_modele)
get category of cards by model
__construct($p_cn, $p_frd_id=-1)
$SecUser db