diff options
-rw-r--r-- | index.php | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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>'; + } } ?> |