예제 #1
0
        /// <summary>
        /// 移除管理员登录Cookie
        /// </summary>
        bool RemoveCookie_Login()
        {
            bool b = true;

            b = OpMemory.RemoveCookie("a_id", null);
            b = OpMemory.RemoveCookie("a_uname", null);
            return(b);
        }
예제 #2
0
        /*
         *      ===========================================
         *      全局Cookie
         *      ===========================================
         */
        #region 全局Cookie
        /// <summary>
        /// 添加管理员登录Cookie
        /// </summary>
        /// <param name="s_id">管理员流水号</param>
        /// <param name="s_name">管理员用户名</param>
        /// <param name="isremember">是否记住</param>
        bool CreateCookie_Login(string a_id, string a_uname, bool isremember)
        {
            bool b = true;

            b = isremember? OpMemory.SetCookie("a_id", a_id, 365, 0, 0, 0, null): OpMemory.SetCookie("a_id", a_id, null);
            b = isremember ? OpMemory.SetCookie("a_uname", WebUtility.UrlEncode(a_uname), 365, 0, 0, 0, null): OpMemory.SetCookie("a_uname", WebUtility.UrlEncode(a_uname), null);
            return(b);
        }
예제 #3
0
 get => Convert(OpMemory[OpPtr]);