<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"><title>e5n</title><link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Alata&amp;display=swap"><link rel="stylesheet" href="assets/fonts/font-awesome.min.css"><link rel="stylesheet" href="assets/css/styles.min.css">

<script>

var json = <%- JSON.stringify(data) %>;

function loadTable(){
var table = document.getElementById('pontok').getElementsByTagName('tbody')[0];

var arrayLength = json.length;
for (var i = 0; i < arrayLength; i++) {
    table.innerHTML += `<tr style="margin: 0px;padding: 9px;padding-top: 9px;"><td style="margin: 0px;padding: 9px;padding-top: 9px;">${json[i].name}</td><td style="margin: 0px;padding: 9px;padding-top: 9px;">${json[i].score}<br></td></tr>`;
}
}

function sort(){
var prog = []
var table = document.getElementById('pontok').getElementsByTagName('tbody')[0];
table.innerHTML = ``;
var arrayLength = json.length;
for (var i = 0; i < arrayLength; i++) {
    if (json[i].terem == false) {
    prog.push(json[i])
    }
}

prog.sort((elso, masodik) => masodik.score - elso.score);
var arrayLength = prog.length;
for (var i = 0; i < arrayLength; i++) {
    table.innerHTML += `<tr style="margin: 0px;padding: 9px;padding-top: 9px;"><td style="margin: 0px;padding: 9px;padding-top: 9px;">${prog[i].name}</td><td style="margin: 0px;padding: 9px;padding-top: 9px;">${prog[i].score}<br></td></tr>`;
}
}

function tsort(){
var prog = []
var table = document.getElementById('pontok').getElementsByTagName('tbody')[0];
table.innerHTML = ``;
var arrayLength = json.length;
for (var i = 0; i < arrayLength; i++) {
    if (json[i].terem == true) {
    prog.push(json[i])
    }
}

prog.sort((elso, masodik) => masodik.score - elso.score);
var arrayLength = prog.length;
for (var i = 0; i < arrayLength; i++) {
    table.innerHTML += `<tr style="margin: 0px;padding: 9px;padding-top: 9px;"><td style="margin: 0px;padding: 9px;padding-top: 9px;">${prog[i].name}</td><td style="margin: 0px;padding: 9px;padding-top: 9px;">${prog[i].score}<br></td></tr>`;
}
}


</script>
</head><body onload="loadTable()"><div><nav class="navbar navbar-light navbar-expand-md sticky-top navigation-clean-button" style="height: 80px;color: #ffffff;background: rgb(12,26,164);"><div class="container-fluid"><a class="navbar-brand" href="/"><img src="assets/img/logó.svg" style="height: 70.328px;margin: 0px;margin-top: -25px;">&nbsp;E5N</a><a data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-placement="bottom" style="color:#ffffff;" href="vote.html" title="Kattints ide a szavazás megkezdéséhez!"><i class="fa fa-gavel"></i><strong>Szavazás</strong></a></div></nav></div><div><h1 data-bs-toggle="tooltip" data-bss-tooltip="" style="margin-top: 26px;margin-bottom: 21px;text-align: center;color: rgb(12,26,164);" title="Az oldal betöltésekor aktuális pontszámok. Frissítsd az oldalt az aktuális pontszámokhoz!">Az osztályok pontszámai</h1><div class="table-responsive" style="margin-left: 20%;margin-right: 20%;">


<button class="btn btn-outline-primary text-start" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-placement="bottom" type="submit" onclick="sort()" style="margin-top: 19px;color: rgb(12,26,164);border-bottom-color: rgb(12,26,164);" title="Ezzel a gombbal növekvő sorrendbe állítod a progrmokat (pontok szerint).">Dobogó (programok)</button>
<button class="btn btn-outline-primary text-start" data-bs-toggle="tooltip" data-bss-tooltip="" data-bs-placement="bottom" type="submit" onclick="tsort()" style="margin-top: 19px;color: rgb(12,26,164);border-bottom-color: rgb(12,26,164);" title="Ezzel a gombbal növekvő sorrendbe állítod a teremdíszítéseket (pontok szerint).">Dobogó (teremdíszítés)</button>
<table id="pontok" class="table"><thead><tr><th>Osztály</th><th>Pontszám</th></tr></thead>

<tbody>

</tbody>
</table>

</div>
</div>


<script src="assets/bootstrap/js/bootstrap.min.js"></script><script src="assets/js/script.min.js"></script></body></html>