Index: openacs-4/packages/calendar/www/cal-dayview-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-dayview-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/calendar/www/cal-dayview-oracle.xql 23 Sep 2001 14:45:00 -0000 1.1 @@ -0,0 +1,64 @@ + + + + oracle8.1.6 + + + + + select to_char(start_date, 'HH24') as start_hour, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + coalesce(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + + + + select to_char(start_date, 'HH24') as start_hour, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + coalesce(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + Index: openacs-4/packages/calendar/www/cal-dayview-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-dayview-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/calendar/www/cal-dayview-postgresql.xql 23 Sep 2001 14:45:00 -0000 1.1 @@ -0,0 +1,64 @@ + + + + postgresql7.1 + + + + + select to_char(start_date, 'HH24') as start_hour, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + coalesce(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + + + + select to_char(start_date, 'HH24') as start_hour, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + coalesce(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + Index: openacs-4/packages/calendar/www/cal-dayview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-dayview.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/calendar/www/cal-dayview.tcl 18 Sep 2001 06:34:46 -0000 1.6 +++ openacs-4/packages/calendar/www/cal-dayview.tcl 23 Sep 2001 14:40:55 -0000 1.7 @@ -29,58 +29,6 @@ set current_date $date set date_format "YYYY-MM-DD HH24:MI" -#get cal-item -set sql " -select to_char(start_date, 'HH24') as start_hour, - to_char(start_date, 'HH24:MI') as pretty_start_date, - to_char(end_date, 'HH24:MI') as pretty_end_date, - coalesce(e.name, a.name) as name, - e.event_id as item_id -from acs_activities a, - acs_events e, - timespans s, - time_intervals t -where e.timespan_id = s.timespan_id -and s.interval_id = t.interval_id -and e.activity_id = a.activity_id -and start_date between - to_date(:current_date,:date_format) and - to_date(:current_date,:date_format) + (24 - 1/3600)/24 -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar = :calendar_id - ) - -" - -#set sql " -#select to_char(start_date, 'HH24') as start_hour, -# to_char(start_date, 'HH24:MI') as pretty_start_date, -# to_char(end_date, 'HH24:MI') as pretty_end_date, -# nvl(e.name, a.name) as name, -# e.event_id as item_id -#from acs_activities a, -# acs_events e, -# timespans s, -# time_intervals t -#where e.timespan_id = s.timespan_id -#and s.interval_id = t.interval_id -#and e.activity_id = a.activity_id -#and start_date between -# to_date(:current_date,:date_format) and -# to_date(:current_date,:date_format) + (24 - 1/3600)/24 -#and e.event_id -#in ( -# select cal_item_id -# from cal_items -# where on_which_calendar = :calendar_id -# ) -#" - - - set mlist "" set set_id [ns_set new day_items] @@ -105,7 +53,7 @@ set calendar_name [calendar_get_name $calendar_id] } - db_foreach get_day_items $sql { + db_foreach get_day_items "" { ns_set put $set_id $start_hour " $pretty_start_date - $pretty_end_date $name ($calendar_name) @@ -130,7 +78,7 @@ set calendar_name [calendar_get_name $calendar_id] } - db_foreach get_day_items $sql { + db_foreach get_day_items "" { ns_set put $set_id $start_hour " $pretty_start_date - $pretty_end_date $name ($calendar_name)
" Index: openacs-4/packages/calendar/www/cal-listview-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-listview-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/calendar/www/cal-listview-oracle.xql 23 Sep 2001 14:45:00 -0000 1.1 @@ -0,0 +1,64 @@ + + + + oracle8.1.6 + + + + +select to_char(start_date, 'j') as start_date, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + nvl(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + + + +select to_char(start_date, 'j') as start_date, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + nvl(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + Index: openacs-4/packages/calendar/www/cal-listview-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-listview-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/calendar/www/cal-listview-postgresql.xql 23 Sep 2001 14:45:00 -0000 1.1 @@ -0,0 +1,64 @@ + + + + postgresql7.1 + + + + +select to_char(start_date, 'J') as start_date, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + coalesce(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + + + +select to_char(start_date, 'J') as start_date, + to_char(start_date, 'HH24:MI') as pretty_start_date, + to_char(end_date, 'HH24:MI') as pretty_end_date, + coalesce(e.name, a.name) as name, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and start_date between + to_date(:current_date,:date_format) and + to_date(:current_date,:date_format) + (24 - 1/3600)/24 +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + Index: openacs-4/packages/calendar/www/cal-listview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-listview.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/calendar/www/cal-listview.tcl 15 Sep 2001 07:14:32 -0000 1.4 +++ openacs-4/packages/calendar/www/cal-listview.tcl 23 Sep 2001 14:40:55 -0000 1.5 @@ -35,59 +35,6 @@ # find out the user_id set user_id [ad_verify_and_get_user_id] - -#get cal-item -set sql " -select to_char(start_date, 'J') as start_date, - to_char(start_date, 'HH24:MI') as pretty_start_date, - to_char(end_date, 'HH24:MI') as pretty_end_date, - coalesce(e.name, a.name) as name, - e.event_id as item_id -from acs_activities a, - acs_events e, - timespans s, - time_intervals t -where e.timespan_id = s.timespan_id -and s.interval_id = t.interval_id -and e.activity_id = a.activity_id -and start_date between - to_date(:current_date,:date_format) and - to_date(:current_date,:date_format) + (24 - 1/3600)/24 -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar = :calendar_id - ) -" - - -#set sql " -#select to_char(start_date, 'j') as start_date, -# to_char(start_date, 'HH24:MI') as pretty_start_date, -# to_char(end_date, 'HH24:MI') as pretty_end_date, -# nvl(e.name, a.name) as name, -# e.event_id as item_id -#from acs_activities a, -# acs_events e, -# timespans s, -# time_intervals t -#where e.timespan_id = s.timespan_id -#and s.interval_id = t.interval_id -#and e.activity_id = a.activity_id -#and start_date between -# to_date(:current_date,:date_format) and -# to_date(:current_date,:date_format) + (24 - 1/3600)/24 -#and e.event_id -#in ( -# select cal_item_id -# from cal_items -# where on_which_calendar = :calendar_id -# ) -#" - - - #------------------------------------------------- # verifiy if the calendar_list has elements or not @@ -107,7 +54,7 @@ set calendar_name [calendar_get_name $calendar_id] } - db_foreach get_day_items $sql { + db_foreach get_day_items "" { ns_set put $set_id $start_date " $pretty_start_date - $pretty_end_date $name ($calendar_name)
" @@ -136,7 +83,7 @@ set calendar_name [calendar_get_name $calendar_id] } - db_foreach get_day_items $sql { + db_foreach get_day_items "" { ns_set put $set_id $start_date " $pretty_start_date - $pretty_end_date $name ($calendar_name)
" Index: openacs-4/packages/calendar/www/cal-monthview-oralce.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-monthview-oralce.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/calendar/www/cal-monthview-oralce.xql 23 Sep 2001 14:45:00 -0000 1.1 @@ -0,0 +1,56 @@ + + + + oracle8.1.6 + + + + + select to_char(start_date, 'j') as start_date, + nvl(e.name, a.name) as name, + nvl(e.description, a.description) as description, + e.event_id as item_id + from acs_activities a, + acs_events e, + timespans s, + time_intervals t + where e.timespan_id = s.timespan_id + and s.interval_id = t.interval_id + and e.activity_id = a.activity_id + and e.event_id + in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + + + + select to_char(start_date, 'j') as start_date, + nvl(e.name, a.name) as name, + nvl(e.description, a.description) as description, + e.event_id as item_id + from acs_activities a, + acs_events e, + timespans s, + time_intervals t + where e.timespan_id = s.timespan_id + and s.interval_id = t.interval_id + and e.activity_id = a.activity_id + and e.event_id + in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + Index: openacs-4/packages/calendar/www/cal-monthview-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-monthview-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/calendar/www/cal-monthview-postgresql.xql 23 Sep 2001 14:45:00 -0000 1.1 @@ -0,0 +1,56 @@ + + + + postgresql7.1 + + + + +select to_char(start_date, 'J') as start_date, + coalesce(e.name, a.name) as name, + coalesce(e.description, a.description) as description, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + + + +select to_char(start_date, 'J') as start_date, + coalesce(e.name, a.name) as name, + coalesce(e.description, a.description) as description, + e.event_id as item_id +from acs_activities a, + acs_events e, + timespans s, + time_intervals t +where e.timespan_id = s.timespan_id +and s.interval_id = t.interval_id +and e.activity_id = a.activity_id +and e.event_id +in ( + select cal_item_id + from cal_items + where on_which_calendar = :calendar_id + ) + + + + + + Index: openacs-4/packages/calendar/www/cal-monthview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/cal-monthview.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/calendar/www/cal-monthview.tcl 17 Sep 2001 06:43:05 -0000 1.4 +++ openacs-4/packages/calendar/www/cal-monthview.tcl 23 Sep 2001 14:40:55 -0000 1.5 @@ -22,47 +22,6 @@ # find out the user_id set user_id [ad_verify_and_get_user_id] -# extract all the cal-item that's occuring within the given month - -set sql " -select to_char(start_date, 'J') as start_date, - coalesce(e.name, a.name) as name, - coalesce(e.description, a.description) as description, - e.event_id as item_id -from acs_activities a, - acs_events e, - timespans s, - time_intervals t -where e.timespan_id = s.timespan_id -and s.interval_id = t.interval_id -and e.activity_id = a.activity_id -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar = :calendar_id - ) -" -#set sql " -#select to_char(start_date, 'j') as start_date, -# nvl(e.name, a.name) as name, -# nvl(e.description, a.description) as description, -# e.event_id as item_id -#from acs_activities a, -# acs_events e, -# timespans s, -# time_intervals t -#where e.timespan_id = s.timespan_id -#and s.interval_id = t.interval_id -#and e.activity_id = a.activity_id -#and e.event_id -#in ( -# select cal_item_id -# from cal_items -# where on_which_calendar = :calendar_id -# ) -#" - set mlist "" set set_id [ns_set new month_items] @@ -87,7 +46,7 @@ } - db_foreach get_monthly_items $sql { + db_foreach get_monthly_items "" { ns_set put $set_id $start_date " $name ($calendar_name)
" @@ -116,7 +75,7 @@ } - db_foreach get_monthly_items $sql { + db_foreach get_monthly_items "" { ns_set put $set_id $start_date " $name ($calendar_name)
"