+@title@
+@context@
+
+
+@reg_info.user_name@,
+
+
+
+ Your place is reserved for @event_info.name@.
+
+ @event_info.display_after@
+
+
About @event_info.name@
+
+
+ When
+ @event_info.timespan@
+ ( view other times )
+
+
+ Where
+ @venue_info.venue_name@
+ @venue_info.address1@
+ @venue_info.address2@
+
+ @venue_info.city@ @venue_info.usps_abbrev@
+
+
+ @venue_info.description@
+
+
+
+
+
+ If you would like to, you may cancel your registration .
+
+
+
+
+ Thank you for your interest in @event_info.name@. This
+ event requires final approval for your registration from one of the
+ event organizers. You have been placed on a registration queue, and
+ we will notify you by e-mail once your registrating status changes.
+
+ If you would like to, you may cancel your request .
+
+
+
+ Thank you for your interest in @event_info.name@. Unfortunately,
+ all spaces for this event were filled before you applied. Thus, you have
+ been placed on a waiting list. We will notify you by e-mail if your
+ registration status changes.
+
+ If you would like to, you may cancel your registration .
+
+
+
+ Your registration has been canceled. If you want, you may
+ place a new registration .
+
Index: openacs-4/contrib/packages/events/www/order-check.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/order-check.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/order-check.tcl 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,45 @@
+# events/www/order-check.tcl
+
+ad_page_contract {
+ Allows users to check the status of an order/registration
+
+ @param reg_id The registration to check
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @creation date 2002-11-10
+ @original OpenACS 3.x version author Bryan Che (bryanche@arsdigita.com)
+
+
+} {
+ {reg_id:naturalnum,notnull}
+} -validate {
+ registration_exists_p -requires {reg_id} {
+ if { ![events::registration::exists_p -reg_id $reg_id] } {
+ ad_complain "We could not find the registration you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+set user_id [ad_verify_and_get_user_id]
+ad_maybe_redirect_for_registration
+
+# check and see if this reg belongs to this user
+if { ![db_0or1row reg_exists {}] } {
+ ad_return_warning "Could Not Find Registration" "We could not find the
+ registration you asked for, or the registration you
+ asked for does not belong to you."
+}
+
+events::registration::get -reg_id $reg_id -array reg_info
+events::event::get -event_id $reg_info(event_id) -array event_info
+events::venue::get -venue_id $event_info(venue_id) -array venue_info
+
+set title "Status of Registration for $event_info(name)"
+set context [list [list "event-info?event_id=$reg_info(event_id)" "$event_info(name) in $venue_info(city)"] "Status of Registration"]
+
+ad_return_template
+
+
+
Index: openacs-4/contrib/packages/events/www/order-check.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/order-check.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/order-check.xql 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+ select 1
+ from events_registrations
+ where reg_id = :reg_id
+ and user_id = :user_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/order-one-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/order-one-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/order-one-oracle.xql 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ declare begin
+ :1 := person.name(person_id => :user_id);
+ end;
+
+
+
+
Index: openacs-4/contrib/packages/events/www/order-one-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/order-one-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/order-one-postgresql.xql 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,10 @@
+
+
+
+
+
+ select person__name(:user_id) as user_name
+
+
+
+
Index: openacs-4/contrib/packages/events/www/order-one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/order-one.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/order-one.adp 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,35 @@
+
+Register for @event_info.name@
+@context@
+
+
+About the Event
+
+
+
+ When
+ @event_info.timespan@
+
+
+ Where
+ @event_info.city@ (you'll get specifics after you register)
+
+
+ Registration Deadline
+ @event_info.reg_deadline@
+
+
+
+
+
+Registration Notes:
+
+
+
+About You
+
+
+
+
Index: openacs-4/contrib/packages/events/www/order-one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/order-one.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/order-one.tcl 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,139 @@
+# events/www/order-one.tcl
+
+ad_page_contract {
+ Registration form for an event.
+
+ @param event_id the event for which the user is signing up
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id order-one.tcl,v 3.19.2.5 2000/09/22 01:37:33 kevin Exp $
+} {
+ {event_id:integer,notnull}
+} -properties {
+
+ detail_url:onevalue
+} -validate {
+ event_exists_p -requires {event_id} {
+ if { ![events::event::exists_p -event_id $event_id] } {
+ ad_complain "We couldn't find the event you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+set user_id [ad_verify_and_get_user_id]
+
+if { [events::event::reg_deadline_elapsed_p -event_id $event_id] } {
+ ad_return_warning "Registration Deadline Elapsed" "The registration
+ deadline for this event has passed."
+}
+
+
+# check to see if this person has already registered
+if {[db_0or1row get_reg_id {}]} {
+ ad_return_warning "Already Registered" "You have already registered for this Event. You are not permitted
+ to register more than once."
+}
+
+
+
+
+events::security::require_read_event -event_id $event_id
+events::event::get -event_id $event_id -array event_info
+events::event::get_stats -event_id $event_id -array event_stats
+
+set context [list [list "event-info?event_id=$event_id" "$event_info(name) in $event_info(city)"] Register]
+
+set detail_url [ad_convert_to_html $event_info(detail_url)]
+
+
+
+set reg_notes_p f
+
+
+if { [string equal $event_info(reg_needs_approval_p) "t"] } {
+ set reg_notes_p t
+ append reg_notes "A registration for this event
+ requires final approval from an administrator. If you sign up
+ for $event_info(name), your final registration will be pending
+ administrator approval.<\/font><\/li>"
+ if {![empty_string_p $event_stats(max_people)] && 0 >= [expr $event_stats(max_people) - $event_stats(approved)]} {
+ append reg_notes "The maximum number of registrations have already been approved
+ and registered. If an administrator approves of your request, you
+ will likely be placed on the waiting list.<\/font><\/li>"
+ }
+ if { [string equal $event_info(reg_cancellable_p) "f"] } {
+ append reg_notes "Registrations for this event cannot be canceled. Once approved,
+ you are committed to coming.<\/font><\/li>"
+ }
+} else {
+ if {![empty_string_p $event_stats(max_people)] && 0 >= [expr $event_stats(max_people) - $event_stats(approved)]} {
+ set reg_notes_p t
+ append reg_notes "This event has already received its maximum number of
+ registrations. If you register for this event, you will be
+ placed on a waiting list.<\/font><\/li>"
+ } else {
+ if { $event_stats(waiting) > 0 } {
+ set reg_notes_p t
+ append reg_notes "Although this event is not filled to maximum
+ capacity, there is a waiting list. If you register for this event an administrator
+ will need to approve of your registration.<\/font><\/li>"
+ }
+ }
+ if { [string equal $event_info(reg_cancellable_p) "f"] } {
+ set reg_notes_p t
+ append reg_notes "Registrations for this event cannot be canceled. Once registered,
+ you are committed to coming.<\/font><\/li>"
+ }
+}
+
+
+set user_name [db_exec_plsql select_user_name {}]
+
+
+form create registration
+
+element create registration event_id \
+ -datatype integer \
+ -widget hidden \
+ -value $event_id
+
+element create registration user_id \
+ -datatype integer \
+ -widget hidden \
+ -value $user_id
+
+element create registration user_name \
+ -label "Your Name" \
+ -datatype text \
+ -widget inform \
+ -value " "
+
+element create registration comments \
+ -label "Comments" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 8 wrap soft} \
+ -optional
+
+if {[template::form is_valid registration]} {
+ template::form get_values registration event_id user_id comments
+
+ set reg_id [events::registration::new -event_id $event_id -user_id $user_id -comments $comments]
+
+ ad_returnredirect "order-check?reg_id=$reg_id"
+ ad_script_abort
+}
+
+ad_return_template
+
+# CUSTOM FIELDS WILL BE DEALT WITH VIA A SERVICE CONTRACT WITH SURVEY
+#
+#db_foreach select_custom_fields {} {
+# set element "
+# {$name:[attribute::translate_datatype $datatype](text)
+# {label $pretty_name}}"
+# ad_form -extend -name registration -form $element
+#}
Index: openacs-4/contrib/packages/events/www/order-one.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/order-one.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/order-one.xql 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+
+
+ select reg_id
+ from events_registrations
+ where event_id = :event_id
+ and user_id = :user_id
+ and reg_state <> 'canceled'
+
+
+
+
+
+ select eaam.attribute_id, aa.attribute_name as name,
+ aa.sort_order as after, aa.datatype, aa.pretty_name,
+ eac.category_name, eac.category_id
+ from events_event_attr_map eaam, acs_attributes aa,
+ events_attr_categories eac, events_attr_category_map eacm
+ where eaam.event_id = :event_id
+ and eaam.attribute_id = aa.attribute_id
+ and eacm.attribute_id = aa.attribute_id
+ and eacm.category_id = eac.category_id
+ order by eac.category_name, aa.sort_order asc
+
+
+
+
Index: openacs-4/contrib/packages/events/www/organizer.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/organizer.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/organizer.adp 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,8 @@
+
+@title@
+@context@
+
+About @organizer_name@:
+
+
+@bio@
Index: openacs-4/contrib/packages/events/www/organizer.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/organizer.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/organizer.tcl 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,33 @@
+ad_page_contract {
+ Displays information about an event organizer
+
+ @param role_id the organizer's role
+ @param user_id the organizer
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: organizer.tcl,v 1.1 2003/03/09 12:08:08 lars Exp $
+} {
+ {role_id:integer,notnull}
+ {user_id:integer,notnull}
+} -validate {
+ organizer_check -requires {role_id user_id} {
+ if { ![db_0or1row select_organizer_info {}] } {
+ ad_complain "Invalid Organizer Request This page
+ came in with an invalid organizer request."
+ return 0
+ }
+ return 1
+ }
+}
+
+events::event::get -event_id $event_id -array event_info
+
+set title "$organizer_name: $role for $event_info(name)"
+set context [list [list "event-info?event_id=$event_id" "One Event"] "$role"]
+
+set bio [db_string select_bio {}]
+set bio [ad_decode $bio "" "$organizer_name has not provided any information about himself to display" $bio]
+
+ad_return_template
+
Index: openacs-4/contrib/packages/events/www/organizer.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/organizer.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/organizer.xql 9 Mar 2003 12:08:08 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+
+
+
+ select eo.role, eo.user_id, eo.role_id, eo.event_id,
+ u.first_names || ' ' || u.last_name as organizer_name
+ from events_organizers eo, cc_users u
+ where eo.role_id = :role_id
+ and eo.public_role_p = 't'
+ and u.user_id = eo.user_id
+ and u.user_id = :user_id
+
+
+
+
+
+ select attr_value
+ from acs_attribute_values
+ where object_id = :user_id
+ and attribute_id =
+ (select attribute_id
+ from acs_attributes
+ where object_type = 'person'
+ and attribute_name = 'bio')
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activities.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activities.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activities.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,34 @@
+
+Activities
+@context_bar@
+
+
+
+Current Activities
+
+
+
+Discontinued Activities
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activities.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activities.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activities.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,21 @@
+# events/www/admin/activities.tcl
+ad_page_contract {
+ Displays a list of current and discontinued activities.
+ Details for specific activities are one click deep.
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: activities.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+
+} {
+}
+
+set package_id [ad_conn package_id]
+
+set context_bar [ad_context_bar Activities]
+
+db_multirow available_activities select_available_activities {}
+
+db_multirow unavailable_activities select_unavailable_activities {}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/activities.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activities.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activities.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,23 @@
+
+
+
+
+ select a.activity_id, a.name, ea.available_p
+ from events_activities ea, acs_activities a
+ where ea.activity_id = a.activity_id
+ and package_id = :package_id
+ and ea.available_p = 't'
+ order by name asc
+
+
+
+
+ select a.activity_id, a.name, ea.available_p
+ from events_activities ea, acs_activities a
+ where ea.activity_id = a.activity_id
+ and package_id = :package_id
+ and ea.available_p = 'f'
+ order by name asc
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-add.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,10 @@
+
+Add a New Activity
+@context_bar@
+
+Activity Description
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/activity-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-add.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,83 @@
+#/packages/events/www/admin/activity-ae.tcl
+
+ad_page_contract {
+ If an activity_id is supplied, the page will display
+ the activity to an admin with options
+ for modifying the event. Otherwise, a blank form for
+ the creation of a new event will be provided.
+
+ @param activity_id the activity at which we're looking
+ @param email_from_search
+ @param user_id_from_search
+ @param no_contact
+ @param default_contact_user_id
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: activity-add.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {activity_id:naturalnum,optional}
+ {email_from_search:optional}
+ {user_id_from_search:optional}
+ {no_contact_flag:optional}
+ {default_contact_user_id:naturalnum,optional}
+}
+
+set context_bar [ad_context_bar [list activities Activities] "New Activity"]
+
+form create activity
+
+element create activity name \
+ -label "Activity Name" \
+ -datatype text \
+ -widget text \
+ -html {size 60}
+
+element create activity default_contact_user_id \
+ -label "Default Contact Person" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::organizer::users_get_options] \
+ -optional \
+ -value "" \
+ -search_query {
+ select distinct u.first_names || ' ' || u.last_name as name, u.user_id
+ from cc_users u
+ where upper(decode(u.first_names,' ', '') || decode(u.last_name,' ', '') || u.email || ' ' || decode(u.screen_name, ' ', '')) like upper('%'||:value||'%')
+ order by name
+}
+
+element create activity detail_url \
+ -label "Details URL" \
+ -datatype text \
+ -widget text \
+ -html {size 50} \
+ -help_text "Note: If you don't put http:// in your url, the link will be relative" \
+ -optional
+
+element create activity description \
+ -label Description \
+ -datatype text \
+ -widget textarea \
+ -html {cols 60 rows 10 wrap soft} \
+ -optional
+
+if {[template::form is_valid activity]} {
+ template::form get_values activity \
+ name description detail_url default_contact_user_id
+
+ set package_id [ad_conn package_id]
+ set activity_id [events::activity::new \
+ -name $name \
+ -description $description \
+ -detail_url $detail_url \
+ -default_contact_user_id $default_contact_user_id \
+ -package_id $package_id
+ ]
+
+ ad_returnredirect "activity?activity_id=$activity_id"
+ ad_script_abort
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/activity-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-edit.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,9 @@
+
+@title@
+@context_bar@
+
+Activity Description
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-edit.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,113 @@
+# events/www/admin/activity-edit.tcl
+
+ad_page_contract {
+ Allows admins to edit an activity's properties.
+
+ @param activity_id the activity to edit
+ @param email_from_search optional default contact person's email
+ @param user_id_from_search optional default contact person's user_id
+ @param no_contact_flat optional flag stating there is not default contact
+ @param default_contact_user_id optional default contact person's user_id
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs-id activity-edit.tcl,v 3.8.2.7 2000/09/29 14:49:46 bryanche Exp
+} {
+ {activity_id:naturalnum,notnull}
+} -validate {
+ activity_exists -requires {activity_id} {
+ if { ![db_0or1row activity_exists {}] } {
+ ad_complain "We couldn't find the activity you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+set context_bar [ad_context_bar [list activities "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] "Edit Activity"]
+
+form create activity
+
+element create activity activity_id \
+ -label "Activity ID" \
+ -datatype integer \
+ -widget hidden
+
+element create activity name \
+ -label "Activity Name" \
+ -datatype text \
+ -widget text \
+ -html {size 60}
+
+element create activity creator \
+ -label "Creator" \
+ -datatype text \
+ -widget inform
+
+element create activity default_contact_user_id \
+ -label "Default Contact Person" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::organizer::users_get_options] \
+ -optional \
+ -search_query {
+ select distinct u.first_names || ' ' || u.last_name as name, u.user_id
+ from cc_users u
+ where upper(decode(u.first_names,' ', '') || decode(u.last_name,' ', '') || u.email || ' ' || decode(u.screen_name, ' ', '')) like upper('%'||:value||'%')
+ order by name
+}
+
+element create activity detail_url \
+ -label "Details URL" \
+ -datatype text \
+ -widget text \
+ -html {size 50} \
+ -help_text "Leave out http:// for relative URLs" \
+ -optional
+
+element create activity description \
+ -label Description \
+ -datatype text \
+ -widget textarea \
+ -html {cols 60 rows 10 wrap soft} \
+ -optional
+
+element create activity available_p \
+ -label "Current or Discontinued" \
+ -datatype text \
+ -widget radio \
+ -options {{Current t} {Discontinued f}} \
+ -help_text "Discontinuing an activity will not cancel an activity's existing events. It only prevents you from adding new events to the activity"
+
+if {[template::form is_valid activity]} {
+ template::form get_values activity \
+ activity_id name detail_url description available_p default_contact_user_id
+
+ events::activity::edit \
+ -activity_id $activity_id \
+ -name $name \
+ -detail_url $detail_url \
+ -description $description \
+ -available_p $available_p \
+ -default_contact_user_id $default_contact_user_id
+
+ ad_returnredirect "activity?activity_id=$activity_id"
+ ad_script_abort
+}
+
+events::activity::get -activity_id $activity_id -array activity_info
+set title "Edit $activity_info(name)"
+
+element set_properties activity activity_id -value $activity_id
+element set_properties activity name -value $activity_info(name)
+element set_properties activity default_contact_user_id -value $activity_info(default_contact_user_id)
+element set_properties activity detail_url -value $activity_info(detail_url)
+element set_properties activity description -value $activity_info(description)
+element set_properties activity available_p -value $activity_info(available_p)
+
+events::activity::get_creator -activity_id $activity_id -array creator_info
+element set_properties activity creator -value $creator_info(name)
+ad_return_template
+
Index: openacs-4/contrib/packages/events/www/admin/activity-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-edit.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-edit.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+
+
+ select 1
+ from events_activities
+ where activity_id = :activity_id
+
+
+
+
+
+ select a.name,
+ a.description,
+ ae.available_p,
+ ae.detail_url,
+ ae.default_contact_user_id
+ from acs_activities a, events_activities ae
+ where a.activity_id = :activity_id
+ and a.activity_id = ae.activity_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,50 @@
+
+
+
+
+
+ select role, eor.role_id,
+ decode(public_role_p, 't', ' (public role)', '') as public_role_p
+ from events_organizer_roles eor, events_org_role_activity_map eoram
+ where eoram.activity_id = :activity_id
+ and eoram.role_id = eor.role_id
+ order by role
+
+
+
+
+
+ select CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan,
+ nvl(e.name, a.name) as name,
+ e.event_id,
+ v.city,
+ v.usps_abbrev
+ from acs_activities a,
+ acs_events e,
+ events_activities ea,
+ events_events ee,
+ timespans s,
+ time_intervals t,
+ events_venues v
+ where e.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and e.activity_id = a.activity_id
+ and a.activity_id = ea.activity_id
+ and e.activity_id = :activity_id
+ and e.event_id = ee.event_id
+ and v.venue_id = ee.venue_id
+ and ee.available_p = 't'
+ and ea.package_id = :package_id
+ order by t.start_date
+
+
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-orders-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-orders-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-orders-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,74 @@
+
+
+
+
+
+ select er.reg_id,
+ person.name(er.user_id) as name,
+ er.user_id,
+ pa.email,
+ er.reg_state,
+ to_char(ao.creation_date, :date_format) || ' ' || to_char(ao.creation_date, :time_format) as creation_date,
+ ae.event_id,
+ ev.venue_name,
+ CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan
+ from events_registrations er,
+ parties pa,
+ acs_objects ao,
+ acs_events ae,
+ events_venues ev,
+ events_events ee,
+ timespans s,
+ time_intervals t
+ where er.user_id = pa.party_id
+ and ae.activity_id = :activity_id
+ and ae.event_id = er.event_id
+ and ae.event_id = ee.event_id
+ and ee.venue_id = ev.venue_id
+ and er.reg_state <> 'canceled'
+ and er.reg_id = ao.object_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ order by creation_date
+
+
+
+
+
+ select er.reg_id,
+ person.name(er.user_id) as name,
+ er.user_id,
+ pa.email,
+ er.reg_state,
+ to_char(ao.creation_date, :date_format) || ' ' || to_char(ao.creation_date, :time_format) as creation_date,
+ ae.event_id,
+ ev.venue_name,
+ CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan
+ from events_registrations er,
+ parties pa,
+ acs_objects ao,
+ acs_events ae,
+ events_venues ev,
+ events_events ee,
+ timespans s,
+ time_intervals t
+ where er.user_id = pa.party_id
+ and ae.activity_id = :activity_id
+ and ae.event_id = er.event_id
+ and ae.event_id = ee.event_id
+ and ee.venue_id = ev.venue_id
+ and er.reg_state = :specific_reg_type
+ and er.reg_id = ao.object_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ order by creation_date
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-orders-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-orders-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-orders-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,74 @@
+
+
+
+
+
+ select er.reg_id,
+ person__name(er.user_id) as name,
+ er.user_id,
+ pa.email,
+ er.reg_state,
+ to_char(ao.creation_date, :date_format) || ' ' || to_char(ao.creation_date, :time_format) as creation_date,
+ ae.event_id,
+ ev.venue_name,
+ CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan
+ from events_registrations er,
+ parties pa,
+ acs_objects ao,
+ acs_events ae,
+ events_venues ev,
+ events_events ee,
+ timespans s,
+ time_intervals t
+ where er.user_id = pa.party_id
+ and ae.activity_id = :activity_id
+ and ae.event_id = er.event_id
+ and ae.event_id = ee.event_id
+ and ee.venue_id = ev.venue_id
+ and er.reg_state <> 'canceled'
+ and er.reg_id = ao.object_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ order by creation_date
+
+
+
+
+
+ select er.reg_id,
+ person__name(er.user_id) as name,
+ er.user_id,
+ pa.email,
+ er.reg_state,
+ to_char(ao.creation_date, :date_format) || ' ' || to_char(ao.creation_date, :time_format) as creation_date,
+ ae.event_id,
+ ev.venue_name,
+ CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan
+ from events_registrations er,
+ parties pa,
+ acs_objects ao,
+ acs_events ae,
+ events_venues ev,
+ events_events ee,
+ timespans s,
+ time_intervals t
+ where er.user_id = pa.party_id
+ and ae.activity_id = :activity_id
+ and ae.event_id = er.event_id
+ and ae.event_id = ee.event_id
+ and ee.venue_id = ev.venue_id
+ and er.reg_state = :specific_reg_type
+ and er.reg_id = ao.object_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ order by creation_date
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-orders.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-orders.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-orders.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,90 @@
+
+@title@
+@context@
+
+
+
+ Activity
+ @activity_info.name@
+
+
+
+
+
+ Approved
+ Pending
+ Waiting
+ Canceled
+
+
+ @activity_stats.approved@
+ @activity_stats.pending@
+ @activity_stats.waiting@
+ @activity_stats.canceled@
+
+
+
+
+
+
+
+
+
+
+ No registrants fit this category
+
+
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity-orders.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-orders.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-orders.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,43 @@
+# events/www/admin/order-history-one.tcl
+
+ad_page_contract {
+
+ displays the order history of an event
+
+ @param event_id
+ @author Matthew Geddert (geddert@yahoo.com)
+
+} {
+ {specific_reg_type ""}
+ {activity_id:integer}
+} -properties {
+ activity_members:multirow
+} -validate {
+ activity_exists_p -requires {activity_id} {
+ if { ![events::activity::exists_p -activity_id $activity_id] } {
+ ad_complain "We couldn't find the activity you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+# what reg state do we plug into the database?
+set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"]
+set time_format [parameter::get -parameter time_format -default "HH12:MIam"]
+
+if {[string equal $specific_reg_type "canceled"] ||
+ [string equal $specific_reg_type "approved"] ||
+ [string equal $specific_reg_type "waiting"] ||
+ [string equal $specific_reg_type "pending"]} {
+db_multirow activity_members select_specific_reg_type {}
+} else {
+db_multirow activity_members select_activity_members {}
+}
+
+events::activity::get -activity_id $activity_id -array activity_info
+events::activity::get_stats -activity_id $activity_id -array activity_stats
+set title "Order History for $activity_info(name)"
+set context [list [list "activities" Activities] [list "activity?activity_id=$activity_id" $activity_info(name)] "Orders"]
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/activity-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,47 @@
+
+
+
+
+
+ select role, eor.role_id, public_role_p,
+ CASE when public_role_p = 't' then ' (public role)'
+ ELSE ''
+ END
+ from events_organizer_roles eor, events_org_role_activity_map eoram
+ where eoram.activity_id = :activity_id
+ and eoram.role_id = eor.role_id
+ order by role
+
+
+
+
+
+ select CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan,
+ coalesce(e.name, a.name) as name,
+ e.event_id,
+ v.city,
+ v.usps_abbrev
+ from acs_activities a,
+ acs_events e,
+ events_activities ea,
+ events_events ee,
+ timespans s,
+ time_intervals t,
+ events_venues v
+ where e.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and e.activity_id = a.activity_id
+ and a.activity_id = ea.activity_id
+ and e.activity_id = :activity_id
+ and e.event_id = ee.event_id
+ and v.venue_id = ee.venue_id
+ and ee.available_p = 't'
+ and ea.package_id = :package_id
+ order by t.start_date
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,99 @@
+
+@activity_info.name@
+@context_bar@
+
+Events for this Activity
+
+
+
+Activity Description
+
+
+
+ Name
+ @activity_info.name@
+
+
+ Creator
+ @creator_info.name@
+
+
+ Default Contact Person
+ @default_contact_email@
+
+
+ URL
+ @detail_url@
+
+ Description
+ @activity_info.description@
+
+
+ Current or Discontinued
+
+ Current
+
+
+ Discontinued
+
+
+
+
+
+
+
+Organizer Roles
+You may create default organizer roles for this activity type.
+
+
+
+ @org_roles.role@ @org_roles.public_role_p@
+ [ remove ]
+
+
+
+
+ There are no organizer roles for this activity
+
+
+ Add an organizer role
+
+
+Event Statistics
+
+
+ Approved
+ Pending
+ Waiting
+ Canceled
+
+
+ @activity_stats.approved@
+ @activity_stats.pending@
+ @activity_stats.waiting@
+ @activity_stats.canceled@
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/activity.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,91 @@
+# /events/www/admin/activity.tcl
+
+ad_page_contract {
+ Displays a particular activity to an admin, with options
+ for modifying the event.
+
+ @param activity_id the activity at which we're looking
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: activity.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ activity_id:integer,notnull
+} -validate {
+ activity_exists -requires {activity_id} {
+ if { ![events::activity::exists_p -activity_id $activity_id] } {
+ ad_complain "We couldn't find the activity you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+
+set package_id [ad_conn package_id]
+
+events::activity::get -activity_id $activity_id -array activity_info
+events::activity::get_creator -activity_id $activity_id -array creator_info
+events::activity::get_stats -activity_id $activity_id -array activity_stats
+
+set context_bar [ad_context_bar [list activities "Activities"] $activity_info(name)]
+
+# html'ify email and url
+set default_contact_email [ad_convert_to_html $activity_info(default_contact_email)]
+set detail_url [ad_convert_to_html $activity_info(detail_url)]
+
+set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"]
+set time_format [parameter::get -parameter time_format -default "HH12:MIam"]
+
+set events ""
+db_foreach select_activity_events {} {
+ # do something for each group of which user 123456 is in the role
+ # of "administrator"
+ events::event::get_stats -event_id $event_id -array event_stats
+
+ append events ""
+ if { [empty_string_p $city] } {
+ append events "$name"
+ } else {
+ append events "$city"
+ }
+ if { ![empty_string_p $usps_abbrev] } {
+ if { ![empty_string_p $city] } {
+ append events ", "
+ } else {
+ append events " - "
+ }
+ append events "$usps_abbrev"
+ }
+ append events " - $timespan - "
+ if { [empty_string_p $event_stats(max_people)] } {
+ append events "unlimited registrations"
+ } else {
+ append events "([expr $event_stats(max_people) - $event_stats(approved)]<\/b> of $event_stats(max_people) spots left"
+ }
+
+ if {![string compare $event_stats(pending) "0"] == 0} {
+ append events " with $event_stats(pending) pending<\/font>"
+ if {![string compare $event_stats(waiting) "0"] == 0} {
+ append events " and $event_stats(waiting) waiting<\/font>"
+ }
+ } else {
+ if {![string compare $event_stats(waiting) "0"] == 0} {
+ append events " with $event_stats(waiting) waiting<\/font>"
+ }
+ }
+
+ if { ![empty_string_p $event_stats(max_people)] } {
+ append events ")"
+ }
+}
+
+if {![exists_and_not_null events]} {
+ set events "No events for this activity have been created.<\/li>"
+}
+
+
+db_multirow custom_fields select_custom_fields {}
+db_multirow org_roles select_org_roles {}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/activity.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/activity.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/activity.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,45 @@
+
+
+
+
+
+ select a.name,
+ a.description,
+ ae.available_p,
+ ae.detail_url,
+ ae.default_contact_user_id
+ from acs_activities a, events_activities ae
+ where a.activity_id = :activity_id
+ and a.activity_id = ae.activity_id
+
+
+
+
+
+ select column_name, pretty_name, column_type, column_actual_type,
+ column_extra, sort_key
+ from events_activity_fields
+ where activity_id = :activity_id
+ order by sort_key
+
+
+
+
+
+ select edaam.attribute_id, aa.attribute_name as name,
+ aa.sort_order as after, aa.datatype, eac.category_name,
+ eac.category_id
+ from events_def_actvty_attr_map edaam, acs_attributes aa,
+ events_attr_categories eac, events_attr_category_map eacm
+ where edaam.activity_id = :activity_id
+ and edaam.attribute_id = aa.attribute_id
+ and eacm.attribute_id = aa.attribute_id
+ and eacm.category_id = eac.category_id
+ order by eac.category_name, aa.sort_order asc
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/administer.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/administer.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/administer.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,86 @@
+ad_page_contract {
+ This is the Site-Wide Events Administration Page.
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id index.tcl,v 1.5.2.3 2000/09/22 01:35:07 kevin Exp
+} {
+}
+
+set events_admin_group_id [db_string evnt_sel_admin_group "select
+group_id
+from user_groups
+where group_name = 'Events Administration'
+and group_type = 'administration'
+and short_name = 'events'"]
+
+append whole_page "[ad_header "Events Administration"]
+Events Administration
+[ad_admin_context_bar "Events"]
+
+
+Administrate Events
+
+
+
+Join a User Group
+
+If you wish to administrate an event, you must belong to that event's
+activity's owning user group. Following is a list of user groups
+which currently own activities. You may add yourself (or another
+person) as a member/administrator to any of these groups so that you
+can administrate that group's activities.
+
+
+"
+
+set first_group_p 1
+set last_group_id ""
+
+db_foreach evnt_sel_evnt_groups "select
+distinct ug.group_id, ug.group_name, ug.group_type, a.short_name
+from user_groups ug, events_activities a
+where ug.group_id = a.group_id
+order by upper(group_name), upper(short_name)
+" {
+ if {($last_group_id != $group_id) || ($first_group_p == 1)} {
+ if {$first_group_p != 1} {
+ append whole_page " "
+ }
+
+ append whole_page "
+
+ $group_name ($group_type group type)
+
+ "
+ set first_group_p 0
+ set last_group_id $group_id
+ }
+
+ append whole_page "$short_name"
+}
+
+append whole_page " "
+
+set header "Join All Activity User Groups"
+set message "Are you sure you want to join all the user groups
+that own activities?"
+set yes_url "/admin/events/join-groups?proceed=1"
+set no_url "/admin/events/"
+
+append whole_page "
+
+
Join all the above user groups
+"
+
+append whole_page "[ad_footer]
+"
+
+
+
+doc_return 200 text/html $whole_page
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-add-2-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add-2-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add-2-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,38 @@
+
+
+
+ oracle 8.1.6
+
+
+
+
+ begin
+ :1 := ec_product.new(
+ creation_user => :user_id,
+ creation_ip => :peeraddr,
+ context_id => :event_id,
+ product_name => '$activity_info(name) $date_time',
+ price => :event_price,
+ sku => 'event_$event_id',
+ one_line_description => '$activity_info(name); $date_time; $venue_info(city), $venue_info(usps_abbrev)',
+ detailed_description => '$activity_info(description)',
+ search_keywords => '$activity_info(name), $venue_info(city), $venue_info(usps_abbrev), $venue_info(venue_name)',
+ present_p => 't',
+ stock_status => 'i',
+ email_on_purchase_list => :email,
+ url => '$activity_info(detail_url)',
+ no_shipping_avail_p => 't',
+ active_p => 't'
+ );
+ end;
+
+
+
+
+
+
+ insert into ec_category_product_map values (:product_id, :category_id, null, sysdate, :user_id, :peeraddr)
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-add-2-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add-2-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add-2-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,35 @@
+
+
+
+ postgresql 7.1
+
+
+
+
+ select ec_product__new(
+ null,
+ :user_id,
+ :event_id,
+ '$activity_info(name) $date_time',
+ :event_price,
+ 'event_$event_id',
+ '$activity_info(name); $date_time; $venue_info(city), $venue_info(usps_abbrev)',
+ '$activity_info(description)',
+ '$activity_info(name), $venue_info(city), $venue_info(usps_abbrev), $venue_info(venue_name)',
+ 't',
+ 'i',
+ null,
+ to_date(current_timestamp, 'YYYY-MM-DD'),
+ :peeraddr
+ )
+
+
+
+
+
+
+ insert into ec_category_product_map values (:product_id, :category_id, null, current_timestamp, :user_id, :peeraddr)
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-add-2.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add-2.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add-2.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,10 @@
+
+@title@
+@context_bar@
+
+
+Event Details
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-add-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add-2.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add-2.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,217 @@
+# events/www/admin/event-add-2.tcl
+
+ad_page_contract {
+ Purpose: allow an admin to insert info for a new event, one a
+ venue has been chosen.
+
+ @param activity_id the activity type of the new event
+ @param venue_id where the new event will be located
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: event-add-2.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {activity_id:integer,notnull}
+ {venue_id:integer,notnull}
+}
+
+form create event_add
+
+element create event_add venue_id \
+ -datatype integer \
+ -widget hidden \
+ -value $venue_id
+
+element create event_add activity_id \
+ -datatype integer \
+ -widget hidden \
+ -value $activity_id
+
+element create event_add venue_name \
+ -label "Location" \
+ -datatype text \
+ -widget inform
+
+element create event_add event_price \
+ -label "Price" \
+ -datatype text \
+ -widget text \
+ -html {size 20} \
+ -help_text "A base price, if any, for this event." \
+ -optional
+
+set ecommerce_list [db_list_of_lists ecommerce "select category_name, category_id from ec_categories order by category_name"]
+set ecommerce_list [concat $ecommerce_list { { "None" "" } }]
+
+element create event_add category_id \
+ -label "Ecommerce Category" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options $ecommerce_list \
+ -optional \
+ -value ""
+
+element create event_add start_time \
+ -label "Start" \
+ -datatype date \
+ -widget date \
+ -format "MONTH DD YYYY HH12:MI AM" \
+ -minutes_interval { 0 59 5 } \
+ -help
+
+element create event_add end_time \
+ -label "End" \
+ -datatype date \
+ -widget date \
+ -format "MONTH DD YYYY HH12:MI AM" \
+ -minutes_interval { 0 59 5 } \
+ -help \
+ -validate { \
+ { expr {[template::util::date::compare [template::element::get_value event_add start_time] $value] < 0} } \
+ {End time must be after start time} }
+
+element create event_add reg_deadline \
+ -label "Registration Deadline" \
+ -datatype date \
+ -widget date \
+ -format "MONTH DD YYYY HH12:MI AM" \
+ -minutes_interval { 0 59 5 } \
+ -help \
+ -help_text "at latest the Start Time" \
+ -validate { \
+ { expr {[template::util::date::compare $value [template::element::get_value event_add start_time]] <= 0} } \
+ {Registration Deadline must be no later than the start date} }
+
+element create event_add reg_cancellable_p \
+ -label "Registration Cancellable?" \
+ -datatype text \
+ -widget select \
+ -options {{Yes t} {No f}} \
+ -help_text "Can someone cancel his registration?"
+
+element create event_add reg_needs_approval_p \
+ -label "Registration Needs Approval?" \
+ -datatype text \
+ -widget select \
+ -options {{Yes t} {No f}} \
+ -help_text "Does a registration need to be approved?"
+
+element create event_add max_people \
+ -label "Maximum Capacity" \
+ -datatype text \
+ -widget text \
+ -html {size 20} \
+ -help_text "The max number of people that can register before new registrants are automatically wait-listed. If this field is empty, wait-listing won't automatically kick in." \
+ -optional
+
+element create event_add contact_user_id \
+ -label "Event Contact Person" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::organizer::users_get_options] \
+ -optional \
+ -value "" \
+ -search_query {
+ select distinct u.first_names || ' ' || u.last_name as name, u.user_id
+ from cc_users u
+ where upper(decode(u.first_names,' ', '') || decode(u.last_name,' ', '') || u.email || ' ' || decode(u.screen_name, ' ', '')) like upper('%'||:value||'%')
+ order by name
+}
+
+element create event_add display_after \
+ -label "Confirmation Message" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 8 wrap soft}
+
+element create event_add refreshments_note \
+ -label "Refreshment Notes" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 8 wrap soft} \
+ -optional
+
+element create event_add av_note \
+ -label "Audio/Visual Notes" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 8 wrap soft} \
+ -optional
+
+element create event_add additional_note \
+ -label "Additional Notes" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 8 wrap soft} \
+ -optional
+
+if {[template::form is_valid event_add]} {
+ template::form get_values event_add activity_id venue_id start_time end_time reg_deadline \
+ reg_cancellable_p reg_needs_approval_p contact_user_id max_people display_after refreshments_note \
+ av_note additional_note event_price category_id
+
+ events::venue::get -venue_id $venue_id -array venue_info
+ events::activity::get -activity_id $activity_id -array activity_info
+
+ set user_id [ad_conn user_id]
+ set peeraddr [ns_conn peeraddr]
+
+ db_1row select_email {}
+ if { ![empty_string_p $contact_user_id] && $user_id!=$contact_user_id } {
+ db_1row select_contact_email {}
+ append email ", $contact_email"
+ }
+
+ db_transaction {
+
+ set event_id [events::event::new -activity_id $activity_id \
+ -venue_id $venue_id \
+ -start_time $start_time \
+ -end_time $end_time \
+ -display_after $display_after \
+ -max_people $max_people \
+ -available_p "t" \
+ -deleted_p "f" \
+ -reg_deadline $reg_deadline \
+ -reg_cancellable_p $reg_cancellable_p \
+ -reg_needs_approval_p $reg_needs_approval_p \
+ -contact_user_id $contact_user_id \
+ -refreshments_note $refreshments_note \
+ -av_note $av_note \
+ -additional_note $additional_note \
+ ]
+
+ if { $event_price > 0 } {
+ set date_time "[lindex $start_time 1]/[lindex $start_time 2]/[lindex $start_time 0]"
+ set end_date_time "[lindex $end_time 1]/[lindex $end_time 2]/[lindex $end_time 0]"
+ if { $end_date_time != $date_time } {
+ set date_time "$date_time-$end_date_time"
+ }
+
+ set product_id [db_exec_plsql product_insert {}]
+
+ if { ![empty_string_p $category_id] } {
+ db_dml mapping_insert {}
+ }
+
+ db_dml contact_update {}
+ }
+ }
+
+ ad_returnredirect "event?event_id=$event_id"
+}
+
+events::activity::get -activity_id $activity_id -array activity_info
+events::venue::get -venue_id $venue_id -array venue_info
+set activity_name $activity_info(name)
+
+element set_properties event_add start_time -value [template::util::date::today]
+element set_properties event_add end_time -value [template::util::date::today]
+element set_properties event_add reg_deadline -value [template::util::date::today]
+element set_properties event_add display_after -value "Thanks for registering for $activity_name!"
+element set_properties event_add venue_name -value $venue_info(venue_name)
+element set_properties event_add max_people -value $venue_info(max_people)
+set title "Add a New Event for $activity_name"
+set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] "Add Event"]
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-add-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add-2.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add-2.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+ select to_char(sysdate, 'MONTH DD YYYY HH12:MI AM') from dual
+
+
+
+
+
+ select email from parties where party_id=:user_id
+
+
+
+
+
+ select email as contact_email from parties where party_id=:contact_user_id
+
+
+
+
+
+ update ec_products set email_on_purchase_list=:email, url='$activity_info(detail_url)',no_shipping_avail_p='t', active_p='t' where product_id=:product_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,20 @@
+
+@title@
+@context_bar@
+
+
+Choose a Venue
+
+
+
+
+
+
+
+
+
+
+
+If you do not see your venue above, you may add a new venue .
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,42 @@
+# events/www/admin/event-add.tcl
+
+ad_page_contract {
+ Purpose: Allow an admin to select a venue for a new event, or
+ add a new venue if necessary first.
+
+ @param activity_id the activity to which we're adding an event
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: event-add.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {activity_id:integer,notnull}
+}
+
+set venues [events::venue::venues_get_options]
+
+if {[llength $venues] == 0} {
+ set no_venues 1
+} else {
+ set no_venues 0
+}
+
+form create venue_select -action event-add-2
+
+element create venue_select activity_id \
+ -label "Activity ID" \
+ -datatype text \
+ -widget hidden \
+ -value $activity_id
+
+element create venue_select venue_id \
+ -label "Select a venue for your new event" \
+ -datatype text \
+ -widget select \
+ -options $venues
+
+events::activity::get -activity_id $activity_id -array activity_info
+set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] "Add Event"]
+set activity_name $activity_info(name)
+set title "Add a New Event for $activity_name"
+set return_url "event-add-2?activity_id=$activity_id"
Index: openacs-4/contrib/packages/events/www/admin/event-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-add.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,11 @@
+
+
+
+
+
+ select venue_name, venue_id
+ from events_venues
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-edit-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-edit-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-edit-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,64 @@
+
+
+
+ oracle 8.1.6
+
+
+
+ select ec_products.product_id, ec_products.price, ec_category_product_map.category_id, min(sale_price) as sale_price from acs_objects, ec_products, ec_category_product_map, ec_sale_prices_current where acs_objects.context_id=:event_id and acs_objects.object_id=ec_products.product_id and ec_category_product_map.product_id(+)=ec_products.product_id and ec_sale_prices_current.product_id(+)=ec_products.product_id group by ec_products.product_id, ec_products.price, ec_category_product_map.category_id
+
+
+
+
+
+ select ec_products.product_id from acs_objects, ec_products, ec_category_product_map where acs_objects.context_id=:event_id and acs_objects.object_id=ec_products.product_id and ec_category_product_map.product_id(+)=ec_products.product_id
+
+
+
+
+
+ last_modified=sysdate, last_modifying_user=:user_id, modified_ip_address=:peeraddr
+
+
+
+
+
+ insert into ec_category_product_map values (:product_id, :category_id, null, sysdate, :user_id, :peeraddr)
+
+
+
+
+
+
+ begin
+ :1 := ec_product.new(
+ creation_user => :user_id,
+ creation_ip => :peeraddr,
+ context_id => :event_id,
+ product_name => '$activity_info(name) $date_time',
+ price => :event_price,
+ sku => 'event_$event_id',
+ one_line_description => '$activity_info(name); $date_time; $pretty_location',
+ detailed_description => '$activity_info(description)',
+ search_keywords => '$activity_info(name), $venue_info(venue_name), $pretty_location',
+ present_p => 't',
+ stock_status => 'i',
+ email_on_purchase_list => :email,
+ url => '$activity_info(detail_url)',
+ no_shipping_avail_p => 't',
+ active_p => 't'
+ );
+ end;
+
+
+
+
+
+
+ begin
+ ec_product.delete(:product_id);
+ end;
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-edit-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-edit-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,59 @@
+
+
+
+ postgresql 7.1
+
+
+
+ select ec_products.product_id, ec_products.price, ec_category_product_map.category_id, min(sale_price) as sale_price from acs_objects, ec_products left join ec_category_product_map on ec_category_product_map.product_id=ec_products.product_id left join ec_sale_prices_current on ec_sale_prices_current.product_id=ec_products.product_id where acs_objects.context_id=:event_id and acs_objects.object_id=ec_products.product_id group by ec_products.product_id, ec_products.price, ec_category_product_map.category_id
+
+
+
+
+
+ select ec_products.product_id from acs_objects, ec_products left join ec_category_product_map on ec_category_product_map.product_id=ec_products.product_id where acs_objects.context_id=:event_id and acs_objects.object_id=ec_products.product_id
+
+
+
+
+
+ last_modified=current_timestamp, last_modifying_user=:user_id, modified_ip_address=:peeraddr
+
+
+
+
+
+ insert into ec_category_product_map values (:product_id, :category_id, null, current_timestamp, :user_id, :peeraddr)
+
+
+
+
+
+
+ select ec_product__new(
+ null,
+ :user_id,
+ :event_id,
+ '$activity_info(name) $date_time',
+ :event_price,
+ 'event_$event_id',
+ '$activity_info(name); $date_time; $pretty_location',
+ '$activity_info(description)',
+ '$activity_info(name), $venue_info(venue_name), $pretty_location',
+ 't',
+ 'i',
+ null,
+ to_date(current_timestamp, 'YYYY-MM-DD'),
+ :peeraddr
+ )
+
+
+
+
+
+
+ select ec_product__delete(:product_id)
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-edit.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,7 @@
+
+@title@
+@context_bar@
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-edit.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,301 @@
+# events/www/admin/event-edit.tcl
+
+ad_page_contract {
+ Allows admins to edit an event's properties.
+ Provides a form with existing data filled in.
+
+ @param event_id the event to edit
+ @param venue_id the event's new venue (if changing the venue)
+ @param user_id_from_search optional new contact person's user_id
+ @param email_from_search optional new contact person's email
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: event-edit.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {event_id:integer,notnull}
+ {venue_id:integer,optional}
+} -validate {
+ event_exists_p -requires {event_id} {
+ if { ![events::event::exists_p -event_id $event_id] } {
+ ad_complain "We couldn't find the event you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+set user_id [ad_conn user_id]
+
+events::event::get -event_id $event_id -array event_info
+events::event::get_stats -event_id $event_id -array stat_info
+
+set admin_text ""
+if { ![db_0or1row select_ecommerce_info {}] } {
+ set category_id ""
+ set price ""
+} else {
+ if { ![empty_string_p $sale_price] && $sale_price < $price } {
+ set price $sale_price
+ }
+ # If admin
+ if { [permission::permission_p -no_cache -party_id $user_id -object_id $event_id -privilege "admin"] } {
+ set admin_text "(edit user class prices ) "
+ }
+}
+
+form create event_edit
+
+element create event_edit event_id \
+ -datatype integer \
+ -widget hidden
+
+element create event_edit action \
+ -label "Action" \
+ -datatype text \
+ -widget inform
+
+element create event_edit venue_id \
+ -label "Venue" \
+ -datatype integer \
+ -widget select \
+ -options [events::venue::venues_get_options]
+
+set venues_connecting [events::venue::venues_get_connecting_options -this_venue_id $event_info(venue_id) -none_p "f"]
+if { ![empty_string_p $venues_connecting] } {
+ element create event_edit event_connecting \
+ -label "Use Connecting" \
+ -datatype text \
+ -widget checkbox \
+ -help_text "Use the following connecting venues" \
+ -options $venues_connecting \
+ -optional
+} else {
+ element create event_edit event_connecting \
+ -optional \
+ -widget hidden
+}
+
+element create event_edit event_price \
+ -label "Price" \
+ -datatype text \
+ -widget text \
+ -html {size 20} \
+ -help_text "A base price, if any, for this event.$admin_text" \
+ -optional
+
+set ecommerce_list [db_list_of_lists ecommerce "select category_name, category_id from ec_categories order by category_name"]
+set ecommerce_list [concat $ecommerce_list { { "None" "" } }]
+
+element create event_edit category_id \
+ -label "Ecommerce Category" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options $ecommerce_list \
+ -optional
+
+element create event_edit max_people \
+ -label "Maximum Capacity" \
+ -datatype text \
+ -widget text \
+ -html {size 20} \
+ -optional
+
+element create event_edit reg_cancellable_p \
+ -label "Registration Cancellable?" \
+ -datatype text \
+ -widget select \
+ -options {{Yes t} {No f}} \
+ -help_text "Can someone cancel his registration?"
+
+element create event_edit reg_needs_approval_p \
+ -label "Registration Needs Approval?" \
+ -datatype text \
+ -widget select \
+ -options {{Yes t} {No f}} \
+ -help_text "Does a registration need to be approved?"
+
+element create event_edit contact_user_id \
+ -label "Event Contact Person" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::organizer::users_get_options] \
+ -optional \
+ -search_query {
+ select distinct u.first_names || ' ' || u.last_name as name, u.user_id
+ from cc_users u
+ where upper(decode(u.first_names,' ', '') || decode(u.last_name,' ', '') || u.email || ' ' || decode(u.screen_name, ' ', '')) like upper('%'||:value||'%')
+ order by name
+}
+
+element create event_edit display_after \
+ -label "Confirmation Message" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 8 wrap soft}
+
+element create event_edit start_time \
+ -label "Start" \
+ -datatype date \
+ -widget date \
+ -format "MONTH DD YYYY HH12:MI AM" \
+ -help
+
+element create event_edit end_time \
+ -label "End" \
+ -datatype date \
+ -widget date \
+ -format "MONTH DD YYYY HH12:MI AM" \
+ -help \
+ -validate { \
+ { expr {[template::util::date::compare [template::element::get_value event_edit start_time] $value] < 0} } \
+ {End time must be after start time} }
+
+element create event_edit reg_deadline \
+ -label "Registration Deadline" \
+ -datatype date \
+ -widget date \
+ -format "MONTH DD YYYY HH12:MI AM" \
+ -help \
+ -help_text "at latest the Start Time" \
+ -validate { \
+ { expr {[template::util::date::compare $value [template::element::get_value event_edit start_time]] <= 0} } \
+ {Registration Deadline must be no later than the start date} }
+
+if {[template::form is_valid event_edit]} {
+ template::form get_values event_edit event_id venue_id max_people \
+ reg_cancellable_p reg_needs_approval_p contact_user_id \
+ display_after start_time end_time reg_deadline event_price category_id
+
+ set event_connecting [template::element get_values event_edit event_connecting]
+
+ events::venue::get -venue_id $venue_id -array venue_info
+ events::activity::get -activity_id $event_info(activity_id) -array activity_info
+
+ set peeraddr [ns_conn peeraddr]
+
+ db_1row select_email {}
+ if { ![empty_string_p $contact_user_id] && $user_id!=$contact_user_id } {
+ db_1row select_contact_email {}
+ append email ", $contact_email"
+ }
+
+ set pretty_location ""
+ if { ![empty_string_p $event_info(city)] } {
+ append pretty_location "$event_info(city)"
+ }
+ if { ![empty_string_p $event_info(usps_abbrev)] } {
+ if { ![empty_string_p $event_info(city)] } {
+ append pretty_location ", "
+ }
+ append pretty_location "$event_info(usps_abbrev)"
+ }
+
+ db_transaction {
+
+ if { ![db_0or1row select_product_id {}] } {
+ set product_id ""
+ }
+
+ db_dml mapping_remove {}
+
+ # Update connecting venues
+ db_dml delete_connecting {}
+ for { set i 0 } { $i < [llength $event_connecting] } { incr i } {
+ set connecting_venue_id [lindex $event_connecting $i]
+ if { ![empty_string_p $connecting_venue_id] && [db_0or1row valid_venue {}] } {
+ db_dml insert_connecting {}
+ }
+ }
+
+ set venue [events::venue::connected -event_id $event_id -venue_id $venue_id -sql_p "f"]
+ for { set i 0 } { $i < [llength $venue] } { incr i } {
+ append venue_info(venue_name) ", [lindex $venue $i]"
+ }
+
+ if { $event_price > 0 } {
+ set date_time "[lindex $start_time 1]/[lindex $start_time 2]/[lindex $start_time 0]"
+ set end_date_time "[lindex $end_time 1]/[lindex $end_time 2]/[lindex $end_time 0]"
+ if { $end_date_time != $date_time } {
+ set date_time "$date_time-$end_date_time"
+ }
+
+ if { ![empty_string_p $product_id] } {
+
+ set audit_update [db_map audit_update_sql]
+
+ db_dml product_update {}
+
+ } else {
+ set product_id [db_exec_plsql product_insert {}]
+
+ db_dml contact_update {}
+ }
+
+ if { ![empty_string_p $category_id] } {
+ # insert category map
+ db_dml mapping_insert {}
+ }
+ } else {
+ # Remove this event from ecommerce
+ db_exec_plsql product_delete {}
+ }
+
+ if { ![empty_string_p $max_people] && (([expr [expr $stat_info(approved) + $stat_info(pending)] + $stat_info(waiting)] > $max_people) || [events::venue::connecting_max -event_id $event_id -venue_id $venue_id]<$max_people) } {
+ ad_return_complaint 1 "You cannot have more registrants than your Venue Capacity."
+ ad_script_abort
+ }
+
+ # We've made it this far. Do the update.
+ events::event::edit \
+ -event_id $event_id \
+ -venue_id $venue_id \
+ -max_people $max_people \
+ -reg_cancellable_p $reg_cancellable_p \
+ -reg_needs_approval_p $reg_needs_approval_p \
+ -contact_user_id $contact_user_id \
+ -display_after $display_after \
+ -start_time $start_time \
+ -end_time $end_time \
+ -reg_deadline $reg_deadline
+
+ }
+
+ ad_returnredirect "event?event_id=$event_id"
+ ad_script_abort
+}
+
+# Slug form with any/all connected venues to this event ...
+set connected_venue_list ""
+for { set i 0 } { $i < [llength $venues_connecting] } { incr i } {
+ set venue_id [lindex [lindex $venues_connecting $i] 1]
+ if { [db_0or1row select_connecting {}] } {
+ lappend connected_venue_list $venue_id
+ }
+}
+element set_properties event_edit event_connecting -values $connected_venue_list
+
+element set_properties event_edit action -value "Edit $event_info(name) on $event_info(timespan)"
+element set_properties event_edit event_id -value $event_id
+element set_properties event_edit venue_id -value $event_info(venue_id)
+element set_properties event_edit event_price -value $price
+element set_properties event_edit category_id -value $category_id
+element set_properties event_edit max_people -value $event_info(max_people)
+element set_properties event_edit reg_cancellable_p -value $event_info(reg_cancellable_p)
+element set_properties event_edit reg_needs_approval_p -value $event_info(reg_needs_approval_p)
+element set_properties event_edit contact_user_id -value $event_info(contact_user_id)
+element set_properties event_edit display_after -value $event_info(display_after)
+element set_properties event_edit start_time -value [events::event::make_event_date \
+ -which_type start_time -timespan_id $event_info(timespan_id)]
+element set_properties event_edit end_time -value [events::event::make_event_date \
+ -which_type end_time -timespan_id $event_info(timespan_id)]
+element set_properties event_edit reg_deadline -value [events::event::make_event_date \
+ -which_type reg_deadline -event_id $event_id]
+
+set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$event_info(activity_id)" Activity] [list "event?event_id=$event_id" "Event"] "Edit Event"]
+set return_url "event-edit.tcl?event_id=$event_id"
+set title "Edit Event"
+
+ad_return_template
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-edit.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-edit.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,79 @@
+
+
+
+
+
+ select 1
+ from events_events
+ where event_id = :event_id
+
+
+
+
+
+ select email from parties where party_id=:user_id
+
+
+
+
+
+ select email as contact_email from parties where party_id=:contact_user_id
+
+
+
+
+
+ update ec_products set email_on_purchase_list=:email, url='$activity_info(detail_url)',no_shipping_avail_p='t', active_p='t' where product_id=:product_id
+
+
+
+
+
+ delete from ec_category_product_map where product_id=:product_id
+
+
+
+
+
+ update ec_products
+ set product_name='$activity_info(name) $date_time',
+ sku='event_$event_id',
+ one_line_description='$activity_info(name); $date_time; $pretty_location',
+ detailed_description='$activity_info(description)',
+ email_on_purchase_list=:email,
+ search_keywords='$activity_info(name), $venue_info(venue_name), $pretty_location',
+ url='$activity_info(detail_url)',
+ price=:event_price,
+ no_shipping_avail_p='t',
+ present_p='$event_info(available_p)',
+ available_date=sysdate,
+ $audit_update
+ where product_id=:product_id
+
+
+
+
+
+ delete from events_venues_conn_used_map where event_id=:event_id and package_id=[ad_conn package_id]
+
+
+
+
+
+ insert into events_venues_conn_used_map values (:event_id, :venue_id, [lindex $event_connecting $i], [ad_conn package_id])
+
+
+
+
+
+ select connected_venue_id from events_venues_conn_used_map where event_id=:event_id and venue_id=$event_info(venue_id) and package_id=[ad_conn package_id] and connected_venue_id=:venue_id
+
+
+
+
+
+ select venue_id from events_venues where venue_id=:venue_id and $connecting_venue_id in ([events::venue::connecting -venue_id $venue_id -package_id [ad_conn package_id] -sql_p "t"])
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+ select eo.role, eo.user_id, eo.role_id, eo.event_id,
+ decode(eo.public_role_p, 't', '(public role)', '') as public_role_p,
+ p.first_names || ' ' || p.last_name as organizer_name
+ from events_organizers eo, users u, persons p
+ where eo.user_id = u.user_id(+)
+ and p.person_id(+) = u.user_id
+ and eo.event_id = :event_id
+ order by role
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-orders-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-orders-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-orders-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+ select er.reg_id, person.name(er.user_id) as name, er.user_id,
+ pa.email, er.reg_state, ao.creation_date
+ from events_registrations er, parties pa, acs_objects ao
+ where er.user_id = pa.party_id
+ and er.event_id = :event_id
+ and reg_state <> 'canceled'
+ and er.reg_id = ao.object_id
+
+
+
+
+
+ select er.reg_id, person.name(er.user_id) as name, er.user_id,
+ pa.email, er.reg_state, ao.creation_date
+ from events_registrations er, parties pa, acs_objects ao
+ where er.user_id = pa.party_id
+ and er.event_id = :event_id
+ and reg_state = :specific_reg_type
+ and er.reg_id = ao.object_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-orders-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-orders-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-orders-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+ select er.reg_id, person__name(er.user_id) as name, er.user_id,
+ pa.email, er.reg_state, ao.creation_date
+ from events_registrations er, parties pa, acs_objects ao
+ where er.user_id = pa.party_id
+ and er.event_id = :event_id
+ and reg_state <> 'canceled'
+ and er.reg_id = ao.object_id
+
+
+
+
+
+ select er.reg_id, person__name(er.user_id) as name, er.user_id,
+ pa.email, er.reg_state, ao.creation_date
+ from events_registrations er, parties pa, acs_objects ao
+ where er.user_id = pa.party_id
+ and er.event_id = :event_id
+ and reg_state = :specific_reg_type
+ and er.reg_id = ao.object_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-orders.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-orders.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-orders.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,108 @@
+
+@title@
+@context@
+
+
+
+ Activity
+ @event_info.name@
+
+
+ Location
+ @event_info.city@
+
+
+ Time
+ @event_info.timespan@
+
+
+ Registration Deadline
+ @event_info.reg_deadline@
+
+
+
+
+
+ Max Allowed
+ Spots Remaining
+ Approved
+ Pending
+ Waiting
+ Canceled
+
+
+ N/A @event_stats.max_people@
+ N/A @count_spotsremaining@
+ @event_stats.approved@
+ @event_stats.pending@
+ @event_stats.waiting@
+ @event_stats.canceled@
+
+
+
+
+ The maximum number of people allowed have been registered for this event.
+ You cannot approve users unless you waitlist or cancel somebody
+ else's registration (or modify the maximum capacity of this this event)
+
+
+
+
+
+
+
+
+
+
+ No registrants fit this category
+
+
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-orders.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-orders.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-orders.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,50 @@
+# events/www/admin/order-history-one.tcl
+
+ad_page_contract {
+
+ displays the order history of an event
+
+ @param event_id
+ @author Matthew Geddert (geddert@yahoo.com)
+
+} {
+ {specific_reg_type ""}
+ {event_id:integer}
+} -properties {
+ event_members:multirow
+} -validate {
+ event_exists_p -requires {event_id} {
+ if { ![events::event::exists_p -event_id $event_id] } {
+ ad_complain "We couldn't find the event you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+# what reg state do we plug into the database?
+set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"]
+set time_format [parameter::get -parameter time_format -default "HH12:MIam"]
+
+if {[string equal $specific_reg_type "canceled"] ||
+ [string equal $specific_reg_type "approved"] ||
+ [string equal $specific_reg_type "waiting"] ||
+ [string equal $specific_reg_type "pending"]} {
+db_multirow event_members select_specific_reg_type {}
+} else {
+db_multirow event_members select_event_members {}
+}
+
+events::event::get_stats -event_id $event_id -array event_stats
+events::event::get -event_id $event_id -array event_info
+set title "Order History for $event_info(name)"
+set context [list [list "activities" Activities] [list "activity?activity_id=$event_info(activity_id)" $event_info(name)] [list "event?event_id=$event_id" "$event_info(city)"] "Orders"]
+set count_spotsremaining [expr $event_stats(max_people) - $event_stats(approved)]
+
+if { ![empty_string_p $event_stats(max_people)] && $count_spotsremaining == 0 } {
+ set max_approved t
+} else {
+ set max_approved f
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/event-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,20 @@
+
+
+
+
+
+ select eo.role, eo.user_id, eo.role_id, eo.event_id,
+ CASE WHEN eo.public_role_p THEN '(public role)'
+ ELSE ''
+ END as public_role_p,
+ p.first_names || ' ' || p.last_name as organizer_name
+ from
+ events_organizers eo left join users u on (eo.user_id = u.user_id),
+ persons p
+ where eo.event_id = :event_id
+ and p.person_id = u.user_id
+ order by role
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/event-price-ae-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-price-ae-2.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-price-ae-2.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,118 @@
+# File: events/admin/event-price-ae-2.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Verify and insert price/ecommerce data
+#####
+
+### we're not supporting prices yet.
+return
+
+### if we were...
+set_the_usual_form_variables
+#event_id,
+#maybe product_id, product_name, price, available_date, expire_date, price_id
+
+set user_id [ad_maybe_redirect_for_registration]
+
+
+
+set exception_count 0
+set exception_text ""
+
+### Error checking.
+## simple checks...
+if { [ns_dbformvalue [ns_conn form] available_time datetime available_time_value] <= 0 } {
+ incr exception_count
+ append exception_text "Strange... couldn't parse the available time.\n"
+}
+
+if { [ns_dbformvalue [ns_conn form] expire_time datetime expire_time_value] <= 0 } {
+ incr exception_count
+ append exception_text " Strange... couldn't parse the expiration
+time.\n"
+}
+
+if {![exists_and_not_null product_name]} {
+ incr exception_count
+ append exception_text " Please enter a price description.\n"
+}
+
+if {![exists_and_not_null price]} {
+ incr excpetion_count
+ append exception_text " Please enter a price.\n"
+}
+
+if {![valid_number_p $price]} {
+ incr exception_count
+ append exception_text " Please enter a valid number for the price.\n"
+}
+
+## date check
+set selection [ns_db 0or1row $db "select 1
+ from dual, events_events
+ where to_date('$available_time_value', 'YYYY-MM-DD HH24:MI:SS')
+ < to_date('$expire_time_value', 'YYYY-MM-DD HH24:MI:SS')
+ and to_date('$expire_time_value', 'YYYY-MM-DD HH24:MI:SS')
+ <= end_time
+ and event_id = $event_id"]
+
+if {[empty_string_p $selection]} {
+ incr exception_count
+ append exception_text "
+ Please make sure your avaiable time is before your
+ expiration time and your expiration time no later than
+ your event's end time.\n"
+}
+
+## return with errors if any
+if { $exception_count > 0 } {
+ ad_return_complaint $exception_count $exception_text
+ return
+}
+
+## even if we were supporting prices, no ecommerce yet
+#db_transaction {
+
+#db_dml unused "update ec_products
+# set product_name = '$QQproduct_name',
+# price = $price,
+# last_modified = sysdate,
+# last_modifying_user = $user_id,
+# modified_ip_address = '[DoubleApos [ns_conn peeraddr]]',
+# available_date = to_date('$available_time_value', 'YYYY-MM-DD HH24:MI:SS')
+#where product_id = $product_id"
+
+db_dml unused "update events_prices
+ set expire_date = to_date('$expire_time_value', 'YYYY-MM-DD HH24:MI:SS'),
+ available_date = to_date('$available_time_value', 'YYYY-MM-DD HH24:MI:SS'),
+ description='$QQproduct_name',
+ price = $price
+ where price_id = $price_id"
+
+if {[db_resultrows] == 0} {
+
+## again, no ecommerce yet
+# db_dml unused "insert into ec_products
+# (product_id, product_name, creation_date, price, available_date,
+# last_modified, last_modifying_user, modified_ip_address)
+# values
+# ($product_id, '$QQproduct_name', sysdate, $price,
+# to_date('$available_time_value', 'YYYY-MM-DD HH24:MI:SS'),
+# sysdate, $user_id, '[DoubleApos [ns_conn peeraddr]]')"
+
+ db_dml unused "insert into events_prices
+ (price_id, event_id, description, expire_date,
+ available_date, price)
+ values
+ ($price_id, $event_id, '$QQproduct_name',
+ to_date('$expire_time_value', 'YYYY-MM-DD HH24:MI:SS'),
+ to_date('$available_time_value', 'YYYY-MM-DD HH24:MI:SS'),
+ $price)"
+}
+
+### clean up, redirect.
+
+#}
+db_release_unused_handles
+ad_returnredirect "event.tcl?[export_url_vars event_id]"
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/event-price-ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-price-ae.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-price-ae.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,102 @@
+# File: events/admin/event-price-ae.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Allow admins to edit and update prices/ecommerce info
+#####
+
+### we're not supporting prices at this time
+return
+
+### but if we were...
+
+set_the_usual_form_variables
+#event_id, maybe price_id
+
+
+
+set time_elements "
+
+ Date available:
+ [_ns_dateentrywidget available_time] [_ns_timeentrywidget available_time]
+
+ Date expires:
+ [_ns_dateentrywidget expire_time] [_ns_timeentrywidget expire_time]
+"
+
+if {[exists_and_not_null price_id]} {
+ #we're editing
+ set adding_p 0
+
+ set page_title "Edit Price"
+ set submit_text "Update Price"
+ set selection [ns_db 1row $db "select
+ product_id, price, description as product_name,
+ to_char(available_date, 'YYYY-MM-DD HH24:MI:SS') as available_timestamp,
+ to_char(expire_date, 'YYYY-MM-DD HH24:MI:SS') as expire_timestamp,
+ price_id
+ from events_prices
+ where price_id = $price_id"]
+
+ set_variables_after_query
+
+ set end_time [db_string unused "
+ select to_char(end_time, 'YYYY-MM-DD HH24:MI:SS')
+ from events_events
+ where event_id = $event_id"]
+
+} else {
+ #we're adding
+ set adding_p 1
+
+ set page_title "Add New Price"
+ set submit_text "Add Price"
+# set product_id [db_string unused "select ec_product_id_sequence.nextval from dual"]
+ set product_name ""
+ set price ""
+ set price_id [db_string unused "select events_price_id_sequence.nextval from dual"]
+
+ set selection [ns_db 1row $db "select
+ to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') as available_timestamp,
+ to_char(end_time, 'YYYY-MM-DD HH24:MI:SS') as expire_timestamp
+ from events_events, dual
+ where event_id = $event_id"]
+
+ set_variables_after_query
+
+ set end_time $expire_timestamp
+}
+
+set stuffed_with_a [ns_dbformvalueput $time_elements "available_time"
+ "timestamp" $available_timestamp]
+set times [ns_dbformvalueput $stuffed_with_a "expire_time"
+ "timestamp" $expire_timestamp]
+
+set context_bar "[ad_admin_context_bar [list "index.tcl" "Events"] "Pricing"]"
+
+## Clean up, return the page
+db_release_unused_handles
+
+ReturnHeaders
+
+ns_write "
+[ad_partner_header]
+
+[ad_partner_footer]"
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/event-toggle-available-p-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-toggle-available-p-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-toggle-available-p-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ oracle 8.1.6
+
+
+
+ update ec_products
+ set active_p = '$event_info(available_p)', last_modified = sysdate, last_modifying_user = :user_id,
+ modified_ip_address = :peeraddr
+ where product_id = :product_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-toggle-available-p-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-toggle-available-p-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-toggle-available-p-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+ postgresql 7.1
+
+
+
+ update ec_products
+ set active_p = '$event_info(available_p)',
+ last_modified = current_timestamp,
+ last_modifying_user = :user_id,
+ modified_ip_address = :peeraddr
+ where product_id = :product_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-toggle-available-p.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-toggle-available-p.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-toggle-available-p.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,37 @@
+# events/www/admin/event-toggle-available-p.tcl
+
+ad_page_contract {
+ Toggles the availability of an event.
+
+ @param event_id the event whose availability we're toggling
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: event-toggle-available-p.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {event_id:integer,notnull}
+} -validate {
+ event_exists_p -requires {event_id} {
+ if { ![events::event::exists_p -event_id $event_id] } {
+ ad_complain "We couldn't find the event you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+db_transaction {
+
+ events::event::toggle_available_p -event_id $event_id
+
+ events::event::get -event_id $event_id -array event_info
+
+ if { [db_0or1row select_ecommerce_info {}] } {
+ set user_id [ad_get_user_id]
+ set peeraddr [ns_conn peeraddr]
+
+ db_dml toggle_active_p_update {}
+ }
+
+}
+
+ad_returnredirect "event?event_id=$event_id"
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event-toggle-available-p.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event-toggle-available-p.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event-toggle-available-p.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,10 @@
+
+
+
+
+
+ select ec_products.product_id from acs_objects, ec_products where acs_objects.context_id=:event_id and acs_objects.object_id=ec_products.product_id
+
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/event.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,154 @@
+
+@title@
+@context@
+
+
+
+
+
+
+
+
+
+ Creator
+ @creator_name@
+
+ Location
+ @pretty_location@
+
+
+ Confirmation Message
+ @event_info.display_after@
+
+
+ Time
+ @event_info.timespan@
+
+
+ Registration Deadline
+ @event_info.reg_deadline@
+
+
+ Event Statistics
+
+
+
+
+
+
+
+
+
+ Max Allowed
+ Spots Remaining
+ Approved
+ Pending
+ Waiting
+ Canceled
+
+
+ N/A @event_stats.max_people@
+ N/A @count_spotsremaining@
+ @event_stats.approved@
+ @event_stats.pending@
+ @event_stats.waiting@
+ @event_stats.canceled@
+
+
+
+
+
+
+
+
+
+ Registration Cancellable?
+ @event_info.pretty_reg_cancellable_p@
+
+
+ Registration Needs Approval?
+ @event_info.pretty_reg_needs_approval_p@
+
+
+ Event Contact Person
+ @contact_email@
+
+
+ Availability Status
+
+ Current
+ (toggle )
+
+
+ Discontinued
+ (toggle )
+
+
+ You may want to
+ email the registrants for this event
+ to notify them the event is canceled.
+
+
+
+
+
+
+
+
+
+Organizers
+
+
+
+
+Agenda Files
+
+
+
+
+Event Notes
+
Index: openacs-4/contrib/packages/events/www/admin/event.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,122 @@
+# events/www/admin/event.tcl
+
+ad_page_contract {
+ Purpose: List one event with details, for administration.
+ (that is, with links for altering and updating the event info)
+
+ @param event_id the event at which we're looking
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: event.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {event_id:integer,notnull}
+} -properties {
+ custom_fields:multirow
+ org_roles:multirow
+ event_organizers:onevalue
+} -validate {
+ event_exists_p -requires {event_id} {
+ if { ![events::event::exists_p -event_id $event_id] } {
+ ad_complain "We couldn't find the event you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+events::event::get -event_id $event_id -array event_info
+events::event::get_stats -event_id $event_id -array event_stats
+
+set count_spotsremaining [expr $event_stats(max_people) - $event_stats(approved)]
+
+set contact_email [ad_convert_to_html $event_info(contact_email)]
+
+set pretty_location ""
+if { [empty_string_p $event_info(city)] } {
+ append pretty_location "$event_info(name)"
+} else {
+ append pretty_location "$event_info(city)"
+}
+if { ![empty_string_p $event_info(usps_abbrev)] } {
+ if { ![empty_string_p $event_info(city)] } {
+ append pretty_location ", "
+ } else {
+ append pretty_location " - "
+ }
+ append pretty_location "$event_info(usps_abbrev)"
+}
+set title "$pretty_location: $event_info(timespan)"
+set context [list [list "activities" Activities] [list "activity?activity_id=$event_info(activity_id)" $event_info(name)] $pretty_location]
+
+set attachments_enabled_p [events::event::attachments_enabled_p]
+if {$attachments_enabled_p} {
+ set attachments [attachments::get_attachments -base_url "../" -object_id $event_id]
+ set attachment_link "../attach/attach?object_id=$event_id&return_url=../admin/event?event_id=$event_id&pretty_name=$event_info(name)"
+}
+
+set cancelled_p 0
+if {[string compare $event_info(available_p) "f"] == 0 && $event_stats(total_interested) > 0} {
+ set cancelled_p 1
+}
+
+#db_multirow custom_fields select_custom_fields {}
+db_multirow org_roles select_org_roles {}
+set event_organizers [db_string select_event_organizers_count {}]
+#db_multirow eoe select_event_organizers_email {}
+
+events::event::get_creator -event_id $event_id -array creator_info
+set creator_name $creator_info(name)
+set creator_email $creator_info(email)
+
+form create event_notes
+
+element create event_notes event_id \
+ -datatype integer \
+ -widget hidden
+
+element create event_notes refreshments_note \
+ -label "Refreshments Note" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 65 rows 6 wrap soft} \
+ -optional
+
+element create event_notes av_note \
+ -label "Audio/Visual Note" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 65 rows 6 wrap soft} \
+ -optional
+
+element create event_notes additional_note\
+ -label "Additional Note" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 65 rows 6 wrap soft} \
+ -optional
+
+element create event_notes submit \
+ -label "Update" \
+ -datatype text \
+ -widget submit
+
+if {[form is_submission event_notes]} {
+ template::form get_values event_notes \
+ event_id refreshments_note av_note additional_note
+
+ events::event::edit_event_notes \
+ -event_id $event_id \
+ -refreshments_note $refreshments_note \
+ -av_note $av_note \
+ -additional_note $additional_note
+
+ ad_returnredirect "event?event_id=$event_id"
+}
+
+element set_properties event_notes event_id -value $event_id
+element set_properties event_notes refreshments_note -value $event_info(refreshments_note)
+element set_properties event_notes av_note -value $event_info(av_note)
+element set_properties event_notes additional_note -value $event_info(additional_note)
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/event.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/event.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/event.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,49 @@
+
+
+
+
+
+ select count(*)
+ from events_organizers
+ where event_id = :event_id
+ and user_id is not null
+
+
+
+
+
+ select distinct users.priv_email, users.user_id
+ from users, events_organizers eo, events_org_role_event_map eorem
+ where eorem.event_id = :event_id
+ and eorem.role_id = eo.role_id
+ and users.user_id = eo.user_id
+ order by users.user_id
+
+
+
+
+
+ select eaam.attribute_id, aa.attribute_name as name,
+ aa.sort_order as after, aa.datatype,
+ eac.category_name, eac.category_id
+ from events_event_attr_map eaam, acs_attributes aa,
+ events_attr_categories eac, events_attr_category_map eacm
+ where eaam.event_id = :event_id
+ and eaam.attribute_id = aa.attribute_id
+ and eacm.attribute_id = aa.attribute_id
+ and eacm.category_id = eac.category_id
+ order by eac.category_name, aa.sort_order asc
+
+
+
+
+
+ select column_name, pretty_name, column_type, column_actual_type,
+ column_extra, sort_key
+ from events_event_fields
+ where event_id = :event_id
+ order by sort_key
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-add.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,15 @@
+
+@title@
+@context_bar@
+
+Choose a field (or fields)
+
+
+
+
+If you do not see the field you wish to add above, you may add a new field
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-add.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,89 @@
+# File: events/www/admin/field-add.tcl
+
+ad_page_contract {
+ Allows admins to select from existing custom fields
+
+ @param activity_id the field's activity
+ @param event_id the field's event
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id activity-field-remove.tcl,v 3.6.6.4 2000/09/22 01:37:35 kevin Exp
+} {
+ {event_id ""}
+ {activity_id ""}
+ {attribute_ids:multiple ""}
+}
+
+if {[exists_and_not_null event_id]} {
+ set title "Add Custom Fields"
+ set field_create "field-create?activity_id=$activity_id&event_id=$event_id"
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] \
+ [list "event?event_id=$event_id" "Event"] "Add Custom Fields"]
+ set attributes [db_list_of_lists select_available_event_fields {}]
+} else {
+ set title "Add Default Custom Fields"
+ set field_create "field-create?activity_id=$activity_id"
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] "Add Default Custom Fields"]
+ set attributes [db_list_of_lists select_available_activity_fields {}]
+}
+
+if {[exists_and_not_null attributes]} {
+ set attributes_p t
+} else {
+ set attributes_p f
+}
+
+form create field_add
+
+element create field_add activity_id \
+ -optional \
+ -widget hidden \
+ -datatype integer
+
+element create field_add event_id \
+ -optional \
+ -widget hidden \
+ -datatype integer
+
+element create field_add attribute_ids \
+ -label "Available Fields" \
+ -widget multiselect \
+ -datatype integer \
+ -help_text "Select multiple fields by holding down the Control key" \
+ -options $attributes
+
+element create field_add submit \
+ -label "Add fields" \
+ -datatype text \
+ -widget submit
+
+if {[template::form is_valid field_add]} {
+
+ if {[exists_and_not_null event_id]} {
+ foreach attribute_id $attribute_ids {
+ events::registration::map_attribute -event_id $event_id -attribute_id $attribute_id
+ }
+ set redirect_url "event?event_id=$event_id"
+ } else {
+ foreach attribute_id $attribute_ids {
+ events::registration::map_attribute -activity_id $activity_id -attribute_id $attribute_id
+ }
+ set redirect_url "activity?activity_id=$activity_id"
+ }
+
+ ad_returnredirect $redirect_url
+ ad_script_abort
+
+}
+
+if {[exists_and_not_null event_id]} {
+ element set_properties field_add activity_id -value $activity_id
+ element set_properties field_add event_id -value $event_id
+} else {
+ element set_properties field_add activity_id -value $activity_id
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/field-add.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-add.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-add.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,34 @@
+
+
+
+
+
+ select eac.category_name || ' >> ' || aa.attribute_name || ' ( datatype : ' || aa.datatype || ' )' as name,
+ aa.attribute_id
+ from acs_attributes aa, events_attr_categories eac,
+ events_attr_category_map eacm
+ where eacm.attribute_id = aa.attribute_id
+ and eacm.category_id = eac.category_id
+ and aa.attribute_id not in (select attribute_id
+ from events_def_actvty_attr_map
+ where activity_id = :activity_id)
+ order by name asc
+
+
+
+
+
+ select eac.category_name || ' >> ' || aa.attribute_name || ' ( datatype : ' || aa.datatype || ' )' as name,
+ aa.attribute_id
+ from acs_attributes aa, events_attr_categories eac,
+ events_attr_category_map eacm
+ where eacm.attribute_id = aa.attribute_id
+ and eacm.category_id = eac.category_id
+ and aa.attribute_id not in (select attribute_id
+ from events_event_attr_map
+ where event_id = :event_id)
+ order by name asc
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-create.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-create.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-create.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,12 @@
+
+@title@
+@context_bar@
+
+
+Add a new field
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-create.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-create.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-create.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,119 @@
+# events/www/admin/field-add.tcl
+
+ad_page_contract {
+ Purpose: allows admins to add a custom field to the registrations
+ forms for the specified event.
+
+ @param event_id the activity to which we are adding a field
+ @param after field after which this new field will appear
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id activity-field-add.tcl,v 3.6.6.4 2000/09/22 01:37:35 kevin Exp
+} {
+ {event_id:integer,optional}
+ {activity_id:integer,optional}
+ {after:optional}
+}
+
+set datatypes [db_list_of_lists select_attribute_datatypes {}]
+
+set categories [db_list_of_lists select_categories {}]
+
+if {[exists_and_not_null event_id]} {
+ set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] [list "event?event_id=$event_id" Event] "Custom Field"]
+ set title "Add a New Custom Field"
+} elseif {[exists_and_not_null activity_id]} {
+ set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] "Custom Field"]
+ set title "Add a New Default Custom Field"
+} else {
+ set context_bar [ad_context_bar [list "fields" "Custom Fields"] "Custom Field"]
+ set title "Add a New Custom Field"
+}
+
+form create custom_field
+
+element create custom_field activity_id \
+ -datatype integer \
+ -widget hidden \
+ -optional
+
+element create custom_field event_id \
+ -datatype integer \
+ -widget hidden \
+ -optional
+
+#element create custom_field after \
+# -label "After" \
+# -datatype integer \
+# -widget hidden
+
+element create custom_field attribute_name \
+ -label "Field Name" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create custom_field pretty_name \
+ -label "Pretty Name" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create custom_field pretty_plural \
+ -label "Pretty Plural" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create custom_field datatype \
+ -label "Type of Data" \
+ -datatype text \
+ -widget select \
+ -options $datatypes
+
+element create custom_field category_id \
+ -label "Category" \
+ -datatype text \
+ -widget select \
+ -options $categories
+
+if {[template::form is_valid custom_field]} {
+ template::form get_values custom_field attribute_name \
+ pretty_name pretty_plural datatype category_id
+
+ set attribute_id [events::registration::new_attribute \
+ -attribute_name $attribute_name \
+ -pretty_name $pretty_name \
+ -pretty_plural $pretty_plural \
+ -category_id $category_id \
+ -datatype $datatype]
+
+ if {[exists_and_not_null event_id]} {
+ set redirect_url "event?event_id=$event_id"
+ events::registration::map_attribute -event_id $event_id \
+ -attribute_id $attribute_id
+ } elseif {[exists_and_not_null activity_id]} {
+ set redirect_url "event?activity_id=$activity_id"
+ events::registration::map_attribute -activity_id $activity_id \
+ -attribute_id $attribute_id
+ } else {
+ set redirect_url "fields?field_id=$activity_id"
+ }
+
+ ad_returnredirect $redirect_url
+ ad_script_abort
+}
+
+if {[exists_and_not_null event_id]} {
+ element set_properties custom_field event_id -value $event_id
+ element set_properties custom_field activity_id -value $activity_id
+} elseif {[exists_and_not_null activity_id]} {
+ element set_properties custom_field activity_id -value $activity_id
+}
+
+if {[exists_and_not_null after]} {
+ element set_properties custom_field after -value $after
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/field-create.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-create.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-create.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+ select datatype, datatype
+ from acs_datatypes
+
+
+
+
+
+ select category_name, category_id
+ from events_attr_categories
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-delete.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-delete.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-delete.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,10 @@
+
+@title@
+@context_bar@
+
+@prompt@
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-delete.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-delete.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,50 @@
+# File: events/www/admin/field-delete.tcl
+
+ad_page_contract {
+ Allows admins to confirm the removal of a field
+
+ @param role_id the id of the role
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id activity-field-remove.tcl,v 3.6.6.4 2000/09/22 01:37:35 kevin Exp
+} {
+ {attribute_id:naturalnum,notnull}
+}
+
+events::registration::get_attribute -attribute_id $attribute_id -array attribute_info
+
+set title "Delete Field?"
+
+set context_bar [ad_context_bar [list "fields" "Custom Fields"] [list "field?attribute_id=$attribute_id" "Custom Field"] "Delete Custom Field"]
+
+set prompt "Delete custom field from system?"
+
+form create field_delete
+
+element create field_delete field \
+ -label "Custom Field" \
+ -datatype text \
+ -widget inform \
+ -value $attribute_info(name)
+
+element create field_delete attribute_id \
+ -datatype integer \
+ -widget hidden \
+ -value $attribute_id
+
+element create field_delete submit \
+ -label "Delete field" \
+ -datatype text \
+ -widget submit
+
+if {[template::form is_valid field_delete]} {
+ events::registration::delete_attribute \
+ -attribute_id $attribute_id \
+ -attribute_name $attribute_info(name)
+
+ ad_returnredirect fields
+ ad_script_abort
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/field-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-edit.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,12 @@
+
+@title@
+@context_bar@
+
+
+Edit a custom field
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-edit.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,86 @@
+# events/www/admin/field-edit.tcl
+
+ad_page_contract {
+ Allows admins to confirm the removal of a field
+ associated with the selected activity/event
+
+ @param attribute_id the name of the field's table column
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id activity-field-remove.tcl,v 3.6.6.4 2000/09/22 01:37:35 kevin Exp
+} {
+ {attribute_id:integer,notnull}
+}
+
+set datatypes [db_list_of_lists select_attribute_datatypes {}]
+
+set categories [db_list_of_lists select_categories {}]
+
+set context_bar [ad_context_bar [list "fields" "Custom Fields"] "Edit Custom Field"]
+
+set title "Edit Custom Field"
+
+form create custom_field
+
+element create custom_field attribute_id \
+ -datatype integer \
+ -widget hidden \
+ -value $attribute_id
+
+element create custom_field attribute_name \
+ -label "Field Name" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create custom_field pretty_name \
+ -label "Pretty Name" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create custom_field pretty_plural \
+ -label "Pretty Plural" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create custom_field datatype \
+ -label "Type of Data" \
+ -datatype text \
+ -widget select \
+ -options $datatypes
+
+element create custom_field category_id \
+ -label "Category" \
+ -datatype text \
+ -widget select \
+ -options $categories
+
+if {[template::form is_valid custom_field]} {
+ template::form get_values custom_field attribute_name \
+ pretty_name pretty_plural datatype category_id
+
+ events::registration::edit_attribute \
+ -attribute_id $attribute_id \
+ -attribute_name $attribute_name \
+ -pretty_name $pretty_name \
+ -pretty_plural $pretty_plural \
+ -category_id $category_id \
+ -datatype $datatype
+
+ set redirect_url "fields?attribute_id=$attribute_id"
+ ad_returnredirect $redirect_url
+ ad_script_abort
+}
+
+events::registration::get_attribute -attribute_id $attribute_id -array attribute_info
+
+element set_properties custom_field attribute_name -value $attribute_info(name)
+element set_properties custom_field pretty_name -value $attribute_info(pretty_name)
+element set_properties custom_field pretty_plural -value $attribute_info(pretty_plural)
+element set_properties custom_field datatype -value $attribute_info(datatype)
+element set_properties custom_field category_id -value $attribute_info(category_id)
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/field-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-edit.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-edit.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,18 @@
+
+
+
+
+
+ select datatype, datatype
+ from acs_datatypes
+
+
+
+
+
+ select category_name, category_id
+ from events_attr_categories
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-remove.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-remove.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-remove.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,12 @@
+
+@title@
+@context_bar@
+
+
+@prompt@
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field-remove.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field-remove.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field-remove.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,87 @@
+# File: events/www/admin/activity-field-delete.tcl
+
+ad_page_contract {
+ Allows admins to confirm the removal of a field
+ associated with the selected activity/event
+
+ @param activity_id the field's activity
+ @param event_id the field's event
+ @param attribute_name the name of the field's table column
+ @param attribute_id the name of the field's table column
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id activity-field-remove.tcl,v 3.6.6.4 2000/09/22 01:37:35 kevin Exp
+} {
+ {event_id ""}
+ {activity_id ""}
+ {attribute_id:integer,notnull}
+ {attribute_name ""}
+}
+
+if {[exists_and_not_null event_id]} {
+ events::event::get -event_id $event_id -array info
+ set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] [list "event?event_id=$event_id" Event] "Remove Custom Field"]
+} else {
+ events::activity::get -activity_id $activity_id -array info
+ set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] "Remove Custom Field"]
+}
+
+set title "Remove Custom Field?"
+
+set prompt "Remove field from $info(name)?"
+
+form create field_remove
+
+element create field_remove activity_id \
+ -datatype integer \
+ -optional \
+ -widget hidden
+
+element create field_remove event_id \
+ -datatype integer \
+ -optional \
+ -widget hidden
+
+element create field_remove attribute_name \
+ -label "Field Name" \
+ -datatype integer \
+ -widget inform \
+ -optional \
+ -value $attribute_name
+
+element create field_remove attribute_id \
+ -datatype integer \
+ -widget hidden \
+ -value $attribute_id
+
+element create field_remove submit \
+ -label "Remove custom field" \
+ -datatype text \
+ -widget submit
+
+if {[template::form is_valid field_remove]} {
+ template::form get_values field_remove attribute_id
+
+ if {[exists_and_not_null event_id]} {
+ set redirect_url "event?event_id=$event_id"
+ events::registration::unmap_attribute -attribute_id $attribute_id \
+ -event_id $event_id
+ } else {
+ set redirect_url "activity?activity_id=$activity_id"
+ events::registration::unmap_attribute -attribute_id $attribute_id \
+ -activity_id $activity_id
+ }
+
+ ad_returnredirect $redirect_url
+ ad_script_abort
+}
+
+if {[exists_and_not_null event_id]} {
+ element set_properties field_remove activity_id -value $activity_id
+ element set_properties field_remove event_id -value $event_id
+} else {
+ element set_properties field_remove activity_id -value $activity_id
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/field.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,64 @@
+
+@attribute_info.name@
+@context_bar@
+
+Events using this field
+
+
+
+
+ @eam.name@ (@eam.pretty_start_date@ - @eam.pretty_end_date@)
+
+
+
+ No events are currently using this field
+
+
+
+Activities using the field
+
+
+
+
+ @aam.name@
+
+
+
+ No activities are currently using this field
+
+
+
+Custom Field Description
+
+
+
+ Name
+ @attribute_info.name@
+
+
+ Pretty Name
+ @attribute_info.pretty_name@
+
+
+ Pretty Plural
+ @attribute_info.pretty_plural@
+
+
+ Data type
+ @attribute_info.datatype@
+
+
+ Category
+ @attribute_info.category_name@
+
+
+ Sort Order
+ @attribute_info.sort_order@
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/field.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,25 @@
+# events/www/admin/fields.tcl
+
+ad_page_contract {
+ Displays a list of fields
+ Details for specific roles are one click deep.
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id activities.tcl,v 3.8.2.6 2000/09/22 01:37:34 kevin Exp
+
+} {
+ {attribute_id:naturalnum,notnull}
+}
+
+set title "One Custom Field"
+
+set context_bar [ad_context_bar [list "fields" "Custom Fields"] "One Custom Field"]
+
+events::registration::get_attribute -attribute_id $attribute_id -array attribute_info
+
+db_multirow aam select_activity_custom_field_mappings {}
+
+db_multirow eam select_event_custom_field_mappings {}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/field.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/field.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/field.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+
+
+
+ select aa.activity_id, aa.name
+ from events_activities ea, events_def_actvty_attr_map edaam,
+ acs_activities aa
+ where aa.activity_id = ea.activity_id
+ and ea.activity_id = edaam.activity_id
+ and edaam.attribute_id = :attribute_id
+ order by aa.name asc
+
+
+
+
+
+ select ee.event_id, aa.name,
+ to_char(t.start_date, 'fmMonth DD, YYYY, HH12:MI PM') as pretty_start_date,
+ to_char(t.end_date, 'fmMonth DD, YYYY, HH12:MI PM') as pretty_end_date
+ from events_events ee, events_event_attr_map eeam,
+ acs_events ae, acs_activities aa, timespans s, time_intervals t
+ where ee.event_id = eeam.event_id
+ and eeam.event_id = ae.event_id
+ and aa.activity_id = ae.activity_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and eeam.attribute_id = :attribute_id
+ order by aa.name asc
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/fields.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/fields.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/fields.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,29 @@
+
+Custom Fields
+@context_bar@
+
+
+
+Custom Fields
+You may define custom fields that you would like to collect from registrants.
+
+
+Custom fields currently in the system:
+
+
+
+
+
+
+
+
+There are no custom fields in the system. You may add a new one
+
+
Index: openacs-4/contrib/packages/events/www/admin/fields.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/fields.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/fields.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,19 @@
+# events/www/admin/roles.tcl
+ad_page_contract {
+ Displays a list of roles
+ Details for specific roles are one click deep.
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id activities.tcl,v 3.8.2.6 2000/09/22 01:37:34 kevin Exp
+
+} {
+} -properties {
+ custom_fields:multirow
+}
+
+set context_bar [ad_context_bar "Custom Fields"]
+
+db_multirow custom_fields select_custom_fields {}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/fields.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/fields.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/fields.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+
+
+
+ select aa.attribute_id, aa.attribute_name as name,
+ aa.sort_order as after, aa.datatype,
+ eac.category_name, eac.category_id
+ from acs_attributes aa, events_attr_categories eac,
+ events_attr_category_map eacm
+ where aa.attribute_id = eacm.attribute_id
+ and eacm.category_id = eac.category_id
+ order by eac.category_name, aa.sort_order asc
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/index-oracle.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+
+
+ select CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan,
+ nvl(e.name, a.name) as name,
+ e.event_id,
+ v.city
+ from acs_activities a,
+ acs_events e,
+ events_activities ea,
+ events_events ee,
+ timespans s,
+ time_intervals t,
+ events_venues v
+ where e.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and e.activity_id = a.activity_id
+ and a.activity_id = ea.activity_id
+ and e.event_id = ee.event_id
+ and v.venue_id = ee.venue_id
+ and ee.available_p = 't'
+ and ea.package_id = :package_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/index-postgresql.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,31 @@
+
+
+
+
+
+ select CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan,
+ coalesce(e.name, a.name) as name,
+ e.event_id,
+ v.city
+ from acs_activities a,
+ acs_events e,
+ events_activities ea,
+ events_events ee,
+ timespans s,
+ time_intervals t,
+ events_venues v
+ where e.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and e.activity_id = a.activity_id
+ and a.activity_id = ea.activity_id
+ and e.event_id = ee.event_id
+ and v.venue_id = ee.venue_id
+ and ee.available_p = 't'
+ and ea.package_id = :package_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/index.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,39 @@
+
+Events Administration
+@context_bar@
+
+
+
+(Note: To add/edit an event, you must first go to the
+activities page to select the type of
+activity for your event. Then, you may add/edit an event
+based upon that activity.)
+
+
+
Current Events Registration Status
+
+
+
+ There are no current events to display
+
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/index.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/index.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,41 @@
+# /events/www/admin/index.tcl
+
+ad_page_contract {
+
+ Displays all upcoming events and the breakdown of registrations
+ for them. Offers various admin options, such as looking at
+ registration stats or available venues/activities. New event
+ creation, and checking out/editing events not currently available to
+ the public, must be done through subsidiary pages.
+ @param orderby for ad_table
+
+ This is the index page for events administration.
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs-id $Id index.tcl,v 3.19.2.5 2000/09/22 01:37:37 kevin Exp $
+} {
+} -properties {
+ available_events_and_locations:multirow
+ context_bar:onevalue
+}
+
+
+ad_require_permission [ad_conn package_id] admin
+set package_id [ad_conn package_id]
+set context_bar [ad_context_bar]
+
+set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"]
+set time_format [parameter::get -parameter time_format -default "HH12:MIam"]
+
+db_multirow available_events_and_locations select_available_events_and_locations {}
+
+ad_return_template
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/join-groups.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/join-groups.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/join-groups.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,67 @@
+ad_page_contract {
+ Adds user to all user groups which own event activities.
+
+ @param dummy parameter that prevents people from accidentally clicking on this page and joining a bunch of groups
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id join-groups.tcl,v 1.1.2.4 2000/09/22 01:35:07 kevin Exp
+} {
+ {proceed:notnull}
+}
+
+#we force this page to take a variable so that someone can't just
+#load the page and accidentally join all the user groups
+
+set user_id [ad_verify_and_get_user_id]
+
+append whole_page "
+[ad_header "Joined Groups"]
+Joined Groups
+[ad_admin_context_bar [list "index" "Events"] "Join Groups"]
+
+You were added as an administrator to the following groups:
+
+"
+
+db_transaction {
+
+ set groups_html ""
+
+ set ip_address [ns_conn peeraddr]
+
+ db_foreach evnt_sel_groups_to_join {
+ select
+ distinct ug.group_id, ug.group_name, ug.group_type
+ from user_groups ug, events_activities a
+ where ug.group_id = a.group_id
+ and ug.group_id not in
+ (select group_id
+ from user_group_map
+ where user_id = :user_id)
+ } {
+ db_dml evnt_join_ug {
+ insert into user_group_map
+ (group_id, user_id, role, mapping_user, mapping_ip_address)
+ values
+ (:group_id, :user_id, 'administrator', :user_id, :ip_address)
+ }
+ append groups_html "$group_name ($group_type group type)"
+ }
+}
+
+if {[empty_string_p $groups_html]} {
+ append whole_page "You were not added to any groups. You
+ probably already belonged to them all."
+} else {
+ append whole_page $groups_html
+}
+
+append whole_page "
+
+
+[ad_footer]
+"
+
+
+doc_return 200 text/html $whole_page
+
Index: openacs-4/contrib/packages/events/www/admin/one-role.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/one-role.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/one-role.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,52 @@
+
+@role_info.role@
+@context_bar@
+
+Event associations
+
+
+
+
+ @erm.name@ (@erm.pretty_start_date@ - @erm.pretty_end_date@)
+
+
+
+ No event mappings for this role
+
+
+
+Activity associations
+
+
+
+
+ @arm.name@
+
+
+
+ No activity mappings for this role
+
+
+
+Role Description
+
+
+
+ Role Name
+ @role_info.role@
+
+
+ Responsibilities
+ @role_info.responsibilities@
+
+
+ Public Role?
+ Yes No
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/one-role.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/one-role.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/one-role.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,25 @@
+# events/www/admin/roles.tcl
+
+ad_page_contract {
+ Displays a list of roles
+ Details for specific roles are one click deep.
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: one-role.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+
+} {
+ {role_id:naturalnum,notnull}
+}
+
+set title "One Role"
+
+set context_bar [ad_context_bar [list "roles" "Roles"] "One Role"]
+
+events::organizer::get_role -role_id $role_id -array role_info
+
+db_multirow arm select_activity_role_mappings {}
+
+db_multirow erm select_event_role_mappings {}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/one-role.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/one-role.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/one-role.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,33 @@
+
+
+
+
+
+ select aa.activity_id, aa.name
+ from events_activities ea, events_org_role_activity_map eoram,
+ acs_activities aa
+ where aa.activity_id = ea.activity_id
+ and ea.activity_id = eoram.activity_id
+ and eoram.role_id = :role_id
+ order by aa.name asc
+
+
+
+
+
+ select ee.event_id, aa.name,
+ to_char(t.start_date, 'Month DD, YYYY HH12:MI PM') as pretty_start_date,
+ to_char(t.end_date, 'Month DD, YYYY HH12:MI PM') as pretty_end_date
+ from events_events ee, events_org_role_event_map eorem,
+ acs_events ae, acs_activities aa, timespans s, time_intervals t
+ where ee.event_id = eorem.event_id
+ and eorem.event_id = ae.event_id
+ and aa.activity_id = ae.activity_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and eorem.role_id = :role_id
+ order by aa.name asc
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/order-history-activity.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-activity.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-activity.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,77 @@
+# File: events/admin/order-history-activity.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Display order history grouped by activity
+#####
+ad_page_contract {
+ Display order history grouped by activity
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-history-activity.tcl,v 3.6.6.4 2000/09/22 01:37:37 kevin Exp
+} {
+}
+
+
+set admin_id [ad_maybe_redirect_for_registration]
+
+set whole_page ""
+
+append whole_page "[ad_header "[ad_system_name] Events Administration: Order History - By Activity"]
+
+Order History - By Activity
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] [list "order-history.tcl" "Order History"] "By Activity"]
+
+
+
+
+Activity #
+ Name
+ Registrations
+"
+
+
+
+# count the number of orders (in events_registrations) for each activity_id in
+# events_activities
+
+db_foreach sel_activities "select
+ a.short_name, a.activity_id, count(r.reg_id) as n_reg
+ from events_activities a, events_registrations r, events_events e,
+ events_prices p
+ where p.event_id = e.event_id
+ and p.price_id = r.price_id(+)
+ and a.activity_id = e.activity_id
+ and a.group_id in (select distinct group_id
+ from user_group_map
+ where user_id = :admin_id)
+ group by a.activity_id, a.short_name
+union
+ select a.short_name, a.activity_id, count(r.reg_id) as n_reg
+ from events_activities a, events_registrations r, events_events e,
+ events_prices p
+ where p.event_id = e.event_id
+ and p.price_id = r.price_id(+)
+ and a.activity_id = e.activity_id
+ and a.group_id is null
+ group by a.activity_id, a.short_name
+ order by activity_id
+" {
+ append whole_page "
+
+ $activity_id
+ $short_name
+ "
+ if {$n_reg > 0} {
+ append whole_page "
+ $n_reg \n"
+ } else {
+ append whole_page "$n_reg"
+ }
+}
+## clean up, return page.
+append whole_page "
\n [ad_footer] "
+
+
+
+doc_return 200 text/html $whole_page
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/order-history-date.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-date.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-date.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,88 @@
+# File: events/admin/order-history-date.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Displays order-history grouped by date.
+#####
+
+ad_page_contract {
+ Displays order-history grouped by date.
+
+ @param year optional arg for what year to view
+ @param month optional arg for what month to view
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-history-date.tcl,v 3.10.2.5 2000/09/22 01:37:37 kevin Exp
+} {
+ {year:optional}
+ {month:optional}
+}
+
+set admin_id [ad_maybe_redirect_for_registration]
+
+if {[info exists year] && [info exists month]} {
+ set page_title "Orders in $month $year"
+ set where_clause "
+ where to_char(reg_date,'fmMonth') = :month
+ and to_char(reg_date,'YYYY') = :year
+ and "
+} else {
+ set page_title "Orders by Date"
+ set where_clause "where"
+}
+
+# prepare page to be returned
+set whole_page ""
+
+append whole_page "[ad_header $page_title]
+
+$page_title
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] [list "order-history.tcl" "Order History"] "By Date"]
+
+
+
+
+ Date
+ Orders
+"
+
+
+
+# count the number of orders (in events_registrations) for each date in
+# events_registrations
+
+set history_type "date"
+
+db_foreach sel_regs "
+ select trunc(reg_date) as reg_date,
+ count(reg_id) as n_orders
+ from events_registrations r, events_events e, events_prices p
+ $where_clause p.event_id = e.event_id
+ and p.price_id = r.price_id
+ and r.reg_id not in (select distinct r.reg_id
+ from events_registrations r,events_activities a, events_events e,
+ events_prices p
+ $where_clause p.event_id = e.event_id
+ and e.activity_id = a.activity_id
+ and p.price_id = r.price_id
+ and a.group_id not in (select distinct group_id
+ from user_group_map
+ where user_id = :admin_id) )
+ group by trunc(reg_date)
+ order by reg_date desc
+" {
+ #can't export reg_date since ® is a special character
+ set r_date $reg_date
+
+ append whole_page "
+ [util_IllustraDatetoPrettyDate $reg_date]
+ $n_orders \n"
+
+}
+
+### clean up, return page.
+append whole_page "
\n [ad_footer] "
+
+
+
+doc_return 200 text/html $whole_page
+##### File Over.
+
Index: openacs-4/contrib/packages/events/www/admin/order-history-month.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-month.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-month.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,67 @@
+# File: events/admin/order-history-month.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Provides an overview of order history grouped by month.
+#####
+
+ad_page_contract {
+ Purpose: Provides an overview of order history grouped by month.
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-history-month.tcl,v 3.7.6.5 2000/09/22 01:37:37 kevin Exp
+} {
+}
+
+set admin_id [ad_maybe_redirect_for_registration]
+
+# prepare page to be returned
+set whole_page ""
+append whole_page "
+ [ad_header "[ad_system_name] Events Administration: Order History - By Month"]
+Order History - By Month
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] [list "order-history.tcl" "Order History"] "By Month"]
+
+
+
+
+Month
+ Orders
+"
+
+
+# count the number of orders (in events_registrations) for each date in
+# events_registrations
+db_foreach sel_reg "
+ select to_char(reg_date,'YYYY') as year,
+ to_char(reg_date,'fmMonth') as month,
+ to_char(reg_date,'MM') as month_number,
+ count(reg_id) as n_orders
+ from events_registrations r, events_events e, events_prices p
+ where p.event_id = e.event_id
+ and p.price_id = r.price_id
+ and r.reg_id not in (select distinct r.reg_id
+ from events_registrations r,events_activities a, events_events e,
+ events_prices p
+ where p.event_id = e.event_id
+ and e.activity_id = a.activity_id
+ and p.price_id = r.price_id
+ and a.group_id not in (select distinct group_id
+ from user_group_map
+ where user_id = :admin_id) )
+group by to_char(reg_date,'YYYY'),
+ to_char(reg_date,'fmMonth'),
+ to_char(reg_date,'MM')
+order by year,month
+" {
+ append whole_page "
+ $month $year
+ $n_orders \n"
+}
+
+## clean up, return page
+
+append whole_page "
\n [ad_footer] "
+
+
+doc_return 200 text/html $whole_page
+
+##### File Over
Index: openacs-4/contrib/packages/events/www/admin/order-history-one-activity.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-one-activity.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-one-activity.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,68 @@
+# File: events/admin/order-history-one-activity.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: To provide an overview of order history grouped by activity.
+#####
+
+ad_page_contract {
+ Purpose: To provide an overview of order history grouped by activity.
+
+ @param activity_id the activity whose history we are viewing
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-history-one-activity.tcl,v 3.7.6.4 2000/09/22 01:37:37 kevin Exp
+} {
+ {activity_id:integer,notnull}
+}
+
+set whole_page ""
+
+append whole_page "[ad_header "[ad_system_name] Events Administration: Order History - By Activity"]"
+
+
+
+set short_name [db_string sel_name "select short_name from events_activities where activity_id=$activity_id"]
+
+append whole_page "
+ Order History - For Activity # $activity_id ($short_name)
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] [list "order-history.tcl" "Order History"] [list "order-history-activity.tcl" "By Activity"] "Activity"]
+
+
+
+
+ Event Location
+ Date
+ Number of Registrations
+"
+
+set history_type "event"
+
+db_foreach sel_reg "select
+ e.event_id, e.start_time, v.city,
+ decode(v.iso, 'us', v.usps_abbrev, cc.country_name) as big_location,
+ count(r.reg_id) as n_reg
+ from events_activities a, events_events e, events_registrations r,
+ events_venues v, events_prices p, country_codes cc
+where e.activity_id = a.activity_id
+ and a.activity_id = :activity_id
+ and p.event_id = e.event_id
+ and p.price_id = r.price_id(+)
+ and v.venue_id = e.venue_id
+ and cc.iso = v.iso
+group by e.event_id, e.start_time, v.city, v.usps_abbrev, v.iso, cc.country_name
+order by e.start_time desc
+" {
+ append whole_page "
+ $city, $big_location
+ [util_AnsiDatetoPrettyDate $start_time]
+ $n_reg registrations"
+}
+
+## clean up, return page
+
+append whole_page "
\n [ad_footer] "
+
+
+
+doc_return 200 text/html $whole_page
+
+##### File Over
Index: openacs-4/contrib/packages/events/www/admin/order-history-person.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-person.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-person.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,73 @@
+
+@title@
+@context@
+
+
+
+ Name @user_name@
+
+
+ Email @user_email@
+
+
+ Community Page @member_link@
+
+
+
+
+
+ @user_name@ has not registered for any events
+
+
+
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/order-history-person.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-person.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-person.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,44 @@
+# events/www/admin/order-history-person.tcl
+
+ad_page_contract {
+
+ displays the order history of a person
+
+ @param user_id
+ @author Matthew Geddert (geddert@yahoo.com)
+
+} {
+ {user_id:integer,notnull}
+} -properties {
+ reg_history:multirow
+} -validate {
+ user_name_select -requires {user_id} {
+ if { ![db_0or1row select_user_info {}] } {
+ ad_complain "We couldn't find the user you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+db_1row select_user_info {}
+set user_email [ad_convert_to_html $user_email]
+
+
+set ad_url [ad_url]
+
+set member_link [acs_community_member_link -user_id $user_id -label "${ad_url}[acs_community_member_url -user_id $user_id]"]
+
+
+# get the variables needed by the sql query
+set date_format [parameter::get -parameter date_format -default "MM/DD/YYYY"]
+set time_format [parameter::get -parameter time_format -default "HH12:MIam"]
+set package_id [ad_conn package_id]
+
+db_multirow reg_history select_reg_history {}
+
+set title "$user_name's Order History"
+set context [list $title]
+
+ad_return_template
+
Index: openacs-4/contrib/packages/events/www/admin/order-history-person.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-person.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-person.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,40 @@
+
+
+
+
+
+select CASE WHEN to_char(t.start_date, 'YYYY-MM-DD') = to_char(t.end_date, 'YYYY-MM-DD')
+ THEN to_char(t.start_date, :date_format) || ' (' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :time_format) || ')'
+ ELSE to_char(t.start_date, :date_format) || ' ' || to_char(t.start_date, :time_format) || ' - ' || to_char(t.end_date, :date_format) || ' ' || to_char(t.end_date, :time_format)
+ END as timespan,
+ aa.name, ae.activity_id, ae.event_id, reg_id, ev.venue_name, er.reg_state
+ from acs_events ae,
+ acs_activities aa,
+ events_registrations er,
+ timespans s,
+ time_intervals t,
+ events_venues ev,
+ events_events ee,
+ events_activities ea
+ where er.user_id = :user_id
+ and er.event_id = ae.event_id
+ and ae.activity_id = aa.activity_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and ee.event_id = ae.event_id
+ and ee.venue_id = ev.venue_id
+ and aa.activity_id = ea.activity_id
+ and ea.package_id = :package_id
+
+
+
+
+
+ select first_names || ' ' || last_name as user_name, email as user_email
+ from persons, parties
+ where person_id = :user_id
+ and person_id = party_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/order-history-state.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-state.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-state.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,65 @@
+# File: events/admin/order-history-state.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: ...
+#####
+ad_page_contract {
+ Lists number of registrations in each state.
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-history-state.tcl,v 3.9.2.4 2000/09/22 01:37:38 kevin Exp
+} {
+}
+
+set admin_id [ad_maybe_redirect_for_registration]
+
+append whole_page "[ad_header "[ad_system_name] Events Administration: Order History - By Order State"]
+
+Order History - By Registration State
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] [list "order-history.tcl" "Order History"] "By Registration State"]
+
+
+
+
+
+Registration State
+ Registrations
+"
+
+
+
+# count the number of orders (in events_registrations) for each order_state in
+# events_registrations
+
+set history_type "state"
+
+db_foreach sel_regs "
+select
+reg_state, count(reg_id) as n_orders
+from events_registrations r, events_activities a, events_events e,
+events_prices p
+where p.event_id = e.event_id
+and p.price_id = r.price_id
+and e.activity_id = a.activity_id
+ and r.reg_id not in (select distinct r.reg_id
+ from events_registrations r,events_activities a, events_events e,
+ events_prices p
+ where p.event_id = e.event_id
+ and e.activity_id = a.activity_id
+ and p.price_id = r.price_id
+ and a.group_id not in (select distinct group_id
+ from user_group_map
+ where user_id = :admin_id) )
+group by reg_state
+order by reg_state
+" {
+ #set r_state $reg_state
+ set state_filter $reg_state
+
+ append whole_page " $reg_state $n_orders \n"
+}
+
+append whole_page "
\n [ad_footer] "
+
+
+doc_return 200 text/html $whole_page
+#####
Index: openacs-4/contrib/packages/events/www/admin/order-history-ug.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history-ug.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history-ug.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,106 @@
+# File: events/admin/order-history-ug.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Displays order history grouped by user group.
+#####
+
+ad_page_contract {
+ Displays order history grouped by user group.
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-history-ug.tcl,v 3.8.6.5 2000/09/22 01:37:38 kevin Exp
+} {
+}
+
+set user_id [ad_maybe_redirect_for_registration]
+
+# prepare the page to be returned
+set whole_page ""
+
+append whole_page "[ad_header "[ad_system_name] Events Administration: Order History - By User Group"]
+
+Order History - By User Group
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] [list "order-history.tcl" "Order History"] "By User Group"]
+
+
+
+
+ User Group
+ Orders
+"
+
+set history_type "group"
+
+#create a bunch of views to do this select...
+db_foreach sel_regs "
+ select group_name, um.group_id, sum(distinct group_orders) as n_orders
+ from user_groups ug, user_group_map um,
+ (select group_id, sum(ev_num) as group_orders
+ from events_activities a,
+ (select activity_id, sum(num) as ev_num
+ from events_events e,
+ (select p.event_id, count(1) as num
+ from events_registrations r, events_prices p
+ where p.price_id = r.price_id group by p.event_id
+ ) order_count
+ where e.event_id = order_count.event_id(+)
+ group by activity_id
+ ) ev_count
+ where a.activity_id = ev_count.activity_id(+)
+ group by group_id
+ ) group_count
+ where ug.group_id = group_count.group_id(+)
+ and um.user_id = :user_id
+ and ug.group_id = um.group_id
+ group by group_name, um.group_id
+ order by group_name
+" {
+ if {[empty_string_p $n_orders]} {
+ append whole_page "
+ $group_name
+ 0"
+ } else {
+ append whole_page "
+ $group_name
+ $n_orders \n"
+ }
+}
+
+db_1row sel_no_group "
+ select decode(sum(group_orders), null, 0, sum(group_orders)) as n_orders
+ from (select group_id, sum(ev_num) as group_orders
+ from events_activities a,
+ (select activity_id, sum(num) as ev_num
+ from events_events e,
+ (select p.event_id, count(1) as num
+ from events_registrations r, events_prices p
+ where p.price_id = r.price_id
+ group by event_id
+ ) order_count
+ where e.event_id = order_count.event_id(+)
+ group by activity_id
+ ) ev_count
+ where a.activity_id = ev_count.activity_id(+)
+ group by group_id
+ ) group_count
+ where group_count.group_id is null
+"
+
+append whole_page "
+
+ No group
+"
+if {$n_orders > 0 } {
+ append whole_page "
+ $n_orders \n"
+} else {
+ append whole_page " 0 "
+}
+
+## clean up, return page
+
+append whole_page "
\n [ad_footer]"
+
+
+doc_return 200 text/html $whole_page
+
+#####
Index: openacs-4/contrib/packages/events/www/admin/order-history.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,23 @@
+
+Order History
+@context@
+
+View Orders/Statistics by:
+
+
+
+Search For an Individual Registration:
+We should change this to a formtemplate
+
Index: openacs-4/contrib/packages/events/www/admin/order-history.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/order-history.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-history.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,18 @@
+# /events/www/admin/order-history.tcl
+ad_page_contract {
+
+ Present a selection of views for order history.
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-history.tcl,v 3.4.6.3 2000/09/22 01:37:38 kevin Exp
+
+
+} {
+} -properties {
+ context_bar:onevalue
+}
+ad_require_permission [ad_conn package_id] admin
+set context [list "Order History"]
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/order-same-person.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/order-same-person.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-same-person.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,71 @@
+# File: events/admin/order-same-person.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: ...
+#####
+
+
+ad_page_contract {
+ Lists registrations by one user
+
+ @param user_id the user whose registrations we're listing
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-same-person.tcl,v 3.5.2.4 2000/09/22 01:37:38 kevin Exp
+} {
+ {user_id:integer,notnull}
+}
+
+set admin_id [ad_maybe_redirect_for_registration]
+
+set output_html_page "whole_page"
+# this is for events_write_order_summary
+
+set whole_page ""
+
+
+db_1row sel_names "
+ select first_names, last_name from users
+ where user_id = :user_id"
+
+append whole_page "
+ [ad_header "Orders by $first_names $last_name"]
+Orders by $first_names $last_name
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] "Order History"]
+
+
+
+"
+
+db_foreach sel_regs "
+ select r.reg_id, r.reg_state, a.short_name, r.reg_date
+ from events_registrations r, events_activities a, events_events e,
+ user_groups ug, user_group_map ugm, events_prices p
+ where p.event_id = e.event_id
+ and r.price_id = p.price_id
+ and e.activity_id = a.activity_id
+ and r.user_id = :user_id
+ and a.group_id = ugm.group_id
+ and ugm.group_id = ug.group_id
+ and ugm.user_id = :admin_id
+union
+ select r.reg_id, r.reg_state, a.short_name, r.reg_date
+ from events_registrations r, events_activities a, events_events e,
+ user_groups ug, user_group_map ugm, events_prices p
+ where p.event_id = e.event_id
+ and r.price_id = p.price_id
+ and e.activity_id = a.activity_id
+ and r.user_id = :user_id
+ and a.group_id is null
+ order by reg_id desc" {
+ append whole_page "\n"
+ events_write_order_summary
+}
+
+## clean up, return page.
+
+append whole_page " \n [ad_footer] "
+
+
+doc_return 200 text/html $whole_page
+
+##### File Over
Index: openacs-4/contrib/packages/events/www/admin/order-search.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/order-search.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/order-search.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,88 @@
+# File: events/admin/order-search.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Full text search of existing orders
+#####
+
+ad_page_contract {
+ Search for existing orders
+
+ @param id_query a registration id to search for
+ @param name_query a name to search for
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id order-search.tcl,v 3.9.2.4 2000/09/22 01:37:38 kevin Exp
+} {
+ {id_query:integer,optional}
+ {name_query:trim,optional}
+}
+
+set admin_id [ad_maybe_redirect_for_registration]
+set output_html_page "whole_page"
+# for events_write_order_summary
+
+set whole_page ""
+
+if { [info exists id_query] && [string compare $id_query ""] != 0 } {
+ ad_returnredirect "reg-view.tcl?reg_id=$id_query"
+ return
+} elseif { ![info exists name_query] || [string compare $name_query ""] == 0 } {
+ ad_return_warning "Please enter search info" "Please enter either an order # or the customer's last name"
+ return
+}
+
+append whole_page "
+ [ad_header "Orders with Last Name Containing \"$name_query\""]
+Orders with Last Name Containing \"$name_query\"
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] [list "order-history.tcl" "Order History"] "Search"]
+
+
+
+"
+
+set n_rows_found 0
+
+db_foreach sel_regs "
+select u.first_names, u.last_name, r.reg_id, r.reg_state,
+a.short_name, v.city, v.usps_abbrev, v.iso
+from events_registrations r, events_activities a, events_events e,
+events_prices p, events_venues v, users u,
+user_group_map ugm
+where upper(u.last_name) like upper(:name_query)
+and r.user_id = u.user_id
+and p.price_id = r.price_id
+and e.event_id = p.event_id
+and a.activity_id = e.activity_id
+and v.venue_id = e.venue_id
+and ugm.group_id = a.group_id
+and ugm.user_id = :admin_id
+union
+select u.first_names, u.last_name, r.reg_id, r.reg_state,
+a.short_name, v.city, v.usps_abbrev, v.iso
+from events_registrations r, events_activities a, events_events e,
+events_prices p, events_venues v, users u
+where upper(u.last_name) like upper(:name_query)
+and r.user_id = u.user_id
+and p.price_id = r.price_id
+and e.event_id = p.event_id
+and a.activity_id = e.activity_id
+and v.venue_id = e.venue_id
+and a.group_id is null
+order by reg_id
+" {
+ incr n_rows_found
+ append whole_page ""
+ events_write_order_summary
+}
+
+if { $n_rows_found == 0 } {
+ append whole_page "no orders found"
+}
+
+## clean up, return
+
+append whole_page " \n [ad_footer] "
+
+
+doc_return 200 text/html $whole_page
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/organizer-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/organizer-add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/organizer-add.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,13 @@
+
+@title@
+@context_bar@
+
+@title@
+@context_bar@
+
+Identify Organizer
+
+Search for a user to be the organizer of the @name@ event:
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/organizer-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/organizer-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/organizer-add.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,70 @@
+# events/www/admin/organizer-add.tcl
+
+ad_page_contract {
+ Choose a user to add as an organizer for an event.
+
+ @param event_id the event to which to add the organizer
+ @param role_id the role for which we're adding an organizer, if it has already been created
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: organizer-add.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {event_id:integer,notnull}
+ {activity_id:integer,notnull}
+ {role_id:integer,optional}
+}
+
+events::event::get -event_id $event_id -array event_info
+
+set name $event_info(name)
+
+set title "Add a New Organizer"
+
+set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] [list "event?event_id=$event_id" "Event"] "Add Organizer"]
+
+form create organizer_add -action /acs-admin/users/search
+
+element create organizer_add target \
+ -datatype text \
+ -widget hidden \
+ -value "[ad_conn package_url]admin/organizer-add-2.tcl"
+
+element create organizer_add custom_title \
+ -datatype text \
+ -widget hidden \
+ -value "Choose a Member to Add as a Organizer for the $name event"
+
+element create organizer_add passthrough \
+ -datatype text \
+ -widget hidden \
+ -value "event_id role_id"
+
+element create organizer_add event_id \
+ -datatype text \
+ -widget hidden \
+ -value $event_id
+
+element create organizer_add role_id \
+ -datatype text \
+ -widget hidden \
+ -value $role_id
+
+element create organizer_add email \
+ -label "by Email address" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create organizer_add last_name \
+ -label "or by Last name" \
+ -datatype text \
+ -widget text \
+ -html {size 40}
+
+element create organizer_add submit \
+ -widget submit \
+ -label "Search for an organizer"
+
+ad_return_template
+
Index: openacs-4/contrib/packages/events/www/admin/organizer-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/organizer-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/organizer-edit.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,10 @@
+
+@title@
+@context_bar@
+
+Select Organizer for Role
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/organizer-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/organizer-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/organizer-edit.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,98 @@
+#/packages/events/www/admin/organizer-edit.tcl
+
+ad_page_contract {
+
+ Edit an organizer for an event role
+
+ @param activity_id the activity in question
+ @param event_id the event in question
+ @param role_id the role which we're to edit
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: organizer-edit.tcl,v 1.1 2003/03/09 12:08:22 lars Exp $
+} {
+ {role_id:naturalnum,notnull}
+ {event_id:naturalnum,notnull}
+ {activity_id:naturalnum,notnull}
+}
+
+events::organizer::get_role -role_id $role_id -array org_role_info
+
+set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] \
+ [list "event?event_id=$event_id" "Event"] "Edit Organizer Role"]
+set title "Edit Organizer"
+
+form create organizer_edit
+
+element create organizer_edit activity_id \
+ -datatype integer \
+ -widget hidden \
+ -value $activity_id
+
+element create organizer_edit event_id \
+ -datatype integer \
+ -widget hidden \
+ -value $event_id
+
+element create organizer_edit role_id \
+ -datatype integer \
+ -widget hidden \
+ -value $role_id
+
+element create organizer_edit role \
+ -label "Role" \
+ -datatype text \
+ -widget inform \
+ -value $org_role_info(role)
+
+element create organizer_edit user_id \
+ -label "User in this role" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::organizer::users_get_options] \
+ -optional \
+ -search_query {
+ select distinct u.first_names || ' ' || u.last_name as name, u.user_id
+ from cc_users u
+ where upper(decode(u.first_names,' ', '') || decode(u.last_name,' ', '') || u.email || ' ' || decode(u.screen_name, ' ', '')) like upper('%'||:value||'%')
+ order by name
+}
+
+if {[template::form is_valid organizer_edit]} {
+ template::form get_values organizer_edit user_id
+
+ set organizer_exists_p [events::organizer::organizer_exists_p \
+ -event_id $event_id -role_id $role_id]
+
+ if {$organizer_exists_p && [exists_and_not_null user_id]} {
+ events::organizer::edit_organizer \
+ -event_id $event_id \
+ -role_id $role_id \
+ -party_id $user_id
+ } elseif {$organizer_exists_p} {
+ ns_log Notice "deleting organizer"
+ events::organizer::delete_organizer \
+ -event_id $event_id \
+ -role_id $role_id \
+ -party_id $user_id
+ } else {
+ events::organizer::add_organizer \
+ -event_id $event_id \
+ -role_id $role_id \
+ -party_id $user_id
+ }
+
+ ad_returnredirect "event?event_id=$event_id"
+ ad_script_abort
+}
+
+element set_properties organizer_edit user_id -value $org_role_info(user_id)
+
+ad_return_template
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/reg-approve.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-approve.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-approve.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,43 @@
+# events/www/admin/reg-approve.tcl
+ad_page_contract {
+
+ Approve a Registration.
+
+ @param reg_id the registration to cancel
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @creation date 2002-11-11
+
+} {
+ {reg_id:naturalnum,notnull}
+ {return_url ""}
+} -validate {
+ registration_exists_p -requires {reg_id} {
+ if { ![events::registration::exists_p -reg_id $reg_id] } {
+ ad_complain "We could not find the registration you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+events::registration::get -reg_id $reg_id -array reg_info
+events::event::get_stats -event_id $reg_info(event_id) -array event_stats
+
+set count_spotsremaining [expr $event_stats(max_people) - $event_stats(approved)]
+
+if { ![empty_string_p $event_stats(max_people)] && $count_spotsremaining == 0 } {
+ ad_return_error "Max Number Already Reached" "The maximum number of registrations for this event has already been reached.
+ You cannot approve of this registration before cancelling or waitlisting somebody else, or editing
+ the maximum number of registrants allowed for this event."
+} else {
+ events::registration::approve -reg_id $reg_id
+
+ if {![exists_and_not_null return_url]} {
+ set return_url "reg-view?reg_id=$reg_id"
+ }
+
+ ad_returnredirect $return_url
+}
+
+ad_script_abort
Index: openacs-4/contrib/packages/events/www/admin/reg-cancel-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-cancel-2.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-cancel-2.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,144 @@
+# File: events/admin/reg-cancel-2.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Cancel one registration
+#####
+
+ad_page_contract {
+ Cancels a registration.
+
+ @param reg_id the registration to cancel
+ @param cancel_reason why we are canceling this reg
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id reg-cancel-2.tcl,v 3.9.2.5 2000/09/22 01:37:39 kevin Exp
+} {
+ {reg_id:integer,notnull}
+ {cancel_reason:html,trim,optional}
+}
+
+set user_id [ad_maybe_redirect_for_registration]
+
+if {![exists_and_not_null cancel_reason]} {
+ set cancel_msg ""
+} else {
+ set cancel_msg "Explanation:\n\n"
+
+ # Strip all ^M's out of any interactively entered text message.
+ # This is because Windows browsers insist on inserting CRLF at
+ # the end of each line of a TEXTAREA.
+ regsub -all "\r" $cancel_reason "" cancel_reason
+ append cancel_msg $cancel_reason
+}
+
+
+
+set reg_check [db_0or1row sel_reg "select '1_reg_check' from
+events_registrations
+where reg_id = :reg_id
+"]
+
+if {!$reg_check} {
+ append whole_page "
+ [ad_header "Could not find registration"]
+ Couldn't find registration
+ [ad_context_bar_ws [list "index.tcl" "Events Administration"] "Cancel Registration"]
+
+
+ Registration $reg_id was not found in the database.
+ [ad_footer]"
+
+ return
+}
+
+#cancel the registration
+db_transaction {
+ db_dml update_reg "update events_registrations
+ set reg_state = 'canceled'
+ where reg_id = :reg_id"
+
+ #try to remove the user from the event's user group
+ set user_check [db_0or1row sel_user_info "select
+ e.group_id as event_group_id, r.user_id as reg_user_id, e.event_id
+ from events_events e, events_registrations r, events_prices p
+ where r.reg_id = :reg_id
+ and p.price_id = r.price_id
+ and e.event_id = p.event_id"]
+
+ if {$user_check > 0} {
+ db_dml del_ugm "delete from user_group_map
+ where group_id = :event_group_id
+ and user_id = :reg_user_id
+ and role <> 'administrator'"
+ }
+
+}
+
+set to_email [db_string sel_to_email "
+ select u.email
+ from users u, events_registrations r
+ where r.reg_id = :reg_id
+ and u.user_id = r.user_id"]
+
+append whole_page "[ad_header "Registration Canceled"]
+Registration Canceled
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] "Cancel Registration"]
+
+
+$to_email's registration has been canceled. $to_email has been notified
+by e-mail:
+"
+
+#e-mail the registrant to let him know we canceled his registration
+#set from_email [db_string unused "select email from
+#users where user_id = $user_id"]
+set from_email [db_string sel_from_email "select u.email
+from users u, event_info ei, events_events e
+where e.event_id = :event_id
+and ei.group_id = e.group_id
+and u.user_id = ei.contact_user_id"]
+
+set to_email [db_string sel_to_email_addr "
+ select u.email
+ from users u, events_registrations r
+ where r.reg_id = :reg_id
+ and u.user_id = r.user_id"]
+
+set event_id [db_string sel_event_id "
+ select event_id
+ from events_registrations r, events_prices p
+ where r.reg_id = :reg_id
+ and p.price_id = r.price_id"]
+
+set email_subject "Registration Canceled"
+set email_body "Your registration for:\n
+[events_pretty_event $event_id]\n
+has been canceled.\n
+
+$cancel_msg
+
+[ad_parameter SystemURL]/events/
+"
+
+append whole_page "
+
+To: $to_email
+From: $from_email
+Subject: $email_subject
+
+$email_body
+
+
+
+Return to events administration
+[ad_footer]
+"
+
+
+doc_return 200 text/html $whole_page
+ns_conn close
+
+if [catch { ns_sendmail $to_email $from_email $email_subject $email_body } errmsg] {
+ ns_log Notice "failed sending confirmation email to customer: $errmsg"
+}
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/reg-cancel.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-cancel.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-cancel.adp 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,6 @@
+
+
+@title@
+@context@
+
+
Index: openacs-4/contrib/packages/events/www/admin/reg-cancel.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-cancel.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-cancel.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,104 @@
+# events/www/admin/reg-cancel.tcl
+ad_page_contract {
+
+ Cancel a Registration.
+
+ @param reg_id the registration to cancel
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @creation date 2002-11-11
+
+} {
+ {reg_id:naturalnum,notnull}
+ {return_url ""}
+} -validate {
+ registration_exists_p -requires {reg_id} {
+ if { ![events::registration::exists_p -reg_id $reg_id] } {
+ ad_complain "We could not find the registration you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+events::registration::get -reg_id $reg_id -array reg_info
+events::event::get -event_id $reg_info(event_id) -array event_info
+events::venue::get -venue_id $event_info(venue_id) -array venue_info
+
+set title "Cancel $reg_info(user_name)'s Registration"
+set context [list [list "event?event_id=$reg_info(event_id)" "$event_info(name) in $venue_info(city)"] "Cancel $reg_info(user_name)'s Registration"]
+
+form create confirm_cancel
+
+element create confirm_cancel return_url \
+ -datatype text \
+ -widget hidden \
+ -value $return_url
+
+element create confirm_cancel reg_id \
+ -datatype integer \
+ -widget hidden \
+ -value $reg_id
+
+element create confirm_cancel inform_of_cancel \
+ -label "Action" \
+ -datatype text \
+ -widget inform \
+ -value "Cancel a reservation for $event_info(name), and send the registrant a message to notify him/her that their reservation was canceled"
+
+if {[exists_and_not_null event_info(contact_email)]} {
+ set from_addr "$event_info(contact_email) (the default contact for this event)"
+} else {
+# do we want a parameter for this?
+ set from_addr "[ad_outgoing_sender] (the system wide default outgoing sender)"
+}
+
+element create confirm_cancel send_message_from \
+ -label "From" \
+ -datatype text \
+ -widget inform \
+ -value $from_addr
+
+element create confirm_cancel send_message_to \
+ -label "To" \
+ -datatype text \
+ -widget inform \
+ -value $reg_info(user_email)
+
+element create confirm_cancel message_subject \
+ -label "Subject" \
+ -datatype text \
+ -widget inform \
+ -value "Your registration for $event_info(name) has been canceled"
+
+
+element create confirm_cancel email_body \
+ -label "Email Message" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 8 wrap soft} \
+ -value "$reg_info(user_name),
+
+Your registration request for $event_info(name) - $event_info(timespan) has been canceled.
+
+Sincerely,
+
+Event Administrator"
+
+if {[template::form is_valid confirm_cancel]} {
+ template::form get_values confirm_cancel reg_id email_body return_url
+
+ events::registration::cancel -reg_id $reg_id -email_body $email_body
+
+ if {![exists_and_not_null return_url]} {
+ set return_url "reg-view?reg_id=$reg_id"
+ }
+
+
+ ad_returnredirect $return_url
+ ad_script_abort
+
+}
+
+ad_return_template
+
Index: openacs-4/contrib/packages/events/www/admin/reg-cancel.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-cancel.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-cancel.xql 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select 1
+ from events_registrations
+ where reg_id = :reg_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/reg-comments.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-comments.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-comments.tcl 9 Mar 2003 12:08:22 -0000 1.1
@@ -0,0 +1,49 @@
+# File: events/admin/reg-comments.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Update comments for one registration.
+#####
+
+ad_page_contract {
+ Update comments for one registration.
+
+ @param reg_id the registration whose comments we're updating
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id reg-comments.tcl,v 3.6.6.4 2000/09/22 01:37:39 kevin Exp
+} {
+ {reg_id:integer,notnull}
+}
+
+
+db_1row sel_comments "
+ select r.comments, p.event_id, r.reg_date, u.first_names, u.last_name
+ from events_registrations r, events_events e, users u, events_prices p
+ where p.event_id = e.event_id
+ and u.user_id = r.user_id
+ and r.reg_id = $reg_id
+ and p.price_id = r.price_id
+"
+
+append whole_page "
+ [ad_header "Add/Edit Comments Regarding Registration #$reg_id"]
+Add/Edit Comments Regarding Registration #$reg_id
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] "Registration"]
+
+
+Comments
+
+on this order from $first_names $last_name on $reg_date for
+[events_event_name $event_id]
+
+
+[ad_footer]
+"
+
+
+doc_return 200 text/html $whole_page
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/reg-view.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-view.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-view.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,78 @@
+
+@title@
+@context@
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/reg-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-view.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-view.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,70 @@
+# events/www/order-check.tcl
+
+ad_page_contract {
+ Allows users to check the status of an order/registration
+
+ @param reg_id The registration to check
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @creation date 2002-11-10
+} {
+ {reg_id:naturalnum,notnull}
+} -validate {
+ registration_exists_p -requires {reg_id} {
+ if { ![events::registration::exists_p -reg_id $reg_id] } {
+ ad_complain "We could not find the registration you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+events::registration::get -reg_id $reg_id -array reg_info
+events::event::get -event_id $reg_info(event_id) -array event_info
+events::venue::get -venue_id $event_info(venue_id) -array venue_info
+events::event::get_stats -event_id $reg_info(event_id) -array event_stats
+
+set title "Registration \#$reg_id"
+set context [list [list "event?event_id=$reg_info(event_id)" "$event_info(name) in $venue_info(city)"] "Status of Registration"]
+
+set count_spotsremaining [expr $event_stats(max_people) - $event_stats(approved)]
+
+if { ![empty_string_p $event_stats(max_people)] && $count_spotsremaining == 0 } {
+ set max_approved t
+} else {
+ set max_approved f
+}
+
+
+
+form create reg_comments
+
+element create reg_comments reg_id \
+ -datatype integer \
+ -widget hidden \
+ -value $reg_id
+
+element create reg_comments comments \
+ -label "Reg. Comments:" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 65 rows 6 wrap soft} \
+ -optional \
+ -value $reg_info(comments)
+
+element create reg_comments submit \
+ -label "Update" \
+ -datatype text \
+ -widget submit
+
+if {[form is_submission reg_comments]} {
+ template::form get_values reg_comments comments reg_id
+
+ events::registration::edit_reg_comments \
+ -reg_id $reg_id \
+ -comments $comments
+
+ ad_returnredirect "reg-view?reg_id=$reg_id"
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/reg-view.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-view.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-view.xql 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,12 @@
+
+
+
+
+
+ select 1
+ from events_registrations
+ where reg_id = :reg_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/reg-waitlist.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/reg-waitlist.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/reg-waitlist.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,34 @@
+# events/www/admin/reg-approve.tcl
+ad_page_contract {
+
+ Approve a Registration.
+
+ @param reg_id the registration to cancel
+
+ @author Matthew Geddert (geddert@yahoo.com)
+ @creation date 2002-11-11
+
+} {
+ {reg_id:naturalnum,notnull}
+ {return_url ""}
+} -validate {
+ registration_exists_p -requires {reg_id} {
+ if { ![events::registration::exists_p -reg_id $reg_id] } {
+ ad_complain "We could not find the registration you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+events::registration::waiting -reg_id $reg_id
+
+if {![exists_and_not_null return_url]} {
+ set return_url "reg-view?reg_id=$reg_id"
+}
+
+
+ad_returnredirect $return_url
+ad_script_abort
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-add-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-add-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-add-oracle.xql 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,30 @@
+
+
+
+
+
+ select role || ' ' ||
+ decode(public_role_p, 't', ' (public role)', '') as public_role_p,
+ role_id
+ from events_organizer_roles
+ where role_id not in
+ (select role_id
+ from events_org_role_activity_map
+ where activity_id = :activity_id)
+
+
+
+
+
+ select role || ' ' ||
+ decode(public_role_p, 't', ' (public role)', '') as public_role_p,
+ role_id
+ from events_organizer_roles
+ where role_id not in
+ (select role_id
+ from events_org_role_event_map
+ where event_id = :event_id)
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-add-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-add-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-add-postgresql.xql 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+
+
+
+ select role || '' || CASE WHEN public_role_p THEN ' (public role)' ELSE '' END,
+ role_id
+ from events_organizer_roles
+ where role_id not in
+ (select role_id
+ from events_org_role_activity_map
+ where activity_id = :activity_id)
+
+
+
+
+
+ select role || '' || CASE WHEN public_role_p = 't' THEN ' (public role)' ELSE '' END,
+ role_id
+ from events_organizer_roles
+ where role_id not in
+ (select role_id
+ from events_org_role_event_map
+ where event_id = :event_id)
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-add.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-add.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,15 @@
+
+@title@
+@context_bar@
+
+Choose a role (or roles)
+
+
+
+
+If you do not see the role you wish to add above, you may add a new role
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-add.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-add.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,89 @@
+# File: events/www/admin/role-add.tcl
+
+ad_page_contract {
+ Allows admins to select from existing system roles
+
+ @param activity_id the field's activity
+ @param event_id the field's event
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: role-add.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {event_id ""}
+ {activity_id ""}
+ {role_ids:multiple ""}
+}
+
+if {[exists_and_not_null event_id]} {
+ set title "Add Organizer Roles"
+ set role_create "role-create?activity_id=$activity_id&event_id=$event_id"
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] \
+ [list "event?event_id=$event_id" "Event"] "Add Organizer Roles"]
+ set roles [db_list_of_lists select_available_event_roles {}]
+} else {
+ set title "Add Default Organizer Roles"
+ set role_create "role-create?activity_id=$activity_id"
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] "Add Default Organizer Roles"]
+ set roles [db_list_of_lists select_available_activity_roles {}]
+}
+
+if {[exists_and_not_null roles]} {
+ set roles_p t
+} else {
+ set roles_p f
+}
+
+form create role_add
+
+element create role_add activity_id \
+ -optional \
+ -widget hidden \
+ -datatype integer
+
+element create role_add event_id \
+ -optional \
+ -widget hidden \
+ -datatype integer
+
+element create role_add role_ids \
+ -label "Available Roles" \
+ -widget multiselect \
+ -datatype integer \
+ -help_text "Select multiple roles by holding down the Control key" \
+ -options $roles
+
+element create role_add submit \
+ -label "Add roles" \
+ -datatype text \
+ -widget submit
+
+if {[template::form is_valid role_add]} {
+
+ if {[exists_and_not_null event_id]} {
+ foreach role_id $role_ids {
+ events::organizer::map_role -event_id $event_id -role_id $role_id
+ }
+ set redirect_url "event?event_id=$event_id"
+ } else {
+ foreach role_id $role_ids {
+ events::organizer::map_role -activity_id $activity_id -role_id $role_id
+ }
+ set redirect_url "activity?activity_id=$activity_id"
+ }
+
+ ad_returnredirect $redirect_url
+ ad_script_abort
+
+}
+
+if {[exists_and_not_null event_id]} {
+ element set_properties role_add activity_id -value $activity_id
+ element set_properties role_add event_id -value $event_id
+} else {
+ element set_properties role_add activity_id -value $activity_id
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/role-create.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-create.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-create.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,10 @@
+
+@title@
+@context_bar@
+
+Role Description
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-create.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-create.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-create.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,142 @@
+#/packages/events/www/admin/role-create.tcl
+
+ad_page_contract {
+
+ Create an org role
+
+ @param activity_id the activity in question
+ @param event_id the event in question
+ @param role_id the role which we're to edit
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: role-create.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {activity_id:naturalnum,optional}
+ {event_id:naturalnum,optional}
+}
+
+if {[exists_and_not_null event_id]} {
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] \
+ [list "event?event_id=$event_id" "Event"] "New Organizer Role"]
+ set title "Add a New Organizer Role"
+} elseif {[exists_and_not_null activity_id]} {
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] "New Default Organizer Role"]
+ set title "Add a New Default Organizer Role"
+} else {
+ set context_bar [ad_context_bar [list "roles" "Roles"] "New Organizer Role"]
+ set title "Add a New Organizer Role"
+}
+
+form create organizer_role
+
+element create organizer_role activity_id \
+ -datatype integer \
+ -widget hidden \
+ -optional
+
+element create organizer_role event_id \
+ -datatype integer \
+ -widget hidden \
+ -optional
+
+element create organizer_role role \
+ -label "Role" \
+ -datatype text \
+ -widget text \
+ -html {size 20} \
+ -required
+
+element create organizer_role responsibilities \
+ -label "Responsibilities" \
+ -datatype text \
+ -widget textarea \
+ -optional \
+ -html {cols 70 rows 10 wrap soft}
+
+element create organizer_role public_role_p \
+ -label "Public Role?" \
+ -datatype text \
+ -widget select \
+ -options {{No f} {Yes t}}
+
+if {[exists_and_not_null event_id]} {
+ element create organizer_role user_id \
+ -label "User in this role" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::organizer::users_get_options] \
+ -optional \
+ -search_query {
+ select distinct u.first_names || ' ' || u.last_name as name, u.user_id
+ from cc_users u
+ where upper(decode(u.first_names,' ', '') || decode(u.last_name,' ', '') || u.email || ' ' || decode(u.screen_name, ' ', '')) like upper('%'||:value||'%')
+ order by name
+ }
+
+ element create organizer_role submit \
+ -label "Add a Role" \
+ -datatype text \
+ -widget submit
+
+} else {
+ element create organizer_role submit \
+ -label "Add a Default Role" \
+ -datatype text \
+ -widget submit
+
+}
+
+if {[template::form is_submission organizer_role]} {
+
+ if {[exists_and_not_null event_id]} {
+ # create role and map to event_id
+ set redirect_url "event?event_id=$event_id"
+ template::form get_values organizer_role \
+ role responsibilities public_role_p user_id
+ set role_id [events::organizer::new_role \
+ -role $role \
+ -responsibilities $responsibilities \
+ -public_role_p $public_role_p]
+ events::organizer::map_role -role_id $role_id -event_id $event_id
+ if {[exists_and_not_null user_id]} {
+ # add organizer while we're at it
+ events::organizer::add_organizer -role_id $role_id \
+ -party_id $user_id -event_id $event_id
+ }
+ } elseif {[exists_and_not_null activity_id]} {
+ # create role and map to activity_id
+ set redirect_url "activity?activity_id=$activity_id"
+ template::form get_values organizer_role \
+ role responsibilities public_role_p
+ set role_id [events::organizer::new_role \
+ -role $role \
+ -responsibilities $responsibilities \
+ -public_role_p $public_role_p]
+ events::organizer::map_role -role_id $role_id -activity_id $activity_id
+ } else {
+ # no event/activity association; just create the role
+ set redirect_url "roles"
+ template::form get_values organizer_role role public_role_p responsibilities
+ events::organizer::new_role \
+ -role $role \
+ -responsibilities $responsibilities \
+ -public_role_p $public_role_p
+ }
+
+ ad_returnredirect $redirect_url
+ ad_script_abort
+}
+
+if {[exists_and_not_null event_id]} {
+ element set_properties organizer_role event_id -value $event_id
+ element set_properties organizer_role user_id -value ""
+} elseif {[exists_and_not_null activity_id]} {
+ element set_properties organizer_role activity_id -value $activity_id
+}
+
+ad_return_template
+
Index: openacs-4/contrib/packages/events/www/admin/role-delete.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-delete.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-delete.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,10 @@
+
+@title@
+@context_bar@
+
+@question@
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-delete.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-delete.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,50 @@
+# File: events/www/admin/role-delete.tcl
+
+ad_page_contract {
+ Allows admins to confirm the removal of a role
+
+ @param role_id the id of the role
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: role-delete.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {role_id:naturalnum,notnull}
+}
+
+events::organizer::get_role -role_id $role_id -array role_info
+
+set title "Delete Role?"
+
+set context_bar [ad_context_bar [list "roles" Roles] [list "role?role_id=$role_id" Role] "Delete Role"]
+
+set question "Delete role from system?"
+
+form create role_delete
+
+element create role_delete role \
+ -label "Role name" \
+ -datatype text \
+ -widget inform \
+ -value $role_info(role)
+
+element create role_delete role_id \
+ -label "Role" \
+ -datatype integer \
+ -widget hidden \
+ -value $role_id
+
+element create role_delete submit \
+ -label "Delete role" \
+ -datatype text \
+ -widget submit
+
+if {[template::form is_valid role_delete]} {
+ events::organizer::delete_role \
+ -role_id $role_id
+
+ ad_returnredirect roles
+ ad_script_abort
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/role-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-edit.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-edit.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,10 @@
+
+@title@
+@context_bar@
+
+Role Description
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-edit.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-edit.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,110 @@
+#/packages/events/www/admin/role-edit.tcl
+
+ad_page_contract {
+
+ Edit an org role for either an event or an activity
+
+ @param activity_id the activity in question
+ @param event_id the event in question
+ @param role_id the role which we're to edit
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: role-edit.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {role_id:naturalnum,notnull}
+ {event_id:naturalnum,optional}
+ {activity_id:naturalnum,optional}
+}
+
+events::organizer::get_role -role_id $role_id -array org_role_info
+
+form create organizer_role
+
+if {[exists_and_not_null event_id]} {
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] \
+ [list "event?event_id=$event_id" "Event"] "Edit Organizer Role"]
+ set title "Edit Organizer Role"
+} elseif {[exists_and_not_null activity_id]} {
+ set context_bar [ad_context_bar [list "activities" "Activities"] \
+ [list "activity?activity_id=$activity_id" "Activity"] "Edit Organizer Role"]
+ set title "Edit Default Activity Organizer Role"
+} else {
+ set context_bar [ad_context_bar [list "roles" "Roles"] \
+ [list "one-role?role_id=$role_id" "One Role"] "Edit Organizer Role"]
+ set title "Edit Organizer Role"
+}
+
+element create organizer_role activity_id \
+ -datatype integer \
+ -widget hidden \
+ -optional
+
+element create organizer_role event_id \
+ -datatype integer \
+ -widget hidden \
+ -optional
+
+element create organizer_role role_id \
+ -datatype integer \
+ -widget hidden \
+ -value $role_id
+
+element create organizer_role role \
+ -label "Role" \
+ -datatype text \
+ -widget text \
+ -html {size 20} \
+ -required
+
+element create organizer_role responsibilities \
+ -label "Responsibilities" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 70 rows 10 wrap soft}
+
+
+element create organizer_role public_role_p \
+ -label "Public Role?" \
+ -datatype text \
+ -widget select \
+ -options {{No f} {Yes t}}
+
+if {[template::form is_valid organizer_role]} {
+ template::form get_values organizer_role \
+ role_id role responsibilities public_role_p event_id
+
+ if {[exists_and_not_null event_id]} {
+ set redirect_url "event?event_id=$event_id"
+ } elseif {[exists_and_not_null activity_id]} {
+ set redirect_url "activity?activity_id=$activity_id"
+ } else {
+ set redirect_url "one-role?role_id=$role_id"
+ }
+
+ events::organizer::edit_role \
+ -role_id $role_id \
+ -role $role \
+ -responsibilities $responsibilities \
+ -public_role_p $public_role_p
+
+ ad_returnredirect $redirect_url
+ ad_script_abort
+}
+
+element set_properties organizer_role role -value $org_role_info(role)
+element set_properties organizer_role responsibilities -value $org_role_info(responsibilities)
+element set_properties organizer_role public_role_p -value $org_role_info(public_role_p)
+
+if {[exists_and_not_null event_id]} {
+ element set_properties organizer_role event_id -value $event_id
+} elseif {[exists_and_not_null activity_id]} {
+ element set_properties organizer_role activity_id -value $activity_id
+}
+
+ad_return_template
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-remove.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-remove.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-remove.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,10 @@
+
+@title@
+@context_bar@
+
+@question@
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/role-remove.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/role-remove.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/role-remove.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,89 @@
+# File: events/www/admin/activity-field-delete.tcl
+
+ad_page_contract {
+ Allows admins to confirm the removal of a role
+ associated with the selected activity/event
+
+ @param activity_id the field's activity
+ @param event_id the field's event
+ @param attribute_name the name of the field's table column
+ @param attribute_id the name of the field's table column
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: role-remove.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {event_id ""}
+ {activity_id ""}
+ {role_id:integer}
+}
+
+events::organizer::get_role -role_id $role_id -array role_info
+
+if {[exists_and_not_null event_id]} {
+ events::event::get -event_id $event_id -array info
+ set title "Remove Role from Event?"
+ set context_bar [ad_context_bar [list "activities" Activities] [list "event?event_id=$event_id" Event] "Remove Role"]
+} else {
+ events::activity::get -activity_id $activity_id -array info
+ set title "Remove Role from Activity?"
+ set context_bar [ad_context_bar [list "activities" Activities] [list "activity?activity_id=$activity_id" Activity] "Remove Role"]
+}
+
+set question "Remove role from $info(name)?"
+
+form create role_remove
+
+element create role_remove activity_id \
+ -datatype integer \
+ -optional \
+ -widget hidden
+
+element create role_remove event_id \
+ -datatype integer \
+ -optional \
+ -widget hidden
+
+element create role_remove role \
+ -label "Role name" \
+ -datatype text \
+ -widget inform \
+ -value $role_info(role)
+
+element create role_remove role_id \
+ -label "Role" \
+ -datatype integer \
+ -widget hidden \
+ -value $role_id
+
+element create role_remove submit \
+ -label "Remove role" \
+ -datatype text \
+ -widget submit
+
+if {[template::form is_valid role_remove]} {
+ template::form get_values role_remove role_id
+ if {[exists_and_not_null event_id]} {
+ set redirect_url "event?event_id=$event_id"
+ events::organizer::unmap_role \
+ -event_id $event_id \
+ -role_id $role_id
+ } else {
+ set redirect_url "activity?activity_id=$activity_id"
+ events::organizer::unmap_role \
+ -activity_id $activity_id \
+ -role_id $role_id
+ }
+
+ ad_returnredirect $redirect_url
+ ad_script_abort
+}
+
+if {[exists_and_not_null event_id]} {
+ element set_properties role_remove activity_id -value $activity_id
+ element set_properties role_remove event_id -value $event_id
+} else {
+ element set_properties role_remove activity_id -value $activity_id
+}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/roles-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/roles-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/roles-oracle.xql 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,13 @@
+
+
+
+
+
+ select role, role_id,
+ decode(public_role_p, 't', ' (public role)', '') as public_role_p
+ from events_organizer_roles
+ order by role asc
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/roles-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/roles-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/roles-postgresql.xql 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+
+
+ select role, role_id, public_role_p,
+ CASE when public_role_p = 't' then ' (public role)'
+ ELSE ''
+ END
+ from events_organizer_roles
+ order by role asc
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/roles.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/roles.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/roles.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,24 @@
+
+Roles
+@context_bar@
+
+
+
+Event Roles
+
+
+
+
+
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/roles.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/roles.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/roles.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,19 @@
+# events/www/admin/roles.tcl
+ad_page_contract {
+ Displays a list of roles
+ Details for specific roles are one click deep.
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: roles.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+
+} {
+} -properties {
+ roles:multirow
+}
+
+set context_bar [ad_context_bar Roles]
+
+db_multirow roles select_roles {}
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/send-mail.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/send-mail.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/send-mail.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,6 @@
+
+
+@title@
+@context@
+
+
Index: openacs-4/contrib/packages/events/www/admin/send-mail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/send-mail.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/send-mail.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,299 @@
+# events/www/admin/send-mail.tcl
+
+ad_page_contract {
+
+ this page allows you to sending email in bulk to event or activity registrants,
+ it relies on the bulk-mail package
+
+ @param activty_id
+ @param event_id
+ @param return_url
+
+ @author Matthew Geddert
+ @creation date 2002-11-01
+ @cvs-id $Id: send-mail.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {activity_id:integer,optional}
+ {event_id:integer,optional}
+ {group ""}
+ {return_url ""}
+}
+
+# first, lets make sure they have bulk-mail installed.
+if { ![apm_package_installed_p bulk-mail] } {
+ ad_return_warning "Bulk-Mail is not installed" "Sending email message in bulk relies on bulk mail,
+ please see your webmaster to see if he/she can install it for you."
+}
+
+set user_id [ad_conn user_id]
+
+if {[exists_and_not_null event_id]} {
+ if {[exists_and_not_null activity_id]} {
+ ad_return_warning "Both Variables Cannot Be Specified" "You must either specify Event_id or Activity_id, not both at the same time."
+ }
+ if { ![events::event::exists_p -event_id $event_id] } {
+ ad_return_warning "Event doesn't exist" "We couldn't find the event you asked for."
+ }
+} else {
+ if {[exists_and_not_null activity_id]} {
+ if { ![events::activity::exists_p -activity_id $activity_id] } {
+ ad_return_warning "Activity doesn't exist" "We couldn't find the activity you asked for."
+ }
+ } else {
+ ad_return_warning "You must supply a variable" "You must either specify Event_id or Activity_id."
+ }
+}
+
+
+if {[exists_and_not_null event_id]} {
+ # we are sending a message to folks involved with a particular event
+ events::event::get -event_id $event_id -array event_info
+
+ set title "Send Mail to $event_info(name) [string totitle $group]"
+ set context [list [list "activities" Activities] [list "activity?activity_id=$event_info(activity_id)" $event_info(name)] [list "event?event_id=$event_id" "$event_info(city)"] "Send Mail"]
+
+ form create send-bulk-mail
+
+ element create send-bulk-mail event_id \
+ -datatype integer \
+ -widget hidden \
+ -value $event_id
+
+ element create send-bulk-mail return_url \
+ -datatype text \
+ -widget hidden \
+ -value $return_url
+
+ db_1row select_event_from_addr_count {}
+ db_1row select_my_email_address {}
+
+ if {[string compare $from_addr_count "1"] == 0} {
+
+ element create send-bulk-mail from_addr \
+ -label "Send Mail From" \
+ -datatype text \
+ -widget inform \
+ -value $from_addr
+
+ } else {
+
+ element create send-bulk-mail from_addr \
+ -label "Send Mail From" \
+ -datatype text \
+ -widget select \
+ -options [db_list_of_lists select_event_from_addr {}] \
+ -value $from_addr
+ }
+
+ # are we sending mail to registrants or organizers?
+ switch $group {
+ registrants {
+ element create send-bulk-mail to \
+ -label "Send Mail To" \
+ -datatype text \
+ -widget radio \
+ -options { {{All Approved, Waitlisted, and Pending Registrants} all}
+ {{Approved Registrants} approved}
+ {{Waitlisted Registrants} waiting}
+ {{Pending Registrants} pending}
+ }
+ }
+ organizers {
+ element create send-bulk-mail to \
+ -datatype text \
+ -widget hidden \
+ -value "organizers"
+ }
+ }
+
+ element create send-bulk-mail subject \
+ -label "Message Subject" \
+ -datatype text \
+ -widget text \
+ -html {size 50} \
+ -value "$event_info(name) on $event_info(timespan)"
+
+ element create send-bulk-mail message \
+ -label "Enter Message" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 60 rows 8 wrap soft}
+
+ element create send-bulk-mail submit \
+ -label "Send Message" \
+ -datatype text \
+ -widget submit
+
+ if {[template::form is_valid send-bulk-mail]} {
+ template::form get_values send-bulk-mail event_id return_url from_addr to subject message
+
+ set query ""
+
+ switch $to {
+ all {
+ set query [db_map select_all_event_registrants]
+ }
+ approved {
+ set query [db_map select_event_reg_state_registrants]
+ }
+ waiting {
+ set query [db_map select_event_reg_state_registrants]
+ }
+ pending {
+ set query [db_map select_event_reg_state_registrants]
+ }
+ organizers {
+ set query [db_map select_event_organizers]
+ }
+ }
+
+ ns_log notice "EVENTS-MAIL-EVENT-REGS: $query"
+
+ bulk_mail::new \
+ -from_addr $from_addr \
+ -subject $subject \
+ -message $message \
+ -query $query
+
+ if {![exists_and_not_null return_url]} {
+ set return_url "event?event_id=$event_id"
+ }
+
+ ad_returnredirect $return_url
+ ad_script_abort
+ }
+}
+
+
+
+
+if {[exists_and_not_null activity_id]} {
+# we are sending a message to everybody involved with an activity
+ events::activity::get -activity_id $activity_id -array activity_info
+
+ set title "Send Mail To The $activity_info(name) Activity Registrants"
+ set context [list [list "activities" Activities] [list "activity?activity_id=$activity_id" $activity_info(name)] "Send Mail"]
+
+ form create send-bulk-mail
+
+ element create send-bulk-mail activity_id \
+ -datatype integer \
+ -widget hidden \
+ -value $activity_id
+
+ element create send-bulk-mail return_url \
+ -datatype text \
+ -widget hidden \
+ -value $return_url
+
+ db_1row select_activity_from_addr_count {}
+ db_1row select_my_email_address {}
+
+ if {[string compare $from_addr_count "1"] == 0} {
+
+ element create send-bulk-mail from_addr \
+ -label "Send Mail From" \
+ -datatype text \
+ -widget inform \
+ -value $from_addr
+
+ } else {
+
+ element create send-bulk-mail from_addr \
+ -label "Send Mail From" \
+ -datatype text \
+ -widget select \
+ -options [db_list_of_lists select_activity_from_addr {}] \
+ -value $from_addr
+ }
+
+ element create send-bulk-mail to \
+ -label "Send Mail To" \
+ -datatype text \
+ -widget radio \
+ -options { {{All Approved, Waitlisted, and Pending Registrants} all}
+ {{Approved Registrants} approved}
+ {{Waitlisted Registrants} waiting}
+ {{Pending Registrants} pending}
+ }
+
+ element create send-bulk-mail time \
+ -label "Registered For" \
+ -datatype text \
+ -widget select \
+ -options { {{All Past and Future Events} all}
+ {{Future Events} future}
+ {{Past Events} past}
+ } \
+ -value future
+
+
+ element create send-bulk-mail subject \
+ -label "Message Subject" \
+ -datatype text \
+ -widget text \
+ -html {size 50} \
+ -value "$activity_info(name)"
+
+ element create send-bulk-mail message \
+ -label "Enter Message" \
+ -datatype text \
+ -widget textarea \
+ -html {cols 60 rows 8 wrap soft}
+
+ element create send-bulk-mail submit \
+ -label "Send Message" \
+ -datatype text \
+ -widget submit
+
+ if {[template::form is_valid send-bulk-mail]} {
+ template::form get_values send-bulk-mail activity_id return_url from_addr to time subject message
+
+ set query ""
+
+ switch $time {
+ all {
+ if {[string compare $to "all"] == 0} {
+ set query [db_map select_activity_all_all]
+ } else {
+ set query [db_map select_activity_reg_state_all]
+ }
+ }
+ future {
+ if {[string compare $to "all"] == 0} {
+ set query [db_map select_activity_all_future]
+ } else {
+ set query [db_map select_activity_reg_state_future]
+ }
+ }
+ past {
+ if {[string compare $to "all"] == 0} {
+ set query [db_map select_activity_all_past]
+ } else {
+ set query [db_map select_activity_reg_state_past]
+ }
+ }
+ }
+
+ ns_log notice "EVENTS-MAIL-ACTIVITY-REGS: $query"
+
+ set package_id [ad_conn package_id]
+
+ bulk_mail::new \
+ -package_id $package_id \
+ -from_addr $from_addr \
+ -subject $subject \
+ -message $message \
+ -query $query
+
+ if {![exists_and_not_null return_url]} {
+ set return_url "activity?activity_id=$activity_id"
+ }
+
+ ad_returnredirect $return_url
+ ad_script_abort
+ }
+}
+
+
+ad_return_template
Index: openacs-4/contrib/packages/events/www/admin/send-mail.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/send-mail.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/send-mail.xql 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,208 @@
+
+
+
+
+
+ select count(*) as from_addr_count
+ from parties pa,
+ events_activities ea
+ where ea.default_contact_user_id = pa.party_id
+ and ea.activity_id = :activity_id
+ or pa.party_id = :user_id
+
+
+
+
+
+ select CASE WHEN ea.default_contact_user_id = pa.party_id AND ea.default_contact_user_id <> :user_id THEN pa.email || ' (the default contact for this activity)'
+ ELSE pa.email END as from_addr, pa.email
+ from parties pa,
+ events_activities ea
+ where ea.default_contact_user_id = pa.party_id
+ and ea.activity_id = :activity_id
+ or pa.party_id = :user_id
+
+
+
+
+
+ select count(*) as from_addr_count
+ from parties pa,
+ events_events ee
+ where ee.contact_user_id = pa.party_id
+ and ee.event_id = :event_id
+ or pa.party_id = :user_id
+
+
+
+
+
+ select CASE WHEN ee.contact_user_id = pa.party_id AND ee.contact_user_id <> :user_id THEN pa.email || ' (the default contact for this event)'
+ ELSE pa.email END as from_addr, pa.email
+ from parties pa,
+ events_events ee
+ where ee.contact_user_id = pa.party_id
+ and ee.event_id = :event_id
+ or pa.party_id = :user_id
+
+
+
+
+
+ select email as from_addr
+ from parties
+ where party_id = :user_id
+
+
+
+
+
+ select pa.email
+ from parties pa,
+ events_registrations er
+ where er.user_id = pa.party_id
+ and er.reg_state <> 'canceled'
+ and event_id = '$event_id'
+
+
+
+
+
+ select pa.email
+ from parties pa,
+ events_registrations er
+ where er.user_id = pa.party_id
+ and er.reg_state = '$to'
+ and event_id = '$event_id'
+
+
+
+
+
+ select pa.email
+ from parties pa,
+ events_organizers eo
+ where eo.user_id = pa.party_id
+ and eo.event_id = '$event_id'
+
+
+
+
+
+ select pa.email
+ from events_registrations er,
+ parties pa,
+ acs_events ae,
+ timespans s,
+ time_intervals t,
+ dual
+ where er.user_id = pa.party_id
+ and ae.activity_id = '$activity_id'
+ and ae.event_id = er.event_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and er.reg_state = '$to'
+ and t.start_date > sysdate
+ group by pa.email
+
+
+
+
+
+ select pa.email
+ from events_registrations er,
+ parties pa,
+ acs_events ae,
+ timespans s,
+ time_intervals t,
+ dual
+ where er.user_id = pa.party_id
+ and ae.activity_id = '$activity_id'
+ and ae.event_id = er.event_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and er.reg_state <> 'canceled'
+ and t.start_date > sysdate
+ group by pa.email
+
+
+
+
+
+ select pa.email
+ from events_registrations er,
+ parties pa,
+ acs_events ae,
+ timespans s,
+ time_intervals t,
+ dual
+ where er.user_id = pa.party_id
+ and ae.activity_id = '$activity_id'
+ and ae.event_id = er.event_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and er.reg_state <> 'canceled'
+ and t.start_date < sysdate
+ group by pa.email
+
+
+
+
+
+ select pa.email
+ from events_registrations er,
+ parties pa,
+ acs_events ae,
+ timespans s,
+ time_intervals t,
+ dual
+ where er.user_id = pa.party_id
+ and ae.activity_id = '$activity_id'
+ and ae.event_id = er.event_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and er.reg_state = '$to'
+ and t.start_date < sysdate
+ group by pa.email
+
+
+
+
+
+ select pa.email
+ from events_registrations er,
+ parties pa,
+ acs_events ae,
+ timespans s,
+ time_intervals t,
+ dual
+ where er.user_id = pa.party_id
+ and ae.activity_id = '$activity_id'
+ and ae.event_id = er.event_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and er.reg_state = '$to'
+ group by pa.email
+
+
+
+
+
+ select pa.email
+ from events_registrations er,
+ parties pa,
+ acs_events ae,
+ timespans s,
+ time_intervals t,
+ dual
+ where er.user_id = pa.party_id
+ and ae.activity_id = '$activity_id'
+ and ae.event_id = er.event_id
+ and ae.timespan_id = s.timespan_id
+ and s.interval_id = t.interval_id
+ and er.reg_state <> 'canceled'
+ group by pa.email
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/spam-selected-events.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/spam-selected-events.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/spam-selected-events.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,177 @@
+# File: events/admin/spam-selected-events.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: Select events to spam.
+#####
+
+#perhaps orderby
+#perhaps event_id if we only want to spam one event
+
+ad_page_contract {
+ Select events to spam.
+
+ @param orderby order param for ad_table
+ @param event_id optionally, the event to spam if we only want to spam one event
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id spam-selected-events.tcl,v 3.16.2.5 2000/09/22 01:37:40 kevin Exp
+} {
+ {orderby "short_name"}
+ {event_id:integer,optional}
+}
+
+set admin_id [ad_maybe_redirect_for_registration]
+
+if {![exists_and_not_null orderby]} {
+ set orderby "short_name"
+}
+
+
+set whole_page ""
+append whole_page "[ad_header "Spam Selected Events"]"
+
+append whole_page "
+ Spam Selected Events
+[ad_context_bar_ws [list "index.tcl" "Events Administration"] "Spam Selected Events"]
+ "
+
+if {[exists_and_not_null event_id]} {
+ set event_sql_filter "and event_id = $event_id"
+
+ #the table definition for ad_table
+ set table_def {
+ {check_box "" {no_sort} { }}
+ {short_name "Activity" {upper_name $order} {$short_name }}
+ {city "Location" {upper_city $order} {$city, $big_location }}
+ {start_time "Start" {} {[util_AnsiDatetoPrettyDate $start_time] }}
+ {end_time "End" {} {[util_AnsiDatetoPrettyDate $end_time] }}
+ }
+
+} else {
+ #this is for stuffing into the spam module
+ set sql_post_select "select distinct
+ users.email, users.user_id, users.email_type
+ from users_spammable users, events_reg_not_canceled r
+ where users.user_id = r.user_id
+ and r.reg_id not in
+ (select distinct r.reg_id
+ from events_registrations r,events_activities a, events_events e,
+ events_prices p
+ where p.event_id = e.event_id
+ and e.activity_id = a.activity_id
+ and p.price_id = r.price_id
+ and a.group_id not in
+ (select distinct group_id
+ from user_group_map
+ where user_id = $admin_id) )
+ order by users.user_id
+ "
+ append whole_page "
+ Select the event(s) whose registrants you would like to spam
+ or
+
+ [export_form_vars sql_post_select]
+
+
+ "
+
+ #the table definition for ad_table
+ set table_def {
+ {check_box "" {no_sort} { }}
+ {short_name "Activity" {upper_name $order} {$short_name }}
+ {city "Location" {upper_city $order} {$city, $big_location }}
+ {start_time "Start" {} {[util_AnsiDatetoPrettyDate $start_time] }}
+ {end_time "End" {} {[util_AnsiDatetoPrettyDate $end_time] }}
+ }
+
+ set event_sql_filter ""
+}
+
+append whole_page "
+
+[philg_hidden_input spam_selected_events 1]
+"
+
+if {![exists_and_not_null state_filter]} {
+ set state_filter "all"
+}
+
+#dimensional filter for which conferences to show
+set dimensional {
+ {state_filter "Show Events Starting in the:" all {
+ {last_month "Last Month" {where "start_time > sysdate - 32 and start_time <= sysdate"}}
+ {last_6_months "Last 6 Months" {where "start_time > sysdate - 187 and start_time <= sysdate"}}
+ {last_year "Last Year" {where "start_time > sysdate - 366 and start_time <= sysdate"}}
+ {future "Future" {where "start_time > sysdate"}}
+ {all "All" {}}
+ }
+ }
+}
+
+
+#the columns for ad_table
+set col [list check_box short_name city start_time end_time]
+
+set sql "select
+upper(a.short_name) as upper_name, upper(v.city) as upper_city,
+e.event_id, e.start_time, e.end_time,
+v.city,
+decode(v.iso, 'us', v.usps_abbrev, cc.country_name) as big_location,
+a.short_name
+from events_activities a, events_events e, events_venues v,
+country_codes cc,
+user_groups ug, user_group_map ugm
+where a.activity_id = e.activity_id
+and a.group_id = ugm.group_id
+and ugm.group_id = ug.group_id
+and ugm.user_id = :admin_id
+and v.venue_id = e.venue_id
+and cc.iso = v.iso
+$event_sql_filter
+[ad_dimensional_sql $dimensional where]
+union
+select
+upper(a.short_name) as upper_name, upper(v.city) as upper_city,
+e.event_id, e.start_time, e.end_time,
+v.city,
+decode(v.iso, 'us', v.usps_abbrev, cc.country_name) as big_location,
+a.short_name
+from events_activities a, events_events e, events_venues v,
+country_codes cc
+where a.activity_id = e.activity_id
+and a.group_id is null
+and v.venue_id = e.venue_id
+and cc.iso = v.iso
+$event_sql_filter
+[ad_dimensional_sql $dimensional where]
+[ad_order_by_from_sort_spec $orderby $table_def]
+"
+
+set bind_vars [ad_tcl_vars_to_ns_set admin_id]
+
+append whole_page "
+[ad_dimensional $dimensional]
+
+[ad_table -bind $bind_vars -Tcolumns $col -Tmissing_text "There are no current events to display " -Torderby $orderby sel_events $sql $table_def]
+"
+
+append whole_page "
+
+Do you want to spam:
+
+ Confirmed Registrants
+ Pending Registrants
+ Wait-Listed Registrants
+ All Registrants
+"
+
+## clean up, return page
+
+append whole_page "
+
+
+[ad_footer]"
+
+
+
+doc_return 200 text/html $whole_page
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/venue-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venue-delete.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venue-delete.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,35 @@
+# events/www/admin/venue-delete.tcl
+
+ad_page_contract {
+ deletes a venue
+
+ @param venue_id the venue to be deleted
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: venue-delete.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {venue_id:integer,notnull}
+} -validate {
+ exists_p -requires {venue_id} {
+ if { ![events::venue::exists_p -venue_id $venue_id] } {
+ ad_complain "We couldn't find the venue you specified."
+ return 0
+ }
+ return 1
+ }
+ in_use_p -requires {venue_id} {
+ if { [events::venue::in_use_p -venue_id $venue_id] } {
+ ad_complain "This venue is being
+ used by one or more events. You cannot delete this
+ venue unless no events are located there."
+ return 0
+ }
+ return 1
+ }
+}
+
+events::venue::delete -venue_id $venue_id
+
+ad_returnredirect "venues"
+
Index: openacs-4/contrib/packages/events/www/admin/venues-ae.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-ae.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues-ae.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,14 @@
+
+@title@
+@context@
+
+Venue Description
+
+
+
+
+
+
+Delete this Venue
+
+
Index: openacs-4/contrib/packages/events/www/admin/venues-ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-ae.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues-ae.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,159 @@
+# events/www/admin/venues-ae.tcl
+
+ad_page_contract {
+ Add or edit a venue.
+
+ @param venue_id the venue if we're editing a venue
+ @param return_url the return url if we're adding a venue
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: venues-ae.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ venue_id:integer,optional
+ {return_url:optional}
+} -properties {
+ title:onevalue
+ context:onevalue
+ in_use_p:onevalue
+}
+
+set tz_list [db_list_of_lists get_timezones "select tz, tz_id from timezones order by tz"]
+set tz_list [linsert $tz_list 0 ""]
+
+set iso_list [db_list_of_lists get_isos "select default_name, iso from countries order by default_name"]
+
+ad_form -name venues_ae -export {return_url} -form {
+
+venue_id:key
+
+{venue_name:text(text)
+ {label "Venue Name"}
+ {html {size 20}}}
+
+{address1:text(text)
+ {label "Address 1"}
+ {html {size 50}}
+ optional}
+
+{address2:text(text)
+ {label "Address 2"}
+ {html {size 50}}
+ optional}
+
+{city:text(text)
+ {label "City"}
+ {html {size 50}}
+ optional}
+
+{usps_abbrev:text(text)
+ {label "State"}
+ {html {size 2}}
+ optional}
+
+{postal_code:text(text)
+ {label "Postal Code"}
+ {html {size 20}}
+ optional}
+
+{time_zone:text(select)
+ {label "Time Zone"}
+ {options $tz_list}
+ optional}
+
+{iso:text(select)
+ {label "Country"}
+ {options $iso_list}}
+
+{phone_number:text(text)
+ {label "Phone Number"}
+ {html {size 30}}
+ optional}
+
+{fax_number:text(text)
+ {label "Fax Number"}
+ {html {size 30}}
+ optional}
+
+{email:text(text)
+ {label "Email"}
+ {html {size 30}}
+ optional}
+
+{max_people:integer(text)
+ {label "Maximum Capacity"}
+ {html {size 20}}
+ optional}
+
+{needs_reserve_p:text(select)
+ {label "Needs Reservation"}
+ {options {{No f} {Yes t}}}}
+
+{description:text(textarea)
+ {label "Description"}
+ {html {cols 70 rows 8 wrap soft}}
+ {help_text "Include directions"}}
+
+} -select_query_name select_venue -validate {
+
+} -new_data {
+ set package_id [ad_conn package_id]
+ set venue_id [events::venue::new -venue_id $venue_id \
+ -package_id $package_id \
+ -venue_name $venue_name \
+ -address1 $address1 \
+ -address2 $address2 \
+ -city $city \
+ -usps_abbrev $usps_abbrev \
+ -postal_code $postal_code \
+ -time_zone $time_zone \
+ -iso $iso \
+ -phone_number $phone_number \
+ -fax_number $fax_number \
+ -email $email \
+ -needs_reserve_p $needs_reserve_p \
+ -max_people $max_people \
+ -description $description ]
+
+} -edit_data {
+
+ events::venue::edit -venue_id $venue_id \
+ -venue_name $venue_name \
+ -address1 $address1 \
+ -address2 $address2 \
+ -city $city \
+ -usps_abbrev $usps_abbrev \
+ -postal_code $postal_code \
+ -time_zone $time_zone \
+ -iso $iso \
+ -phone_number $phone_number \
+ -fax_number $fax_number \
+ -email $email \
+ -needs_reserve_p $needs_reserve_p \
+ -max_people $max_people \
+ -description $description
+
+} -after_submit {
+
+ if {[exists_and_not_null return_url]} {
+ ad_returnredirect "$return_url&venue_id=$venue_id"
+ } else {
+ ad_returnredirect "venues"
+ }
+ ad_script_abort
+}
+
+if { ![ad_form_new_p -key venue_id] } {
+ set title "Update a Venue"
+ set context [ad_context_bar [list "venues" "Venues"] " Edit Venue"]
+ set in_use_p [events::venue::in_use_p -venue_id $venue_id]
+} else {
+ set title "Add a New Venue"
+ set context [ad_context_bar [list "venues" "Venues"] " New Venue"]
+ set in_use_p 1
+ element set_value venues_ae iso "US"
+}
+
+ad_return_template
+
+
Index: openacs-4/contrib/packages/events/www/admin/venues-ae.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-ae.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues-ae.xql 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,14 @@
+
+
+
+
+
+ select venue_name, address1, address2, city, usps_abbrev, postal_code, iso,
+ time_zone, phone_number, fax_number, email,
+ needs_reserve_p, max_people, description
+ from events_venues
+ where venue_id = :venue_id
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/venues-connecting.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-connecting.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues-connecting.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,11 @@
+
+Connecting/Disconnecting Venues
+@context_bar@
+
+Connecting/Disconnecting Venues
+
+Venue : @venue_name@
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/venues-connecting.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-connecting.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues-connecting.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,66 @@
+# events/www/admin/venues-connecting.tcl
+
+ad_page_contract {
+ Allows admins to connect/disconnect venues.
+
+ @param venue_id the venue to edit
+
+ @author Brad Duell (bduell@ncacasi.org)
+} {
+ {venue_id:naturalnum,notnull}
+} -validate {
+ venue_exists -requires {venue_id} {
+ if { ![db_0or1row activity_exists "select venue_name from events_venues where venue_id=:venue_id"] } {
+ ad_complain "We couldn't find the venue you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+set context_bar [ad_context_bar [list "venues" "Venues"] " Venue Connections"]
+
+form create venue
+
+element create venue venue_id \
+ -label "Venue ID" \
+ -datatype integer \
+ -widget hidden
+
+element create venue connect_to_id \
+ -label "Connect Venue To" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::venue::venues_get_connecting_options -this_venue_id $venue_id -connecting "t"] \
+ -optional \
+ -value ""
+
+element create venue disconnect_from_id \
+ -label "Disconnect Venue From" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::venue::venues_get_connecting_options -this_venue_id $venue_id -connecting "f"] \
+ -optional \
+ -value ""
+
+if {[template::form is_valid venue]} {
+ template::form get_values venue \
+ venue_id connect_to_id disconnect_from_id
+
+ if { ![empty_string_p $connect_to_id] } {
+ # Connect
+ events::venue::connect -left_id $venue_id -right_id $connect_to_id
+ }
+ if { ![empty_string_p $disconnect_from_id] } {
+ # Disconnect
+ events::venue::disconnect -left_id $venue_id -right_id $disconnect_from_id
+ }
+ ad_returnredirect "venues"
+ ad_script_abort
+}
+
+element set_properties venue venue_id -value $venue_id
+
+ad_return_template
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/venues-hierarchy.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-hierarchy.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues-hierarchy.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,11 @@
+
+Venue Hierarchy
+@context_bar@
+
+Venue Hierarchy
+
+Venue : @venue_name@
+
+
+
+
Index: openacs-4/contrib/packages/events/www/admin/venues-hierarchy.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues-hierarchy.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues-hierarchy.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,96 @@
+# events/www/admin/venues-hierarchy.tcl
+
+ad_page_contract {
+ Allows admins to make levels of venues.
+
+ @param venue_id the venue to edit
+
+ @author Brad Duell (bduell@ncacasi.org)
+} {
+ {venue_id:naturalnum,notnull}
+} -validate {
+ venue_exists -requires {venue_id} {
+ if { ![db_0or1row activity_exists "select venue_name from events_venues where venue_id=:venue_id"] } {
+ ad_complain "We couldn't find the venue you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+set context_bar [ad_context_bar [list "venues" "Venues"] " Venue Hierarchy"]
+
+form create venue
+
+element create venue venue_id \
+ -label "Venue ID" \
+ -datatype integer \
+ -widget hidden
+
+element create venue add_parent_id \
+ -label "Add Parent" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::venue::venues_get_hierarchy_options -this_venue_id $venue_id -parent_p "t" -add_p "t"] \
+ -optional \
+ -value ""
+
+element create venue remove_parent_id \
+ -label "Remove Parent" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::venue::venues_get_hierarchy_options -this_venue_id $venue_id -parent_p "t" -add_p "f"] \
+ -optional \
+ -value ""
+
+element create venue add_child_id \
+ -label "Add Child" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::venue::venues_get_hierarchy_options -this_venue_id $venue_id -parent_p "f" -add_p "t"] \
+ -optional \
+ -value ""
+
+element create venue remove_child_id \
+ -label "Remove Child" \
+ -datatype search \
+ -widget search \
+ -result_datatype integer \
+ -options [events::venue::venues_get_hierarchy_options -this_venue_id $venue_id -parent_p "f" -add_p "f"] \
+ -optional \
+ -value ""
+
+if {[template::form is_valid venue]} {
+ template::form get_values venue \
+ venue_id add_parent_id remove_parent_id add_child_id remove_child_id
+
+ if { ![empty_string_p $add_parent_id] } {
+ # Add Parent
+ if { $add_parent_id != $add_child_id } {
+ events::venue::make_child_of -parent_id $add_parent_id -child_id $venue_id
+ }
+ }
+ if { ![empty_string_p $remove_parent_id] } {
+ # Remove Parent
+ events::venue::dechildize -parent_id $remove_parent_id -child_id $venue_id
+ }
+ if { ![empty_string_p $add_child_id] } {
+ # Add Child
+ if { $add_parent_id != $add_child_id } {
+ events::venue::make_child_of -parent_id $venue_id -child_id $add_child_id
+ }
+ }
+ if { ![empty_string_p $remove_child_id] } {
+ # Remove Child
+ events::venue::dechildize -parent_id $venue_id -child_id $remove_child_id
+ }
+ ad_returnredirect "venues"
+ ad_script_abort
+}
+
+element set_properties venue venue_id -value $venue_id
+
+ad_return_template
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/venues.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues.adp 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,14 @@
+
+Venues
+@context_bar@
+
+
+
+Venues
+
+Parents Children of Venue : @venue_name@
+
+@table@
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/venues.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/Attic/venues.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/venues.tcl 9 Mar 2003 12:08:23 -0000 1.1
@@ -0,0 +1,63 @@
+# File: events/www/admin/venues.tcl
+
+ad_page_contract {
+ Lists event venues.
+
+ @param orderby for ad_table
+
+ @author Michael Steigman (michael@steigman.net)
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id $Id: venues.tcl,v 1.1 2003/03/09 12:08:23 lars Exp $
+} {
+ {orderby "venue_name"}
+ {venue_id:optional ""}
+ {parent_p:optional "f"}
+} -validate {
+ venue_exists -requires {venue_id} {
+ if { ![db_0or1row activity_exists "select venue_name from events_venues where venue_id=:venue_id"] } {
+ ad_complain "We couldn't find the venue you asked for."
+ return 0
+ }
+ return 1
+ }
+}
+
+set context_bar [ad_context_bar "Venues"]
+
+#the columns for ad_table
+set col [list venue_name city state max_people connecting]
+
+set table_def {
+ {venue_name "Venue Name" {} {$venue_name }}
+ {city "City" {} {$city }}
+ {state "State" {} {$state }}
+ {max_people "Max People" {} {$max_people }}
+ {connecting "Connecting" {} {change [events::venue::connecting -venue_id $venue_id] (parents) (children) (add/remove hierarchy) }}
+}
+
+if { [empty_string_p $venue_id] } {
+ # Select top-level venues only
+ set sql "
+ select v.venue_id, v.venue_name, v.city,
+ v.usps_abbrev as state, max_people
+ from events_venues v where venue_id not in (select child_venue_id from events_venues_venues_map)
+ [ad_order_by_from_sort_spec $orderby $table_def]"
+} else {
+ if { $parent_p } {
+ # Select parent venues (if any) for this venue
+ set sql "
+ select v.venue_id, v.venue_name, v.city,
+ v.usps_abbrev as state, max_people
+ from events_venues v where venue_id in ([events::venue::all_parents_or_children -venue_id $venue_id -parent_p "t" -sql_p "t"])
+ [ad_order_by_from_sort_spec $orderby $table_def]"
+ } else {
+ # Select children venues (if any) for this venue
+ set sql "
+ select v.venue_id, v.venue_name, v.city,
+ v.usps_abbrev as state, max_people
+ from events_venues v where venue_id in ([events::venue::all_parents_or_children -venue_id $venue_id -parent_p "f" -sql_p "t"])
+ [ad_order_by_from_sort_spec $orderby $table_def]"
+ }
+}
+
+set table [ad_table -Tcolumns $col -Tmissing_text "There are no venues to display " -Torderby $orderby venues_list $sql $table_def]
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/admin/spam/action-choose.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/spam/action-choose.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/spam/action-choose.tcl 9 Mar 2003 12:08:36 -0000 1.1
@@ -0,0 +1,262 @@
+# action-choose.tcl,v 1.1.2.2 2000/02/03 09:50:01 ron Exp
+# events/admin/action-choose.tcl
+# Owner: bryanche@arsdigita.com
+# Purpose: A page allowing admins to spam users and providing
+# info on who spam will be sent to.
+#####
+
+# maybe user_class_id (to indicate a previousely-selected class of users)
+# maybe a whole host of user criteria
+# maybe msg_text, maybe create_comment_p and event_id. If these variables exists, then a comment will be created for all the registrants of this event
+
+ad_page_contract {
+ A page allowing admins to spam users and providing
+ info on who spam will be sent to. Note that the interface
+ and code for this page comes mainly from the spam module
+
+ @param sql_post_select a sql query describing which users to select
+ @param msg_text optional default email text
+ @param create_comment_p should this email also be saved as comments for event registrants
+ @param event_id (optional) the event for which this spam is creating a comment
+
+ @param spam_selected_events flag indicating that this page should handle processing of /events/admin/spam-selected-events.tcl
+ @param event array of event_id's indicating which events to spam
+ @param reg_state which registration state to spam for the events
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id action-choose.tcl,v 3.15.2.5 2000/09/22 01:37:41 kevin Exp
+} {
+ {sql_post_select:optional}
+ {msg_text:html,trim,optional}
+ {create_comment_p:html,optional}
+ {event_id:integer,optional}
+
+ {spam_selected_events:optional}
+ {event:array,optional}
+ {reg_state:optional}
+}
+
+set admin_user_id [ad_verify_and_get_user_id]
+ad_maybe_redirect_for_registration
+
+page_validation {
+ set error_msg ""
+
+ #if this page should insert a comment, then it needs to know
+ #for what event these users are being spammed.
+ if {[exists_and_not_null create_comment_p]} {
+ if {$create_comment_p != 0 && ![exists_and_not_null event_id]} {
+ append error_msg "This page came in without an event_id"
+ }
+ }
+
+ if {![empty_string_p $error_msg]} {
+ error $error_msg
+ }
+}
+
+#############################################
+
+#BEGIN PROCESS CODE FROM SPAM-SELECTED-EVENTS
+
+#Unfortunately, Netscape and IE seem to have limits to how long
+#a URL they can parse. So, we'll move the code from spam-selected-events-2
+#to this page so that it won't have to redirect to this page
+#using a long url. It's ugly, but we can't get around it...
+
+
+
+if {[exists_and_not_null spam_selected_events]} {
+
+ page_validation {
+ if {![exists_and_not_null reg_state]} {
+ error " You did not select which types of registrants
+ you wish to spam"
+ }
+ }
+
+ set events_list [list]
+
+ # see which events to spam
+ db_foreach evnt_sel_spam_events "
+ select e.event_id
+ from events_activities a, events_events e,
+ user_groups ug, user_group_map ugm
+ where a.activity_id = e.activity_id
+ and a.group_id = ugm.group_id
+ and ugm.group_id = ug.group_id
+ and ugm.user_id = :admin_user_id
+ union
+ select e.event_id
+ from events_activities a, events_events e
+ where a.activity_id = e.activity_id
+ and a.group_id is null
+ " {
+ set event_var "event($event_id)"
+
+ if {[info exists $event_var]} {
+ lappend events_list $event_id
+ }
+ }
+
+ if {[llength $events_list] == 0} {
+ ad_return_warning "No Events Selected" "You didn't select any events to spam"
+ return
+ }
+
+ switch $reg_state {
+ "shipped" {set reg_state_sql "and r.reg_state = 'shipped'"}
+ "pending" {set reg_state_sql "and r.reg_state = 'pending'"}
+ "waiting" {set reg_state_sql "and r.reg_state = 'waiting'"}
+ "all" {set reg_state_sql ""}
+ default {set reg_state_sql ""}
+ }
+
+ set sql_post_select "select distinct
+ users.user_id, users.email, users.email_type
+ from users_spammable users, events_reg_not_canceled r, events_prices p
+ where users.user_id = r.user_id
+ and p.price_id = r.price_id
+ $reg_state_sql
+ and (
+ "
+
+ set first_flag 1
+ foreach event_id $events_list {
+ if {$first_flag} {
+ set first_flag 0
+ append sql_post_select " p.event_id = $event_id\n"
+ } else {
+ append sql_post_select " or p.event_id = $event_id\n"
+ }
+ }
+
+ append sql_post_select ")\norder by users.user_id"
+}
+
+#END PROCESS CODE FROM SPAM-SELECTED-EVENTS
+
+#############################################
+
+
+# we get a form that specifies a class of user
+
+#set users_description [ad_user_class_description [ns_conn form]]
+set users_description "users returned by $sql_post_select"
+
+#text we want to already show up in the email body
+if {![exists_and_not_null msg_text]} {
+ set msg_text ""
+}
+
+## We store the page in whole_page as we go.
+
+set whole_page ""
+append whole_page "
+ [ad_admin_header "Spam"]
+Spam
+
+[ad_context_bar_ws [list "../index.tcl" "Events Administration"] "Spam"]
+
+
+
+"
+
+#
+
+#regsub {from users} $sql_post_select {from users_spammable users} sql_post_select
+
+#set query [ad_user_class_query_count_only [ns_conn form]]
+set query "select count(count_view.email)
+from ($sql_post_select) count_view"
+if [catch {set n_users [db_string evnt_spam_count_users $query]} errmsg] {
+
+ db_release_unused_handles
+ ns_warning "invalid query" "The query \n
\n $query \n "
+ return
+}
+
+
+#ad_return_error "query" "$query "
+#return
+
+if {$n_users == 0} {
+ ad_return_error "No people to e-mail" "There are no people to e-mail."
+ return
+}
+set action_heading ""
+
+if {$n_users == 1} {
+ append action_heading "You are e-mailing $n_users person."
+} else {
+ append action_heading "You are e-mailing [util_commify_number $n_users] people."
+}
+
+# generate unique key here so we can handle the "user hit submit twice" case
+set spam_id [db_string evnt_spam_spam_id_seq "select spam_id_sequence.nextval from dual"]
+
+# Generate the SQL query from the user_class_id, if supplied, or else from the
+# pile of form vars as args to ad_user_class_query
+
+#set users_sql_query [ad_user_class_query [ns_getform]]
+set users_sql_query $sql_post_select
+
+append whole_page "
+
+
+[export_form_vars spam_id users_sql_query users_description create_comment_p event_id]
+
+From:
+
+"
+
+
+append whole_page "
+
Send Date:
[_ns_dateentrywidget "send_date"]
+ Send Time:[_ns_timeentrywidget "send_date"]
+
+
+Subject:
+
+Message:
+
+$msg_text
+
+
+
+
+
+[ad_footer]
+"
+
+## clean up, return the page.
+
+
+
+doc_return 200 text/html $whole_page
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/spam/spam-confirm.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/spam/spam-confirm.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/spam/spam-confirm.tcl 9 Mar 2003 12:08:36 -0000 1.1
@@ -0,0 +1,170 @@
+# spam-confirm.tcl,v 1.1.2.2 2000/02/03 09:50:02 ron Exp
+# File: events/admin/spam-confirm.tcl
+# Creator: hqm@arsdigita.com
+#
+# A good thing to do before sending out 100,000 emails:
+# ask user to confirm the outgoing spam before queuing it.
+#####
+
+ad_page_contract {
+ Confirms sending spam.
+
+ @param spam_id id of the spam to send
+ @param from_address email address the spam is from
+ @param subject the email's subject
+ @param message email message
+ @param from_file_p is this email from a file
+ @param users_sql_query sql query describing which users to spam
+ @param users_description description of the users to spam
+ @param template_p is this email a tcl template
+
+ @param create_comment_p should this spam create a registration comment
+ @param event_id which event to comment about when spamming a selected event
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id spam-confirm.tcl,v 3.7.6.8 2000/09/22 01:37:41 kevin Exp
+} {
+ {spam_id:integer,notnull}
+ {from_address:trim,notnull}
+ {subject:trim,notnull}
+ {message:html,trim,notnull}
+ {message_html:html,optional}
+ {from_file_p:optional}
+ {users_sql_query}
+ {users_description:optional}
+ {template_p:optional}
+
+ {create_comment_p:optional}
+ {event_id:integer,optional}
+}
+
+# spam_id, from_address, subject, send_date, message
+#
+# maybe: message_html
+# from_file_p If == 't', get message texts from default
+# filesystem location
+# users_sql_query The SQL needed to get the list of target users
+# users_description English descritpion of target users
+#
+# or else user_class_id, which can be passed to ad_user_class_query to
+# generate a SQL query.
+#
+# maybe: template_p If == 't', then run subst on the message
+# subject and body. A scary prospect, but spam can only be
+# created by site admins anyhow. (seems to be disabled here)
+
+#maybe create_comment_p & event_id
+
+set admin_user_id [ad_verify_and_get_user_id]
+ad_maybe_redirect_for_registration
+
+if {[info exists from_file_p] && [string compare $from_file_p "t"] == 0} {
+ set message [get_spam_from_filesystem "plain"]
+ set message_html [get_spam_from_filesystem "html"]
+ set message_aol [get_spam_from_filesystem "aol"]
+}
+
+set exception_count 0
+set exception_text ""
+
+if {[catch {ns_dbformvalue [ns_conn form] send_date datetime send_date} errmsg]} {
+ incr exception_count
+ append exception_text "
Please make sure your date is valid."
+}
+
+if {[exists_and_not_null create_comment_p]} {
+ if {$create_comment_p != 0 && ![exists_and_not_null event_id]} {
+ incr exception_count
+ append exception_text " This page came in without an event_id"
+ }
+}
+
+if {[empty_string_p $subject]} {
+ incr exception_count
+ append exception_text " Please enter a subject"
+}
+
+if {[empty_string_p $message]} {
+ incr exception_count
+ append exception_text " Please enter a message."
+}
+
+
+if {$exception_count > 0 } {
+ ad_return_complaint $exception_count $exception_text
+ return
+}
+
+ns_dbformvalue [ns_conn form] send_date datetime send_date
+
+if {[info exists template_p] && [string match $template_p "t"]} {
+} else {
+ set template_p "f"
+}
+
+## Begin to return the page...
+
+# Wrap message text properly
+set message [spam_wrap_text $message 80]
+
+append pagebody "[ad_admin_header "Confirm sending spam"]
+Confirm Sending Spam
+[ad_context_bar_ws [list "../index.tcl" "Events Administration"] "Confirm Spam"]
+
+
+
+The following spam will be queued for delivery:
+
+"
+
+append pagebody "
+
+
+
+
+
+
+Date: $send_date
+
+From: $from_address
+Subject: $subject
+Plain Text Message:
+[ns_quotehtml $message]
+
+"
+
+if {[info exists message_html] && ![empty_string_p $message_html]} {
+ append pagebody "
+HTML Message:
+ $message_html
+ "
+}
+
+if {[info exists message_aol] && ![empty_string_p $message_aol]} {
+ append pagebody "
+AOL Message:
+ $message_aol
+ "
+}
+
+append pagebody "
"
+
+set count_users_query "select count(*) from ($users_sql_query)"
+set total_users [db_string evnt_spam_confirm_count $count_users_query]
+
+append pagebody "
+You will send email to $total_users users.
+
+
+
+[export_form_vars users_sql_query spam_id from_address subject message message_html message_aol send_date template_p users_description create_comment_p event_id]
+
+[ad_footer]"
+
+## clean up, return the page.
+
+
+
+doc_return 200 text/html $pagebody
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/admin/spam/spam.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/spam/spam.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/spam/spam.tcl 9 Mar 2003 12:08:36 -0000 1.1
@@ -0,0 +1,229 @@
+# spam.tcl,v 3.10.2.7 2000/09/22 01:37:42 kevin Exp
+# spam.tcl
+#
+# hqm@arsdigita.com
+#
+# Queues an outgoing spam message to a group of users,
+# by adding it to the spam_history table
+
+# spam_id, from_address, subject,
+# message (optionally message_html, message_aol)
+# maybe send_date
+# from_file_p
+# template_p
+#
+#maybe create_comment_p, event_id
+
+ad_page_contract {
+ Confirms sending spam.
+
+ @param spam_id id of the spam to send
+ @param from_address email address the spam is from
+ @param subject the email's subject
+ @param message email message
+ @param message_html email message in html format
+ @param message_aol email message in aol format
+ @param send_date when to send the email
+ @param from_file_p is this email from a file
+ @param users_sql_query sql query describing which users to spam
+ @param users_description description of the users to spam
+ @param template_p is this email a tcl template
+
+ @param create_comment_p should this spam create a registration comment
+ @param event_id which event to comment about when spamming a selected event
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id spam.tcl,v 3.10.2.7 2000/09/22 01:37:42 kevin Exp
+} {
+ {spam_id:integer,notnull}
+ {from_address:notnull}
+ {subject:trim [db_null]}
+ {message:html,trim,optional}
+ {message_html:html,trim,optional}
+ {message_aol:html,trim,optional}
+ {send_date:optional}
+ {from_file_p:optional}
+ {users_sql_query}
+ {users_description:optional}
+ {template_p:optional}
+
+ {create_comment_p:optional}
+ {event_id:integer,optional}
+}
+
+
+ns_log Notice "spam.tcl: entering page"
+
+set admin_user_id [ad_verify_and_get_user_id]
+ad_maybe_redirect_for_registration
+
+# Strip all ^M's out of any itneractively entered text message.
+# This is because Windows browsers insist on inserting CRLF at
+# the end of each line of a TEXTAREA.
+if {[info exists message]} {
+ regsub -all "\r" $message "" message_stripped
+}
+
+if {[info exists from_file_p] && [string compare $from_file_p "t"] == 0} {
+ set message [get_spam_from_filesystem "plain"]
+ set message_html [get_spam_from_filesystem "html"]
+ set message_aol [get_spam_from_filesystem "aol"]
+}
+
+if {[info exists template_p] && [string match $template_p "t"]} {
+} else {
+ set template_p "f"
+}
+
+if {![info exists send_date]} {
+ set send_date ""
+}
+
+if {![info exists message_html]} {
+ set message_html ""
+}
+
+if {![info exists message_aol]} {
+ set message_aol ""
+}
+
+set exception_count 0
+set exception_text ""
+
+if {[empty_string_p $subject] && [empty_string_p $message_stripped] && [empty_string_p $message_html] && [empty_string_p $message_aol]} {
+ incr exception_count
+ append exception_text " The contents of your message and subject line is the empty string. You must send something in the message body"
+}
+
+if {$exception_count > 0 } {
+ ad_return_complaint $exception_count $exception_text
+ return
+}
+
+
+# Generate the SQL query from the user_class_id, if supplied
+if {[info exists user_class_id] && ![empty_string_p $user_class_id]} {
+ set users_sql_query [ad_user_class_query [ns_getform]]
+ set class_name [db_string evnt_spam_sel_class_name "select name from user_classes where user_class_id = :user_class_id "]
+
+ set sql_description [db_string evnt_spam_sel_sql_desc "select sql_description from user_classes where user_class_id = :user_class_id "]
+ set users_description "$class_name: $sql_description"
+}
+
+#set spam_query [spam_rewrite_user_class_query $users_sql_query]
+set spam_query $users_sql_query
+
+if [catch {
+ spam_post_new_spam_message -spam_id $spam_id -template_p $template_p \
+ -from_address $from_address \
+ -title $subject \
+ -body_plain $message_stripped \
+ -body_html $message_html \
+ -body_aol $message_aol \
+ -target_users_description $users_description \
+ -target_users_query $spam_query \
+ -send_date $send_date \
+ -creation_user $admin_user_id
+} errmsg] {
+ # choked; let's see if it is because
+ if { [db_string evnt_spam_dbl_click "select count(*) from spam_history where spam_id = $spam_id"] > 0 } {
+ doc_return 200 text/html "[ad_admin_header "Double Click?"]
+
+Double Click?
+
+
+
+This spam has already been sent. Perhaps you double clicked? In any
+case, you can check the progress of this spam on
+the history page .
+
+[ad_admin_footer]"
+ } else {
+ ad_return_error "Ouch!" "The database choked on your insert:
+
+$errmsg
+
+"
+ }
+ return
+}
+
+#Perhaps create a comment for the users' registrations
+#Note that this only makes sense if the spam is sent immediately.
+#If the spam were sent in the future, then it could be sent to
+#registrants whose registrations weren't marked with this
+#comment because the registrations took place after these comments
+#were created but before the spam was sent. Also note that
+#there still could be a few people who register in the short time
+#between the comments below are created and the spam is sent. In that
+#case, these users' registrations won't be marked with comments
+#either.
+
+if {[exists_and_not_null create_comment_p] && [exists_and_not_null event_id] && $create_comment_p != 0} {
+
+ db_foreach evnt_spam_create_comment "select
+ r.reg_id, r.comments
+ from events_reg_not_canceled r, events_prices p
+ where p.event_id = $event_id
+ and r.price_id = p.price_id
+ and r.user_id in
+ (select distinct u.user_id
+ from users u, ($users_sql_query) sql_query
+ where u.email = sql_query.email)
+ " {
+ append comments "\n------\nSent the following e-mail to this registrant on $send_date:\n\n$message_stripped\n------"
+
+ db_dml evnt_spam_create_comment "update events_registrations
+ set comments = :comments
+ where reg_id = :reg_id"
+ }
+}
+
+append pagebody "[ad_admin_header "Spamming $users_description"]
+
+Spamming Users
+[ad_context_bar_ws [list "../index.tcl" "Events Administration"] "Spam"]
+
+
+
+Class description: $users_description.
+
+
+
+Query to be used:
+
+
+$users_sql_query
+
+
+
+
+Message to be sent:
+
+
+from: $from_address
+ subject: $subject
+ send on: $send_date
+ body: $message_stripped
+
+
+
+"
+
+append pagebody "
+
+Queued for delivery by the spam sending daemon.
+
+
+[ad_admin_footer]
+"
+db_release_unused_handles
+
+doc_return 200 text/html $pagebody
+
+ns_conn close
+
+ns_log Notice "spam.tcl: calling spam queue sweeper $spam_id now from interactive spam.tcl page"
+send_scheduled_spam_messages
+ns_log Notice "spam.tcl: spam $spam_id sent"
+
Index: openacs-4/contrib/packages/events/www/admin/spam/spamees-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/admin/spam/spamees-view.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/admin/spam/spamees-view.tcl 9 Mar 2003 12:08:36 -0000 1.1
@@ -0,0 +1,49 @@
+# spamees-view.tcl,v 1.1.2.2 2000/02/03 09:50:05 ron Exp
+# events/admin/spamees-view.tcl
+# Owner: bryanche@arsdigita.com
+#####
+
+ad_page_contract {
+ Purpose: To show an admin about to spam a bunch of people a list
+ of all the spamees.
+
+ @param sql_post_select sql query for which users to show
+
+ @author Bryan Che (bryanche@arsdigita.com)
+ @cvs_id spamees-view.tcl,v 3.5.6.4 2000/09/22 01:37:42 kevin Exp
+} {
+ {sql_post_select:notnull}
+}
+
+if {![exists_and_not_null sql_post_select]} {
+ ad_return_complaint 1 "
You have entered this page without
+ a sql_post_select variable"
+}
+
+# we collect the page body in whole_page
+set whole_page ""
+append whole_page "[ad_admin_header "Spam"]
+
+Spam
+
+[ad_context_bar_ws [list "../index.tcl" "Events Administration"] [list "action-choose.tcl?[export_url_vars sql_post_select]" "Spam"] "Spamees"]
+
+
+
+You are spamming the following people:
+
+"
+
+
+db_foreach evnt_spamees_view $sql_post_select {
+ append whole_page "$email"
+}
+append whole_page " [ad_footer]"
+
+## clean up, return the page
+
+
+
+doc_return 200 text/html $whole_page
+
+##### EOF
Index: openacs-4/contrib/packages/events/www/doc/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/index.adp 9 Mar 2003 12:08:50 -0000 1.1
@@ -0,0 +1,343 @@
+
+Events Module
+"Events Documentation"
+
+Events
+
+(part of the ArsDigita Community System ,
+originally by Philip Greenspun and Bryan Che)
+
+
+Note: this documentation refers to the 3.x version of Events. I plan
+to update these soon but even as is, they will give a good overview of the
+functionality as well as some possible future directions. The new
+version uses ACS Events and many of the new 4.x modules including bulk
+mail and attachments. Bryan Che also wrote an ASJ article on Events,
+which I've included at /doc/events/asj .
+
+
+
+User-accessible directory: /events/ (or wherever you've mounted events)
+ Administrator directory: /events/admin/
+ data model and Tcl procs: /api-doc
+
+
+The Big Idea
+
+
+Organizations often present events, such as a lecture series or a social
+gathering. This software module gives organizations a way to register
+people for events online.
+
+
+
The Medium-sized Idea
+
+
+Organizations often have a number of set events which they like to
+repeat. For example, a company may have a certain presentation which it
+makes over and over. A photoraphy club may hold monthly outings. A
+marathon race could occur annually. Therefore, we organize events in
+the following way:
+
+
+Each organization has a series of activities that it holds. An
+event is a particular instance of an activity--it is the actual
+occurance of an activity. Each event has an organizer and takes place
+in a physical location and during a certain time. For example, a
+software company might hold a series of talks as activities:
+
+
+ Why you should think our software is the best
+ Why you should do things our way
+ Why the Government should leave us alone and let us innovate
+
+
+That software company could then present these talks as lecture events:
+
+
+
+ Talk (Activity)
+ Lecture Speaker (Event organizer)
+ Lecture Date
+
+ Why you should think our software is the best
+ billy
+ 05-07-2000
+
+ Why you should think our software is the best
+ stevie
+ 08-29-2000
+
+ Why the Government should leave us alone and let us innovate
+ billy
+ 09-10-2000
+
+
+
+Organizations that organize their events using this convention may
+then fully administer and register those events online using this
+module.
+
+
The Fine-details
+
+Activities
+
+
+An organization is not necessarily an entire company--it can be a
+company department or office or project or any other group of people.
+Therefore, activities are owned by ACS user groups. Each user group
+represents an organization of people. An activity also has a creator, a
+name, a description, and a flag indicating if it is available. Finally,
+an activity can link to a url for more information:
+
+
+create table events_activities (
+ activity_id integer primary key,
+ -- activities are owned by user groups
+ group_id integer references user_groups,
+ creator_id integer not null references users,
+ short_name varchar(100) not null,
+ default_price number default 0 not null,
+ currency char(3) default 'USD',
+ description clob,
+ -- Is this activity occurring? If not, we can't assign
+ -- any new events to it.
+ available_p char(1) default 't' check (available_p in ('t', 'f')),
+ deleted_p char(1) default 'f' check (deleted_p in ('t', 'f')),
+ detail_url varchar(256) -- URL for more details,
+ default_contact_user_id integer references users
+);
+
+
+Events
+
+For each event, we need to track its organizers, its location, and its
+time. We define the organizers' roles and their responsibilities. We
+also store extra information that might pertain to that specific event,
+such as refreshemnts or audio/visual information. In addition, we store
+of which activity this event is an instance.
+
+
+create table events_events (
+ event_id integer not null primary key,
+ activity_id integer not null references events_activities,
+ venue_id integer not null references events_venues,
+ -- the user group that is created for this event's registrants
+ group_id integer not null references user_groups,
+ creator_id integer not null references users,
+ -- HTML to be displayed after a successful order.
+ display_after varchar(4000),
+ -- Date and time.
+ start_time date not null,
+ end_time date not null,
+ reg_deadline date not null,
+ -- An event may have been cancelled.
+ available_p char(1) default 't' check (available_p in ('t', 'f')),
+ deleted_p char(1) default 'f' check (deleted_p in ('t', 'f')),
+ max_people integer,
+ -- can someone cancel his registration?
+ reg_cancellable_p char(1) default 't' check (reg_cancellable_p in ('t', 'f')),
+ -- does a registration need approval to become finalized?
+ reg_needs_approval_p char(1) default 'f' check (reg_needs_approval_p in ('t', 'f')),
+ -- notes for doing av setup
+ av_note clob,
+ -- notes for catering
+ refreshments_note clob,
+ -- extra info about this event
+ additional_note clob,
+ -- besides the web, is there another way to register?
+ alternative_reg clob,
+ check (start_time < end_time),
+ check (reg_deadline <= start_time)
+);
+
+
+-- where the events occur
+create table events_venues (
+ venue_id integer primary key,
+ venue_name varchar(200) not null,
+ address1 varchar(100),
+ address2 varchar(100),
+ city varchar(100) not null,
+ usps_abbrev char(2),
+ postal_code varchar(20),
+ iso char(2) default 'us' references country_codes,
+ time_zone varchar(50),
+ -- some contact info for this venue
+ fax_number varchar(30),
+ phone_number varchar(30),
+ email varchar(100),
+ needs_reserve_p char(1) default 'f' check (needs_reserve_p in ('t', 'f')),
+ max_people integer,
+ description clob
+);
+
+
+
+
+This data model also contains extensions for selling admission to
+events, althought the tcl pages do not currently implement this feature.
+These extensions can tie in with the
+ecommerce module .
+
+
+create table events_prices (
+ price_id integer primary key,
+ event_id integer not null references events_events,
+ -- e.g., "Developer", "Student"
+ description varchar(100) not null,
+ -- we also store the price here too in case someone doesn't want
+ -- to use the ecommerce module but still wants to have prices
+ price number not null,
+ -- This is for hooking up to ecommerce.
+ -- Each product is a different price for this event. For example,
+ -- student price and normal price products for an event.
+-- product_id integer references ec_products,
+ -- prices may be different for early, normal, late, on-site
+ -- admission,
+ -- depending on the date
+ expire_date date not null,
+ available_date date not null
+);
+
+
+
+
+
+
+
Organizers
+
+Each event should have at least one organizer role. An organizer role
+is an official position for that event. For example, a lecture
+might have the organizer role of "speaker." Organizers are people
+who fill an organizer role position.
+
+
+
+create table events_event_organizer_roles (
+ role_id integer
+ constraint evnt_ev_org_roles_role_id_pk
+ primary key,
+ event_id integer
+ constraint evnt_ev_org_roles_event_id_fk
+ references events_events
+ constraint evnt_ev_org_roles_event_id_nn
+ not null,
+ role varchar(200)
+ constraint evnt_ev_org_roles_role_nn
+ not null,
+ responsibilities clob,
+ -- is this a role that we want event registrants to see?
+ public_role_p char(1) default 'f'
+ constraint evnt_ev_roles_public_role_p
+ check (public_role_p in ('t', 'f'))
+);
+
+create table events_organizers_map (
+ user_id constraint evnt_org_map_user_id_nn
+ not null
+ constraint evnt_org_map_user_id_fk
+ references users,
+ role_id integer
+ constraint evnt_org_map_role_id_nn
+ not null
+ constraint evnt_org_map_role_id_fk
+ references events_event_organizer_roles,
+ constraint events_org_map_pk primary key (user_id, role_id)
+);
+
+
+
+Registrations
+For each person who registers for an event, we record a bunch of
+information. This helps the organizations understand who is coming to
+their events and why. It also helps the organization accomodate its
+attendees' needs and group them together.
+
+
+We organize registrations in the following way: a registration
+represents a person who has expressed interest in attending the event.
+There is one registration for each person who wants to attend.
+Registrations can have different states. For example, a registration
+may be wait-listed because there are already too many registrations for
+a particular event. Or, a registration may be canceled.
+
+An order is a set of registrations. Typically, when a person
+registers himself for an event, he will create one order containing his
+single registration. But, there may be an individual who wishes to
+register multiple people at once. In that case, the individual would
+make one order containing multiple registrations. Thus, this data
+model allows people to make multiple registrations. The tcl pages do
+not yet implement this feature, though.
+
+
+create table events_orders (
+ order_id integer not null primary key,
+-- ec_order_id integer references ec_orders,
+ -- the person who made the order
+ user_id integer not null references users,
+ paid_p char(1) default null check (paid_p in ('t', 'f', null)),
+ payment_method varchar(50),
+ confirmed_date date,
+ price_charged number,
+ -- the date this registration was refunded, if it was refunded
+ refunded_date date,
+ price_refunded number,
+ ip_address varchar(50) not null
+);
+
+create table events_registrations(
+ -- Goes into table at confirmation time:
+ reg_id integer not null primary key,
+ order_id integer not null references events_orders,
+ price_id integer not null references events_prices,
+ -- the person registered for this reg_id (may not be the person
+ -- who made the order)
+ user_id integer not null references users,
+ -- reg_states: pending, shipped, canceled, waiting
+ --pending: waiting for approval
+ --shipped: registration all set
+ --canceled: registration canceled
+ --waiting: registration is wait-listed
+ reg_state varchar(50) not null check (reg_state in ('pending', 'shipped', 'canceled', 'waiting')),
+ -- when the registration was made
+ reg_date date,
+ -- when the registration was shipped
+ shipped_date date,
+ org varchar(4000),
+ title_at_org varchar(4000),
+ attending_reason clob,
+ where_heard varchar(4000),
+ -- does this person need a hotel?
+ need_hotel_p char(1) default 'f' check (need_hotel_p in ('t', 'f')),
+ -- does this person need a rental car?
+ need_car_p char(1) default 'f' check (need_car_p in ('t', 'f')),
+ -- does this person need airfare?
+ need_plane_p char(1) default 'f' check (need_plane_p in ('t', 'f')),
+ comments clob
+);
+
+
+
+Using Events
+
+
+With the events module, organizations can create, edit, and remove
+activities. They can do the same to events and organizers. Thus,
+organizations can fully describe and advertise any activity event
+online.
+
+
+Organizations can also obtain information about who is coming to their
+events and spam those attendees. They can review order histories to see
+how many people registered for a given event and why they came. In
+addition, they can view order statistics by activity, month, date, and
+order state. Finally, they can spam their own organizers to remind them
+about their upcoming events.
+
+
+People coming to register online at a site using this module will be
+able to find upcoming activity events and sign up for them.
+
Index: openacs-4/contrib/packages/events/www/doc/asj/activity-admin.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/activity-admin.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/activity-admin.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,97 @@
+
+
+
+
+3 Week Boot Camp
+
+
+
+
+3 Week Boot Camp
+Your Workspace : Events Administration : Activities : Activity
+
+
+Events for this Activity
+
+Activity Description
+
+
+ Name
+ 3 Week Boot Camp
+
+
+ Creator
+ Brian Stein
+
+
+ Default Contact Person
+
+
+
+ Owning Group
+ ArsDigita Bootcamps
+
+
+
+ URL
+ http://www.arsdigita.com/boot-camp/threeweekbootcamp.html
+
+ Description
+ A lab environment for programmers to learn about the ArsDigita Community System and related tools. 3+ problem sets will be covered.
+
+
+ Current or Discontinued
+Current
+
+
+
+
+
+Activity Custom Fields
+ You may define default custom fields which you would like to
+ collect from registrants for this activity type.
+
+
+
+Organizer Roles
+
+You may create default organizer roles for this activity type.
+
+
+Accounting
+
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/doc/asj/bboard.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/bboard.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/bboard.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,36 @@
+
+
+Cambridge threads in ArsDigita General
+
+
+
+
+Cambridge Threads
+
+Your Workspace : ArsDigita Discussion Forums : ArsDigita General : One Category
+
+
+
+
+
+
+
+
+bryanche@arsdigita.com
+
+
+
Index: openacs-4/contrib/packages/events/www/doc/asj/chat.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/chat.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/chat.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+Chat
+
+
+
+
+
+
+
+
+
+
+
+bryanche@arsdigita.com
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/doc/asj/demo.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/demo.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/demo.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,17 @@
+
+
+Just A Demo
+
+
+Just A Demo
+
+
+You have clicked on a link or button from a demo page. As it is only a
+demo, the links and submit buttons don't actually do anything other
+than send you to this page.
+
+
+bryanche@arsdigita.com
+
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/doc/asj/event-admin.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/event-admin.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/event-admin.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,139 @@
+
+
+
+Cambridge, MA: Thursday, May 11, 2000
+
+
+
+ Cambridge, MA: Thursday, May 11, 2000
+Your Workspace : Events Administration : Activities : Activity : Event
+
+
+
+
+
+
+
+ Creator
+ Bootcamp Admin
+
+ Location
+ Cambridge, MA
+
+
+ Confirmation Message
+ You have been accepted into the 3-week bootcamp starting May 8th in the ArsDigita headquarters in Cambridge bootcamp. Please show up between 9 and 10 on the first Monday of bootcamp. Reference books and most other materials will be provided. Still got questions? Send mail to bootcamp@arsdigita.com.
+
+
+ Start Time
+ 2000-05-11 09:00
+
+ End Time
+ 2000-05-26 18:00
+
+
+ Registration Deadline
+ 2000-05-11 08:59
+
+
+ Maximum Capacity
+ 28
+
+ Registration Cancellable?
+ yes
+
+ Registration Needs Approval?
+ yes
+
+ Event Contact Person
+ bootcamp@arsdigita.com
+
+ Availability Status
+Current (toggle )
+
+
+
+
+ Custom Fields
+You may define custom fields that you would like to
+collect from registrants.
+
+
+
+
+Organizers
+ Agenda Files
+
+Event User Group
+ You may manage the user group for this event.
+
+
+ Event Notes
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/doc/asj/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/index.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/index.adp 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,746 @@
+
+Web-Based Event Planning and Registration
+"Events Documentation : ASJ Article"
+
+ArsDigita Systems Journal: Web-Based Event Planning and Registration
+
+ by Bryan Che
+
+Sumbitted on: 2000-06-09
+ Last updated: 2000-09-25
+
+
+Online registration harnesses much of the Internet's power. It saves
+time, enhances productivity, and simplifies operations. It lowers
+costs. It facilitates community. It provides flexibility.
+Surprisingly, though, online registration provides these benefits more
+to event administrators than to the people who register for events.
+
+
+Web-based registration does provide some measure of ease for event
+attendees. In addition to eliminating paper forms, Web-based
+registration can facilitate collaboration among registrants.
+It can also provide immediate feedback to people when they register.
+For event planners, though, online registration offers the ability to:
+
+
+ Make it easy to offer repeated events
+ Make it easy to collect, aggregate, and view registrations
+ Provide convenient means for communicating with registrants
+ Provide means for coordinating registrants
+
+
+These four advantages can save event administrators a tremendous amount
+of work and time. Thus, even though event participants may gain from
+Web-based event registration, event administrators are the ones who
+truly profit from it.
+
+Events Module Goals Overview
+The events module has four main goals. In accordance with the fact that
+online events handling benefits event planners the most, these goals
+focus on helping event administrators. The events module aims to:
+
+
+ Simplify offering repeat events
+ Simplify handling registrations
+ Simplify communicating with registrants
+ Simplify coordinating registrants
+
+
+
+Repeated Events
+
+Organizations often offer the same basic event on a repeated basis. For
+example, ArsDigita runs a series of bootcamps each month. These
+bootcamps are essentially the same -- they teach the same material,
+last the same amount of time, and provide similar experiences. The only
+things that really vary are where and when these bootcamps occur.
+Therefore, data within the events module divides into activities
+and events .
+
+
+An activity is a kind of event; it is the type of thing for which people
+register. Activities might be bootcamps or lectures or conferences. An
+event is an instance of an activity. An event might be a three-week
+bootcamp starting on June 28, 2000 in Cambridge, MA or an Oracle
+conference in Amsterdam from July 23-25, 2001.
+
+
+By making this distinction between activities and events, the events
+module can help event planners avoid repeated work. For example, people
+who want to manage ArsDigita bootcamps need only perform all of their
+major planning once. They can plan what their bootcamp activity will
+cover, what type of information registrants need to provide, and so on
+the first time they plan a bootcamp. From then on, whenever they want
+to create an online registration form for a new bootcamp, they do not
+need to repeat entering information that is the same across all
+bootcamps. Instead, they may simply edit items specific to a particular
+bootcamp event -- where and when that bootcamp takes place, for
+example. The events module will then generate an appropriate
+registration form for users based upon the bootcamp's activity
+information and its specific event information. This process makes it
+quite convenient to offer events on a repeated basis.
+
+
+[screenshot of order histories for different events of a particular activity]
+
+
Handling Registrations
+
+Filling out a registration form by hand may not
+be terribly inconvenient. But, processing thousands of hand-written
+registration forms is. Therefore, offering online, electronic
+registration forms can save event administrators significant time.
+Online registration forms means that as soon as a registrant submits his
+application, event administrators may review the registration online
+without much hassle. Furthermore, they can easily view aggregate
+information, such as how many people have registered for a particular
+event. And, they may approve, deny, or mark registrations using simple
+point-and-click interfaces. Managing registrations online can save
+event planners a significant amount of work.
+
+
+[screenshot of admin page for wait-listing a registration]
+
+
Communicating with Registrants
+
+Another benefit of online registration is that it can facilitate easy
+communication between event planners and registrants. The events module
+collects e-mail addresses from each person who registers for a certain
+event. Thus, it can provide an interface for helping event planners do
+things like "e-mail all the people who attended these three conferences"
+or "e-mail this particular registrant to request more information about
+his work history." Because all registration, event, and communication
+information is provided through the same user interface (the Web),
+communicating with various event registrants is a simple task. Thus,
+online registration can greatly help event designers to communicate with
+registrants.
+
+
+[screenshot of page for e-mailing registrants]
+
+
Coordinating Registrants
+
+Because registrants have entered some personal information online when
+registering for an event, the events module can help event
+administrators organize these registrants into user groups. These
+groups of users can then interact with bulletin boards, calendars, and
+other features which the event administrator sees fit to add. In this
+way, event administrators can easily provide a variety of
+community-fostering features for people who register online. If these
+people had not registered online and were not entered into a database,
+then they would not be able to socialize, communicate, and work together
+over the Internet as members of the same event.
+
+
+[screenshot of entrance to ACS chat rooms]
+
+
Events Module Implementation
+
+The Data Model
+
+The events module's data model consists of four main sections:
+
+
+tables for managing the events
+ tables for collecting custom fields
+ tables for managing events organizers
+ tables for managing events registrants
+
+
+
+
+
+
+
+
+
Managing Events
+
+Activities
+
+An organization is not necessarily an entire company -- it can be a
+company department or office or project or any other group of
+people. Therefore, activities are owned by ACS user groups. Each user
+group represents an organization of people. An activity also has a
+creator, a name, a description, and a flag indicating if it is
+available. Finally, an activity can link to a url for more information:
+
+
+
+
+create table events_activities (
+ activity_id integer primary key,
+ -- activities are owned by user groups
+ group_id integer references user_groups,
+ creator_id integer not null references users,
+ short_name varchar(100) not null,
+ default_price number default 0 not null,
+ currency char(3) default 'USD',
+ description clob,
+ -- Is this activity occurring? If not, we can't assign
+ -- any new events to it.
+ available_p char(1) default 't' check (available_p in ('t', 'f')),
+ deleted_p char(1) default 'f' check (deleted_p in ('t', 'f')),
+ detail_url varchar(256), -- URL for more details
+ default_contact_user_id integer references users
+);
+
+
+
+
+
Events
+
+Information about the events are stored in the tables events_events,
+events_prices, and events_venues. events_events tracks data such as an
+event's start and end times, where it occurs, and how many people may
+register for it.
+
+
+
+
+create table events_events (
+ event_id integer not null primary key,
+ activity_id integer not null references events_activities,
+ venue_id integer not null references events_venues,
+ -- the user group that is created for this event's registrants
+ group_id integer not null references user_groups,
+ creator_id integer not null references users,
+ -- HTML to be displayed after a successful order.
+ display_after varchar(4000),
+ -- Date and time.
+ start_time date not null,
+ end_time date not null,
+ reg_deadline date not null,
+ -- An event may have been cancelled.
+ available_p char(1) default 't' check (available_p in ('t', 'f')),
+ deleted_p char(1) default 'f' check (deleted_p in ('t', 'f')),
+ max_people integer,
+ -- can someone cancel his registration?
+ reg_cancellable_p char(1) default 't' check (reg_cancellable_p in ('t', 'f')),
+ -- does a registration need approval to become finalized?
+ reg_needs_approval_p char(1) default 'f' check (reg_needs_approval_p in ('t', 'f')),
+ -- notes for doing av setup
+ av_note clob,
+ -- notes for catering
+ refreshments_note clob,
+ -- extra info about this event
+ additional_note clob,
+ -- besides the web, is there another way to register?
+ alternative_reg clob,
+ check (start_time < end_time),
+ check (reg_deadline <= start_time)
+);
+
+
+
+
+This data model contains, through events_prices, extensions for selling
+admission to events. The presentation pages, however, do not currently
+implement this feature. These extensions can tie in with the ecommerce
+module.
+
+
+
+
+create table events_prices (
+ price_id integer primary key,
+ event_id integer not null references events_events,
+ -- e.g., "Developer", "Student"
+ description varchar(100) not null,
+ -- we also store the price here too in case someone doesn't want
+ -- to use the ecommerce module but still wants to have prices
+ price number not null,
+ -- This is for hooking up to ecommerce.
+ -- Each product is a different price for this event. For example,
+ -- student price and normal price products for an event.
+-- product_id integer references ec_products,
+ -- prices may be different for early, normal, late, on-site
+ -- admission,
+ -- depending on the date
+ expire_date date not null,
+ available_date date not null
+);
+
+
+
+
+The table events_venues retains knowledge about all the different
+locations in which an event might take place.
+
+
+
Collecting Custom Fields
+
+One of the hallmark features of the events module is its ability to let
+event administrators collect customized information from events
+registrants. Organizations are usually interested in obtaining more
+than just a name and e-mail address. For example, a company might
+request registrants to provide their resumes. The company could do this
+in the events module by creating a custom field for its event called
+resume .
+
+
+
+
+
+create table events_event_fields (
+ event_id not null references events_events,
+ column_name varchar(30) not null,
+ pretty_name varchar(50) not null,
+ -- something generic and suitable for handing to AOLserver,
+ -- e.g., boolean or text
+ column_type varchar(50) not null,
+ -- something nitty gritty and Oracle-specific, e.g.,
+ -- char(1) instead of boolean
+ -- things like "not null"
+ column_actual_type varchar(100) not null,
+ column_extra varchar(100),
+ -- Sort key for display of columns.
+ sort_key integer not null
+);
+
+
+
+
+
Managing Organizers
+
+Each event should have at least one organizer role. An organizer role is
+an official position for that event. For example, a lecture might have
+the organizer role of "speaker." Organizers are people who fill an
+organizer role position.
+
+
+
+
+create table events_event_organizer_roles (
+ role_id integer
+ constraint evnt_ev_org_roles_role_id_pk
+ primary key,
+ event_id integer
+ constraint evnt_ev_org_roles_event_id_fk
+ references events_events
+ constraint evnt_ev_org_roles_event_id_nn
+ not null,
+ role varchar(200)
+ constraint evnt_ev_org_roles_role_nn
+ not null,
+ responsibilities clob,
+ -- is this a role that we want event registrants to see?
+ public_role_p char(1) default 'f'
+ constraint evnt_ev_roles_public_role_p
+ check (public_role_p in ('t', 'f'))
+);
+
+create table events_organizers_map (
+ user_id constraint evnt_org_map_user_id_nn
+ not null
+ constraint evnt_org_map_user_id_fk
+ references users,
+ role_id integer
+ constraint evnt_org_map_role_id_nn
+ not null
+ constraint evnt_org_map_role_id_fk
+ references events_event_organizer_roles,
+ constraint events_org_map_pk primary key (user_id, role_id)
+);
+
+
+
+
+
Managing Registrations
+
+For each person who registers for an event, the software helps
+organizations understand who is coming to their events and why. It also
+helps an organization accommodate its attendees' needs and group them
+together.
+
+
+The events module organizes registrations in the following way: a
+registration represents a person who has expressed interest in attending
+the event. There is one registration for each person who wants to
+attend. Registrations can have different states. For example, a
+registration may be wait-listed because there are already too many
+registrations for a particular event. Or, a registration may be
+canceled.
+
+
+An order is a set of registrations. Typically, when a person registers
+himself for an event, he will create one order containing his single
+registration. But, there may be an individual who wishes to register
+multiple people at once. In that case, the individual would make one
+order containing multiple registrations. Thus, this data model allows
+people to make multiple registrations. The Web pages do not yet
+implement this feature, though.
+
+
+
+
+create table events_orders (
+ order_id integer not null primary key,
+-- ec_order_id integer references ec_orders,
+ -- the person who made the order
+ user_id integer not null references users,
+ paid_p char(1) default null check (paid_p in ('t', 'f', null)),
+ payment_method varchar(50),
+ confirmed_date date,
+ price_charged number,
+ -- the date this registration was refunded, if it was refunded
+ refunded_date date,
+ price_refunded number,
+ ip_address varchar(50) not null
+);
+
+create table events_registrations(
+ -- Goes into table at confirmation time:
+ reg_id integer not null primary key,
+ order_id integer not null references events_orders,
+ price_id integer not null references events_prices,
+ -- the person registered for this reg_id (may not be the person
+ -- who made the order)
+ user_id integer not null references users,
+ -- reg_states: pending, shipped, canceled, waiting
+ --pending: waiting for approval
+ --shipped: registration all set
+ --canceled: registration canceled
+ --waiting: registration is wait-listed
+ reg_state varchar(50) not null check (reg_state in ('pending', 'shipped', 'canceled', 'waiting')),
+ -- when the registration was made
+ reg_date date,
+ -- when the registration was shipped
+ shipped_date date,
+ org varchar(4000),
+ title_at_org varchar(4000),
+ attending_reason clob,
+ where_heard varchar(4000),
+ -- does this person need a hotel?
+ need_hotel_p char(1) default 'f' check (need_hotel_p in ('t', 'f')),
+ -- does this person need a rental car?
+ need_car_p char(1) default 'f' check (need_car_p in ('t', 'f')),
+ -- does this person need airfare?
+ need_plane_p char(1) default 'f' check (need_plane_p in ('t', 'f')),
+ comments clob
+);
+
+
+
+
+
The Presentation Pages
+
+The vast majority of the events module's Web interface is located in its
+admin directory. From these pages, an event administrator can manage
+his events and event registrants.
+
+The Main Admin Page
+
+The main administration page provides a summary of current event
+registrations and links to the key functions he can perform:
+
+Managing activities
+ Managing venues
+ Viewing order histories
+ Spamming (e-mailing) registrants
+
+
+
+[screenshot of main admin page]
+
+
+
Managing Activities and Events
+
+As previously stated, one of the goals of the events module was to
+facilitate repeating events through the use of activities and events.
+Separate admin pages for managing activities and events accomplish this
+goal. Furthermore, the event admin page links to pages which fulfill
+other goals for the events module: The event admin page links to pages
+displaying order-histories, helping administrators handle registrations.
+It also links to pages for e-mailing registrants, providing for easy
+communication to registrants. Finally, it links to the event's user
+group, letting the administrator coordinate registrants.
+
+
+[screenshot of activity admin page]
+
+
+[screenshot of event admin page]
+
+
+One of the links from the main administration page is for managing
+venues. Venues are locations where events occur. Since an organization
+or person's events will usually take place within a certain set of
+venues, the events module provides a means of creating and managing
+these locations. Then, when an event administrator creates an event, he
+can easily select an existing venue for his event -- and save himself the
+work of typing in all the relevant information for that venue again.
+
+
+[screenshot of venues admin page]
+
+
+
Managing Registrations
+
+The Order History pages provide most of the functionality for managing
+registrations. From these pages, event administrators can view
+aggregated registration information and answer questions such as, "how
+many people registered for that event," or "how many people placed
+registrations on this date?"
+
+
+[screenshot of order history index page]
+
+
+Event administrators can also view a single registration and perform
+actions upon it, like approving it.
+
+
+[screenshot of single registration order history]
+
+
+
+
E-mailing Registrants
+
+When a person places a registration in the events module, he has to
+provide his e-mail address. This means that event administrators can
+e-mail groups of registrants and individual registrants from the admin
+pages -- perhaps, for example, to advertise an upcoming, similar event.
+
+
+[screenshot of page for e-mailing registrants]
+
+
+
Coordinating Registrants
+
+Because the events module is part of the ArsDigita Community System
+(ACS), it has access to all of the community-building features within
+the ACS. Each event, as explained earlier, has a corresponding ACS user
+group. All registrants for a particular event are automatically placed
+into their respective event's user group. This means that event
+administrators can easily provide, using other ACS modules, the ability
+for an event's registrants to communicate and collaborate together in a
+variety of ways. For example, the event administrator could add a
+bboard to an event's user group. Then, the individuals within that user
+group could post messages for each other. The link to managing the
+event's user group comes from the event admin page.
+
+
+[screenshot of an ACS bulletin board]
+
+
+
User Registration
+
+Although the power and convenience of online registration benefits
+events administrators the most, registrants should still find it simple
+to register for an event. Thus, the user interface for placing a
+registration is fairly straightforward. The events module tries to fill
+in as much personal information as possible for the registrant if he is
+already an ACS user of the registration Web site. Then, the user must
+simply provide the rest of the registration material in which the even
+planners are interested.
+
+
+[screenshot of registration page]
+
+
+
Events Module Comparison
+
+Key3Media
+
+Because the events module focuses on enabling event administrators
+rather than event registrants, it offers significant advantages against
+most online registration offerings, which traditionally view Web-based
+registration as simply another way to collect registration information.
+Registration sites which do not offer special capabilities for event
+planners lose out on much of the power and efficiency that comes from
+offering events online. For example, Key3Media is a large company which
+handles online registration for a number of events, including Comdex,
+JavaOne, and Linux Business Expo. But, Key3Media treats online
+registration as nothing more than another means to collect information
+as part of a complicated setup for registering people.
+
+
+Key3Media collects registration information for events through both
+paper and Web applications. Web applications go directly into a
+database; paper applications are entered into the database by Key3Media
+employees. Once Key3Media processes an application, it sends a
+confirmation message to the application's registrant. Online
+registrants receive an online confirmation, and paper applicants receive
+a paper confirmation.
+
+
+Upon completing signups for an event, Key3Media exports all of its
+registration information into a file -- typically a Microsoft Excel
+spreadsheet -- and gives the file to another company. This company
+serves as a "holding tank" for the registration data and eventually
+passes the records to a third company. This third company may be the
+Key3Media client running the event or perhaps a company building a Web
+site for the client's event, and it uses the registration data as it
+wishes.
+
+
+Key3Media's solution for handling event registration seems to work fine
+for collecting information. But, its solution does little to help event
+planners communicate with registrants, coordinate registrants, and
+aggregate information about registrants. Key3Media cannot inform a
+client for what other of the client's events a person has registered.
+Key3Media cannot help registrants collaborate and communicate.
+Key3Media cannot offer a centralized, unified, and integrated interface
+to event management. The events module, by focusing on event planners,
+does offer all these features in addition to facilitating easy online
+event-registration.
+
+
+<%
+#UNCOMMENT THIS SECTION OUT ONCE WE HAVE APPROVAL
+#FROM ORACLE TO PUBLISH IT
+
+#One significant reason for choosing Key3Media is that it will process both
+#paper and electronic registrations. Because the events module is a
+#Web-based application, it cannot intrinsically handle paper
+#applications. However, event administrators may still take advantage of
+#the planning and organizing capabilities of the events module while
+#contracting out registration-handling to a company like Key3Media.
+#Indeed, this is what Oracle is doing for its iDevelop 2000 Conferences
+#site (http://idevelop2000.com ).
+#
+#
+#ArsDigita is building the Oracle iDevelop site based upon the events
+#module. By doing so, ArsDigita enables Oracle iDevelop planners to
+#manage their conferences and conference attendants. But, Oracle has
+#hired another company (Key3Media) to handle its registrations, allowing
+#Oracle to offer multiple means of registration. Once Key3Media has
+#collected its registration data, it will pass the information to
+#ArsDigita. ArsDigita will then upload the registration information into
+#the events module -- allowing iDevelop administrators to organize their
+#conferences and attendees just as if the attendees had registered for
+#iDevelop through the events module's own registration pages. In this
+#way, Oracle will be able to harness virtually all of the power of the
+#events module while still allowing for paper-based registrations. Of
+#course, why anyone attending an Oracle Technology Network conference
+#would choose a paper application over the Internet is another matter.
+%>
+
+
Evite.com
+
+Although most Web sites that offer online registration do not support
+much functionality for event planners, there are a number of sites
+springing up which offer users some basic abilities to plan and organize
+personal functions. Evite.com
+(http://www.evite.com ) is one such
+popular site.
+
+
+Evite.com focuses on helping users to plan events for which they would
+like to invite guests. It does this by offering a simple interface for
+individuals to:
+
+
+plan a series of events
+ invite people to those events
+ RSVP to events to which they are invited
+ see who is coming to their events
+ remind themselves about events
+
+
+In many ways, Evite.com and other, similar sites
+(http://socialeventplanner.com ,
+http://invites.yahoo.com ,
+http://www.pleasersvp.com ,
+and so on) understand that their sites are
+useful because they enable people to plan and organize events. Evite
+even supports, to some extent, the four goals outlined for the events
+module.
+
+
+Evite supports repeating events as well as the distinction between
+activities and events. For example, a user can create invitations for a
+"Birthday" event and have this Birthday event repeat every year.
+Birthdays, then, are like activities in the events module, and the
+annual Birthday parties are like events within the events module.
+Evite.com, though, does not support creating arbitrary activities like
+the events module.
+
+
+Evite helps users handle registrations by allowing users to setup lists
+of guests to invite to their events. Once a user has setup a guest list
+for an event, Evite sends e-mail to each person on the user's guest
+list, notifying him that he has been invited to an event. Evite also
+allows these invitees to RSVP so that users may see who is coming to
+their events. Evite lacks, however, a number of the aggregation and
+advanced registration-handling functions of the events module. Evite
+also does not let users create events for which arbitrary users can
+register -- event registrants must first be invited.
+
+
+Communicating with invitees through Evite takes place through Evite's
+address book features. Users may store email contacts and create groups
+of contacts within their address book. Then, they can send e-mail to
+individual e-mail addresses or to groups of e-mail addresses. This
+functionality seems fairly limited as it does not provide much support
+for communicating within the context of an event. For example, users
+cannot ask to e-mail "all the people who attended these three
+events" -- as they could within the events module.
+
+
+If Evite offers limited communications capabilities, it supports even
+fewer community-building options. Unlike the events module, which
+supports a host of community capabilities through other ACS modules,
+Evite merely lets invitees see who else is coming to a particular event.
+
+
+Evite.com and other event planning sites on the Internet are optimized
+to help individuals plan social events like a Memorial Day barbeque.
+The events module was designed to handle enterprise event planning and
+registration -- and is consequently much more powerful than a site like
+Evite.com. People may still use the events module, though, to implement
+something like Evite.com; its data model and Web pages intrinsically
+support virtually all of the functionality of Evite.
+
+
+
Events Module Future Features
+
+ArsDigita has been using the events module for several months now on its
+own Web site
+(http://www.arsdigita.com/events ).
+This module has handled thousands of registrations for lectures,
+bootcamps, and other activities. So far, the events module has
+performed well and provided event administrators with a great deal of
+time-saving and convenience. The module more than adequately achieves
+the four goals I outlined in the beginning of this article. Still,
+there are several key areas in which ArsDigita plans to improve
+this module.
+
+
+First of all, the data model for the events module supports
+tasks which the Web pages do not yet implement. These main
+features are support for various event prices, support for online
+payment for events, and support for multiple registrations per order.
+Adding these features will enable organizations to charge registrants
+for their events, charge different types of registrants different
+amounts of money, and allow one person to place multiple registrations
+on behalf of other people.
+
+
+ArsDigita also plans to expand its support of event registrations for
+sub-communities. The events module already allows ACS user groups to
+own event activities. Consequently, user groups may administrate their
+own events and also restrict others from administering those same
+events. But, this is the extent of the event module's sub-community
+features. ArsDigita intends to further aid sub-communities by making it
+possible for them to maintain their own "instances" of the events
+module. Thus, sub-sites will be able to offer their own, distinct
+registration pages and URL's as well as administration pages. An
+ArsDigita Boot Camp sub-community could, for example, offer its own
+events at www.arsdigita.com/bootcamp/events/ instead of listing its boot
+camps along with all the other events at www.arsdigita.com/events/.
+
+
+Finally, there are some areas in the data model ArsDigita plans to
+re-write because they are not elegant. Foremost of these areas is how
+the module handles event custom fields. Currently, the data model is
+styled after the user group module and creates a new event_n_info table
+for each event. Ideally, the module would store custom information
+within the user_group_member_fields/user_group_member_field_map tables.
+But, these tables do not support enough data types for the events module
+yet. There are plans, though, to update these user group tables in the
+near future so that the events module may store information within them
+for registrants.
+
+
+Submitted by Bryan Che
Index: openacs-4/contrib/packages/events/www/doc/asj/main-admin.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/main-admin.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/main-admin.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,219 @@
+
+
+
+ArsDigita Events Administration
+
+
+
+
+Events Administration
+Your Workspace : Events Administration
+
+
+
+
+Current Events Registration Status
+
+
+
+
+
+Activity
+
+Location
+
+Start v
+
+End
+
+Confirmed
+
+Pending
+
+Wait-Listed
+
+Total
+
+
+ 2 Week Boot Camp
+ Cambridge, MA
+ September 5, 2000
+ September 15, 2000
+
+
+ 23
+
+ 1
+ 3
+
+
+ 27
+
+
+
+ Two-day Boot Camp (long weekend)
+ Atlanta, GA
+ September 9, 2000
+ September 10, 2000
+
+
+ 22
+
+
+
+ 1
+
+ 0
+
+
+ 23
+
+
+
+ 1 Week Boot Camp
+ Berkeley, CA
+ September 11, 2000
+ September 15, 2000
+
+
+ 10
+
+ 0
+ 0
+
+
+ 10
+
+
+
+ One-day Course: Web Tools for Online Communities
+ Cyberjaya, Malaysia
+ September 13, 2000
+ September 13, 2000
+
+
+ 10
+
+ 0
+ 0
+
+
+ 10
+
+
+
+ One-day Course: Web Tools for Online Communities
+ Cyberjaya, Selangor, Malaysia
+ September 14, 2000
+ September 14, 2000
+
+
+ 40
+
+ 0
+ 0
+
+
+ 40
+
+
+
+ 1 Week Boot Camp
+ Washington, DC
+ September 25, 2000
+ September 29, 2000
+ 0
+ 0
+ 0
+ 0
+
+
+ Two-day Boot Camp (long weekend)
+ Cambridge, MA
+ September 30, 2000
+ October 1, 2000
+ 0
+
+
+ 1
+
+ 0
+
+
+ 1
+
+
+
+ 2 Week Boot Camp
+ Cambridge, MA
+ October 2, 2000
+ October 13, 2000
+ 0
+
+
+ 3
+
+ 0
+
+
+ 3
+
+
+
+ ACS installation Boot Camp
+ Hamburg, Germany
+ October 2, 2000
+ October 2, 2000
+
+
+ 1
+
+
+
+ 4
+
+ 0
+
+
+ 5
+
+
+
+ 3 Week Boot Camp
+ Hamburg, Germany
+ October 4, 2000
+ October 20, 2000
+
+
+ 12
+
+
+
+ 3
+
+ 0
+
+
+ 15
+
+
+
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
Index: openacs-4/contrib/packages/events/www/doc/asj/order-history-one-activity.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/order-history-one-activity.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/order-history-one-activity.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,58 @@
+
+
+
+ArsDigita Events Administration: Order History - By Activity
+
+
+
+ Order History - For Activity # 221 (One-day Course: Web Tools for Online Communities)
+Your Workspace : Events Administration : Order History : By Activity : Activity
+
+
+
+
+ Event Location
+ Date
+ Number of Registrations
+
+ Seattle, WA
+ July 16, 2000
+ 2 registrations
+ Cambridge, MA
+ June 24, 2000
+ 116 registrations
+ Tel Aviv, Israel
+ June 15, 2000
+ 40 registrations
+ Philadelphia, PA
+ April 9, 2000
+ 82 registrations
+ Cambridge, MA
+ April 2, 2000
+ 334 registrations
+ Cambridge, MA
+ January 9, 2000
+ 334 registrations
+ Palo Alto, CA
+ December 21, 1999
+ 217 registrations
+ Munich, Germany
+ December 14, 1999
+ 36 registrations
+ Bristol, United Kingdom
+ November 30, 1999
+ 50 registrations
+ Berkeley, CA
+ November 22, 1999
+ 253 registrations
+ Pasadena, CA
+ November 14, 1999
+ 184 registrations
+
+
+
+
+
+webmaster@arsdigita.com
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/doc/asj/order-history.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/order-history.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/order-history.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,40 @@
+
+
+
+ArsDigita Events Administration: Events Order History
+
+
+
+
+Order History
+Your Workspace : Events Administration : Order History
+
+
+View Orders/Statistics by:
+
+
+
+Search For an Individual Registration:
+
+
+Enter either the registration number or the customer's last name for the order you wish to view:
+
+
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
Index: openacs-4/contrib/packages/events/www/doc/asj/order-one.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/order-one.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/order-one.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,355 @@
+
+
+
+Register
+
+
+
+
+Register
+ for
+ 3 Week Boot Camp
+ in Pasadena, CA
+
+Your Workspace : Events : Register
+
+Note: A registration for this event
+ requires final approval from an administrator. If you sign up
+ for 3 Week Boot Camp, your final registration will be pending
+ administrator approval.
+
+
+
+
+
+
+About the Event
+
+
+
Start Date: Monday, June 12, 2000,
+9:00 AM
+
+
+ End Date: Friday, June 30, 2000,
+8:00 PM
+
+ Registration Deadline : Monday,
+June 12, 2000,
+8:00 AM
+
+Pasadena, CA
+(you'll get specifics after you register)
+
+
+
+
+
+About You
+
+
+
+
+Mailing Address
+
+
+
+
+
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/doc/asj/reg-wait-list.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/reg-wait-list.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/reg-wait-list.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,34 @@
+
+
+
+
+Wait-List Registration
+
+
+
+Wait-List Registration for 2 Week Boot Camp
+Your Workspace : Events Administration : Wait-List Registration
+
+
+
+
+Are you sure that you want to wait-list alyssa_p_hacker@mit.edu's registration for 2 Week Boot Camp?
+
+If you would like, you may enter a comment for why you
+are wait-listing this registration:
+
+
+
+
+
+
+
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
Index: openacs-4/contrib/packages/events/www/doc/asj/single-order-history.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/single-order-history.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/single-order-history.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,166 @@
+
+
+
+Registration # 17470 (canceled)
+
+
+
+Registration # 17470 (canceled)
+Your Workspace : Events Administration : Order History : Registration
+
+
+
+
+
+Event Information
+3 Week Boot Camp in
+ Berkeley, CA
+ from May 8, 2000 to May 26, 2000
+
+
+Registration Information
+
+
+ Registration State
+ canceled
+
+ Registration Date
+ 2000-05-01 13:05:29
+
+
+
+
+
+Customer Information
+
+
+
+ Name
+ Bryan Che
+
+
+ Email
+ bryanche@arsdigita.com
+
+
+ Telephone number
+ 617-555-3141
+
+
+ Address
+ 500 Memorial Dr
+
+ #243
+
+
+ Cambridge, MA 02139
+
+ Attending reason
+ Sounds like fun
+
+
+ Heard from
+ me
+
+
+
+ Application Letter
+ Hi, this is my application
+
+
+ Resume
+ I work
+ Needs
+ Comments
+------
+Sent the following e-mail to this registrant on 2000-05-01 13:13:54:
+
+We need more information to process your registration for
+3 Week Boot-Camp in
+ Berkeley, CA
+ from May 8, 2000 to May 26, 2000
+
+Please come to
+http://www.arsdigita.com/events/order-one.tcl?event_id=831
+------
+
+
+
+Registration Maintenance
+
+
+
+All info in events_registrations table regarding registration # 17470
+This is probably only worth looking at if there's a problem with the registration.
+
+
+
+
+ REG_ID
+ 17470
+
+ ORDER_ID
+ 79320
+
+ PRICE_ID
+ 382
+
+ USER_ID
+ 1929
+
+ REG_STATE
+ canceled
+
+ ORG
+ aD
+
+ TITLE_AT_ORG
+ developer
+
+ ATTENDING_REASON
+ Sounds like fun
+
+ WHERE_HEARD
+ me
+
+ NEED_HOTEL_P
+ f
+
+ NEED_CAR_P
+ f
+
+ NEED_PLANE_P
+ f
+
+ COMMENTS
+
+------
+Sent the following e-mail to this registrant on 2000-05-01 13:13:54:
+
+We need more information to process your registration for
+3 Week Boot-Camp in
+ Berkeley, CA
+ from May 8, 2000 to May 26, 2000
+
+Please come to
+http://www.arsdigita.com/events/order-one.tcl?event_id=831
+------
+
+ REG_DATE
+ 2000-05-01
+
+ SHIPPED_DATE
+
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
Index: openacs-4/contrib/packages/events/www/doc/asj/spam-selected-events.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/spam-selected-events.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/spam-selected-events.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,192 @@
+
+
+
+Spam Selected Events
+
+
+
+ Spam Selected Events
+Your Workspace : Events Administration : Spam Selected Events
+
+ Select the event(s) whose registrants you would like to spam
+ or
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Activity v
+
+Location
+
+Start
+
+End
+
+
+
+ 3 Week Boot Camp
+ Cambridge, MA
+ May 11, 2000
+ May 26, 2000
+
+
+
+ 3 Week Boot Camp
+ Cambridge, MA
+ March 6, 2000
+ March 24, 2000
+
+
+
+ 3 Week Boot Camp
+ Hamburg, Germany
+ October 4, 2000
+ October 20, 2000
+
+
+
+ Evening Course: Web Application Design
+ Toronto, Ontario, Canada
+ June 26, 1999
+ June 26, 1999
+
+
+
+ Future Events
+ Palo Alto, CA
+ June 1, 2000
+ July 1, 2000
+
+
+
+ One-day Course: Web Application Design
+ Cambridge, MA
+ January 11, 1999
+ January 11, 1999
+
+
+
+ One-day Course: Web Application Design
+ Cambridge, MA
+ June 25, 1999
+ June 25, 1999
+
+
+
+ One-evening Web Course
+ Melbourne, Australia
+ July 24, 2000
+ July 24, 2000
+
+
+
+ One-evening Web Course
+ Sydney, Australia
+ July 21, 2000
+ July 21, 2000
+
+
+
+ Oracle iDevelop Conference
+ Taipei, Taiwan
+ August 9, 2000
+ August 9, 2000
+
+
+
+ Oracle iDevelop Conference
+ Tel Aviv, Israel
+ June 12, 2000
+ June 12, 2000
+
+
+
+ Oracle iDevelop Conference
+ Tel Aviv, Israel
+ June 13, 1999
+ June 13, 1999
+
+
+
+ Oracle iDevelop Conference
+ Toronto, Canada
+ June 26, 2000
+ June 26, 2000
+
+
+
+ Test Activity
+ Cambridge, MA
+ August 24, 1999
+ August 24, 1999
+
+
+
+ Two-day Boot Camp (long weekend)
+ Washington, DC
+ July 15, 2000
+ July 16, 2000
+
+
+
+ Two-day Boot Camp (long weekend)
+ Washington, DC
+ August 26, 2000
+ August 27, 2000
+
+
+
+
+
+Do you want to spam:
+
+ Confirmed Registrants
+ Pending Registrants
+ Wait-Listed Registrants
+ All Registrants
+
+
+
+
+
+
+
+
+webmaster@arsdigita.com
+
+
\ No newline at end of file
Index: openacs-4/contrib/packages/events/www/doc/asj/spam.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/spam.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/spam.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,62 @@
+
+
+
+
+Spam
+
+
+
+Spam
+
+Your Workspace : Events Administration : Spam
+
+
+
+
+
+
+From:
+
+To: You are e-mailing 11 people.
+
+
+ View whom you're spamming
+
+
Send Date:
+ January
+ February
+ March
+ April
+ May
+ June
+ July
+ August
+ September
+ October
+ November
+ December
+
+ Send Time:
+ AM
+ PM
+
+
+
+Subject:
+
+Message:
+
+
+
+
+
+
+
+
+
+
+
+
+bryanche@arsdigita.com
+
+
Index: openacs-4/contrib/packages/events/www/doc/asj/venues-admin.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/www/doc/asj/venues-admin.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/events/www/doc/asj/venues-admin.html 9 Mar 2003 12:09:03 -0000 1.1
@@ -0,0 +1,199 @@
+
+
+Update a Venue
+
+
+
+Update a Venue Your
+Workspace : Events
+Administration : Venues : Venue
+
+
+
+
+
+
+
+
+webmaster@arsdigita.com