Your IP : 3.12.164.102


Current Path : /data/web/virtuals/51568/virtual/www/www/rozvrhy/
Upload File :
Current File : /data/web/virtuals/51568/virtual/www/www/rozvrhy/rozvrhy.php

<div class="rozTridy">
<div class="alert alert-info rounded-0 h5">Rozvrhy tříd</div>
<div class="form-group row align-items-center mb-0">
  <label for="vyberTridu" class="col-sm-3 col-form-label">Zobrazená třída:</label>
  <div class="col-sm-3">
    <select class="custom-select rounded-0" name="vyberTridu" id="vyberTridu" onchange="ukazRozvrh()" style="font-size: 1.2rem;">  
        <option id="vyberTriduxx" value="xx">... vyber třídu ... </option>
<?php
  $dir = "www/rozvrhy/jpg";
  $tridy = scandir($dir);
  foreach($tridy as $trida){
    if (strlen($trida) > 3){
      $tr = basename($trida, '.png');
      $odkaz = $dir.'/'.$trida;
      if (strlen($tr) == 2){
        $trx = $tr[0].".".$tr[1];?>
      <!--button class="btn btn-info mr-2 mb-2" onclick="ukazRozvrh('<?= $odkaz;?>')"><?= $tr;?></button-->
        <option id="vyberTridu<?= $tr?>" value="<?= $tr?>" >
      <?= $trx?>
        </option>      
     <?php }
    }
  }
  
?>
    </select>
  </div>    
</div> 
</div>
<div id="rozRozvrh" class="mt-3">

</div>

<script>
function ukazRozvrh(){
  odkaz = "www/rozvrhy/jpg/" + $("#vyberTridu").val() + ".png?rok=2023";
  $("#rozRozvrh").html(`<img class="img-fluid" src="${odkaz}">`);
}
</script>