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

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

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

revision 828 by nhaye, Fri Nov 23 17:50:13 2012 UTC revision 847 by nhaye, Wed Nov 28 10:36:53 2012 UTC
# Line 136  class demandeur extends demandeur_gen { Line 136  class demandeur extends demandeur_gen {
136      /**      /**
137       * Synthèse des demandeurs pour le formulaire de la demande       * Synthèse des demandeurs pour le formulaire de la demande
138       */       */
139      function afficherSynthese($type) {      function afficherSynthese($type, $linkable) {
140          echo "<div class=\"".$type."\">";  
141            // Conteneur du demandeur
142            echo "<div class=\"".$type."\" id=\"".$type."_".$this->val[array_search('demandeur', $this->champs)]."\">\n";
143            if($linkable) {
144                echo "<a href=\"#\" onclick=\"removeDemandeur('".
145                    $type."_".$this->val[array_search('demandeur', $this->champs)].
146                    "'); return false;\">
147                    <span class=\"demandeur_del om-icon om-icon-16 om-icon-fix delete-16\" title=\"".
148                    _("Supprimer le demandeur")."\">"._("Supprimer le demandeur")."</span>
149                    </a>";
150            }
151            // Valeur de formulaire à retourner
152            echo "<input type=\"hidden\" name=\"".$type.
153                                            (($type == "petitionnaire")? "[]":"" ).
154                "\" value=\"".$this->val[array_search('demandeur', $this->champs)]."\" />\n";
155            // Lien de modification du demandeur
156            if($linkable) {
157                echo "<a class=\"edit_demandeur\" href=\"#\"
158                    onclick=\"editDemandeur('".$this->val[array_search('demandeur', $this->champs)]."','".
159                                            $this->val[array_search('type_demandeur', $this->champs)]."',".
160                                            $type."_".$this->val[array_search('demandeur', $this->champs)].
161                                            ");return false;\">\n";
162            }
163            // Affichage des infos du demandeur
164          if($this->val[array_search('qualite', $this->champs)] == 'particulier') {          if($this->val[array_search('qualite', $this->champs)] == 'particulier') {
165              $sql = "SELECT libelle FROM civilite WHERE civilite=".              if(!empty($this->val[array_search('civilite', $this->champs)])) {
166                          $this->val[array_search('civilite', $this->champs)];                  $sql = "SELECT libelle FROM civilite WHERE civilite=".
167              $civilite = $this->f->db->getone($sql);                              $this->val[array_search('civilite', $this->champs)];
168              $this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE);                  $civilite = $this->f->db->getone($sql);
169              $this->f->isDatabaseError($civilite);                  $this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE);
170              echo $civilite." ".                  $this->f->isDatabaseError($civilite);
171                  $this->val[array_search('particulier_nom', $this->champs)]." ".                  echo $civilite." ";
172                  $this->val[array_search('particulier_prenom', $this->champs)]."<br/>";              }
173                echo $this->val[array_search('particulier_nom', $this->champs)]." ".
174                    $this->val[array_search('particulier_prenom', $this->champs)]."<br/>\n";
175          } else {          } else {
176              echo $this->val[array_search('personne_morale_raison_sociale', $this->champs)]." ".              echo $this->val[array_search('personne_morale_raison_sociale', $this->champs)]." ".
177                  $this->val[array_search('personne_morale_denomination', $this->champs)]."<br/>";                  $this->val[array_search('personne_morale_denomination', $this->champs)]."<br/>\n";
178              $sql = "SELECT libelle FROM civilite WHERE civilite=".                  if(!empty($this->val[array_search('personne_morale_civilite', $this->champs)])) {
179                          $this->val[array_search('personne_morale_civilite', $this->champs)];                      $sql = "SELECT libelle FROM civilite WHERE civilite=".
180              $civilite = $this->f->db->getone($sql);                                  $this->val[array_search('personne_morale_civilite', $this->champs)];
181              $this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE);                      $civilite = $this->f->db->getone($sql);
182              $this->f->isDatabaseError($civilite);                      $this->f->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE);
183              echo $civilite." ".                      $this->f->isDatabaseError($civilite);
184                  $this->val[array_search('personne_morale_nom', $this->champs)]." ".                      echo $civilite." ";
185                  $this->val[array_search('personne_morale_nom', $this->champs)]."<br/>";                  }
186                    echo $this->val[array_search('personne_morale_nom', $this->champs)]." ".
187                    $this->val[array_search('personne_morale_nom', $this->champs)]."<br/>\n";
188          }          }
189          echo (($this->val[array_search('numero', $this->champs)] != "")?          echo (($this->val[array_search('numero', $this->champs)] != "")?
190              $this->val[array_search('numero', $this->champs)]." " : "").              $this->val[array_search('numero', $this->champs)]." " : "").
191          (($this->val[array_search('voie', $this->champs)] != "")?          (($this->val[array_search('voie', $this->champs)] != "")?
192              $this->val[array_search('voie', $this->champs)]." " : "").              $this->val[array_search('voie', $this->champs)]." " : "").
193          (($this->val[array_search('complement', $this->champs)] != "")?          (($this->val[array_search('complement', $this->champs)] != "")?
194              $this->val[array_search('complement', $this->champs)]." " : "")."<br/>".              $this->val[array_search('complement', $this->champs)]." " : "")."<br/>\n".
195          (($this->val[array_search('code_postal', $this->champs)] != "")?          (($this->val[array_search('code_postal', $this->champs)] != "")?
196              $this->val[array_search('code_postal', $this->champs)]." " : "").              $this->val[array_search('code_postal', $this->champs)]." " : "").
197          (($this->val[array_search('localite', $this->champs)] != "")?          (($this->val[array_search('localite', $this->champs)] != "")?
# Line 172  class demandeur extends demandeur_gen { Line 199  class demandeur extends demandeur_gen {
199          (($this->val[array_search('bp', $this->champs)] != "")?          (($this->val[array_search('bp', $this->champs)] != "")?
200              $this->val[array_search('bp', $this->champs)]." " : "").              $this->val[array_search('bp', $this->champs)]." " : "").
201          (($this->val[array_search('cedex', $this->champs)] != "")?          (($this->val[array_search('cedex', $this->champs)] != "")?
202              $this->val[array_search('cedex', $this->champs)]." " : "")."<br/>".              $this->val[array_search('cedex', $this->champs)]." " : "")."<br/>\n".
203          (($this->val[array_search('telephone_fixe', $this->champs)] != "")?          (($this->val[array_search('telephone_fixe', $this->champs)] != "")?
204              $this->val[array_search('telephone_fixe', $this->champs)]." " : "").              $this->val[array_search('telephone_fixe', $this->champs)]." " : "").
205          (($this->val[array_search('telephone_mobile', $this->champs)] != "")?          (($this->val[array_search('telephone_mobile', $this->champs)] != "")?
206              $this->val[array_search('telephone_mobile', $this->champs)]." " : "");              $this->val[array_search('telephone_mobile', $this->champs)]." " : "");
207          echo "</div>";          if($linkable) {
208                echo "</a>\n";
209            }
210            echo "</div>\n";
211      }      }
212    
213  }// fin classe  }// fin classe

Legend:
Removed from v.828  
changed lines
  Added in v.847

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26