Libellé équipe Division
AIZENAY 1 - Phase 1 Ph1 - REGIONALE 1 MESSIEURS R1B MASCULINS
AIZENAY 2 - Phase 1 Ph1 - REGIONALE 3 MESSIEURS R3F MASCULINS
AIZENAY 3 - Phase 1 PRE REGIONAL Poule C
AIZENAY 4 - Phase 1 DIVISION 1 Poule B
AIZENAY 5 - Phase 1 DIVISION 2 Poule C
AIZENAY 6 - Phase 1 DIVISION 3 Poule A
AIZENAY 7 - Phase 1 DIVISION 5 Poule A
Libellé équipe Division
Libellé équipe Division
$(".lien-equipe").click(function(e) { e.preventDefault(); var lien = $(this).data('lien'); var tabOrdre = document.getElementById('ordreEquipe'); $.ajax({ url: '/club/resultEquipe.php', type: 'GET', data: lien+'club='+12850028, dataType: 'json', success: function(json, statut) { console.log(tabOrdre.getElementsByTagName('tr')); tabOrdre.innerHTML = ""; var thead = document.createElement('thead'); var tbody = document.createElement('tbody'); var tr = document.createElement('tr'); var th1 = document.createElement('th'); th1.innerHTML = "Classement"; var th2 = document.createElement('th'); th2.innerHTML = "Equipe"; var th3 = document.createElement('th'); th3.innerHTML = "Joué"; var th4 = document.createElement('th'); th4.innerHTML = "Points"; tr.appendChild(th1); tr.appendChild(th2); tr.appendChild(th3); tr.appendChild(th4); thead.appendChild(tr); tabOrdre.appendChild(thead); tabOrdre.appendChild(tbody); $.each(json, function(cle, valeur) { var tr = document.createElement('tr'); var td1 = document.createElement('td'); td1.innerHTML = valeur.clt; var td2 = document.createElement('td'); td2.innerHTML = valeur.equipe; var td3 = document.createElement('td'); td3.innerHTML = valeur.joue; var td4 = document.createElement('td'); td4.innerHTML = valeur.pts; tr.appendChild(td1); tr.appendChild(td2); tr.appendChild(td3); tr.appendChild(td4); tbody.appendChild(tr); }); }, error: function(resultat, statut, erreur) { console.log(resultat); console.log(statut); console.log(erreur); } }); var tab = document.getElementById('tab-rencontre'); $.ajax({ url: '/club/rencontreEquipe.php', type: 'GET', data: lien+'club='+12850028, dataType: 'json', success: function(json, statut) { tab.innerHTML = ""; var ul = document.createElement('ul'), dernierLib = ""; ul.className = "list-unstyled"; tab.appendChild(ul); $.each(json, function(cle, valeur) { var tr = document.createElement('tr'); if(valeur.libelle != dernierLib) { var li = document.createElement('li'), div = document.createElement('div'); div.innerHTML = valeur.libelle; div.className = "col-xs-12 text-center"; li.className = "rencontre-poule h4 row"; ul.appendChild(li); li.appendChild(div); dernierLib = valeur.libelle; } var li = document.createElement('li'); li.dataset.lien = valeur.lien; li.className = "lien-rencontre row"; var div1 = document.createElement('div'); div1.innerHTML = valeur.equa; div1.className = "col-xs-4 text-right"; var div2 = document.createElement('div'); div2.innerHTML = valeur.scorea; div2.className = "col-xs-2 text-center strong h5"; var div3 = document.createElement('div'); div3.innerHTML = valeur.scoreb; div3.className = "col-xs-2 text-center strong h5"; var div4 = document.createElement('div'); div4.innerHTML = valeur.equb; div4.className = "col-xs-4 text-left"; ul.appendChild(li); li.appendChild(div1); li.appendChild(div2); li.appendChild(div3); li.appendChild(div4); }) }, error: function(resultat, statut, erreur) { console.log(resultat); console.log(statut); console.log(erreur); } }); }); $(document).on("click", ".lien-rencontre",function(e) { $.ajax({ url: "/club/detailsRencontre.php", type: "GET", data: $(this).data('lien'), dataType: "json", success: function(json, statut) { viderModal(); var rencontre = document.getElementById('joueurs-rencontre-contenu'), lib_equa = $('#lib-equa'), resultat_equa = $('#resultat-equa'), resultat_equb = $('#resultat-equb'), lib_equb = $('#lib-equb'); $.each(json.resultat, function(cle, valeur) { lib_equa.html(valeur.equa); lib_equb.html(valeur.equb); resultat_equa.html(valeur.resa); resultat_equb.html(valeur.resb); }) $.each(json.joueur, function(cle, valeur) { var row = document.createElement('div'), col1 = document.createElement('div'), col2 = document.createElement('div'), col3 = document.createElement('div'), col4 = document.createElement('div'); row.className = "row"; col1.className = "col-sm-5 col-xs-3 text-right"; col2.className = "col-sm-1 col-xs-3 text-left"; col3.className = "col-sm-1 col-xs-3 text-right"; col4.className = "col-sm-5 col-xs-3 text-left"; col1.innerHTML = valeur.xja; col2.innerHTML = valeur.xca; col3.innerHTML = valeur.xcb; col4.innerHTML = valeur.xjb; row.appendChild(col1); row.appendChild(col2); row.appendChild(col3); row.appendChild(col4); rencontre.appendChild(row); }) $.each(json.partie, function(cle, valeur) { var details = document.getElementById('details-rencontre-contenu'), row = document.createElement('div'), col1 = document.createElement('div'), col2 = document.createElement('div'), col3 = document.createElement('div'), col4 = document.createElement('div'); row.className = "row"; col1.className = "col-sm-5 col-xs-3 text-right"; col2.className = "col-sm-1 col-xs-3 text-center"; col3.className = "col-sm-1 col-xs-3 text-center"; col4.className = "col-sm-5 col-xs-3 text-left"; col1.innerHTML = valeur.ja; col2.innerHTML = valeur.scorea; col3.innerHTML = valeur.scoreb; col4.innerHTML = valeur.jb; row.appendChild(col1); row.appendChild(col2); row.appendChild(col3); row.appendChild(col4); details.appendChild(row); }) }, error: function(resultat, statut, erreur) { alert('erreur'); console.log(resultat); console.log(statut); console.log(erreur); } }); $('#details-rencontre').modal('show'); }) function viderModal() { var details = document.getElementById('details-rencontre-contenu'), rencontre = document.getElementById('joueurs-rencontre-contenu'); details.innerHTML = ""; rencontre.innerHTML = ""; } $('#details-rencontre').on('hidden.bs.modal', function (e) { viderModal(); }) $('#hommes-collapse').collapse('show');