<?php
    /*
    * copyright (c) 2013-2020 Heliac Technologies
    * license http://opensource.org/licenses/gpl-license.php GNU GPL v3 
    *
    * linee guida per l'utilizzo del logo http://www.geecom.org/articolo.php?id=34&alias=linee-guida-per-l%27uso-del-logo-geecom
    */
?>

    <input type="text" class="d-none" name="operazione" value="aggiornaImpostazioniGenerali">
    <h4 class="mb-4 title">Video</h4>
    <div class="row" >
    <?php
    
        $elencoVideo  = $gestoreUploadFileMultimediali->fileCartella("video");
        $percorsoBaseVideo = "file/video";
        
        foreach($elencoVideo as $video) {
            $idDiv = "video$video";
            if($video != ".." && $video !=".") {
                ?>
                <div class="col-lg-6 col-xl-4" id="<?php echo $idDiv ?>">
                    <div class="border p-2 mb-3">
                        <div class="d-flex justify-content-between align-items-start">
                            <div class="">
                                <h6 class="mb-0"><strong><?php echo $video ?></strong></h6>
                                <p class="text-muted"><?php echo "$percorsoBaseVideo/$video" ?></p>
                            </div>
                            <button class="btn btn-danger btn-sm" onclick="apriPopupEliminaFile('<?php echo $idDiv ?>','<?php echo"../$percorsoBaseVideo/$video" ?>')"><i class="fas fa-trash-alt"></i></button>
                        </div>
                        <div class="embed-responsive embed-responsive-16by9">
                            <video src="<?php echo "../$percorsoBaseVideo/$video" ?>" controls ></video>
                        </div>
                    </div>
                </div>
                <?php
            }
        }
    ?>
    </div>