Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
Prog
/
File explorer
:
custom_multiple05.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php //session_start(); //echo "<pre>"; //print_r($_SESSION); //echo "</pre>"; //echo $_SESSION["argument"]; //echo "<br><br>"; //echo $_SESSION["path"]; if (isset($_GET['p'])) { //echo $_GET['p']; //echo "<br><br>"; //*** $pieces = explode("***", $_GET['p']); echo $pieces[0]; echo "<br><br>"; echo $pieces[1]; echo "<br><br>"; echo substr($pieces[1],2); $arg = substr($pieces[1],2); setcookie("cookie_upload", $arg, time()+3600); } ?> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <!-- https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.3/themes/blitzer/jquery-ui.min.css --> <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.13.3/themes/blitzer/jquery-ui.min.css"> <link rel="stylesheet" href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css"> a voir !!! <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script> --> <!-- OK --> <!--<link rel="stylesheet" href= "https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/dark-hive/jquery-ui.css"> --> <link rel="stylesheet" href= "https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css"> <script src= "https://code.jquery.com/jquery-2.1.3.js"></script> <script src= "https://code.jquery.com/ui/1.11.2/jquery-ui.js"></script> <!-- --> <script> /* $(document).ready(function() { $("#demoDialog").dialog(); }); */ function myFunction() { setTimeout(function(){ //window.location.href = "https://www.example.com"; window.history.go(-1); }, 5000); } </script> <script> var resultat = []; $(document).ready(function(){ $('#submit').click(function(){ var form_data = new FormData(); // Read selected files var totalfiles = document.getElementById('files').files.length; if( totalfiles == 0) { $("#demoDialog").dialog( { resizable: false, width: 250, height: 175, modal: true, overlay: { opacity: 0.5, background: "black" } } ); //alert("Error !"); /*$( "#message_expiration" ).dialog({ modal: true, title: "Infos", buttons: { Ok: function() { $( this ).dialog( "close" ); } } });*/ } else { for (var index = 0; index < totalfiles; index++) { form_data.append("files[]", document.getElementById('files').files[index]); } // AJAX request $.ajax({ url: 'envoi_multiples05.php', type: 'post', data: form_data, dataType: 'json', contentType: false, processData: false, beforeSend: function() { $("#loader").show(); }, success: function (response) { for(var index = 0; index < response.length; index++) { var src = response[index]; console.log(" ----- TEMP -------" + response[index]); resultat.push(response[index]); // Add img element in <div id='preview'> //$('#preview').append('<img src="'+src+'" width="200px;" height="200px">'); } }, complete: function (data) { console.log(" ----- FIN -------" + resultat); $("#loader").hide(); $('#user_reponse').html( " Yes !" ); var html = "<table>"; for( var i=0; i < resultat.length ; i++ ) { var text = resultat[i] + " : envoi réussi ..........." html += "<tr>"; html += "<td>" + text + "</td>"; html += "<td><img src='check.png' alt='Image' width='32' height='32'></td>"; html += "</tr>"; } html += "</table>"; document.getElementById("resultat").innerHTML = html; document.getElementById("message_redirection").innerHTML = "Vous allez être rediriger ..."; myFunction(); } }); } }); }); </script> <form method='post' action='' enctype="multipart/form-data"> <input type="file" id='files' name="files[]" multiple><br> <input type="button" id="submit" value='Upload'> </form> <a href="javascript:history.go(-1)" title="Return to the previous page">Retour</a> <form> <input type="button" value="No, really, go back!" onclick="history.go(-1)"> </form> <!-- <div id="preview"></div> --> <!-- Image loader --> <div id="loader" style="display: none;"> <img src="wait.gif" alt="Envoie ..." width="50" height="60"> </div> <p id="user_reponse"></p> <div id="dialog" title="Basic dialog" style="display:none"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> </div> <div id="message_expiration" style="display: none"> <p> <span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span> La session a expiré. veuillez vous reconnecter. </p> </div> <div id="demoDialog" title="Message" style="display:none"> <p>Aucun fichier selectionné.</p> </div> <p id="resultat"></p> <br><br> <p id="message_redirection"></p>