Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string logout = this.Request.QueryString["logout"];
                if (logout == "true")
                {
                    UserLoginService busiObj = new UserLoginService();
                    busiObj.Logout();
                    busiObj.ClearCacheUser();
                }

                DBLayer.PasswordSafe pwdSafeObj = new DBLayer.PasswordSafe();
                //安全策略配置数据表
                DBLayer.PasswordSafeInfo[] pwdArr;
                pwdArr = pwdSafeObj.FindPwdSafe();
                ViewState["PasswordSafe"] = pwdArr;
                //安全策略表中配置是否显示验证码
                if (pwdArr.Length > 0)
                {
                    if (pwdArr[0].fVerificationCode == true)
                    {
                        spanValidateCode.Visible = true;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            HttpBrowserCapabilities bc = Request.Browser;

            if (bc.Browser == "IE" && (bc.MajorVersion == 8 || bc.MajorVersion == 9))
            {
                //      Literal mete = new Literal();
                //       mete.Text = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />";
                //       Page.Header.Controls.AddAt(0, mete);
            }
            rootPath = Request.ApplicationPath == "/" ? string.Empty : Request.ApplicationPath;
            if (!IsPostBack)
            {
                Session["SkinName"] = null;
                string UserName = (string)UCMLCommon.Session.Get("UserName");
                ScreenInfo = (UCMLCommon.UCMLScreenInfo)UCMLCommon.CachedClient.Get(UserName + "ScreenInfo");
                loginuser  = (UCMLCommon.ClientUserInfo)UCMLCommon.Session.Get(PurviewSystemName + UserName);

                if (this.loginuser == null)
                {
                    Response.Write("<script type=\"text/javascript\">alert('未登录或登录失败,请重新登录'); window.location = 'Userlogin.aspx?logout=true';</script>");
                    return;
                }
                if (this.loginuser.PurviewArray == null || this.loginuser.PurviewArray.Length == 0)
                {
                    Response.Write("<script type=\"text/javascript\">alert('没有任何可操作权限');window.location = 'Userlogin.aspx?logout=true';</script>");
                    return;
                }

                if (ScreenInfo == null || ScreenInfo.BusiPortalInfo == null || ScreenInfo.BusiPortalInfo.Length == 0)
                {
                    Response.Write("<script type=\"text/javascript\">alert('没有任何菜单权限');window.location = 'Userlogin.aspx?logout=true';</script>");
                    return;
                }
                ltUserLoginInfoLab.Text = GetUserLoginInfoLab();//登录人员信息
                BindMenu();
                BindSystemButton();
                //加载HOME页皮肤
                LoadFrameSkin();
                LoadSkinMenu();
                PrepareMenu(loginuser);

                GetSysRetrievalTime();//获取系统检索时间

                //获取安全策略配置信息进行配置
                DBLayer.PasswordSafe       pwdSafeObj = new DBLayer.PasswordSafe();
                DBLayer.PasswordSafeInfo[] pwdSafeArr = pwdSafeObj.FindPwdSafe();
                if (pwdSafeArr.Length > 0 && pwdSafeArr[0].fSecurityPolicy == true)
                {
                    LoadModifyPwdPage(pwdSafeArr);//加载修改密码页面
                }
            }
        }