else $texte.html('<center><i>-</i></center>'); }; $actualiseMontantModal = function(elem) { $first = elem.parent().parent().children('label').first(); $tarif = $first.next().next().next().next().next().next().next().next().next().next().children('select').first(); $recharge = $first.next().next().next().next().next().next().next().next().next().next().next().children('select').first(); $texte = $first.next().next().next().next().next().next().next().next().next().next().next().next().children('div').first(); $logement = $tarif.children('option:selected').first().data('logement'); $logement = ($logement == 1 ? '<?php echo printLogementTarif(1); ?> ' : '<?php echo printLogementTarif(0); ?> '); $sport_special = $tarif.children('option:selected').first().data('sportspecial'); $sport_special = $sport_special ? '<b>'+$sport_special+'</b>' : 'aucun'; $montant = $tarif.children('option:selected').first().data('montant') + $recharge.children('option:selected').first().data('montant'); if ($.isNumeric($montant)) $texte.html('<i>Montant total : <b>'+$montant+' €</b><br />Logement : '+$logement+'<br />Sport spécial : '+$sport_special+'</i>'); else $texte.html('<i>Montant total : <b>-</b><br />Logement : <b>-</b><br />Sport spécial : <b>-</b></i>'); }; $actualiseTarifs = function(elem) { $first = elem.parent().parent().children('td').first(); $sportif = $first.next().next().next().children('input').first();
<ul style="margin-left:20px; list-style-type:none"> <?php foreach ($tarifs as $tarif) { ?> <li style="margin-bottom:15px"> <b><?php echo $tarif['nom']; ?> </b> (<?php echo sprintf('%.2f €', $tarif['tarif']); ?> ) <?php echo printLogementTarif($tarif['logement']); ?> <br /> <?php echo nl2br($tarif['description']); ?> <br /> <?php if (!empty($tarif['id_sport_special'])) { ?> <i>Sport Spécial : </i> <b><?php echo stripslashes($tarif['sport']); ?> </b> <?php echo printSexe($tarif['sexe']); ?>