Current Path : /data/web/virtuals/51568/virtual/www/www/lidi/ |
Current File : /data/web/virtuals/51568/virtual/www/www/lidi/zaci-seznam.php |
<?php if (@file_exists("funkce/DbConnect.php")){ require("funkce/DbConnect.php"); } if (@file_exists("../../funkce/DbConnect.php")){ require("../../funkce/DbConnect.php"); } if (isSet($_POST["trida"])) { $trida = $_POST["trida"]; } else { $dotaz = "SELECT distinct trida FROM kn_lidi WHERE aktivni = '1' and typ = 'z' order by trida limit 1"; $result = mysqli_query($conn, $dotaz); if ($radek = mysqli_fetch_object($result)) { $trida = $radek->trida; } else { $trida = '0.X'; } } $dotaz = "SELECT id, kod, prijmeni, jmeno, trida FROM kn_lidi WHERE aktivni = '1' and typ = 'z' and trida = '$trida' order by prijmeni, jmeno "; $pocet = 0; if ($result = mysqli_query($conn, $dotaz)){ if ($radek = mysqli_fetch_object($result)) { ?> <div id="zaciSeznam" class="mt-4" style="padding: 0px 1px;" > <table class="table table-sm table-striped" > <?php do { $pocet++; ?> <tr id="zaciSeznamTbl<?=$radek->kod?>"> <td class="text-right" style="width: 40px;"><?=$pocet?></td> <td id="zakPrJm<?=$radek->kod?>" ><?=$radek->prijmeni?> <?=$radek->jmeno?></td> </tr> <?php } while ($radek = mysqli_fetch_object($result)); ?> </table> </div> <?php } else {?> <div class="alert alert-info h5">V evidenci nejsou žádní aktivní žáci.</div> <?php } }?>