X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=cards%2Findex.cgi;h=0bb4f827c26cf53b7c934039d5260f3a88abe739;hb=915db545f387cf9287b95f3ad5f84278bc2860d3;hp=6f44168fa0914e239a086a05bf0b9ee26b4481a7;hpb=1b5fe5ec8e6ceb580ada4e0ff4fe3955c2457ec0;p=lobster diff --git a/cards/index.cgi b/cards/index.cgi index 6f44168..0bb4f82 100755 --- a/cards/index.cgi +++ b/cards/index.cgi @@ -1,31 +1,30 @@ #!/bin/sh -if [ "$_PATH" = "/cards/cards.css" ]; then - . $_EXEC/cgilite/file.sh - FILE $_EXEC/cards/cards.css - return 0 -fi - . $_EXEC/pdiread.sh . $_EXEC/cards/l10n.sh . $_EXEC/cards/widgets.sh . $_EXEC/cards/list.sh -unescape() { [ $# = 0 ] && sed -E 's;\\(.);\1;g' || printf %s "$*" |sed -E 's;\\(.);\1;g'; } upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; ' filter="$(GET f)" order="$(GET o)" -edit="$(GET e)" -[ "$order" ] || order=firstname +edit="$(GET e |PATH)" -{ w_filter_diag +[ "$order" ] || order=lastname +edit="${edit##*/}" + +list_hi_companies(){ + sed -rn 's;^X-HEALTH-INSURANCE:([^\;]+)\;.*$;\1;p' ${_DATA}/vcard/*vcf \ + | sort -u +} +{ w_filter_diag printf ' [form class="newcard" action="/cards/new_card.sh" method="POST" + [a href="#top" . %s] [button type="submit" %s] - ]' "$(l10n newcard)" - + ]' "$(l10n top)" "$(l10n newcard)" [ "$edit" ] && edit_card "$edit" list_cards -} | yield_page cards /cards/cards.css +} | yield_page cards #/cards/cards.css