<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html">
  <title>UploadyThing V0.01</title>
  </head>
  <style type="text/css">
    body {
      font-family: verdana, arial, tahoma, san-serif;
      font-size: 0.8em;
      background-color: #88C7F0;
    }
  </style>
  <script type="text/javascript" src="overlibMod.js"></script>
  <body>
  <div style="text-align: center; font-size: 1.7em;">Uploady Thing V0.01</div>
  <div style="text-align: center;"><a href="upload.php">Upload Something</a></div><br/>
  <div style="width: 750px; margin: 5px auto 5px auto; padding: 5px; border: 2px dashed #444; text-align: center;">
   <?php
    
if($_GET['flag'] == "del")
    {
      
// A little regex to avoid traversal of the file system.
      
if(!preg_match('/.*\/(.*.txt)$/'$_GET['file'], $matches))
      {
        print 
"Ze Brokens!</body></html>";
        exit();
      }
      if(@
unlink("infostore/".$matches[1]) && @unlink("datastore/".substr($matches[1],0,strlen($matches[1])-4)))
      {
        print 
"<div style=\"width: 300px; margin: 10px auto 10px auto; background-color: #0E0; font-size: 1.5em;\">Deleted File</div>";
      }
      else
      {
        print 
"<div style=\"width: 300px; margin: 10px auto 10px auto; background-color: #E00; font-size: 1.5em;\">Error Deleting File</div>";
      }
      
    }
  
?>
  <span style="font-weight: bold;">Files</span><br/>
  <?php  
    
if ($handle opendir('infostore/'))
    {
      while (
false !== ($file readdir($handle)))
      {
        if (
$file != "." && $file != "..")
        {
          
$handle2 = @fopen("infostore/$file""r");
          
$origtitle trim(str_replace(array('"'"'""|") ,"",fgets($handle2)));
          
$title trim(str_replace(array('"'"'""|") ,"",fgets($handle2)));
          
$other "";
          while (!
feof($handle2))
          {
            
$other .= fgets($handle24096);
          }
          
          print 
"<a rel=\"tooltip\" data=\"<b>$origtitle</b>|$other\" target=\"_blank\" href=\"datastore/".substr($file,0,strlen($file)-4)."\">
            $title
          </a> - <a href=\"index.php?flag=del&file=/$file\">[X]</a><br/>"
;
          
          
fclose($handle2);
          
        }
      }
      
closedir($handle);
    }
  
?>
  </div>
  </body>
</html>