'index.php', 'name' => get_lang('Administration')]; $interbreadcrumb[] = ['url' => 'session_list.php', 'name' => get_lang('Session list')]; // Database Table Definitions $tbl_user = Database::get_main_table(TABLE_MAIN_USER); $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); $table_access_url_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); $url_id = api_get_current_access_url_id(); $action = $_GET['action']; switch ($action) { case 'add_user_to_url': $user_id = $_REQUEST['user_id']; $result = UrlManager::add_user_to_url($user_id, $url_id); $user_info = api_get_user_info($user_id); if ($result) { $message = Display::return_message( get_lang('The user has been added').' '.api_get_person_name( $user_info['firstname'], $user_info['lastname'] ), 'confirm' ); } break; } Display::display_header($tool_name); if (!empty($message)) { echo $message; } $multiple_url_is_on = api_get_multiple_access_url(); $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname'; $session_list = SessionManager::get_sessions_list(); $html = ''; $show_users_with_problems = isset($_REQUEST['show_users_with_problems']) && $_REQUEST['show_users_with_problems'] == 1 ? true : false; if ($show_users_with_problems) { $html .= ''.get_lang('Show all users').''; } else { $html .= ''.get_lang('Show users not added to the URL').''; } foreach ($session_list as $session_item) { $session_id = $session_item['id']; $html .= '
'.get_lang('User').' | '.get_lang('Detail').' |
---|---|
'.$user_link.' | '.$link_to_add_user_in_url.' |