diff options
author | Minteck <contact@minteck.org> | 2022-04-06 19:56:46 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-04-06 19:56:46 +0200 |
commit | 01632caf82659e4e8025b4fad91ff7388b369770 (patch) | |
tree | 18127ad9abbd877dc4c6731040fa12eea2982497 /api/projects/index.php | |
parent | 86bb68d8e7e9c2158939810b9343c7824886d6f4 (diff) | |
download | cloudsdale-01632caf82659e4e8025b4fad91ff7388b369770.tar.gz cloudsdale-01632caf82659e4e8025b4fad91ff7388b369770.tar.bz2 cloudsdale-01632caf82659e4e8025b4fad91ff7388b369770.zip |
Public API is complete
Diffstat (limited to 'api/projects/index.php')
-rw-r--r-- | api/projects/index.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/api/projects/index.php b/api/projects/index.php new file mode 100644 index 0000000..71cf001 --- /dev/null +++ b/api/projects/index.php @@ -0,0 +1,15 @@ +<?php header("Content-Type: text/html"); if (str_ends_with($_SERVER["REQUEST_URI"], "/")) $_SERVER["REQUEST_URI"] = substr($_SERVER["REQUEST_URI"], 0, -1); if (str_contains($_SERVER["REQUEST_URI"], "..")) die(); ?> +<h1>Available endpoints at <?= $_SERVER['REQUEST_URI'] ?></h1> + +<ul> + <?php foreach (scandir($_SERVER["DOCUMENT_ROOT"] . $_SERVER['REQUEST_URI']) as $i1): if (is_dir($_SERVER["DOCUMENT_ROOT"] . $_SERVER['REQUEST_URI'] . "/" . $i1) && !str_starts_with($i1, ".")): ?> + <li><a href="<?= $_SERVER['REQUEST_URI'] ?>/<?= $i1 ?>"><?= $_SERVER['REQUEST_URI'] ?>/<?= $i1 ?></a><ul> + + <?php foreach (scandir($_SERVER["DOCUMENT_ROOT"] . $_SERVER['REQUEST_URI'] . "/" . $i1) as $i2): if (is_dir($_SERVER["DOCUMENT_ROOT"] . $_SERVER['REQUEST_URI'] . "/" . $i1 . "/" . $i2) && !str_starts_with($i2, ".")): ?> + <li><a href="<?= $_SERVER['REQUEST_URI'] ?>/<?= $i1 ?>/<?= $i2 ?>"><?= $_SERVER['REQUEST_URI'] ?>/<?= $i1 ?>/<?= $i2 ?></a></li> + + <?php endif; endforeach; ?> + </ul></li> + <?php endif; endforeach; ?> + +</ul>
\ No newline at end of file |