5 if [ -f "clients/$id" ]; then
6 read -r address hourly <"clients/$id"
8 [ "$address" ] || address="address="
9 [ "$hourly" ] || hourly="hourly="
11 [form method="POST" action="/update_client"
13 <textarea name="address" placeholder="address">
15 [label for=hourly Hourly Rate:]
16 [input #hourly type=number name=hourly value="%s"]
17 [submit "update" "update" Update]
20 "$(UNSTRING "${address#address=}" |HTML)" \
21 "$(UNSTRING "${hourly#hourly=}" |grep -xE '[0-9]+')"
25 [ -d clients/ ] && for c in clients/*; do
26 read -r address hourly <"$c"
27 address="$(UNSTRING "${address#address=}")"
28 [ "$address" ] || address="(no address)"
29 printf '[div .client .address <!--
32 [label Hourly Rate:] %s€
33 [a href="/clients/%s" Edit]]
34 ' "$(HTML "$address")" \
35 "$(HTML "${hourly#hourly=}")" \
36 "$(HTML "${c#clients/}")"
41 id="$(POST id |checkid)"
42 if [ "$(POST update)" = update -a "$id" ]; then
44 printf 'address=%s hourly=%s' \
45 "$(POST address |STRING)" "$(POST hourly |STRING)" \
48 echo Invalid Data "$(POST id)" "$(POST update)" >&2