This commit has been accessed 680 times via Git panel.
commit 69ce445bdf43dccf109998cfe29c79520e2bf262
tree 60ccd7a753b4ded9d9f42ba67af802ff52c66766
parent 46b815abbcd832adc6ecd07c4507df8846be6953
author Engels Antonio <engels@kartero.org> 1383849880 +0800
committer Engels Antonio <engels@kartero.org> 1383849880 +0800
Add HTML5 download attribute
diff --git a/filedrop.php b/filedrop.php
index 921a353..e0493d5 100644
--- a/filedrop.php
+++ b/filedrop.php
@@ -100,7 +100,7 @@ if (file_exists("attach/i/$fileUsr/$filedrop_box")) {
echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}{$fileScan}</td></tr>\r\n";
}
else {
- echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\" download=\"$fileName\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" download=\"$fileName\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
}
}
diff --git a/read.php b/read.php
index 0835b98..e96c99a 100644
--- a/read.php
+++ b/read.php
@@ -528,7 +528,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}{$fileScan}</td></tr>\r\n";
}
else {
- echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\" download=\"$fileName\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" download=\"$fileName\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
if (pathinfo($fileAttachment,PATHINFO_EXTENSION) == "ics") {
include("ics2.php");
tree 60ccd7a753b4ded9d9f42ba67af802ff52c66766
parent 46b815abbcd832adc6ecd07c4507df8846be6953
author Engels Antonio <engels@kartero.org> 1383849880 +0800
committer Engels Antonio <engels@kartero.org> 1383849880 +0800
Add HTML5 download attribute
diff --git a/filedrop.php b/filedrop.php
index 921a353..e0493d5 100644
--- a/filedrop.php
+++ b/filedrop.php
@@ -100,7 +100,7 @@ if (file_exists("attach/i/$fileUsr/$filedrop_box")) {
echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}{$fileScan}</td></tr>\r\n";
}
else {
- echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\" download=\"$fileName\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" download=\"$fileName\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
}
}
diff --git a/read.php b/read.php
index 0835b98..e96c99a 100644
--- a/read.php
+++ b/read.php
@@ -528,7 +528,7 @@ if (isset($_POST['msg']) and !empty($_POST['msg']) and is_numeric($_POST['msg'])
echo "\r\n<tr><td><a href=\"$fileAttachment\" target=\"_blank\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" target=\"_blank\">$fileName</a><br>$fileSize{$imgSize}{$fileScan}</td></tr>\r\n";
}
else {
- echo "\r\n<tr><td><a href=\"$fileAttachment\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
+ echo "\r\n<tr><td><a href=\"$fileAttachment\" download=\"$fileName\"><img src=\"images/file.png\" border=\"0\" width=\"36\" height=\"36\"></a></td><td><a href=\"$fileAttachment\" download=\"$fileName\">$fileName</a><br>$fileSize{$fileScan}</td></tr>\r\n";
if (pathinfo($fileAttachment,PATHINFO_EXTENSION) == "ics") {
include("ics2.php");