<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  <title>UploadyThing Uploader-Action</title>
    <style type="text/css">
    body {
      font-family: verdana, arial, tahoma, san-serif;
      font-size: 0.8em;
      background-color: #88C7F0;
    }
  </style>
  </head>
  <body>
  <?php
   
   $other 
$_POST['other'];
   
$title $_POST['title'];  
   
$timeprefix time();
   
$filename "infostore/" $timeprefix basename($_FILES['uploadedfile']['name']).".txt";
   
  if ( isset(
$_FILES['uploadedfile']['name']))
  {
    
$badItems = array("\\.php""\\.htacess");
    foreach ( 
$badItems as $item ) {
      if(
preg_match('/'.$item.'$/'basename($_FILES['uploadedfile']['name'])))
      {
        print 
"Bad File Match.<br/><a href=\"index.php\">Home</a></body></html>";
        exit();
      }
    }
    
$target_path "datastore/";
    
$target_path $target_path $timeprefix basename$_FILES['uploadedfile']['name']); 
    if(
move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))
    {
      echo 
"The file has been uploaded<br/><a href=\"index.php\">Home</a>";
      
      
      
$content basename($_FILES['uploadedfile']['name']) . "\n";
      
$content .= $title "\n";
      
$content .= $other;
      
      
$handle fopen($filename'a');
      
fwrite($handle$content);
      
fclose($handle);
      
    }
    else
    {
      echo 
"There was an error uploading the file, please try again!<br/><a href=\"index.php\">Home</a>";
    }
  }
  
?>
  </body>
</html>