Website Summary Files Commits Branches @commit @diff @stats
path: root / views / archive / index.php
diff options
context:
space:
mode:
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; ?>