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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1244 - (hide annotations)
Tue Feb 12 16:31:08 2013 UTC (11 years, 11 months ago) by nhaye
File size: 1661 byte(s)
Ajout du contrôle d'erreur sur les requêtes.

1 vpihour 633 <?php
2     //$Id$
3     //gen openMairie le 08/11/2012 14:59
4    
5     require_once ("../gen/obj/lot.class.php");
6    
7     class lot extends lot_gen {
8    
9     function lot($id,&$db,$debug) {
10     $this->constructeur($id,$db,$debug);
11     }// fin constructeur
12    
13 nhaye 1240 function triggerAjouterApres($id, &$db, $val, $DEBUG) {
14     parent::triggerAjouterApres($id, $db, $val, $DEBUG);
15     // Insertion du lien dossier/lot
16     require_once ("../obj/lien_dossier_lot.class.php");
17     $ldl = new lien_dossier_lot("]", $db, $DEBUG);
18     $valLdl['lien_dossier_lot'] = "";
19     $valLdl['dossier'] = $this->getParameter("idxformulaire");
20     $valLdl['lot'] = $this->valF["lot"];
21     $ldl->ajouter($valLdl, $db, $DEBUG);
22    
23     // Insertion du lien demandeur/lot
24     require_once ("../obj/lien_lot_demandeur.class.php");
25     $lld = new lien_lot_demandeur("]", $db, $DEBUG);
26     $sqlDemandeur = "SELECT * FROM ".DB_PREFIXE."lien_dossier_demandeur
27     WHERE dossier='".$this->getParameter("idxformulaire")."'";
28     $res = $db->query($sqlDemandeur);
29 nhaye 1244 $this->f->addToLog("db->query(\"".$sqlDemandeur."\");", VERBOSE_MODE);
30     $this->f->isDatabaseError($res);
31 nhaye 1240 while($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
32     unset($row['lien_dossier_demandeur']);
33     unset($row['dossier']);
34     $row['lien_lot_demandeur'] = "";
35     $row['lot'] = $this->valF["lot"];
36     $lld->ajouter($row, $db, $DEBUG);
37     }
38    
39     }
40    
41 vpihour 1241 function setType(&$form,$maj) {
42     parent::setType($form,$maj);
43    
44     $form->setType('dossier_autorisation', 'hidden');
45     }
46 vpihour 633 }// fin classe
47     ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26