|
|
|
@ -198,7 +198,7 @@ |
|
|
|
|
checkPath($secret['path']); |
|
|
|
|
if (isset($secret['file'])) { |
|
|
|
|
checkFile($secret['file'], true); |
|
|
|
|
if ($file!="") returnFile($file); |
|
|
|
|
if ($file!="") returnFile($file); |
|
|
|
|
} |
|
|
|
|
foreach ($secret['elements'] as $f) checkFile($f); |
|
|
|
|
if (isset($_REQUEST['download'])) { |
|
|
|
@ -217,13 +217,17 @@ |
|
|
|
|
header('Content-Length: '.$size); |
|
|
|
|
header('Content-Disposition: attachment; filename=shared-images.tar'); |
|
|
|
|
foreach($files as $f) { |
|
|
|
|
print tarHeader('shared-images/'.basename($f), filesize($f)); |
|
|
|
|
readfile($f); |
|
|
|
|
print str_repeat(chr(0), ceil(filesize($f)/512)*512-filesize($f)); |
|
|
|
|
} |
|
|
|
|
print tarHeader('shared-images/'.basename($f), filesize($f)); |
|
|
|
|
readfile($f); |
|
|
|
|
print str_repeat(chr(0), ceil(filesize($f)/512)*512-filesize($f)); |
|
|
|
|
} |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} elseif (isset($_REQUEST['qrcode'])) { |
|
|
|
|
QRcode::png((isset($_SERVER['HTTPS']) ? 'https' : 'http') |
|
|
|
|
.'://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI].'?secret='.$_REQUEST['secret']); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
?><!DOCTYPE html> |
|
|
|
@ -293,6 +297,8 @@ |
|
|
|
|
echo '<p>Share files: Tell your friend the password on a separate channel and send this: <a href="?secret |
|
|
|
|
='.$secret.'">Link to Share</a></p>'; |
|
|
|
|
?> |
|
|
|
|
<img src="<?php echo (isset($_SERVER['HTTPS']) ? 'https' : 'http') |
|
|
|
|
.'://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI].'?secret='.$secret.'&qrcode=1'; ?>" /> |
|
|
|
|
<p>or Send Link in E-Mail:</p> |
|
|
|
|
<form method="POST"> |
|
|
|
|
<table style="width: 100%"><tr> |
|
|
|
|