]> git.plutz.net Git - confetti/blobdiff - actions/update_attendee.sh
updated manipulation and view functions for attendee
[confetti] / actions / update_attendee.sh
index 6f46cb2034eaeda33c967523fcb59fde5d1126a6..fee91fc3d0f405a652e4a2315f46953ccb58c7d1 100644 (file)
@@ -9,6 +9,7 @@ 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
@@ -23,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"
@@ -34,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