+
+ printf '%s:exists\n' "$sid" >>"$tempfile"
+ printf '%s_open:checked\n' "$sid" >>"$tempfile"
+
+elif [ -n "$_POST[dotmark.x]" -a -n "$_POST[dotmark.y]" ]; then
+ sed -rn 's;^(session[0-9]+)_open:checked$;\1;p' "$tempfile" \
+ | sort -n \
+ | tail -n1 \
+ | read sid
+
+ x="$_POST[dotmark.x]"
+ y="$_POST[dotmark.y]"
+
+ case "$_POST[color]" in
+ c000) c="#000000";;
+ c001) c="#000088";;
+ c010) c="#008800";;
+ c011) c="#008888";;
+ c100) c="#880000";;
+ c101) c="#880088";;
+ c110) c="#888800";;
+ c111) c="#888888";;
+ esac
+
+ convert "${tpyfile%.tpy}_${sid}.png" -fill "$c" -stroke "$c" -draw "circle $x,$y $(($x+5)),$y" "${tpyfile%.tpy}_${sid}.png"
+