Ejemplo n.º 1
0
        public static string ShopUrl(string url)
        {
            B_User  bu        = new B_User();
            B_Admin ba        = new B_Admin();
            string  resultUrl = "";

            if (url == null || url.Trim() == "")
            {
                //function.Alert("禁止非法进入!");
                //return;
            }
            Security objSecurity = new Security();
            string   urlEncrypt  = objSecurity.EncryptQueryString(url.ToString());
            string   userUrl     = "";

            if (ba.CheckLogin())
            {
                userUrl = objSecurity.EncryptQueryString(bu.GetLogin().UserID.ToString() + "_admin");
            }
            else if (bu.CheckLogin())
            {
                userUrl = objSecurity.EncryptQueryString(bu.GetLogin().UserID.ToString() + "_member");
            }
            else
            {
                userUrl = objSecurity.EncryptQueryString("-1_visitor");
            }
            resultUrl = "http://" + System.Web.HttpContext.Current.Request.Url.Authority + "/api/ShopSource.aspx?sus=" + userUrl + "&sur=" + urlEncrypt;

            return(resultUrl);
        }
Ejemplo n.º 2
0
        public static M_User_Plat GetLogin(bool flag)
        {
            B_User      buser = new B_User();
            B_User_Plat upBll = new B_User_Plat();

            return(upBll.SelReturnModel(buser.GetLogin(flag).UserID));
        }
Ejemplo n.º 3
0
        public static int IsPlatUser()
        {
            B_User buser = new B_User();

            return(IsPlatUser(buser.GetLogin().UserID));
        }
Ejemplo n.º 4
0
        public string SysLabelProc(string syslabel, string Title)
        {
            M_Uinfo muinfo = buser.GetUserBaseByuserid(buser.GetLogin().UserID);
            //处理系统标签获得函数后的内容
            string lbl = syslabel;

            lbl = lbl.Replace("{$", "").Replace("/}", "");
            switch (lbl)
            {
            case "SiteName":
                return(SiteName);

            case "SiteURL":
                return("<a href='" + SiteUrl + "' alt='" + SiteName + "' target='_blank'>" + SiteUrl + "</a>");

            case "SiteTitle":
                return(SiteTitle);

            case "MetaKeywords":
                return(MetaKeywords);

            case "MetaDescription":
                return(MetaDescription);

            case "LogoUrl":
                return("<img src='" + LogoUrl + "' width='206' height='40' />");

            case "Banner":
                return(BannerUrl);

            case "Webmaster":
                return(Webmaster);

            case "WebmasterEmail":
                return(WebmasterEmail);

            case "Copyright":
                return(Copyright);

            case "UserName":
                return(buser.GetLogin().UserName);

            case "password":
                return(buser.GetLogin().UserPwd);

            case "Company":   //风格路径
                return(buser.GetLogin().CompanyName);

            case "OfficePhone":
                return(muinfo.OfficePhone);

            case "HoneyName":
                return(muinfo.HoneyName);

            case "UserFace":
                return("<img src='" + muinfo.UserFace + "' width='32' height='32' />");

            case "sex":
                if (muinfo.UserSex == true)
                {
                    return("男");
                }
                else
                {
                    return("女");
                }

            case "BirthDay":
                return(muinfo.BirthDay);

            case "Country":
                return(muinfo.Country);

            case "Province":
                return(muinfo.Province);

            case "City":
                return(muinfo.City);

            case "County":
                return(muinfo.County);

            case "Address":
                return(muinfo.Address);

            case "ZipCode":
                return(muinfo.ZipCode);

            case "Mobile":
                return(muinfo.Mobile);

            case "Fax":
                return(muinfo.Fax);

            case "Email":
                return("<a href='mailto:" + buser.GetLogin().Email + "'>" + buser.GetLogin().Email + "</a>");

            case "HomePage":
                return(muinfo.HomePage);

            case "QQ":
                return(muinfo.QQ);

            case "MSN":
                return(muinfo.MSN);

            case "Sign":
                return(muinfo.Sign);

            case "Title":
                return(Title);

            default:
                return("[err:站群标签引用错误]");
            }
        }