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