Website Summary Files Commits Branches @commit @diff @stats
path: root / views / archive / index.php
diff options
context:
space:
mode:
Commit1c65183651962e7c91097d3ffd29cfb24b3a6bee (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-01-19 19:25:43 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-01-19 19:25:43 +0200
Filesc257900e580016c6e3475f9de266c7690f210e5e /views/archive/index.php
nowayforward_human-1c65183651962e7c91097d3ffd29cfb24b3a6bee.tar
nowayforward_human-1c65183651962e7c91097d3ffd29cfb24b3a6bee.tar.gz
nowayforward_human-1c65183651962e7c91097d3ffd29cfb24b3a6bee.zip
Parent640dd416d3de28ad39b05747ad4b7c81d5203776 (diff)
feat: Add archive page
1 files changed, 24 insertions, 0 deletions
-rw-r--r--views/archive/index.php24
diff --git a/views/archive/index.php b/views/archive/index.php
new file mode 100644
index 0000000..7e85c70
--- /dev/null
+++ b/views/archive/index.php
@@ -0,0 +1,24 @@
+<?php
+ include '../meta.php';
+ $page = null;
+ runController('archive');
+?>
+
+<?php if ($page !== null): ?>
+ <iframe>
+ <!-- /archives/$page->WID -->
+ </iframe>
+ <?php foreach (Database\Webpage::allArchives($page->URL) as $page): ?>
+ <section>
+ <?php echo $page->Date ?>
+ </section>
+ <?php endforeach; ?>
+
+<?php else: ?>
+ <h2>This page hasn't been archived yet!</h2>
+ <form action="/sample_archive/index.php" method="POST">
+ <input type="hidden" name="page_url" value="<?php echo $_GET["page_url"] ?>">
+ <input type="submit" value="Archive Now!">
+ </form>
+
+<?php endif; ?>