51 |
deleted files! |
deleted files! |
52 |
|
|
53 |
.htusers is in form: |
.htusers is in form: |
54 |
login:Real Name:md5(loginpassword) |
login:Real Name:[md5(loginpassword)|auth_*]:email@host.dom |
55 |
|
|
56 |
|
|
57 |
TODO: |
TODO: |
364 |
$bakdir=dirname("$fsDir/$fn")."/.bak"; |
$bakdir=dirname("$fsDir/$fn")."/.bak"; |
365 |
if (file_exists($logname)) { |
if (file_exists($logname)) { |
366 |
$log=fopen($logname,"r"); |
$log=fopen($logname,"r"); |
367 |
$cl1=" class=lst"; $cl2=""; |
$cl1=" class=LST"; $cl2=""; |
368 |
$logarr = array(); |
$logarr = array(); |
369 |
while($line = fgetcsv($log,255,"\t")) { |
while($line = fgetcsv($log,255,"\t")) { |
370 |
$cl=$cl1; $cl1=$cl2; $cl2=$cl; |
$cl=$cl1; $cl1=$cl2; $cl2=$cl; |
376 |
while ($e = array_shift($logarr)) { |
while ($e = array_shift($logarr)) { |
377 |
if (strstr($e[4],"upload")) { |
if (strstr($e[4],"upload")) { |
378 |
if (file_exists("$bakdir/$bakcount/$name")) { |
if (file_exists("$bakdir/$bakcount/$name")) { |
379 |
$e[4]="<a href=\"".dirname($relPath)."/.bak/$bakcount/$name\">$e[4]</a>"; |
$e[4]="<a href=\"".urlpath(dirname($relPath)."/.bak/$bakcount/$name")."\">$e[4]</a>"; |
380 |
} |
} |
381 |
$bakcount++; |
$bakcount++; |
382 |
} |
} |
875 |
|
|
876 |
////////////////////////////////////////////////////////////////// |
////////////////////////////////////////////////////////////////// |
877 |
|
|
878 |
function UploadPage($fsRoot, $relDir, $filename) { |
function UploadPage($fsRoot, $relDir, $filename="") { |
879 |
|
|
880 |
$self = $GLOBALS["PHP_SELF"] ; |
$self = $GLOBALS["PHP_SELF"] ; |
881 |
if ($relDir == "") $relDir = "/" ; |
if ($relDir == "") $relDir = "/" ; |
885 |
<FORM ENCTYPE="multipart/form-data" METHOD="POST" |
<FORM ENCTYPE="multipart/form-data" METHOD="POST" |
886 |
ACTION="<?= $self ?>"> |
ACTION="<?= $self ?>"> |
887 |
DESTINATION DIRECTORY:<B><?= " " . $relDir ?></B> |
DESTINATION DIRECTORY:<B><?= " " . $relDir ?></B> |
888 |
<? if (isset($filename)) { ?> |
<? if (isset($filename) && $filename!="") { ?> |
889 |
<br>DESTINATION FILE:<B><?= " " . $filename ?></B> |
<br>DESTINATION FILE:<B><?= " " . $filename ?></B> |
890 |
<INPUT TYPE="HIDDEN" NAME="FILENAME" VALUE="<?= $filename ?>"> |
<INPUT TYPE="HIDDEN" NAME="FILENAME" VALUE="<?= $filename ?>"> |
891 |
<? } ?> |
<? } ?> |
1148 |
} |
} |
1149 |
} |
} |
1150 |
fclose($log); |
fclose($log); |
1151 |
$cl1=" class=lst"; $cl2=""; |
$cl1=" class=LST"; $cl2=""; |
1152 |
print "<table border=0 width=100%>\n"; |
print "<table border=0 width=100%>\n"; |
1153 |
while ($e = array_shift($logarr)) { |
while ($e = array_shift($logarr)) { |
1154 |
$cl=$cl1; $cl1=$cl2; $cl2=$cl; |
$cl=$cl1; $cl1=$cl2; $cl2=$cl; |
1234 |
// TODO : should rather check for escapeshellcmds |
// TODO : should rather check for escapeshellcmds |
1235 |
// but maybe RFC 18xx asserts safe filenames .... |
// but maybe RFC 18xx asserts safe filenames .... |
1236 |
$source = $FN ; |
$source = $FN ; |
1237 |
|
if (! file_exists($source)) { |
1238 |
|
Error("You must select file with browse to upload it!"); |
1239 |
|
} |
1240 |
if (! isset($FILENAME)) { // from update file |
if (! isset($FILENAME)) { // from update file |
1241 |
$target = "$fsDir/$FN_name" ; |
$target = "$fsDir/$FN_name" ; |
1242 |
} else { |
} else { |