# You should have received a copy of the GNU Affero General Public License
# along with Confetti. If not, see <http://www.gnu.org/licenses/>.
-[ -z "${_GET[order]}" ] && _GET[order]="firstname"
-
BR='
'
+case $PROFILE in
+medical)
+ view_card="$_EXEC/templates/view_client.sh"
+ edit_card="$_EXEC/templates/edit_client.sh"
+ _GET[order]="${_GET[order]:-lastname}"
+ profile_medical=x
+;;
+circus)
+ view_card="$_EXEC/templates/view_attendee.sh"
+ edit_card="$_EXEC/templates/edit_attendee.sh"
+ _GET[order]="${_GET[order]:-firstname}"
+ profile_circus=x
+;;
+esac
+
+edit="${_GET[edit]}"
+[ \! -f "vcard/$edit" -a \! -f "temp/$edit" ] && edit=''
+_GET[filtertype]="${_GET[filtertype]:-any}"
+
listcourses() {
ls -1 ${_DATA}/ical/*ics |while read file; do
icstime="$(sed -rn 's:^DTSTART\:(TZID=.*\:)?([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z?\r$:\2-\3-\4 \5\:\6\:\7:p' "$file")"