select p.page_signature,
p.show_modified_p
from cr_wp_presentations p, cr_items i
where i.item_id = :pres_item_id
and i.live_revision = p.presentation_id
select i.item_id
from cr_wp_slides s, cr_items i
where i.parent_id = :pres_item_id
and i.live_revision = s.slide_id
and s.sort_key = (:sort_key - 1)
select i.item_id as next_slide_item_id
from cr_wp_slides s, cr_items i
where i.parent_id = :pres_item_id
and i.live_revision = s.slide_id
and s.sort_key = :next_sort_key