/[openfoncier]/branches/3.14.0-b13/obj/dossier.class.php
ViewVC logotype

Diff of /branches/3.14.0-b13/obj/dossier.class.php

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

revision 1187 by nhaye, Wed Jan 9 11:58:51 2013 UTC revision 1358 by vpihour, Mon Mar 11 14:48:17 2013 UTC
# Line 56  class dossier extends dossier_gen { Line 56  class dossier extends dossier_gen {
56              $this->actions_sup = array();              $this->actions_sup = array();
57              $this->setParameter("actions", array());              $this->setParameter("actions", array());
58          }          }
           
         /*  
          * Si une action 'rapport_instruction' est présente et  
          * que le le rapport d'instruction existe déjà, lien vers l'objet en modification  
          * sinon, lien vers un script qui va créer le nouvel objet et  
          * rediriger l'utilisateur vers l'objet en modification.  
          */  
           
         // Vérifie si  un rapport d'instruction existe déjà  
         if ( isset($this->actions_sup["rapport_instruction"]) ) {  
               
             // Requête de vérification  
             $sql = "SELECT  
                     rapport_instruction  
                 FROM  
                     ".DB_PREFIXE."rapport_instruction  
                 WHERE  
                     dossier_instruction = '".$this->getParameter('idx')."'";  
               
             // Ajout au log  
             $this->f->addToLog("checkAccessibility(): db->query(\"".$sql."\");", VERBOSE_MODE);  
               
             // Exécution de la requête    
             $res=$this->f->db->query($sql);  
             $this->f->isDatabaseError($res);  
   
             /*  
              * S'il n'y a pas de rapport d'instruction, redirection vers un script  
              * de création, puis vers l'objet.  
              * */  
             if ( $res->numrows() == 0 ){  
                   
                 $this->actions_sup["rapport_instruction"]["lien"] =  
                     '../app/rapport_instruction.php?idx=';  
             }  
             // S'il a déjà été créé, lien vers l'objet en modification  
             elseif ( $res->numrows() > 0 ){  
                   
                 $row = & $res->fetchRow(DB_FETCHMODE_ASSOC);  
                 $this->actions_sup["rapport_instruction"]["lien"] =  
                     '../scr/form.php?obj=rapport_instruction&action=1&idx='.  
                     $row['rapport_instruction'].'&idD=';  
             }  
               
         }  
59      }      }
60    
61      /**      /**
# Line 536  class dossier extends dossier_gen { Line 491  class dossier extends dossier_gen {
491              $form->setType('division', 'hidden');              $form->setType('division', 'hidden');
492          }          }
493          $form->setType('dossier_autorisation', 'hiddenstatic');          $form->setType('dossier_autorisation', 'hiddenstatic');
494          $form->setType('dossier_instruction_type', 'selectstatic');          $form->setType('dossier_instruction_type', 'selecthiddenstatic');
495          //          //
496          if ($maj == 0) {          if ($maj == 0) {
497              $form->setType('dossier_autorisation', 'select');              $form->setType('dossier_autorisation', 'select');
# Line 917  class dossier extends dossier_gen { Line 872  class dossier extends dossier_gen {
872          $form->setRegroupe('terrain_surface','G',_('surface'),'');// $this->aff_surface);          $form->setRegroupe('terrain_surface','G',_('surface'),'');// $this->aff_surface);
873          $form->setRegroupe('terrain_surface_calcul','F','');          $form->setRegroupe('terrain_surface_calcul','F','');
874                    
         // localisation  
         $form->setRegroupe('parcelle','D',_('localisation'), $this->aff_localisation);  
         $form->setRegroupe('pos','G','');  
         $form->setRegroupe('sig','F','');  
         if($maj==1){  
             $form->setRegroupe('sig','G','');  
             $form->setRegroupe('geom','F','');  
         }  
           
         // description  
         $form->setRegroupe('batiment_nombre','D',_('statistique'), $this->aff_description);  
         $form->setRegroupe('logement_nombre','G','');  
         $form->setRegroupe('hauteur','G','');  
         $form->setRegroupe('piece_nombre','G','');          
         $form->setRegroupe('shon','G','');  
         $form->setRegroupe('shon_calcul','G','');  
         $form->setRegroupe('shob','G','');  
         $form->setRegroupe('lot','F','');  
           
875          $form->setRegroupe('description','D',_('description').' '._('servitude'), $this->aff_amenagement);          $form->setRegroupe('description','D',_('description').' '._('servitude'), $this->aff_amenagement);
876          $form->setRegroupe('servitude','F','');          $form->setRegroupe('servitude','F','');
877                    
# Line 1270  class dossier extends dossier_gen { Line 1206  class dossier extends dossier_gen {
1206                  INNER JOIN ".DB_PREFIXE."dossier_autorisation                  INNER JOIN ".DB_PREFIXE."dossier_autorisation
1207                      ON dossier_autorisation_type_detaille.dossier_autorisation_type_detaille =                      ON dossier_autorisation_type_detaille.dossier_autorisation_type_detaille =
1208                         dossier_autorisation.dossier_autorisation_type_detaille                         dossier_autorisation.dossier_autorisation_type_detaille
1209                  INNER JOIN ".DB_PREFIXE."dossier ON dossier.dossier_autorisation = dossier_autorisaiton.dossier_autorisation                  INNER JOIN ".DB_PREFIXE."dossier ON dossier.dossier_autorisation = dossier_autorisation.dossier_autorisation
1210                  WHERE dossier.dossier = ".$idxDossier;                  WHERE dossier.dossier = '".$idxDossier."'";
1211          $res = $db -> getOne($sql);          $res = $this -> db -> getOne($sql);
1212          $this->f->isDatabaseError();          $this->f->isDatabaseError();
1213            $this->addToLog($sql);
1214          return $res;          return $res;
1215      }      }
1216            

Legend:
Removed from v.1187  
changed lines
  Added in v.1358

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26