From d3f2a05bb824037485738394d65430c5f5407a11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 4 Apr 2019 16:07:15 +0200 Subject: [PATCH] modular design --- cards/main.cgi | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/cards/main.cgi b/cards/main.cgi index 3cf8a23..899388d 100755 --- a/cards/main.cgi +++ b/cards/main.cgi @@ -1,12 +1,9 @@ #!/bin/sh -if [ "$ITEM" = "cards/cards.css" ]; then +if [ "$_PATH" = "/cards/cards.css" ]; then . $_EXEC/cgilite/file.sh FILE $_EXEC/cards/cards.css return 0 -elif [ "$(GET action)" = filter_card ]; then - . $_EXEC/cards/filter_card.sh - exit 0 fi . $_EXEC/pdiread.sh @@ -14,27 +11,18 @@ fi . $_EXEC/cards/widgets.sh . $_EXEC/cards/list.sh -filter="$(GET filter)" -order="$(GET order)" +filter="$(GET f)" +order="$(GET o)" +edit="$(GET e)" +[ "$order" ] || order=firstname -printf 'Content-Type: text/html; charset=utf-8\r\n\r\n' +{ w_filter_diag -{ cat <