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

Diff of /trunk/obj/dossier.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 871 by fmichon, Wed Nov 28 21:28:38 2012 UTC revision 1016 by vpihour, Fri Dec 7 13:40:51 2012 UTC
# Line 25  class dossier extends dossier_gen { Line 25  class dossier extends dossier_gen {
25      var $aff_localisation = "collapsible";      var $aff_localisation = "collapsible";
26      var $aff_description = "startClosed";      var $aff_description = "startClosed";
27      var $aff_amenagement = "startClosed";      var $aff_amenagement = "startClosed";
28        var $dossier_instruction_type;
29    
30          function dossier($id,&$db,$DEBUG) {      function dossier($id,&$db,$DEBUG) {
31          $this->constructeur($id,$db,$DEBUG);          $this->constructeur($id,$db,$DEBUG);
32      } // fin constructeur      } // fin constructeur
33    
34        /*Mutateur pour ma variable dossier_instruction_type*/
35        public function getDossierInstructionType(){
36            return $this->dossier_instruction_type;
37        }
38        public function setDossierInstructionType($dossier_instruction_type){
39            $this->dossier_instruction_type = $dossier_instruction_type;
40        }
41            
42        // {{{ Gestion de la confidentialité des données spécifiques
43    
44        /**
45         * Surcharge pour gérer les actions disponibles dans le portlet
46         */
47        function checkAccessibility() {
48            //
49            parent::checkAccessibility();
50            // Si l'utilisateur est un intructeur qui en correspond pas à la
51            // division du dossier
52            if ($this->f->isUserInstructeur()
53                && isset($this->f->om_utilisateur["division"])
54                && $this->f->om_utilisateur["division"] != $this->getDivisionFromDossier()) {
55                //
56                $this->actions_sup = array();
57                $this->setParameter("actions", array());
58            }
59        }
60    
61        /**
62         * Cette methode est à surcharger elle permet de tester dans chaque classe
63         * des droits des droits spécifiques en fonction des données
64         */
65        function canAccess() {
66            // Si l'utilisateur est un intructeur qui ne correspond pas à la
67            // division du dossier
68            if ($this->f->isUserInstructeur()
69                && $this->f->om_utilisateur["division"] != $this->getDivisionFromDossier()
70                && $this->getParameter("maj") != 3) {
71                //
72                return false;
73            }
74            //
75            return true;
76        }
77    
78        /**
79         * Cette méthode permet de récupérer la division d'un dossier
80         */
81        function getDivisionFromDossier() {
82            //
83            if (!isset($this->val[array_search("dossier", $this->champs)])) {
84                return NULL;
85            }
86            //
87            $sql = "select division from ".DB_PREFIXE."dossier ";
88            $sql .= " where dossier='".$this->val[array_search("dossier", $this->champs)]."'";
89            //
90            $division = $this->db->getOne($sql);
91            $this->addToLog("getDivisionFromDossier(): db->getone(\"".$sql."\")", VERBOSE_MODE);
92            database::isError($division);
93            //
94            return $division;
95        }
96    
97        // }}}
98        /*
99         * Ajoute un numéro au dossier
100         *
101         */
102      function setValFAjout($val = array()) {      function setValFAjout($val = array()) {
103          // Cle primaire          
104          $lettre=$this->f->collectivite["lettre"];          /*Récupération de la lettre associé au type de dossier d'instruction*/
105          $numero_unique = $this->f->collectivite["numero_unique"];          $code = $this->getCode($this->getDossierInstructionType());
106          if($numero_unique==1){          
107          // numero unique (voir dyn/var.inc)          /* Récupération de la valeur du suffixe ce dossier_instruction_type */
108          $temp=$this->$db->nextId(DB_PREFIXE.$this->table);          $suffixe = $this->getSuffixe($this->getDossierInstructionType());
109          }else{          
110          // numero suivant nature          /*S'il est à TRUE, on récupère le numéro de version du dossier d'autorisation*/
111          $temp=$this->db->nextId(DB_PREFIXE."dossier_".$val['nature']);          $numeroVersion = "";
112          }          if ( $suffixe == 't' ){
113          $temp=str_pad($temp,4,"0", STR_PAD_LEFT);              
114          $this->valF['dossier'] = $this->valF['nature'].$this->valF['annee'].              $numeroVersion = $this->getNumeroVersion($val['dossier_autorisation']);
115                                   $lettre.$temp;              
116                /* Incrémentation du numéro de version */
117                if ( is_numeric($numeroVersion) or $numeroVersion == -1 ){
118                    
119                    $this->incrementNumeroVersion($val['dossier_autorisation'], ++$numeroVersion);
120                }
121            }
122            
123            /*Création du numéro de dossier*/
124            $this->valF['dossier'] = $val['dossier_autorisation']."/$code$numeroVersion";
125      }      }
126    
127        /*Récupère la valeur du suffixe d'un dossier_instruction_type*/
128        function getSuffixe($dossierInstructionType){
129            
130            $suffixe = "";
131            
132            $sql = "SELECT
133                        suffixe
134                    FROM
135                        ".DB_PREFIXE."dossier_instruction_type
136                    WHERE
137                        dossier_instruction_type = $dossierInstructionType";
138                        
139            $this->addToLog("getSuffixe(): db->query(\"".$sql."\")", VERBOSE_MODE);
140            $res = $this->db->query($sql);
141            if (database :: isError($res))
142                die($res->getMessage()."erreur ".$sql);
143                
144            if ( $res->numRows() > 0 ){
145                
146                $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
147                $suffixe =  $row['suffixe'];
148            }
149            
150            return $suffixe;
151        }
152        
153        /*Récupère dans la table de paramètrage la lettre correspondant
154         * au dossier_instruction_type
155         */
156        function getCode($dossierInstructionType){
157            
158            $code = "";
159            
160            $sql = "SELECT
161                        code
162                    FROM
163                        ".DB_PREFIXE."dossier_instruction_type
164                    WHERE
165                        dossier_instruction_type = $dossierInstructionType";
166                        
167            $this->addToLog("getCode(): db->query(\"".$sql."\")", VERBOSE_MODE);
168            $res = $this->db->query($sql);
169            if (database :: isError($res))
170                die($res->getMessage()."erreur ".$sql);
171                
172            if ( $res->numRows() > 0 ){
173                
174                $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
175                $code =  $row['code'];
176            }
177            
178            return $code;
179        }
180        
181        /*Récupère le numéro de version d'un dossier_autorisation*/
182        function getNumeroVersion($dossierAutorisation){
183            
184            $numeroVersion = "";
185            
186            $sql = "SELECT
187                        numero_version
188                    FROM
189                        ".DB_PREFIXE."dossier_autorisation
190                    WHERE
191                        dossier_autorisation = '$dossierAutorisation'";
192                        
193            $this->addToLog("getNumeroVersion(): db->query(\"".$sql."\")", VERBOSE_MODE);
194            $res = $this->db->query($sql);
195            if (database :: isError($res))
196                die($res->getMessage()."erreur ".$sql);
197                
198            if ( $res->numRows() > 0 ){
199                
200                $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
201                $numeroVersion =  $row['numero_version'];
202            }
203            
204            return $numeroVersion;
205        }
206        
207        /*Incrémente le numéro de version du dossier*/
208        function incrementNumeroVersion($dossierAutorisation, $nouveauNumeroVersion) {
209            
210            $valF = array (
211                        "numero_version" => $nouveauNumeroVersion
212                    );
213            
214            $res = $this->db->autoExecute(DB_PREFIXE."dossier_autorisation",
215                                        $valF,
216                                        DB_AUTOQUERY_UPDATE,
217                                        "dossier_autorisation = '$dossierAutorisation'");
218                                        
219            if (database :: isError($res))
220                die($res->getMessage()."erreur ".$sql);
221                
222        }
223        
224      function setvalF($val){      function setvalF($val){
225          parent::setvalF($val);          parent::setvalF($val);
226          // enlever les valeurs a ne pas saisir -> recherche en trigger ajouter et modifier          // enlever les valeurs a ne pas saisir -> recherche en trigger ajouter et modifier
# Line 316  class dossier extends dossier_gen { Line 491  class dossier extends dossier_gen {
491          if(!$this->f->getParameter('afficher_division') === 'true') {          if(!$this->f->getParameter('afficher_division') === 'true') {
492              $form->setType('division', 'hidden');              $form->setType('division', 'hidden');
493          }          }
494            $form->setType('dossier_autorisation', 'hiddenstatic');
495            //
496            if ($maj == 0) {
497                $form->setType('dossier_autorisation', 'select');
498            }
499            // On cache enjeu_ERP si l'option n'est pas activée
500            if($this->f->getParameter('option_ERP') != 'true') {
501                $form->setType('erp', 'hidden');
502                $form->setType('enjeu_erp', 'hidden');
503            }
504      }      }
505    
506      function setVal(&$form,$maj,$validation){      function setVal(&$form,$maj,$validation){
# Line 713  class dossier extends dossier_gen { Line 898  class dossier extends dossier_gen {
898                    
899      }      }
900    
       
   
901      /* =============================================================      /* =============================================================
902      * fonction trigger relative a la connexion SIG      * fonction trigger relative a la connexion SIG
903      * $sig = 1 dans dyn/var.inc      * $sig = 1 dans dyn/var.inc
# Line 735  class dossier extends dossier_gen { Line 918  class dossier extends dossier_gen {
918                            
919          }          }
920                    
921            
922            if ($this->f->getParameter('option_erp') != "") {
923                // envoi du message a ERP en cas d'un depot du dossier dat
924                if ($this->valF['nature'] ==
925                        $this->f->getParameter('erp_depot_dossier_dat')) {
926                    $msgenque = new MessageEnqueuer();
927                    $msgenque->setDossierInstructionIdentifier($this->valF['dossier']);
928                    $msgenque->enqueueMessage($msgenque::$ERP_DEPOT_DOSSIER_DAT);
929                }
930                
931                // envoi du message a ERP en cas d'une demande d'ouverture DAT
932                if ($this->valF['nature'] ==
933                        $this->f->getParameter('erp_demande_ouverture_dat')) {
934                    $msgenque = new MessageEnqueuer();
935                    $msgenque->setDossierInstructionIdentifier($this->valF['dossier']);
936                    $msgenque->enqueueMessage($msgenque::$ERP_DEMANDE_OUVERTURE_DAT);
937                }
938                
939                if ($this->valF['erp'] === true) {
940                    // envoi du message a ERP en cas d'annulation d'une demande
941                    if ($this->valF['nature'] ==
942                            $this->f->getParameter('erp_annulation_demande')) {
943                        $msgenque = new MessageEnqueuer();
944                        $msgenque->setDossierInstructionIdentifier($this->valF['dossier']);
945                        $msgenque->enqueueMessage($msgenque::$ERP_ANNULATION_DEMANDE);
946                    }
947                    
948                    // envoi du message a ERP en cas d'ouverture d'un dossier PC "rattache"
949                    // au dossier DAACT
950                    if ($this->valF['nature'] ==
951                            $this->f->getParameter('erp_demande_ouverture_pc_daact')) {
952                        $msgenque = new MessageEnqueuer();
953                        $msgenque->setDossierInstructionIdentifier($this->valF['dossier']);
954                        $msgenque->enqueueMessage($msgenque::$ERP_DEMANDE_OUVERTURE_PC);
955                    }
956                }
957            } // fin de if ($this->f->getParameter('option_erp') != "")        
958      }      }
959            
960      /*      /*
# Line 764  class dossier extends dossier_gen { Line 984  class dossier extends dossier_gen {
984              $sql = "SELECT              $sql = "SELECT
985                          quartier, arrondissement                          quartier, arrondissement
986                      FROM                      FROM
987                          quartier                          ".DB_PREFIXE."quartier
988                      WHERE                      WHERE
989                          code_impots='$quartier'";                          code_impots='$quartier'";
990                            
# Line 800  class dossier extends dossier_gen { Line 1020  class dossier extends dossier_gen {
1020      /*      /*
1021       * Retourne l'intructeur correspondant le mieux à la parcelle       * Retourne l'intructeur correspondant le mieux à la parcelle
1022       * */       * */
1023       function getInstructeurDivision( $quartier, $arrondissement, $section, $nature) {       function getInstructeurDivision( $quartier, $arrondissement, $section, $dossier_autorisation) {
1024                                    
1025          $quartier = ( $quartier == NULL ) ? -1 : $quartier;          $quartier = ( $quartier == NULL ) ? -1 : $quartier;
1026          $arrondissement = ( $arrondissement == NULL ) ? -1 : $arrondissement;          $arrondissement = ( $arrondissement == NULL ) ? -1 : $arrondissement;
1027                    
1028            /*Récupération du dossier_autorisation_type_detaille concerné par le $dossier_autorisation*/
1029          $sql = "          $sql = "
1030             SELECT             SELECT
1031                 instructeur, section, quartier, arrondissement, nature                 dossier_autorisation_type_detaille
1032             FROM             FROM
1033                 lien_localisation_nature l                 ".DB_PREFIXE."dossier_autorisation
1034             WHERE             WHERE
1035                 ( nature IS NULL AND arrondissement IS NULL AND quartier IS NULL AND section IS NULL ) OR                 dossier_autorisation = '$dossier_autorisation'";    
                ( nature IS NULL AND arrondissement IS NULL AND quartier IS NULL AND section = '$section' ) OR  
                ( nature IS NULL AND arrondissement IS NULL AND quartier = $quartier AND section IS NULL ) OR  
                ( nature IS NULL AND arrondissement IS NULL AND quartier = $quartier AND section = '$section' ) OR  
                ( nature IS NULL AND arrondissement = $arrondissement AND quartier IS NULL AND section IS NULL ) OR  
                ( nature IS NULL AND arrondissement = $arrondissement AND quartier IS NULL AND section = '$section' ) OR  
                ( nature IS NULL AND arrondissement = $arrondissement AND quartier = $quartier AND section IS NULL ) OR  
                ( nature IS NULL AND arrondissement = $arrondissement AND quartier = $quartier AND section = '$section' ) OR  
                ( nature = '$nature' AND arrondissement IS NULL AND quartier IS NULL AND section IS NULL ) OR  
                ( nature = '$nature' AND arrondissement IS NULL AND quartier IS NULL AND section = '$section' ) OR  
                ( nature = '$nature' AND arrondissement IS NULL AND quartier = $quartier AND section IS NULL ) OR  
                ( nature = '$nature' AND arrondissement IS NULL AND quartier = $quartier AND section = '$section' ) OR  
                ( nature = '$nature' AND arrondissement = $arrondissement AND quartier IS NULL AND section IS NULL ) OR  
                ( nature = '$nature' AND arrondissement = $arrondissement AND quartier IS NULL AND section = '$section' ) OR  
                ( nature = '$nature' AND arrondissement = $arrondissement AND quartier = $quartier AND section IS NULL ) OR  
                ( nature = '$nature' AND arrondissement = $arrondissement AND quartier = $quartier AND section = '$section' )  
            ORDER BY section, quartier, arrondissement, nature  
            LIMIT 1  
         ";  
1036                    
1037          $this->addToLog("getInstructeurDivision( quartier, arrondissement, section, nature) : db->query(\"$sql\")", VERBOSE_MODE);          $this->addToLog("getInstructeurDivision : db->query(\"$sql\")", VERBOSE_MODE);
1038          $res = $this->db->query($sql);          $resDATD = $this->db->query($sql);
1039          if (database :: isError($res))          if (database :: isError($resDATD))
1040              die($res->getMessage()."erreur ".$sql);              die($resDATD->getMessage()."erreur ".$sql);
1041                    
1042          if ( $res->numRows() > 0 ){          if ( $resDATD->numRows() > 0 ){
1043                $rowDATD = $resDATD->fetchRow(DB_FETCHMODE_ASSOC);
1044                            
1045              $row = $res->fetchRow(DB_FETCHMODE_ASSOC);              $sql = "
1046                   SELECT
1047                       instructeur, section, quartier, arrondissement, dossier_autorisation_type_detaille
1048                   FROM
1049                       ".DB_PREFIXE."affectation_automatique l
1050                   WHERE
1051                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement IS NULL AND quartier IS NULL AND section IS NULL ) OR
1052                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement IS NULL AND quartier IS NULL AND section = '$section' ) OR
1053                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement IS NULL AND quartier = $quartier AND section IS NULL ) OR
1054                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement IS NULL AND quartier = $quartier AND section = '$section' ) OR
1055                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement = $arrondissement AND quartier IS NULL AND section IS NULL ) OR
1056                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement = $arrondissement AND quartier IS NULL AND section = '$section' ) OR
1057                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement = $arrondissement AND quartier = $quartier AND section IS NULL ) OR
1058                       ( dossier_autorisation_type_detaille IS NULL AND arrondissement = $arrondissement AND quartier = $quartier AND section = '$section' ) OR
1059                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement IS NULL AND quartier IS NULL AND section IS NULL ) OR
1060                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement IS NULL AND quartier IS NULL AND section = '$section' ) OR
1061                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement IS NULL AND quartier = $quartier AND section IS NULL ) OR
1062                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement IS NULL AND quartier = $quartier AND section = '$section' ) OR
1063                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier IS NULL AND section IS NULL ) OR
1064                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier IS NULL AND section = '$section' ) OR
1065                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier = $quartier AND section IS NULL ) OR
1066                       ( dossier_autorisation_type_detaille = ".$rowDATD['dossier_autorisation_type_detaille']." AND arrondissement = $arrondissement AND quartier = $quartier AND section = '$section' )
1067                   ORDER BY section, quartier, arrondissement, dossier_autorisation_type_detaille
1068                   LIMIT 1
1069                ";
1070                            
1071              $sql = "SELECT division FROM instructeur WHERE instructeur = ".$row['instructeur'];              $this->addToLog("getInstructeurDivision : db->query(\"$sql\")", VERBOSE_MODE);
1072              $res = $this->db->query($sql);              $res = $this->db->query($sql);
1073              if (database :: isError($res))              if (database :: isError($res))
1074                  die($res->getMessage()."erreur ".$sql);                  die($res->getMessage()."erreur ".$sql);
1075                                
1076              if ( $res->numRows() > 0 ){              if ( $res->numRows() > 0 ){
1077                                    
1078                  $rowT=& $res->fetchRow(DB_FETCHMODE_ASSOC);                  $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
1079                  $row['division'] = $rowT['division'];                  
1080                    $sql = "SELECT division FROM ".DB_PREFIXE."instructeur WHERE instructeur = ".$row['instructeur'];
1081                    $res = $this->db->query($sql);
1082                    if (database :: isError($res))
1083                        die($res->getMessage()."erreur ".$sql);
1084                        
1085                    if ( $res->numRows() > 0 ){
1086                        
1087                        $rowT=& $res->fetchRow(DB_FETCHMODE_ASSOC);
1088                        $row['division'] = $rowT['division'];
1089                    }
1090                    
1091                    return $row;
1092              }              }
               
             return $row;  
