示例#1
0
        public static void ProcessChat(HttpContext context, string command, int organizationID)
        {
            System.Web.HttpBrowserCapabilities browser = context.Request.Browser;
            if (browser.Browser != "IE")
            {
                context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
            }

            if (command == "image")
            {
                bool   isAvailable = ChatRequests.IsOperatorAvailable(LoginUser.Anonymous, organizationID);
                string fileName    = isAvailable ? "chat_available" : "chat_unavailable";
                fileName = AttachmentPath.FindImageFileName(LoginUser.Anonymous, organizationID, AttachmentPath.Folder.ChatImages, fileName);
                WriteImage(context, fileName);
            }
            else if (command == "logo")
            {
                string fileName = AttachmentPath.FindImageFileName(LoginUser.Anonymous, organizationID, AttachmentPath.Folder.ChatImages, "chat_logo");
                WriteImage(context, fileName);
            }
        }