summaryrefslogtreecommitdiff
path: root/public/index.php
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2022-01-10 20:29:04 +0100
committerDaniel Weipert <code@drogueronin.de>2022-01-10 20:29:04 +0100
commita319f3a419790925bed539ba141038c72a83e70f (patch)
treedfb24183cc693863df733e190dbbc6da93bb82e5 /public/index.php
Initial commit
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/public/index.php b/public/index.php
new file mode 100644
index 0000000..57a5d91
--- /dev/null
+++ b/public/index.php
@@ -0,0 +1,28 @@
+<?php
+
+require_once dirname(__DIR__) . '/vendor/autoload.php';
+
+\Elements\Template::init();
+\Elements\DB::init();
+new \Elements\Router();
+
+$fields = [
+ 'name' => 'meta[name]',
+ 'converted mana cost' => 'meta[cmc]',
+ 'is uno reverse' => 'meta[is_uno_reverse]',
+];
+?>
+
+<form action="<?= '/card/add' ?>" method="post" enctype="multipart/form-data">
+ <?php foreach ($fields as $key => $field): ?>
+ <label>
+ <?= $key ?> <input type="text" name="<?= $field ?>">
+ </label>
+ <?php endforeach; ?>
+ <input type="submit" value="Hinzufügen">
+</form>
+
+<?php
+
+
+