--- docman.php 2000/12/21 07:30:04 1.25 +++ docman.php 2000/12/21 08:46:18 1.27 @@ -364,7 +364,7 @@ $bakdir=dirname("$fsDir/$fn")."/.bak"; if (file_exists($logname)) { $log=fopen($logname,"r"); - $cl1=" class=lst"; $cl2=""; + $cl1=" class=LST"; $cl2=""; $logarr = array(); while($line = fgetcsv($log,255,"\t")) { $cl=$cl1; $cl1=$cl2; $cl2=$cl; @@ -875,7 +875,7 @@ ////////////////////////////////////////////////////////////////// -function UploadPage($fsRoot, $relDir, $filename) { +function UploadPage($fsRoot, $relDir, $filename="") { $self = $GLOBALS["PHP_SELF"] ; if ($relDir == "") $relDir = "/" ; @@ -885,7 +885,7 @@
DESTINATION DIRECTORY: - +
DESTINATION FILE: @@ -1148,7 +1148,7 @@ } } fclose($log); - $cl1=" class=lst"; $cl2=""; + $cl1=" class=LST"; $cl2=""; print "\n"; while ($e = array_shift($logarr)) { $cl=$cl1; $cl1=$cl2; $cl2=$cl; @@ -1234,6 +1234,9 @@ // TODO : should rather check for escapeshellcmds // but maybe RFC 18xx asserts safe filenames .... $source = $FN ; + if (! file_exists($source)) { + Error("You must select file with browse to upload it!"); + } if (! isset($FILENAME)) { // from update file $target = "$fsDir/$FN_name" ; } else {