--- /dev/null
+#!/bin/zsh
+
+cgi_post
+
+case "$_POST[\"choice\"]"; in
+ new_filter)
+ filter="$_POST[\"filter\"]"
+ filtertype="$_POST[\"filtertype\"]"
+ order="$_POST[\"order\"]"
+ echo -n "Location: http://$HTTP_HOST/?page=attendees&filter=$filter&filtertype=$filtertype&order=$order\n\n"
+ ;;
+ *)
+ echo -n "Location: http://$HTTP_HOST/?page=attendees\n\n"
+ ;;
+esac
# we will use the http root as object storage (data directory) and call sub
# programs from the directory in which the real executable resides
# therefore we need to identify the code and data directories _EXEC and _DATA
-call=$0
-real=$call
-while [ -L "$real" ]; do
- real="$(stat -c %N "$real" |sed -r "s:..*. -> .(.*).$:\1:")"
-done
-
+call="$0"
+real="$(readlink -f $call)"
_EXEC="$(dirname "$real")" #execution directory
_DATA="$(dirname "$call")" #storage directory
#!/bin/sh
-[ "$_GET[\"choice\"]" = "del_filter" ] && _GET["filter"]="" && _GET["filtertype"]=""
listcards() {
case "$_GET[\"filtertype\"]" in
any)
width: 128ex;
border-width: 1px;
border-style: solid;
- margin: 2em 5% .5em 5%;
+ border-radius: 4px 4px 0 0;
+ margin: .5em auto .25em auto;
padding: .25em 1ex .25em 1ex;
background: #EFF;
}
width: 126ex;
border-width: 1px;
border-style: solid;
- margin: .5em 5% 1em 5%;
+ border-radius: 0 0 4px 4px;
+ margin: .25em auto 1em auto;
padding: .25em 2ex .25em 2ex;
background: #EFF;
}
width: 130ex;
border-style: solid;
border-width: 1px;
- margin: 4px 5%;
+ margin: .25em auto;
padding: 0;
overflow: auto;
+ background: #FFF;
}
.cardlist .card .section {
background: #EEF;
}
.cardlist .card .control .item {
+ color: #008;
margin-top: .2em;
margin-right: 1ex;
}
cat <<EOF
<div class="filter">
<span class="label">$(l10n filter_label)</span>
- <form class="search" action="/" method="GET">
+ <form class="search" action="/?action=filter_attendee" method="POST">
<input type="hidden" name="page" value="attendees"/>
<input type="text" name="filter" value="$_GET["filter"]" placeholder="$(l10n filter_placeholder)"/>
<br />
<title>$($PAGE title)</title>
<style type="text/css">
<!--
+body {
+ background: #EEE;
+ margin: 0;
+ padding: 0;
+}
+.NAVIGATION {
+ display: inline-block;
+ height: 1.5em;
+ border-style: none solid solid solid;
+ border-width: 0 1px 1px 1px;
+ border-radius: 0 0 4px 4px;
+ margin-top: 0;
+ margin-left: 3%;
+ padding: .5em 1ex .25em 1ex;
+ background: #FFF;
+}
+.NAVIGATION a {
+ color: #008;
+ border-style: solid;
+ border-width: 1px;
+ border-color: #BBF;
+ margin: .5em .5ex .25em .5ex;
+ padding: .2em 3ex .2em 3ex;
+ background: #EFF;
+}
+.NAVIGATION a:hover {
+ border-width: 2px 1px 2px 1px;
+ background: #F3FFFF;
+}
$(. $PAGE css)