1093          }          }
1094            
1095          return NULL;          return NULL;
1096       }       }
1097            
# Line 893  class dossier extends dossier_gen { Line 1131  class dossier extends dossier_gen {
1131              $section = $this->getSection($val['parcelle']);              $section = $this->getSection($val['parcelle']);
1132          }          }
1133                    
1134          // Si aucun instructeur n'est saisi et que la nature n'est pas vide          // Si aucun instructeur n'est saisi et que la dossier_autorisation_type_detaille n'est pas vide
1135          // alors on récupère l'instructeur et la division depuis l'affectation          // alors on récupère l'instructeur et la division depuis l'affectation
1136          if ( ( empty($this->valF['instructeur']) || $this->valF['instructeur'] == '' ) && $val['nature'] != '' ) {          if ( ( empty($this->valF['instructeur']) || $this->valF['instructeur'] == '' ) && $val['dossier_autorisation'] != '' ) {
1137                            
1138              //              //
1139              $instructeurDivision = $this->getInstructeurDivision($quartier, $arrondissement, $section, $val['nature']);              $instructeurDivision = $this->getInstructeurDivision($quartier, $arrondissement, $section, $val['dossier_autorisation']);
1140              if ( $instructeurDivision != NULL ){              if ( $instructeurDivision != NULL ){
1141                                    
1142                  $instructeur = $instructeurDivision['instructeur'];                  $instructeur = $instructeurDivision['instructeur'];
# Line 941  class dossier extends dossier_gen { Line 1179  class dossier extends dossier_gen {
1179                  $this->addToMessage("<br>"._("Parcelle ou parcelle_lot non renseignee dans dossier")." ".$id." <br>");                      $this->addToMessage("<br>"._("Parcelle ou parcelle_lot non renseignee dans dossier")." ".$id." <br>");    
1180              }              }
1181          }          }
1182                    
1183            // verification si envoi vers ERP est active
1184            if ($this->f->getParameter('option_erp') != "") {
1185                if ($this->val[array_search('a_qualifier', $this->champs)] == 't'
1186                    && $this->valF['a_qualifier'] === false) {
1187                                    
1188                    // envoi du message "ERP Qualifie" pour un dossier DAT qui a besoin
1189                    // de la qualification URBA
1190                    if ($this->valF['nature'] ==
1191                                 $this->f->getParameter('erp_nature_dat')) {
1192                        $msgenque = new MessageEnqueuer();
1193                        $msgenque->setDossierInstructionIdentifier($this->valF['dossier']);
1194                        $msgenque->setCompetence($this->valF['autorite_competente']);
1195                        $msgenque->setContraintePlu($this->valF['servitude']);
1196                        $msgenque->setReferenceCadastrale(
1197                                $this->getReferenceCadastrale($this->valF['dossier']));
1198                        $msgenque->enqueueMessage($msgenque::$ERP_QUALIFIE);                            
1199                    }
1200                    
1201                    // envoi des messages a ERP en cas du dossier PC traite par URBA, et
1202                    // qui etait classifie come ERP
1203                    if (substr($this->valF['nature'], 0, 2) ==
1204                            $this->f->getParameter('erp_dossier_nature_pc')
1205                        && $this->valF['erp'] == true) {
1206                        $msgenque = new MessageEnqueuer();
1207                        $msgenque->setDossierInstructionIdentifier($this->valF['dossier']);
1208                        $msgenque->enqueueMessage($msgenque::$ERP_DEMANDE_COMPLETUDE_PC);
1209                        $msgenque->enqueueMessage($msgenque::$ERP_DEMANDE_QUALIFICATION_PC);
1210                    }
1211                }
1212            } // fin de if($this->f->getParameter('option_erp'))
1213      }      }
1214        
1215        
1216        /**
1217         * Retourne la reference cadastrale de la demande attache a un dossier ERP
1218         * specifique
1219         * @param string $dossier L'identifiant du dossier
1220         * @return string|null La reference cadastrale si elle est trouve,
1221         * sinon NULL. En cas d'erreur de la BD, l'execution s'arrete.
1222         */
1223        function getReferenceCadastrale($dossier) {
1224            $sql = "SELECT terrain_references_cadastrales FROM ".DB_PREFIXE."demande WHERE dossier_instruction = '" . $dossier . "'";
1225            $res = $this->db->limitquery($sql, 0, 1);
1226            $this->addToLog("getReferenceCadastrale(): db->limitquery(\"".
1227                            str_replace(",",", ",$sql)."\", 0, 1);", VERBOSE_MODE);
1228            // Si une erreur survient on die
1229            if (database::isError($res, true)) {
1230                // Appel de la methode de recuperation des erreurs
1231                $this->erreur_db($res->getDebugInfo(), $res->getMessage(), 'demande');
1232            }
1233            // retourne la nature du dossier
1234            while ($row =& $res->fetchRow()) {
1235                return $row[0];
1236            }
1237            // la nature n'etait pas trouve, ce qui ne devrait pas se passer
1238            return NULL;
1239        }
1240        
1241    
1242      function sig_parametre(&$db){      function sig_parametre(&$db){
1243          if (file_exists ("../dyn/var.inc"))          if (file_exists ("../dyn/var.inc"))

Legend:
Removed from v.871  
changed lines
  Added in v.1016

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26