
<center><h2><strong>Ubuntu</strong></h2>
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php
    $ClassCdeV2                                  = new ClassCdeV2();
    $EtapeCourante                               = $_SESSION['AIRCMDV2']['etape'];
    $Type                                        = $_SESSION['AIRCMDV2']['type'];
    $_SESSION['AIRCMDV2']['Param']['btnSuivant'] = "enabled";

//  Liste les Options
    $CdeNo = 0;
    foreach ($_SESSION['AIRCMDV2']['LstProduits']['opt_'.$Type] as $No => $Produit) {
        $CdeNo++;

    //  Phrases je ne veux pas...
        if($Produit['ref']=="OPT1" && $Produit['offre']=="opt_i") $Jenveuxpas = "Je n'ai pas besoin de cette option";
        if($Produit['ref']=="OPT2" && $Produit['offre']=="opt_i") $Jenveuxpas = "Je n'ai pas besoin du ".utf8_encode($Produit['nom']);
        if($Produit['ref']=="OPT1" && $Produit['offre']=="opt_t") $Jenveuxpas = "Je ne veux pas de numéro fixe ";
        if($Produit['ref']=="OPT2" && $Produit['offre']=="opt_t") $Jenveuxpas = "Je ne veux pas de l'option ".utf8_encode($Produit['nom']);

        if($_SESSION['AIRCMDV2']['Commande'][$Type][$EtapeCourante][$CdeNo]['id']==$Produit['id']) $checked_ok ="checked"; else $checked_ko="checked";
    //  1er passage force
        if  ( empty($_SESSION['AIRCMDV2']['Commande'][$Type][$EtapeCourante][$CdeNo])  )   {
            echo "xxxxxxxxxxxx";
            $checked_ok ="checked";
            $checked_ko ="";
        }

        $id = "ID_".$CdeNo."_".$Produit['id'];
        ?>
        <div class="card shadow p-3 mb-5 bg-white rounded">
            <div class="card-body">
                <table border="0" width="100%">
                    <tr>
                        <td width="30%"><img src="images/opt_<?=$Produit['id']?>.jpg" width="100%"></td>
                        <td>
                            <br>
                            <h3 style="color:#245ba5">Option <?=utf8_encode($Produit['nom'])?></h3>
                            <?php if ($Produit['fas']>0) { ?>
                                <p style="color:#8d8d8d">Frais de mise en service : <?=$Produit['fas'] ?>€ HT</p>
                            <?php } else { ?>
                                <p style="color:#8d8d8d">&nbsp;</p>
                            <?php } ?>
                            <input type='radio' id='ID_<?=$CdeNo?>_<?=$Produit['id']?>' name='Choix_<?=$Produit['ref']?>_<?=$CdeNo?>' value='<?= $Produit['id'] ?>'  <?=$checked_ok ?> OnChange="ControleBtnSuivant(<?=$_SESSION['AIRCMDV2']['etape']?>)">
                            <label for="ID_<?=$CdeNo?>_<?=$Produit['id']?>">Je prend l’option <?=utf8_encode($Produit['nom'])?> (+<?=$Produit['rec'] ?>€ HT/mois)</label>

                            <br>
                            <input type='radio' id='ID_<?=$CdeNo?>_0' name='Choix_<?=$Produit['ref']?>_<?=$CdeNo?>' value='0' <?=$checked_ko ?> OnChange="ControleBtnSuivant(<?=$_SESSION['AIRCMDV2']['etape']?>)">
                            <label for="ID_<?=$CdeNo?>_0"><?=$Jenveuxpas?></label>
                        </td>
                    </tr>
                </table>
            </div>
        </div>

        <?php
    }

?>
<div style="text-align:center">
    <button class="btn-add" name="btn_continuer"   type="submit" value="<?=($_SESSION['AIRCMDV2']['etape']+1)?>"  style="width:300px">
        <?php if ($_REQUEST['type']=="i") {?>Ajouter une offre de téléphonie<?php }?>
        <?php if ($_REQUEST['type']=="t") {?>Ajouter une offre Internet<?php }?>
    </button>

</div>
