<?php include("../elemetns_web/header.php") ?>
<?php include("../../assets/script/login/login_check.php") ?>
<div>

    <header class="file_header">
        <div><a href="../file/dirfile.php">img </a><a href=""> <?php echo $_GET["folder"] ?></a></div>
        <div>
            <form method="post" enctype="multipart/form-data">
                <input type="hidden" name="namefold" value="<?php echo $_GET["folder"] ?>">
                <input type="file" name="files[]" multiple>
                <button class="green" name="upload">dodaj pliki </button>
            </form>

            <button class="red" form="dellmas" name="multidellfile">usuń wiele</button>
            <button class="red" id="multi_check" type="button">-</button>
        </div>
    </header>
    <form class="form_set" method="post" id="dellmas">
        <ul class=" list_user">
            <?php include("../../assets/script/file/manipulationfile.php"); ?>
            <?php include("../../assets/script/file/script.php"); ?>
            <?php foreach ($fold_list[$_GET["folder"]]["list_file"] as $file) { ?>

                <li>
                    <p><img src="<?php echo $file["dir_img_pre"] ?>"><?php echo $file["name_img"] ?></p>

                    <div class="button_continer">
                        <button class="red" form="dellfile.<?php echo $file["name_img"] ?>" name="dellfile">usuń plik</button>
                        <input class="red" type="checkbox" name="dellmas[]" value="<?php echo $file["name_img"]  ?>">
                    </div>

                </li>

            <?php } ?>

        </ul>
        <input type="hidden" name="namefold" value="<?php echo $_GET["folder"] ?>">
    </form>
    <?php foreach ($fold_list[$_GET["folder"]]["list_file"] as $file) { ?>
        <div class="hidden">

            <form method="post" id="dellfile.<?php echo $file["name_img"]  ?>">
                <input type="hidden" name="namefile" value="<?php echo $file["name_img"]  ?>">
                <input type="hidden" name="namefold" value="<?php echo $_GET["folder"] ?>">
            </form>

        </div>
    <?php } ?>
</div>

<script src="../../assets/js/manipulation.js"></script>
<?php include('../elemetns_web/footer.php') ?>