/[openfoncier]/trunk/app/sitadel.php
ViewVC logotype

Diff of /trunk/app/sitadel.php

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

revision 200 by fraynaud, Mon Oct 17 07:31:00 2011 UTC revision 267 by fraynaud, Wed Dec 7 11:44:34 2011 UTC
# Line 67  if($validation==0){ Line 67  if($validation==0){
67                      substr($_POST["datefin"],0,2);                      substr($_POST["datefin"],0,2);
68      if ($correct==true){ // ***      if ($correct==true){ // ***
69          // dossiers concern�s          // dossiers concern�s
70          $sql= "select * from dossier";          $sql= "select * from ".DB_PREFIXE."dossier";
71          $sql.= " where (nature='PC' or nature = 'PD' or nature = 'PA' or nature = 'DP')";          $sql.= " where (nature='PC' or nature = 'PD' or nature = 'PA' or nature = 'DP')";
72          $sql.= " AND ((date_depot >='".$datedebut."' AND date_depot<='".$datefin."')";          $sql.= " AND ((date_depot >='".$datedebut."' AND date_depot<='".$datefin."')";
73          $sql.= " OR (date_decision>='".$datedebut."' AND date_decision<='".$datefin."')";          $sql.= " OR (date_decision>='".$datedebut."' AND date_decision<='".$datefin."')";
# Line 83  if($validation==0){ Line 83  if($validation==0){
83              // sitadel              // sitadel
84              $g->val=$val;              $g->val=$val;
85              // parametre              // parametre
86              $sql = "select parametre, valeur from statistique where dossier ='".$row['dossier']."'";              $sql = "select parametre, valeur from ".DB_PREFIXE."statistique where dossier ='".$row['dossier']."'";
87              $res1 = $f->db -> query ($sql);              $res1 = $f->db -> query ($sql);
88              $f->isDatabaseError($res1);              $f->isDatabaseError($res1);
89              while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)){              while ($row1=& $res1->fetchRow(DB_FETCHMODE_ASSOC)){
# Line 163  if($validation==0){ Line 163  if($validation==0){
163                      if($row['avis']!=''){                      if($row['avis']!=''){
164                          $avis_sitadel = "0";                          $avis_sitadel = "0";
165                          $avis_sitadel_motif="0" ;                          $avis_sitadel_motif="0" ;
166                          $sql="select sitadel, sitadel_motif from avis where avis ='".                          $sql="select sitadel, sitadel_motif from ".DB_PREFIXE."avis where avis ='".
167                                  $row['avis']."'";                                  $row['avis']."'";
168                          $res1 = $f->db -> query ($sql);                          $res1 = $f->db -> query ($sql);
169                          $f->isDatabaseError($res1);                          $f->isDatabaseError($res1);
# Line 184  if($validation==0){ Line 184  if($validation==0){
184                          $decision.= $g->amenagement();                          $decision.= $g->amenagement();
185                          if($row['travaux']!=''){                          if($row['travaux']!=''){
186                              $sql= "select codelascot,libelle                              $sql= "select codelascot,libelle
187                                  from travaux where travaux=".$row['travaux'];                                  from ".DB_PREFIXE."travaux where travaux=".$row['travaux'];
188                              $res2 = $f->db -> query ($sql);                              $res2 = $f->db -> query ($sql);
189                              $f->isDatabaseError($res2);                              $f->isDatabaseError($res2);
190                                $temp=$row['description'];
191                                // enlever les RC
192                                $temp = str_replace( chr(10), " ", $temp);
193                                $temp = str_replace( chr(13), " ", $temp);
194                              while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){                              while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){
195                                  $travaux = $row2['libelle'];                                  $travaux = $row2['libelle']." "; // ***
196                                  $lascot = $row2['codelascot'];                                  $lascot = $row2['codelascot'];
197                              }                              }
198                                $travaux.=" ".$temp;
199                              $decision.= $g->travaux($travaux,$lascot, $row['types']);                              $decision.= $g->travaux($travaux,$lascot, $row['types']);
200                          }                          }
201                          $sql3="select * from destination_shon where dossier = '".                          $sql3="select * from ".DB_PREFIXE."destination_shon where dossier = '".
202                                  $row['dossier']."' order by destination";                                  $row['dossier']."' order by destination";
203                          $res3 = $f->db -> query ($sql3);                          $res3 = $f->db -> query ($sql3);
204                          $f->isDatabaseError($res3);                          $f->isDatabaseError($res3);
# Line 230  if($validation==0){ Line 235  if($validation==0){
235                      if($row['avis']!=''){                      if($row['avis']!=''){
236                          $avis_sitadel = 0;                          $avis_sitadel = 0;
237                          $avis_sitadel_motif=0 ;                          $avis_sitadel_motif=0 ;
238                          $sql="select sitadel, sitadel_motif from avis where avis ='".                          $sql="select sitadel, sitadel_motif from ".DB_PREFIXE."avis where avis ='".
239                                  $row['avis']."'";                                  $row['avis']."'";
240                          $res1 = $f->db -> query ($sql);                          $res1 = $f->db -> query ($sql);
241                          $f->isDatabaseError($res1);                          $f->isDatabaseError($res1);
# Line 247  if($validation==0){ Line 252  if($validation==0){
252                          $modificatif.=$g->adresse_terrain();    //***                          $modificatif.=$g->adresse_terrain();    //***
253                          $modificatif.=$g->parcelle();    //***                          $modificatif.=$g->parcelle();    //***
254                          $modificatif.=$g->terrain();    //***                          $modificatif.=$g->terrain();    //***
255                            // enlever les RC
256                            $temp=$row['description'];
257                            $temp = str_replace( chr(10), " ", $temp);
258                            $temp = str_replace( chr(13), " ", $temp);
259                          if($row['travaux']!=''){                          if($row['travaux']!=''){
260                              $sql= "select codelascot,libelle                              $sql= "select codelascot,libelle
261                                  from travaux where travaux=".$row['travaux'];                                  from ".DB_PREFIXE."travaux where travaux=".$row['travaux'];
262                              $res2 = $f->db -> query ($sql);                              $res2 = $f->db -> query ($sql);
263                              $f->isDatabaseError($res2);                              $f->isDatabaseError($res2);
264                              while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){                              while ($row2=& $res2->fetchRow(DB_FETCHMODE_ASSOC)){
265                                  $travaux = $row2['libelle'];                                  $travaux = $row2['libelle']." ".$row['description']; // ***;
266                                  $lascot = $row2['codelascot'];                                  $lascot = $row2['codelascot'];
267                              }                              }
268                                $travaux.=" ".$temp;
269                              $modificatif.= $g->travaux($travaux,$lascot, $row['types']);                              $modificatif.= $g->travaux($travaux,$lascot, $row['types']);
270                          }                          }
271                          $sql3="select * from destination_shon where dossier = '".                          $sql3="select * from ".DB_PREFIXE."destination_shon where dossier = '".
272                                  $row['dossier']."' order by destination";                                  $row['dossier']."' order by destination";
273                          $res3 = $f->db -> query ($sql3);                          $res3 = $f->db -> query ($sql3);
274                          $f->isDatabaseError($res3);                          $f->isDatabaseError($res3);

Legend:
Removed from v.200  
changed lines
  Added in v.267

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26