<?php /** * Created by PhpStorm. * User: Papangping * Date: 8/7/14 * Time: 4:56 PM */ if ($_SERVER['REQUEST_METHOD'] == "POST") { Manager::uploadPictures($_FILES['files'], $_GET['type']); Helper::reload(); exit; } $pictures = Manager::getPictures($_GET['type']); ?> <div style="padding: 20px;"> <form class="form-upload" method="post" enctype="multipart/form-data"> <h4>Upload New Picture(*ควร upload ทีละไม่เกิน 8Mb)</h4> <input type="file" name="files[]" multiple> <input type="submit" value="Upload"> <br /> <small>อณุญาติให้ upload ได้เฉพาะไฟล์ jpg, jpeg, png เท่านั้น</small> </form> <div> <form method="post" action="?page=delete_picture&type=<?php echo $_GET['type']; ?> "> <?php foreach ($pictures as $key => $picture) { ?>
} ?> </div> <div class="clearfix"></div> <h3 class="title-style1"> <?php echo $text['header3']; ?> <span class="title-block"></span> </h3> <div> <?php $pictures = Manager::getPictures('room_vip'); foreach ($pictures as $key => $picture) { ?> <a class="fancybox" rel="gallery3" href="pictures/<?php echo $picture['path']; ?> " alt=""> <img src="thumb.php?url=pictures/<?php echo $picture['path']; ?> " alt=""/> </a> <?php } ?> </div>
<?php } ?> </div> <div class="clearfix"></div> <h3 class="title-style1"> <?php echo $text['header3']; ?> <span class="title-block"></span> </h3> <div> <?php $pictures = Manager::getPictures('gallery_room'); foreach ($pictures as $key => $picture) { ?> <a class="fancybox" rel="gallery3" href="pictures/<?php echo $picture['path']; ?> " alt=""> <img src="thumb.php?url=pictures/<?php echo $picture['path']; ?> " alt=""/> </a> <?php } ?> </div>