function show_image(image,width,height) { width = parseInt(width) + 20; height = parseInt(height) + 20; window_x = window.open(image,\'windowX\',\'width=\'+ width + \', height=\'+ height + \'\'); } '; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; $htmlHeadXtra[] = ''; if ($_GET['chatid'] != '') { //send out call request $time = time(); $time = date("Y-m-d H:i:s", $time); $chatid = addslashes($_GET['chatid']); if ($_GET['chatid'] == strval(intval($_GET['chatid']))) { $sql = "update $track_user_table set chatcall_user_id = '".Database::escape_string($_user['user_id'])."', chatcall_date = '".Database::escape_string($time)."', chatcall_text = '' where (user_id = ".(int)Database::escape_string($chatid).")"; $result = Database::query($sql, __FILE__, __LINE__); //redirect caller to chat header("Location: ".$_configuration['code_append']."chat/chat.php?".api_get_cidreq()."&origin=whoisonline&target=".Security::remove_XSS($chatid)); exit; } } // This if statement prevents users accessing the who's online feature when it has been disabled. if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) || ((api_get_setting('showonline', 'users') == 'true' || api_get_setting('showonline', 'course') == 'true') && $_user['user_id'])) { if(isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) { $user_list = Who_is_online_in_this_course($_user['user_id'], api_get_setting('time_limit_whosonline'), $_GET['cidReq']); } else { $user_list = WhoIsOnline(api_get_setting('time_limit_whosonline')); } $total = count($user_list); if (!isset($_GET['id'])) { Display::display_header(get_lang('UsersOnLineList')); if (api_get_setting('allow_social_tool') == 'true') { if (!api_is_anonymous()) { echo '
'; //this include the social menu div SocialManager::show_social_menu('whoisonline'); echo '
'; } if ($_GET['id'] == '') { echo '

'.get_lang('Refresh').'

'; } /*else { if (0) { // if ($_user['user_id'] && $_GET["id"] != $_user['user_id']) { echo ''.get_lang('SendChatRequest').''; } }*/ } else { echo '
'; echo get_lang('UsersOnLineList'); echo '
'; } } if ($user_list) { if (!isset($_GET['id'])) { if (api_get_setting('allow_social_tool') == 'true') { echo '
'; //this include the social menu div if (!api_is_anonymous()) { echo UserManager::get_search_form($_GET['q']); } } SocialManager::display_user_list($user_list); echo '
'; } else { //individual user information - also displays header info SocialManager::display_individual_user(Security::remove_XSS($_GET['id'])); } } elseif (isset($_GET['id'])) { Display::display_header(get_lang('UsersOnLineList')); echo '
'; echo get_lang('UsersOnLineList'); echo '
'; } } else { Display::display_header(get_lang('UsersOnLineList')); Display::display_error_message(get_lang('AccessNotAllowed')); } $referer = empty($_GET['referer']) ? 'index.php' : api_htmlentities(strip_tags($_GET['referer']), ENT_QUOTES); /* ============================================================================== FOOTER ============================================================================== */ Display::display_footer();