__ ( 'Past events', 'dbem' ), 'all' => __ ( 'All events', 'dbem' ), 'future' => __ ( 'Future events', 'dbem' ) ); $action_scope = ( !empty($_REQUEST['em_obj']) && $_REQUEST['em_obj'] == 'em_bookings_events_table' ); $action = ( $action_scope && !empty($_GET ['action']) ) ? $_GET ['action']:''; $order = ( $action_scope && !empty($_GET ['order']) ) ? $_GET ['order']:'ASC'; $limit = ( $action_scope && !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit $page = ( $action_scope && !empty($_GET['pno']) ) ? $_GET['pno']:1; $offset = ( $action_scope && $page > 1 ) ? ($page-1)*$limit : 0; $scope = ( $action_scope && !empty($_GET ['scope']) && array_key_exists($_GET ['scope'], $scope_names) ) ? $_GET ['scope']:'future'; // No action, only showing the events list switch ($scope) { case "past" : $title = __ ( 'Past Events', 'dbem' ); break; case "all" : $title = __ ( 'All Events', 'dbem' ); break; default : $title = __ ( 'Future Events', 'dbem' ); $scope = "future"; } $owner = !current_user_can('edit_others_events') ? get_current_user_id() : false; $events = EM_Events::get( array('scope'=>$scope, 'limit'=>0, 'order'=>$order, 'bookings'=>true, 'owner' => $owner ) ); $events_count = count ( $events ); $use_events_end = get_option ( 'dbem_use_event_end' ); ?>
= $limit ) { $events_nav = em_admin_paginate( $events_count, $limit, $page, array('em_ajax'=>0, 'em_obj'=>'em_bookings_events_table')); echo $events_nav; } ?>
= $offset || $offset === 0) ) { $rowno++; $class = ($rowno % 2) ? ' class="alternate"' : ''; // FIXME set to american $localised_start_date = date_i18n(get_option('date_format'), $event->start); $localised_end_date = date_i18n(get_option('date_format'), $event->end); $style = ""; $today = date ( "Y-m-d" ); if ($event->start_date < $today && $event->end_date < $today){ $style = "style ='background-color: #FADDB7;'"; } ?> >
output('#_BOOKINGSLINK'); ?> : get_bookings()->get_booked_spaces()."/".$event->get_spaces() ?> | : get_bookings()->get_pending_spaces(); ?> start_time, 0, 5 ) . " - " . substr ( $event->end_time, 0, 5 ); ?>

= $limit ) : ?>