Exemplo n.º 1
0
     echo '<div style="float: right;"><a href="reservation.php">' . Display::return_icon('sessions.gif', get_lang('BookingCalendarView')) . '&nbsp;' . get_lang('GoToCalendarView') . '</a></div>';
     echo '<a href="m_item.php?view=list">' . Display::return_icon('cube.png', get_lang('Resources')) . '&nbsp;' . get_lang('Resources') . '</a>';
     echo '&nbsp;&nbsp;<a href="m_reservation.php?view=list">' . Display::return_icon('calendar_day.gif', get_lang('BookingPeriods')) . '&nbsp;' . get_lang('BookingPeriods') . '</a>';
     echo '&nbsp;&nbsp;<a href="m_reservation.php?action=add&view=list">' . Display::return_icon('calendar_add.gif', get_lang('BookIt')) . '&nbsp;' . get_lang('BookIt') . '</a>';
     if (api_is_platform_admin()) {
         //echo '&nbsp;&nbsp;<a href="m_category.php">'.Display::return_icon('settings.gif',get_lang('Configuration')).'&nbsp;'.get_lang('Configuration').'</a>';
     }
     echo '</div><br />';
 }
 if (isset($_POST['action'])) {
     switch ($_POST['action']) {
         case 'delete_subscriptions':
             $ids = $_POST['subscriptions'];
             if (count($ids) > 0) {
                 foreach ($ids as $id) {
                     Rsys::delete_subscription(substr($id, 0, strpos($id, '-')), substr($id, strrpos($id, '-') + 1));
                 }
             }
             break;
     }
 }
 $table = new SortableTable('subscription', array('Rsys', 'get_num_subscriptions'), array('Rsys', 'get_table_subscriptions'), 2);
 $table->set_header(0, '', false, array('style' => 'width:10px'));
 $table->set_header(1, get_lang('ResourceName'), true);
 $table->set_header(2, get_lang('StartDate'), true);
 $table->set_header(3, get_lang('EndDate'), true);
 $table->set_header(4, get_lang('Accept'), true);
 $table->set_header(5, get_lang('Modify'), false, array('style' => 'width:50px;'));
 $table->set_column_filter(5, 'modify_filter');
 $table->set_form_actions(array('delete_subscriptions' => get_lang('DeleteSelectedSubscriptions')), 'subscriptions');
 $table->display();
Exemplo n.º 2
0
     $table->set_header(4, get_lang('SubscribedPerson'), true);
     $table->set_header(5, get_lang('SubscribedStartDate'), true);
     $table->set_header(6, get_lang('SubscribedEndDate'), true);
     $table->set_header(7, get_lang('Accept'), true);
     $table->display();
     break;
 case 'accept':
     $NoSearchResults = get_lang('NoReservation');
     if (empty($_GET['rid'])) {
         $_GET['rid'] = $_POST['rid'];
     }
     if ($_GET['switch'] == 'edit') {
         Rsys::set_accepted($_GET['dummy'], $_GET['set']);
     }
     if ($_GET['switch'] == 'delete') {
         Rsys::delete_subscription($_GET['rid'], $_GET['dummy']);
     }
     $interbreadcrumb[] = array("url" => "mysubscriptions.php", "name" => get_lang('Booking'));
     $interbreadcrumb[] = array("url" => "m_reservation.php", "name" => get_lang('ManageBookingPeriods'));
     Display::display_header(get_lang('AutoAccept'));
     api_display_tool_title(get_lang('AutoAccept'));
     $table = new SortableTable('accepting', array('Rsys', 'get_num_waiting_users'), array('Rsys', 'get_table_waiting_users'), 1);
     $table->set_additional_parameters(array('rid' => $_GET['rid'], 'action' => 'accept'));
     $table->set_header(0, '', false, array('style' => 'width:10px'));
     $table->set_header(1, get_lang('SubscribedPerson'), true);
     $table->set_header(2, get_lang('Class'), true);
     $table->set_header(3, get_lang('SubscribedStartDate'), false);
     $table->set_header(4, get_lang('SubscribedEndDate'), false);
     $table->set_header(5, get_lang('Accept'), false, array('style' => 'width:30px;'));
     $table->set_header(6, get_lang('Delete'), false, array('style' => 'width:30px;'));
     $table->set_form_actions(array('accept_users' => get_lang('AcceptUsers'), 'unaccept_users' => get_lang('UnacceptedUsers'), 'delete_subscriptions' => get_lang('DeleteSubscriptions')), 'accepting');