Author: matt
Date: 2008-02-25 08:10:46 -0800 (Mon, 25 Feb 2008)
New Revision: 460
Log:
Reversed attempts to get this script working. I don't want this to look more 
like a hack attempt than it already is. Also, I suck at php ;-)

Modified:
   trunk/site/upload.php

Modified: trunk/site/upload.php
===================================================================
--- trunk/site/upload.php       2008-02-25 16:01:56 UTC (rev 459)
+++ trunk/site/upload.php       2008-02-25 16:10:46 UTC (rev 460)
@@ -16,8 +16,6 @@
   return;
 }
 
-print("<h1>Upload File</h1>\n");
-
 if (array_key_exists("version", $_POST) &&
     eregi("[0-9.]+(b[0-9]+|rc[0-9]+|[0-9]+)", $_POST["version"]))
   $version = $_POST["version"];
@@ -33,27 +31,22 @@
   $dstdir   = "/home/ftp.easysw.com/pub/fltk/$version";
   $dstname  = "$dstdir/$filename";
 
-print("make dstdir<br>");
   if (!file_exists($dstdir))
     mkdir($dstdir);
 
-print("file_exist?<br>");
   if (!file_exists($dstdir))
     print("<p><b>Error:</b> Unable to make directory '$dstdir'!</p>\n");
   else if (strlen($filename) < 1 || $filename[0] == '.' || $filenmae[0] == '/')
     print("<p><b>Error:</b> Bad filename '$htmlname'!</p>\n");
   else if ($src = fopen($tmpname, "rb"))
   {
-print("directory OK<br>");
     if ($dst = fopen($dstname, "wb"))
     {
-print("copy file over<br>");
       // Copy the file to the FTP server directory...
       while ($data = fread($src, 8192))
         fwrite($dst, $data);
 
       fclose($dst);
-print("file copied<br>");
 
       // Get the MD5 sum...
       $fp   = popen("md5sum " . escapeshellarg($dstname), "r");

_______________________________________________
fltk-commit mailing list
fltk-commit@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to