コード例 #1
0
        public string OnLoadVerify(System.Web.HttpContext context, string resptype)
        {
            //MessageBox.Show(context.Request.Cookies["userinfo"].Value.ToString());
            string      respxml  = string.Empty;
            HttpRequest request  = context.Request;
            Hashtable   RespData = new Hashtable();

            RespData["method"] = request.Form.Get("method").ToString();
            if (HttpContext.Current.Request.Cookies["AdminInfo"] != null)
            {
                RespData["success"] = true;
                string username   = context.Request.Cookies["AdminInfo"]["userName"].ToString();
                string userserver = context.Request.Cookies["Admininfo"]["userID"].ToString().Split('@')[1].ToString();
                RespData["username"]   = username;
                RespData["userserver"] = userserver;
            }
            else
            {
                RespData["success"] = false;
                //MessageBox.Show("hi");
                RespData["userserver"]  = WebFrameWork.GetServerCookieValueByNode("userserver");
                RespData["moneyserver"] = WebFrameWork.GetServerCookieValueByNode("moneyserver");
            }

            respxml = AssemblerDictionary.AssemblerPlugins[resptype].GenerateXml(context, (Object)RespData);
            return(respxml);
        }
コード例 #2
0
        //
        public string LogoffPage(System.Web.HttpContext context, string resptype)
        {
            //MessageBox.Show("logoff");
            string      respxml  = string.Empty;
            HttpRequest request  = context.Request;
            Hashtable   RespData = new Hashtable();

            RespData["success"] = true;
            RespData["method"]  = request.Form.Get("method").ToString();
            if (HttpContext.Current.Request.Cookies["AdminInfo"] != null)
            {
                string sessionID = context.Request.Cookies["AdminInfo"]["sessionID"].ToString();
                string username  = context.Request.Cookies["AdminInfo"]["userName"].ToString();
                RespData["username"]    = username;
                RespData["userserver"]  = WebFrameWork.GetServerCookieValueByNode("userserver");
                RespData["moneyserver"] = WebFrameWork.GetServerCookieValueByNode("moneyserver");
                WebFrameWork.ReleaseCache(sessionID);
            }
            else
            {
                RespData["success"] = false;
            }

            WebFrameWork.ReleaseVerifyInfo();
            WebFrameWork.ReleaseCookieUserInfo();
            // context.Response.Expires = -1;


            respxml = AssemblerDictionary.AssemblerPlugins[resptype].GenerateXml(context, (Object)RespData);
            return(respxml);
        }