/[openfoncier]/trunk/obj/avocat.class.php
ViewVC logotype

Annotation of /trunk/obj/avocat.class.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6037 - (hide annotations)
Wed Feb 8 16:34:41 2017 UTC (7 years, 11 months ago) by nmeucci
Original Path: branches/contentieux/obj/avocat.class.php
File size: 2869 byte(s)
Correction formulaire demandeur

1 nhaye 5043 <?php
2     /**
3     * Gestion des avodats.
4     *
5     * @package openads
6     * @version SVN : $Id$
7     */
8     require_once("../obj/demandeur.class.php");
9    
10    
11     /**
12     * Les avodats héritent des demandeurs.
13     */
14 nhaye 5051 class avocat extends demandeur {
15 nhaye 5043
16     /**
17     * Constructeur.
18     *
19     * @param string $id Identifiant du avodat.
20     * @param database $db Instance de base de données.
21     * @param boolean $debug Flag de debug.
22     */
23     function __construct($id, $db, $debug) {
24     $this->constructeur($id, $db, $debug);
25     }
26 nhaye 5051
27     /**
28     * Cache les champs de notification, fréquent et type_demandeur.
29     *
30     * @param formulaire $form Instance de la classe om_formulaire.
31     * @param integer $maj Identifiant de l'action.
32     */
33     function setType(&$form, $maj) {
34     parent::setType($form, $maj);
35 nhaye 5043
36 nhaye 5051 $form->setType('type_demandeur', 'hidden');
37     $form->setType('notification', 'hidden');
38     $form->setType('frequent', 'hidden');
39     }
40    
41    
42     /**
43     * Met le champ type_demandeur à avocat par défaut.
44     *
45     * @param formulaire $form Instance de la classe om_formulaire.
46     * @param integer $maj Identifiant de l'action.
47     * @param integer $validation Nombre de validation du formulaire.
48     * @param database $db Instance de la classe om_database.
49     */
50     function setVal(&$form, $maj, $validation, &$db) {
51     if ($maj == 0 ) {
52     $form->setVal("type_demandeur", "avocat");
53     }
54     }
55    
56     /*
57     * Met le champ type_demandeur à avocat par défaut.
58     */
59     function setValsousformulaire(&$form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, &$dnu1 = null, $dnu2 = null) {
60     parent::setValSousFormulaire($form, $maj, $validation, $idxformulaire, $retourformulaire, $typeformulaire, $dnu1, $dnu2);
61     $form->setVal("type_demandeur", "avocat");
62     if ($maj == 0 ) {
63     // Récupération des infos du demandeur passé en paramètre
64     if ($this->getParameter('idx_demandeur') != "") {
65     include '../sql/pgsql/delegataire.form.inc.php';
66     $sql = "SELECT ".implode(", ", $champs)."
67     FROM ".DB_PREFIXE."demandeur ".
68     "WHERE demandeur=".$this->getParameter('idx_demandeur');
69     $res = $this->db->query($sql);
70     $this->f->addToLog(
71     "setValSousFormulaire() : db->query(\"".$sql."\")",
72     VERBOSE_MODE
73     );
74     if ( database::isError($res)) {
75     die();
76     }
77     $row = & $res->fetchRow(DB_FETCHMODE_ASSOC);
78     foreach ($row as $key => $value) {
79     $form->setVal($key, $value);
80     }
81     $form->setVal("frequent", "f");
82     }
83     }
84     }
85    
86 nhaye 5043 }

Properties

Name Value
svn:keywords Id

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26