Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //session_start();
- if(!isset($_GET['name']))
- header("Location: index.html");
- ?>
- <!DOCTYPE>
- <html>
- <head>
- </head>
- <body>
- <?php
- $folder = $_GET['name'];
- $_SESSION['currentDirectory'] = "root/".$folder;
- $dir_path = $_SESSION['currentDirectory'];
- //echo $_SESSION['currentDirectory'];
- ?>
- <a href="logout.php">Logout</a><br >
- <br/>
- <a href = "upload_in_folder.php?name=<?php echo $dir_path ?>">Upload a file</a>
- <br ><br ><br >
- </body>
- </html>
- <?php
- require_once("include/connection.php");
- $qr = mysql_query("SELECT *FROM infotable ");
- while($row=mysql_fetch_array($qr)){
- $fol_file = $dir_path.'/'.$row['file_name'];
- if($row['file_location'] == $fol_file){
- echo '<a href = "#">'.$row['file_name'].'</a>';
- ?>
-
- <a href = "rename.php?name=<?php echo $row['file_location'] ?>">Rename</a>
-
- <a href = "delete.php?name=<?php echo $row['file_location'] ?>"> Delete</a>
-
- <a href = "download.php?name=<?php echo $row['file_location'] ?>"> Download</a>
- <br ><br >
- <?php
- }
- }
- ?>
- <?php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement