Advertisement
melody45

Untitled

Dec 18th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <?php
  2. //session_start();
  3. if(!isset($_GET['name']))
  4. header("Location: index.html");
  5. ?>
  6. <!DOCTYPE>
  7. <html>
  8. <head>
  9. </head>
  10. <body>
  11. <?php
  12. $folder = $_GET['name'];
  13. $_SESSION['currentDirectory'] = "root/".$folder;
  14. $dir_path = $_SESSION['currentDirectory'];
  15. //echo $_SESSION['currentDirectory'];
  16. ?>
  17. <a href="logout.php">Logout</a><br >
  18. <br/>
  19. <a href = "upload_in_folder.php?name=<?php echo $dir_path ?>">Upload a file</a>
  20. <br ><br ><br >
  21.  
  22. </body>
  23. </html>
  24. <?php
  25. require_once("include/connection.php");
  26. $qr = mysql_query("SELECT *FROM infotable ");
  27. while($row=mysql_fetch_array($qr)){
  28. $fol_file = $dir_path.'/'.$row['file_name'];
  29. if($row['file_location'] == $fol_file){
  30. echo '<a href = "#">'.$row['file_name'].'</a>';
  31.  
  32.  
  33.  
  34. ?>
  35. &nbsp;&nbsp;&nbsp;&nbsp;
  36. <a href = "rename.php?name=<?php echo $row['file_location'] ?>">Rename</a>
  37. &nbsp;&nbsp;&nbsp;&nbsp;
  38. <a href = "delete.php?name=<?php echo $row['file_location'] ?>"> Delete</a>
  39. &nbsp;&nbsp;&nbsp;&nbsp;
  40. <a href = "download.php?name=<?php echo $row['file_location'] ?>"> Download</a>
  41. <br ><br >
  42.  
  43. <?php
  44. }
  45. }
  46. ?>
  47.  
  48. <?php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement