/[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 837 by nhaye, Fri Nov 23 17:50:13 2012 UTC revision 838 by nhaye, Tue Nov 27 12:03:05 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=".              $sql = "SELECT libelle FROM civilite WHERE civilite=".
166                          $this->val[array_search('civilite', $this->champs)];                          $this->val[array_search('civilite', $this->champs)];
# Line 146  class demandeur extends demandeur_gen { Line 169  class demandeur extends demandeur_gen {
169              $this->f->isDatabaseError($civilite);              $this->f->isDatabaseError($civilite);
170              echo $civilite." ".              echo $civilite." ".
171                  $this->val[array_search('particulier_nom', $this->champs)]." ".                  $this->val[array_search('particulier_nom', $this->champs)]." ".
172                  $this->val[array_search('particulier_prenom', $this->champs)]."<br/>";                  $this->val[array_search('particulier_prenom', $this->champs)]."<br/>\n";
173          } else {          } else {
174              echo $this->val[array_search('personne_morale_raison_sociale', $this->champs)]." ".              echo $this->val[array_search('personne_morale_raison_sociale', $this->champs)]." ".
175                  $this->val[array_search('personne_morale_denomination', $this->champs)]."<br/>";                  $this->val[array_search('personne_morale_denomination', $this->champs)]."<br/>\n";
176              $sql = "SELECT libelle FROM civilite WHERE civilite=".              $sql = "SELECT libelle FROM civilite WHERE civilite=".
177                          $this->val[array_search('personne_morale_civilite', $this->champs)];                          $this->val[array_search('personne_morale_civilite', $this->champs)];
178              $civilite = $this->f->db->getone($sql);              $civilite = $this->f->db->getone($sql);
# Line 157  class demandeur extends demandeur_gen { Line 180  class demandeur extends demandeur_gen {
180              $this->f->isDatabaseError($civilite);              $this->f->isDatabaseError($civilite);
181              echo $civilite." ".              echo $civilite." ".
182                  $this->val[array_search('personne_morale_nom', $this->champs)]." ".                  $this->val[array_search('personne_morale_nom', $this->champs)]." ".
183                  $this->val[array_search('personne_morale_nom', $this->champs)]."<br/>";                  $this->val[array_search('personne_morale_nom', $this->champs)]."<br/>\n";
184          }          }
185          echo (($this->val[array_search('numero', $this->champs)] != "")?          echo (($this->val[array_search('numero', $this->champs)] != "")?
186              $this->val[array_search('numero', $this->champs)]." " : "").              $this->val[array_search('numero', $this->champs)]." " : "").
187          (($this->val[array_search('voie', $this->champs)] != "")?          (($this->val[array_search('voie', $this->champs)] != "")?
188              $this->val[array_search('voie', $this->champs)]." " : "").              $this->val[array_search('voie', $this->champs)]." " : "").
189          (($this->val[array_search('complement', $this->champs)] != "")?          (($this->val[array_search('complement', $this->champs)] != "")?
190              $this->val[array_search('complement', $this->champs)]." " : "")."<br/>".              $this->val[array_search('complement', $this->champs)]." " : "")"<br/>\n".
191          (($this->val[array_search('code_postal', $this->champs)] != "")?          (($this->val[array_search('code_postal', $this->champs)] != "")?
192              $this->val[array_search('code_postal', $this->champs)]." " : "").              $this->val[array_search('code_postal', $this->champs)]." " : "").
193          (($this->val[array_search('localite', $this->champs)] != "")?          (($this->val[array_search('localite', $this->champs)] != "")?
# Line 172  class demandeur extends demandeur_gen { Line 195  class demandeur extends demandeur_gen {
195          (($this->val[array_search('bp', $this->champs)] != "")?          (($this->val[array_search('bp', $this->champs)] != "")?
196              $this->val[array_search('bp', $this->champs)]." " : "").              $this->val[array_search('bp', $this->champs)]." " : "").
197          (($this->val[array_search('cedex', $this->champs)] != "")?          (($this->val[array_search('cedex', $this->champs)] != "")?
198              $this->val[array_search('cedex', $this->champs)]." " : "")."<br/>".              $this->val[array_search('cedex', $this->champs)]." " : "")."<br/>\n".
199          (($this->val[array_search('telephone_fixe', $this->champs)] != "")?          (($this->val[array_search('telephone_fixe', $this->champs)] != "")?
200              $this->val[array_search('telephone_fixe', $this->champs)]." " : "").              $this->val[array_search('telephone_fixe', $this->champs)]." " : "").
201          (($this->val[array_search('telephone_mobile', $this->champs)] != "")?          (($this->val[array_search('telephone_mobile', $this->champs)] != "")?
202              $this->val[array_search('telephone_mobile', $this->champs)]." " : "");              $this->val[array_search('telephone_mobile', $this->champs)]." " : "");
203          echo "</div>";          if($linkable) {
204                echo "</a>\n";
205            }
206            echo "</div>\n";
207      }      }
208    
209  }// fin classe  }// fin classe

Legend:
Removed from v.837  
changed lines
  Added in v.838

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26