Public paste
3234
By: we2 | Date: Nov 10 2007 14:41 | Format: PHP | Expires: never | Size: 1.04 KB | Hits: 1505

  1. <?php
  2.         @include("include/config.inc.php");
  3.         $section = "Upload";
  4.         @include($headerlayout);
  5.         if($_POST[action]){
  6.         $filename = "";
  7.         $time=time();
  8.         if ($HTTP_POST_FILES['userfile']['tmp_name']<> 'none'){    
  9.         $file = $HTTP_POST_FILES['userfile']['name'];
  10.         $temp = $HTTP_POST_FILES['userfile']['tmp_name'];
  11.         $path_parts = pathinfo($file);
  12.         $filename = $time . "." . $path_parts["extension"];
  13.         $dest = $path.$filename;
  14.         if(!in_array($path_parts["extension"], $eendungen))
  15.         {
  16.                 echo 'Not accepted file extension!';
  17.         }
  18.         else {
  19.                 copy($temp, $dest);
  20.                 echo 'check out your file <a href="show.php">here</a> ';
  21.         }
  22.         }
  23.         } else {
  24. ?>
  25.                 <form method="post" enctype="multipart/form-data" action="<?php echo $PHP_SELF ?>">
  26.                 <input type="hidden" name="MAX_FILE_SIZE" value="40000000">
  27.                 <br><strong>Regards <a href="http://www.ownageworld.net">OwnageWorld</a> !</strong><br><br>
  28.                 <input name="userfile" type="file" size=40><br><br>
  29.                 <input type="submit" name="action" value="Speichern">
  30.                 </form>
  31. <?      }
  32.         @include($footerlayout);
  33. ?>