} // Get Group ID if (check_if_guest($userid)) { $group_id = array('acg'); } else { $group_id = get_group_id($userid); } // Get file permissions for groups here so it can be passed to other files if ($group_enable_mode == 1) { if (check_array_for_match($group_id, $group_disable_uploads_sep)) { } else { $chatroom_transfer_on = 0; $file_transfer_on = 0; } } else { if (check_array_for_match($group_id, $group_disable_uploads_sep)) { $chatroom_transfer_on = 0; $file_transfer_on = 0; } } // ############################ GET USER DATA ############################ if (logged_in($userid)) { $result = $db->execute("\n\t\t\tSELECT theme, status, popout, hash_id, hide_bar, is_admin, play_sound, window_open, chatroom_window, chatroom_stay, chatroom_block_chats, only_names, unfocus_chat, focus_chat, apps_bookmarks, apps_other, block_chats, chatroom_sound, apps_open, guest_name, chatroom_show_names, ip_address, is_mod\n\t\t\tFROM arrowchat_status \n\t\t\tWHERE userid = '" . $db->escape_string($userid) . "'\n\t\t"); if ($result and $db->count_select() > 0) { $row = $db->fetch_array($result); if (isset($row['popout'])) { $popout = $row['popout']; $popout_time = $popout; if (time() - $popout < $buddy_list_heart_beat + 7 and $popout != "99") { $popout = 1; }
$video_chat = 0; $applications_on = 0; $chatrooms_on = 0; if (check_array_for_match($group_id, $group_disable_video_sep)) { $video_chat = 1; } if (check_array_for_match($group_id, $group_disable_apps_sep)) { $applications_on = 1; } if (check_array_for_match($group_id, $group_disable_rooms_sep)) { $chatrooms_on = 1; } if (check_array_for_match($group_id, $group_disable_sending_private_sep)) { $disable_sending_private_msg = 0; } if (check_array_for_match($group_id, $group_disable_sending_rooms_sep)) { $disable_sending_group_msg = 0; } } // Get all the rest of the general settings $settings .= 'var T=0,'; $settings .= 'u_theme="' . $theme . '",'; $settings .= 'u_name="' . $db->escape_string(strip_tags($user_username)) . '",'; $settings .= 'u_id="' . $userid . '",'; $settings .= 'u_group=' . json_encode($group_id) . ','; $settings .= 'u_hide_bar="' . $hide_bar . '",'; $settings .= 'u_blist_open="' . $window_open . '",'; $settings .= 'u_sounds="' . $play_sound . '",'; $settings .= 'u_chatroom_open="' . $chatroom_window . '",'; $settings .= 'u_chatroom_stay="' . $chatroom_stay . '",'; $settings .= 'u_chatroom_block_chats="' . $chatroom_block_chats . '",';
} $roominfo[] = array('welcome_msg' => $row['welcome_message'], 'desc' => $row['description'], 'limit_msg' => $row['limit_message_num'], 'limit_sec' => $row['limit_seconds_num']); $response['room_info'] = $roominfo; } else { $error[] = array('t' => '1', 'm' => $language[48]); $response['error'] = $error; header('Content-type: application/json; charset=utf-8'); echo json_encode($response); close_session(); exit; } } // #################### START CHATROOM USER GROUP CHECK ################## if (logged_in($userid)) { if (!empty($disallowed_groups)) { if (check_array_for_match($group_id, $disallowed_groups)) { $error[] = array('t' => '1', 'm' => $language[210]); $response['error'] = $error; header('Content-type: application/json; charset=utf-8'); echo json_encode($response); close_session(); exit; } } } // ###################### START CHATROOM WINDOW CHECK #################### if (logged_in($userid)) { if ($chatroom_window != "-1") { $db->execute("\n\t\t\t\tUPDATE arrowchat_status\n\t\t\t\tSET chatroom_window = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t\tWHERE userid = '" . $db->escape_string($userid) . "'\n\t\t\t"); } if ($chatroom_stay != "-1") {