summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-25 10:23:51 +0300
committerAndrew Dolgov <[email protected]>2017-02-25 10:23:51 +0300
commitd3b110e4eb98515d44826e0ce7d5ce3f85892959 (patch)
tree931375889340bd5dc39a041e06d12834db998bd2
parentcdd0fb2b99ee79a37f669abd383e30f14a41a56b (diff)
mark epub format in index
-rw-r--r--index.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.php b/index.php
index 28a8dc1..89a7c8c 100644
--- a/index.php
+++ b/index.php
@@ -169,8 +169,10 @@
while ($data_line = $data_result->fetchArray(SQLITE3_ASSOC)) {
if ($data_line["format"] != "ORIGINAL_EPUB") {
+ $label_class = $data_line["format"] == "EPUB" ? "label-success" : "label-primary";
+
$download_link = "backend.php?op=download&id=" . $data_line["id"];
- print "<a target=\"_blank\" href=\"$download_link\"><span class='label label-primary'>" . $data_line["format"] . "</span></a> ";
+ print "<a target=\"_blank\" href=\"$download_link\"><span class=\"label $label_class\">" . $data_line["format"] . "</span></a> ";
}
}