]> git.plutz.net Git - confetti/blobdiff - cards/index.cgi
merge from cgilite
[confetti] / cards / index.cgi
diff --git a/cards/index.cgi b/cards/index.cgi
new file mode 100755 (executable)
index 0000000..934c19a
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+. $_EXEC/pdiread.sh
+. $_EXEC/cards/l10n.sh
+. $_EXEC/cards/widgets.sh
+. $_EXEC/cards/list.sh
+
+upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '
+
+filter="$(GET f)"
+order="$(GET o)"
+edit="$(GET e |PATH)"
+
+[ "$order" ] || order=firstname
+edit="${edit##*/}"
+
+{ w_filter_diag
+  printf '
+  [form class="newcard" action="/cards/new_card.sh" method="POST"
+    [button type="submit" %s]
+    [input name="seed" placeholder="%s"]
+  ]' "$(l10n newcard)" "$(l10n vcf_seed_label)"
+  [ "$edit" ] && edit_card "$edit"
+  list_cards
+} | yield_page cards #/cards/cards.css