-if mkdir "$lock" 2>&-; then
- cp "$cardfile" "$tempfile"
- REDIRECT "/cards/?o=${order}&f=${filter}&e=${card}"
+if tempfile="$(SLOCK "$cardfile" "$locktimeout")"; then
+ REDIRECT "/cards/?o=${order}&f=${filter}&e=${card#/}"
+elif [ -f "$tempfile" ]; then
+ SET_COOKIE session message="SESSLOCK"
+ REDIRECT "/cards/?o=${order}&f=${filter}#${card#/}"