guitarman0831

Untitled

Jun 10th, 2011
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.79 KB | None | 0 0
  1. <form action='delete.php' method='POST'>
  2.     <table>
  3.         <div class = '.table'>
  4.             <?php
  5.            $dir = '../uploads/store/';
  6.            $newdir = ereg_replace('\.','',$dir);
  7.            
  8.            if (is_dir($dir)) {
  9.            if ($dh = opendir($dir)) {
  10.            while (($file = readdir($dh)) !== false) {
  11.            if (!preg_match('/^(\.(htaccess|\.)?|index\.html)/',$file)) {
  12.            echo "<tr><td><font color = 'white'><a href='$newdir$file'>$file</a></font></td>";
  13.             echo "<td><input type='submit' value ='Delete'></td></tr>";
  14.             echo "<input align='right' type='hidden' value='$file' name='file'>";
  15.             }
  16.             }
  17.             closedir($dh);
  18.             }
  19.             }
  20.             ?>
  21.         </div>
  22.     </table>
  23. </form>
Advertisement
Add Comment
Please, Sign In to add comment