summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/index.php b/index.php
index 9502134..1dcac7b 100644
--- a/index.php
+++ b/index.php
@@ -306,5 +306,15 @@ for ($i = 0; $i < count($listing); $i++) {
echo json_encode($listing);
} else if ($_GET['format'] == "raw") {
print_r($listing);
+} else if ($_GET['format'] == "plain") {
+ header("Content-type: text/plain");
+
+ for ($i = 0; $i < count($listing); $i++) {
+ echo $listing[$i]['filename'] . "\n";
+ }
+} else if ($_GET['format'] == "light") {
+ for ($i = 0; $i < count($listing); $i++) {
+ echo '<a href="' . $listing[$i]['filename'] . '">' . $listing[$i]['filename'] . '</a><br>';
+ }
}
?>