Index: openacs-4/packages/calendar/www/view-one-day-display-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/Attic/view-one-day-display-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/calendar/www/view-one-day-display-oracle.xql 11 Aug 2003 12:14:16 -0000 1.2 +++ openacs-4/packages/calendar/www/view-one-day-display-oracle.xql 14 Aug 2003 15:44:08 -0000 1.3 @@ -2,54 +2,80 @@ oracle8.1.6 - + -select to_char(start_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_start_date, - to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as ansi_end_date, - nvl(e.name, a.name) as name, + select nvl(e.name, a.name) as name, nvl(e.status_summary, a.status_summary) as status_summary, e.event_id as item_id, - (select type from cal_item_types where item_type_id= cal_items.item_type_id) as item_type, - on_which_calendar as calendar_id, - (select calendar_name from calendars - where calendar_id = on_which_calendar) - as calendar_name + (select type from cal_item_types where item_type_id= ci.item_type_id) as item_type, + cals.calendar_id, + cals.calendar_name from acs_activities a, acs_events e, timespans s, time_intervals t, - cal_items + cal_items ci, + calendars cals 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 cal_items.cal_item_id= e.event_id -and e.event_id -in ( - select cal_item_id - from cal_items - where on_which_calendar in ([join $calendar_id_list ","]) - ) - + to_date(:current_date_system,:ansi_date_format) and + (to_date(:current_date_system,:ansi_date_format) + (24 - 1/3600)/24) +and ci.cal_item_id = e.event_id +and to_char(start_date, 'HH24:MI') = '00:00' +and to_char(end_date, 'HH24:MI') = '00:00' +and cals.package_id= :package_id +and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id)) +and cals.calendar_id = ci.on_which_calendar +and e.event_id = ci.cal_item_id - + + + select to_char(start_date, :ansi_date_format) as ansi_start_date, + to_char(end_date, :ansi_date_format) as ansi_end_date, + nvl(e.name, a.name) as name, + nvl(e.status_summary, a.status_summary) as status_summary, + e.event_id as item_id, + (select type from cal_item_types where item_type_id= ci.item_type_id) as item_type, + cals.calendar_id, + cals.calendar_name +from acs_activities a, + acs_events e, + timespans s, + time_intervals t, + cal_items ci, + calendars cals +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_system,:ansi_date_format) and + (to_date(:current_date_system,:ansi_date_format) + (24 - 1/3600)/24) +and ci.cal_item_id = e.event_id +and (to_char(start_date, 'HH24:MI') <> '00:00' or + to_char(end_date, 'HH24:MI') <> '00:00') +and cals.package_id= :package_id +and (cals.private_p='f' or (cals.private_p='t' and cals.owner_id= :user_id)) +and cals.calendar_id = ci.on_which_calendar +and e.event_id = ci.cal_item_id +order by to_char(start_date,'HH24') + + + select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'Day, DD Month YYYY') as day_of_the_week, -to_char(to_date(:current_date, 'yyyy-mm-dd') - cast('1 day' as interval), 'yyyy-mm-dd') +to_char((to_date(:current_date, 'yyyy-mm-dd') - 1), 'yyyy-mm-dd') as yesterday, -to_char(to_date(:current_date, 'yyyy-mm-dd') + cast('1 day' as interval), 'yyyy-mm-dd') +to_char((to_date(:current_date, 'yyyy-mm-dd') + 1), 'yyyy-mm-dd') as tomorrow from dual - -