Sid Gifari From Gifari Industries - BD Cyber Security Team
Home
/
home
/
airmobeuag
/
2020
/
eligible
/
✏️
Editing: eligibilite.php
<!doctype html> <html lang="fr"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.0/css/all.css" integrity="sha384-aOkxzJ5uQz7WBObEZcHvV5JvRW3TUc2rNPA7pe3AwnsUohiw1Vj2Rgx2KSOkF5+h" crossorigin="anonymous"> <script type="text/javascript" src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <link rel = "stylesheet" href = "css/airmob.css?<?=time();?>"> <link rel = "stylesheet" href = "css/switch.css?<?=time();?>"> <link rel = "stylesheet" href = "css/step.css?<?=time();?>"> <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Comfortaa" rel="stylesheet"> </head> <body> <?php session_start(); error_reporting(E_ALL); ini_set("display_errors", 0); // Prérequis include_once ("./lib/gestion.lib.php"); $ClassElig = new ClassElig(); if( $_SESSION['AIRELIG']['etape'] == 3) unset($_SESSION['AIRELIG']); if( ! $_SESSION['AIRELIG']['idunique']) $_SESSION['AIRELIG']['idunique'] = uniqid(); if (!$_REQUEST['e']) $_SESSION['AIRELIG']['etape']="1"; if ($_GET['e'] ) $_SESSION['AIRELIG']['etape']=$_GET['e']; // Se postionner sur Etape if ($_POST['btn_suivant']) $_SESSION['AIRELIG']['etape']=$_POST['btn_suivant']; // Suivant else if ($_POST['btn_precedent']) $_SESSION['AIRELIG']['etape']=$_POST['btn_precedent']; // Précédent // POST les forms $ClassElig->PostForm(); ?> <div class="container"> <?=$ClassElig->AfficheSuiviEtape();?> <div class="row"> <div class="col-lg-12"> <form id="payment-form" method="post" action=""> <?php // Affiche le Form de l'etape courante $ClassElig->AfficheFormEtape(); ?> <br> <div style="text-align:center"> <?php if ($_SESSION['AIRELIG']['etape']< 3 ){ $btnSuivant = $_SESSION['AIRELIG']['Param']['btnSuivant']; if($btnSuivant=="disabled") $class = "btn-suivdis"; else $class = "btn-suivant"; ?> <button class="<?=$class?>" id="btn_suivant" name="btn_suivant" type="submit" value="<?=($_SESSION['AIRELIG']['etape']+1)?>" <?=$btnSuivant?> > SUIVANT </button> <br><br> <?php if ($_SESSION['AIRELIG']['etape'] > 1) { ?> <button class="btn-retour " name="btn_precedent" type="submit" value="<?=($_SESSION['AIRELIG']['etape']-1)?>" OnClick="javascript:AnnuleReq(<?=$_SESSION['AIRELIG']['etape']?>);"> RETOUR </button><br><br> <?php } ?> <?php } ?> </div> </form> </div> </div> </div> <script> function ControleBtnSuivant ( etape ) { var btnSuivant; id = $(this).attr("id"); id2 = $('#'+event.target.id).attr("id"); name2 = $('#'+event.target.id).attr("name"); ref = $('#'+event.target.id).attr("ref");; // ref = id de référence du produit var Ligne = id2.split('_'); console.debug('Recharge le panier '+id2+" / L"+Ligne[1]+ " / Id:"+Ligne[2]+" / "+name2 ); if (etape==1) { n = name2.split('_'); if ( !$("#form_no").val() || !$("#form_adr").val() || !$("#form_cp").val() || !$("#form_ville").val()) { btnSuivant="disabled"; } else { btnSuivant="enabled"; } Go(btnSuivant); } else if (etape==2) { n = id2.split('_'); setTimeout(() => { if ( !$("#form_nomprenom").val() || !$("#form_email").val() || !$("#form_telephone").val() || $('input[name=onoffswitch]:checked').val()!="oui") { btnSuivant="disabled"; } else { btnSuivant="enabled"; } Go(btnSuivant); }, 500); } } // BtnSuivant function Go(btnSuivant) { if(btnSuivant=="enabled") { $("#btn_suivant").prop("disabled", false); $("#btn_suivant").addClass('btn-suivant'); $("#btn_suivant").removeClass('btn-suivdis'); } else { $("#btn_suivant").prop("disabled", true); $("#btn_suivant").addClass('btn-suivdis'); $("#btn_suivant").removeClass('btn-suivant'); } } // Reout/Annule required function AnnuleReq( etape ){ if(etape==2 || etape==4){ $('[name^="form_"]').each(function () { id = $(this).attr("id"); $("#"+id).prop('required',false); }); } } </script> </body> </html>
💾 Save
❌ Cancel