"$(HTML $id)" \
"$(UNSTRING "${address#address=}" |HTML)" \
"$(UNSTRING "${hourly#hourly=}" |grep -xE '[0-9]+')" \
- "$(tid "clients/$id")"
+ "$(transid "clients/$id")"
}
list_clients(){
update_client(){
local id="$(POST id |checkid)"
- if [ "$(POST update)" = "$(tid "clients/$id")" ]; then
+ if [ "$(POST update)" = "$(transid "clients/$id")" ]; then
mkdir -p clients
printf 'address=%s hourly=%s' \
"$(POST address |STRING)" "$(POST hourly |STRING)" \
>"clients/$id"
+
+ [ -d .git ] && {
+ git add "clients/$id"
+ git commit -m 'Update client info for "'"$(POST address |sed 1q)"'"' -- "clients/$id"
+ } >/dev/null
+
REDIRECT "/clients/"
else
error Invalid Data "$id" "$(POST update)"