'; } switch ($_GET['action']) { case 'delete' : Rsys :: delete_subscription($_GET['reservation_id'],$_GET['dummy']); ob_start(); Display :: display_normal_message(Rsys::get_return_msg(get_lang('SubscriptionDeleted'),"mysubscriptions.php",$tool_name),false); $msg=ob_get_contents(); ob_end_clean(); default : $NoSearchResults=get_lang('NoReservations'); Display :: display_header($tool_name); api_display_tool_title($tool_name); if (api_is_allowed_to_create_course()) { echo '
'; echo '
'.Display::return_icon('sessions.gif',get_lang('BookingCalendarView')).' '.get_lang('GoToCalendarView').'
'; echo ''.Display::return_icon('cube.png',get_lang('Resources')).' '.get_lang('Resources').''; echo '  '.Display::return_icon('calendar_day.gif',get_lang('BookingPeriods')).' '.get_lang('BookingPeriods').''; echo '  '.Display::return_icon('calendar_add.gif',get_lang('BookIt')).' '.get_lang('BookIt').''; if (api_is_platform_admin()) { //echo '  '.Display::return_icon('settings.gif',get_lang('Configuration')).' '.get_lang('Configuration').''; } echo '

'; } 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(); } /** --------------------------------------------------------------------- */ Display :: display_footer(); ?>