Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <?php
- session_start();
- //ini_set('display_errors', 0);
- require 'scripts/login.php';
- require 'scripts/display_comments.php';
- $username = $_SESSION['username'];
- $password = $_SESSION['password'];
- if($username && $password)
- {
- ?>
- <head>
- <link rel="stylesheet" type="text/css" href="stylesheet2.css" />
- </head>
- <body>
- <?php
- echo "<table id='filelist'>";
- echo "<tr>";
- echo "<th>File</th>";
- echo "</tr>";
- //chdir("../");
- echo getcwd().$_GET["filepath"]."<br/>";
- chdir(getcwd().$_GET["filepath"]);
- if ($handle = opendir(getcwd())) {
- while (false !== ($file = readdir($handle))) {
- if ($file != "." && $file != "..") {
- echo "<tr class='alt'>";
- echo "<td>".$file."</td>";
- echo "</tr>";
- }
- }
- closedir($handle);
- }
- ?>
- <script type="text/javascript" src="scripts/jquery.js"></script>
- <script type="text/javascript">
- $("td").mouseenter(function(){
- $(this).css("background-color", "#999");
- })
- $("td").mouseleave(function(){
- $(this).css("background-color", "#EAF2D3");
- })
- $("td").click(function(){
- $.ajax({
- type: "GET",
- url: "files.php",
- data: 'filepath='+String.fromCharCode(92)+$(this).text(),
- cache: false,
- success: function(html){
- $("#content").html(html);
- }
- });
- })
- </script>
- </body>
- <?php
- }
- else
- {
- echo "You must be logged in to access this content!";
- }
- ?>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement