Advertisement
Guest User

Untitled

a guest
May 28th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <html>
  2. <?php
  3. session_start();
  4. //ini_set('display_errors', 0);
  5. require 'scripts/login.php';
  6. require 'scripts/display_comments.php';
  7. $username = $_SESSION['username'];
  8. $password = $_SESSION['password'];
  9. if($username && $password)
  10. {
  11. ?>
  12. <head>
  13. <link rel="stylesheet" type="text/css" href="" />
  14. </head>
  15. <body>
  16. <?php
  17. echo "<table id='filelist'>";
  18. echo "<tr>";
  19. echo "<th>File</th>";
  20. echo "</tr>";
  21.  
  22. //chdir("../");
  23. echo getcwd().$_GET["filepath"]."<br/>";
  24. chdir(getcwd().$_GET["filepath"]);
  25. if ($handle = opendir(getcwd())) {
  26. while (false !== ($file = readdir($handle))) {
  27. if ($file != "." && $file != "..") {
  28. echo "<tr class='alt'>";
  29. echo "<td>".$file."</td>";
  30. echo "</tr>";
  31. }
  32. }
  33. closedir($handle);
  34. }
  35. ?>
  36. <script type="text/javascript" src="scripts/jquery.js"></script>
  37. <script type="text/javascript">
  38. $("td").mouseenter(function(){
  39. $(this).css("background-color", "#999");
  40. })
  41. $("td").mouseleave(function(){
  42. $(this).css("background-color", "#EAF2D3");
  43. })
  44. $("td").click(function(){alert("");
  45. $.ajax({
  46. type: "GET",
  47. url: "files.php",
  48. data: 'filepath='+charCodeAt(92)+$(this).text(),
  49. cache: false,
  50. success: function(html){
  51. $("#content").html(html);
  52. }
  53. });
  54. })
  55. </script>
  56. </body>
  57. <?php
  58. }
  59. else
  60. {
  61. echo "You must be logged in to access this content!";
  62. }
  63. ?>
  64. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement