<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no">
  <title>Live Lights</title>
  <meta name="author" content="Raumgleiter AG (GS)">

  <meta name="description" content="...">
  <link rel="shortcut icon" href="logos/favicon.png" />
  <script src="jquery/jquery-3.4.1.min.js"></script>
    <!-- <script src="jquery-3.4.1.min.js"></script> -->
  <script src="js/main.js"></script>
  <script src="js/livelights/LiveLayer.js"></script>
  <script src="js/livelights/controller.js"></script>
  <script src="js/livelights/core.js"></script>

  <link rel="stylesheet" href="css/style.css?v=1.0">

</head>

<body>
  <?php
    //$ifImgLayers = True;
    //$ifSounds = False;

    //if($ifImgLayers) { // or maybe it should always do it and only later check if any proper files were in there
    $imgDir = $_COOKIE['imgDir'];
    $imgFiles = array_diff(scandir($imgDir), array('..', '.'));

    $i=0;
    foreach ($imgFiles as $imgFile)
     { 
      echo("<script> saveNameToImgList('$imgFile'); </script>") ;
      $i++;
     }
    //}

    /*
    //if($ifSounds) { // or maybe it should always do it and only later check if any proper files were in there
      $soundDir = $_COOKIE['soundDir'];
      $soundFiles = array_diff(scandir($soundDir), array('..', '.'));

      $j=0;
      foreach ($soundFiles as $soundFile)
       { 
        echo("<script> saveToSoundList('$soundFile'); </script>") ;
        $j++;
       }
    //}   
    */

  ?>

    <div class="ll-container" id="ll-1">
    </div>
</body>
</html>