3 [ "$_GET[\"action\"]" = "del_filter" ] && _GET["filter"]="" && _GET["filtertype"]=""
5 case "$_GET["filtertype"]" in
7 grep -il "$_GET[\"filter\"]" ${_DATA}/vcard/*vcf
10 egrep -xil "(FN|NICKNAME|N)(;.+)*:.*$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
13 egrep -xil "(ADR)(;.+)*:([^;]*;){2}$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
16 egrep -xil "(ADR)(;.+)*:([^;]*;){5}$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
19 egrep -xil "(TEL)(;.+)*:.*$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
22 egrep -xil "(BDAY)(;.+)*:$_GET[\"filter\"].*" ${_DATA}/vcard/*vcf
26 *) ls -1 ${_DATA}/vcard/*vcf
31 FIELDLIST="$(echo PHOTO LOGO FN NICKNAME SOUND GENDER KIND TITLE ROLE ORG MEMBER CATEGORIES ANNIVERSARY BDAY EMAIL TEL IMPP ADR URL LANG NOTE RELATED |tr ' ' '\n')"
34 tr -d '\n' <"$1" |sed -r 's:\r ::g;s:\r:\n:g' \
37 s:^X-MS-CARDPICTURE:001 PHOTO:p;
41 s:^NICKNAME:005 NICKNAME:p;
43 s:^GENDER:007 GENDER:p;
44 s:^X-GENDER:007 GENDER:p;
49 s:^MEMBER:012 MEMBER:p;
50 s:^CATEGORIES:013 CATEGORIES:p;
51 s:^ANNIVERSARY:014 ANNIVERSARY:p;
52 s:^X-ANNIVERSARY:014 ANNIVERSARY:p;
53 s:^X-EVOLUTION-ANNIVERSARY:014 ANNIVERSARY:p;
54 s:^X-KADDRESSBOOK-X-Anniversary:014 ANNIVERSARY:p;
59 s:^X-AIM(;[^"\:]+|;"[^"]+")*\:(.*)$:018 IMPP\1\:aim\:\2:p;
60 s:^X-ICQ(;[^"\:]+|;"[^"]+")*\:(.*)$:018 IMPP\1\:aim\:\2:p;
61 s:^X-GOOGLE-TALK(;[^"\:]+|;"[^"]+")*\:(.*)$:018 IMPP\1\:xmpp\:\2:p;
62 s:^X-JABBER(;[^"\:]+|;"[^"]+")*\:(.*)$:018 IMPP\1\:xmpp\:\2:p;
63 s:^X-MSN(;[^"\:]+|;"[^"]+")*\:(.*)$:018 IMPP\1\:msn\:\2:p;
64 s:^X-YAHOO(;[^"\:]+|;"[^"]+")*\:(.*)$:018 IMPP\1\:ymsgr\:\2:p;
65 s:^X-SIP(;[^"\:]+|;"[^"]+")*\:(sip\:)?(.*)$:018 IMPP\1\:sip\:\3:p;
67 s:^LABEL(;[^"\:]+|;"[^"]+")*\:(.*)$:019 ADR;LABEL="\2"\1\::p;
69 s:^X-EVOLUTION-BLOG-URL:021 URL:p;
73 s:^RELATED:025 RELATED:p;
74 s:^AGENT:025 RELATED\;TYPE=agent:p;
75 s:^X-ASSISTANT:025 RELATED\;TYPE=assistant;VALUE=text:p;
76 s:^X-EVOLUTION-ASSISTANT:025 RELATED\;TYPE=assistant;VALUE=text:p;
77 s:^X-KADDRESSBOOK-X-AssistantsName:025 RELATED\;TYPE=assistant;VALUE=text:p;
78 s:^X-MANAGER:025 RELATED\;TYPE=manager;VALUE=text:p;
79 s:^X-EVOLUTION-MANAGER:025 RELATED\;TYPE=manager;VALUE=text:p;
80 s:^X-KADDRESSBOOK-X-ManagersName:025 RELATED\;TYPE=manager;VALUE=text:p;
81 s:^X-SPOUSE:025 RELATED\;TYPE=spouse;VALUE=text:p;
82 s:^X-EVOLUTION-SPOUSE:025 RELATED\;TYPE=spouse;VALUE=text:p;
83 s:^X-KADDRESSBOOK-X-SpouseName:025 RELATED\;TYPE=spouse;VALUE=text:p;
102 s:^VERSION.*$:000 VERSION\:4.0:p;
105 s:^([A-Z].*)$:024 \1:p;
107 | sort |while read -r line; do
113 fn=$(echo -E "$line" |sed -r 's:^[0-9]{3} ([^;\:]+)(;[^"\:]+|;"[^"]+")*\:(.*)$:\3:g' |tr -d '\r')
116 n=$(echo -E "$line" \
117 |sed -rn 's:^([0-9]{3} )([^;\:]+)(;[^"\:]+|;"[^"]+")*\:([^;]*)(\;[^;]*)(\;[^;]*)?(\;[^;]*)?(\;[^;]*)?$:\7 \5 \6 \4 \8:gp' \
118 |sed -r 's:,: :;s:\;: :g;s: +: :g' \
123 nick=$(echo -E "$line" |sed -r 's:^[0-9]{3} ([^;\:]+)(;[^"\:]+|;"[^"]+")*\:(.*)$:\3:g' |tr -d '\r')
125 *) [ -n "$n" ] && fn="$n"
126 [ -n "$fn" -a -n "$nick" ] && fn="$fn aka. $nick"
127 [ -n "$fn" ] && echo -E "003 FN:$fn" \
128 || echo -E "003 FN:$nick"
134 | sed -r 's:^[0-9]{3} ([^;\:]+)(;[^"\:]+|;"[^"]+")*\:(.*)$:key="\1"\nvalue="\3"\ntag=\2:g' \
135 | while read -r line; do
137 key=*) echo -E "$line"
139 value=*) echo -E "$line"
143 | sed -r 's:^tag=::;s:\;([A-Z+_-]+="[^"]+"|[A-Z+_-]+=[^\;]+):\n\1:g;' \
144 | sed -r 's:([A-Z+_-]+)="?(.*)"?:tag\[\1\]="\2":g' \
146 | sort |while read -r tag; do
147 nt="$(echo -E "$tag" |sed -r 's:^tag\[([A-Z+_-]+)\]="(.*)"$:\1:')"
148 nv="$(echo -E "$tag" |sed -r 's:^tag\[([A-Z+_-]+)\]="(.*)"$:\2:')"
149 [ "$nt" = "$ot" ] && vl="$nv,$vl" || vl="$nv"
150 echo -E "tag[$nt]=\"$vl\""
163 . ${_EXEC}/templates/attendees.css.sh
166 . ${_EXEC}/templates/attendees.html.sh