X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=actions%2Fupdate_attendee.sh;h=fee91fc3d0f405a652e4a2315f46953ccb58c7d1;hp=10eb82c419b7716856c7c121b9d7ba7a4998cdb1;hb=19a85441a8f173c3d2cd3d29fd7d95d2b471bb3c;hpb=9da739230659371a860e93dcaf3765b977e30de7 diff --git a/actions/update_attendee.sh b/actions/update_attendee.sh index 10eb82c..fee91fc 100644 --- a/actions/update_attendee.sh +++ b/actions/update_attendee.sh @@ -8,6 +8,8 @@ cardfile="vcard/$card" echo "BEGIN:VCARD\r" >"$tempfile" echo "VERSION:4.0\r" >>"$tempfile" +echo "N:$_POST[\"0N\"];$_POST[\"1N\"];$_POST[\"2N\"];$_POST[\"3N\"];$_POST[\"4N\"]\r" >>"$tempfile" +echo "UID:$_POST[\"UID\"]\r" >>"$tempfile" for field in $VCF_FIELDS; do value="$_POST[\"$field\"]" n=0 @@ -22,7 +24,7 @@ case "$_POST[\"action\"]" in addfield) echo "$_POST[\"newfield\"]:\r" >>"$tempfile" echo "END:VCARD\r" >>"$tempfile" - echo -n "Location: http://$HTTP_HOST/?page=attendees&edit=$card#$card\n\n" + echo -n "Location: http://$HTTP_HOST/?page=attendees&edit=$card\n\n" ;; update) echo "END:VCARD\r" >>"$tempfile" @@ -33,4 +35,8 @@ case "$_POST[\"action\"]" in rm "$tempfile" echo -n "Location: http://$HTTP_HOST/?page=attendees#$card\n\n" ;; + delete) + rm "$tempfile" "$cardfile" + echo -n "Location: http://$HTTP_HOST/?page=attendees\n\n" + ;; esac