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)]; |
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); |
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)] != "")? |
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 |