Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head lang="en">
- <meta charset="UTF-8">
- <title>Airplane - My Files</title>
- <!-- Latest compiled and minified CSS -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
- <link href="Style/Styles.css" rel="stylesheet" />
- <script src="JS/jquery.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
- <script>
- $(document).ready(function() {
- function loadFileList() {
- $.getJSON(
- "database.php?f=getFileList", function (response) {
- console.log(response);
- if (response.code == 999) {
- alert('You need to log in first');
- window.location.href = "Main.html";
- } else {
- console.log('db');
- console.log(response.data);
- createMyFileList(response.data);
- }
- });
- }
- loadFileList();
- function createMyFileList(data) {
- var myhtml="";
- for (var i=0; i<data.file_list.length; i++) {
- //if (data[0]==="."||data[0]==="..") continue;
- myhtml+='<li><a href="download.php?d=files/'+data.user_id+'/'+data.file_list[i]+'">'+data.file_list[i]+'</a> <a href="database.php?f=deleteFile&file='+data.file_list[i]+'" class="btn delete-btn">Delete</a></li>';
- }
- $('#files').html(myhtml);
- $('.delete-btn').click(function(e) {
- e.preventDefault();
- var href=$(this).attr('href');
- if (confirm("wanna delete this file?")) {
- $.get(href).success(function() {
- });
- loadFileList();//reload file list
- }
- });
- }
- });
- </script>
- <style>
- h2 {
- text-align: center;
- color: white;
- text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
- }
- #menu {
- width: 66px;
- }
- .bigger {
- font-size: 35px;
- margin: 10px;
- color: white;
- }
- .bigger:hover, .bigger:focus {
- color: #3399FF;
- }
- .bigger2 {
- font-size: 35px;
- color: #3399FF;
- }
- body {
- background: url(1406961364489.png);
- background-position: center center;
- background-attachment: fixed!important;
- background-size: cover;
- }
- button {
- background: transparent!important;
- border: none!important;
- }
- #containereins {
- background: url(opac_50.png)!important;
- width: 40%;
- height: 150px;
- margin: 0 auto;
- margin-top: 6%;
- margin-bottom: 6%;
- border: 20px solid;
- border-radius: 5px;
- border-color: transparent;
- }
- #containerzwei {
- background: url(opac_50.png)!important;
- width: 40%;
- height: 300px;
- margin: 0 auto;
- border: 2px solid;
- border-radius: 5px;
- border-color: transparent;
- }
- #containerdrei {
- background: url(opac_50.png)!important;
- border: 2px solid;
- border-radius: 5px;
- border-color: transparent;
- float:left;
- width:20%;
- height:600px;
- position:fixed;
- top:80px;
- left:80px;
- }
- #containervier{
- background: url(opac_50.png)!important;
- border: 2px solid;
- border-radius: 5px;
- border-color: transparent;
- float:right;
- width:20%;
- height:600px;
- position:fixed;
- top:80px;
- right:80px;
- }
- #menu{
- position:fixed;
- width:300px;
- top:10px;
- }
- </style>
- </head>
- <body>
- <div id="menu">
- <a href="Main.html">
- <button><i class="glyphicon glyphicon-home bigger"></i></span> </button>
- </a> <a href="UserMainStorage.html">
- <button>
- <div class="file-icon"> <span class="glyphicon glyphicon-folder-close bigger"></span></div>
- </button>
- </a> <a href="logout.php">
- <button> <span class="glyphicon glyphicon-log-out bigger"></span></button>
- </a>
- </div>
- <div id="containereins">
- <fieldset>
- <h2>Upload File</h2>
- <form method="post" action="database.php?f=uploadFile" enctype="multipart/form-data">
- <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
- <input type="file" name="myFile" />
- </p>
- <p>
- <input type="submit" name="submit" value="Start upload" />
- </p>
- </form>
- </fieldset>
- </div>
- <div id="containerzwei">
- <fieldset>
- <h2>My Files</h2>
- </fieldset>
- </div>
- <div id="containerdrei">
- <fieldset>
- <h2>Directory</h2>
- <ul id="files">
- <!--list of files go here-->
- <!-- <li>[filename] Delete</li>-->
- </ul>
- </fieldset>
- </div>
- <div id="containervier">
- <h2>File Options</h2>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement