コード例 #1
0
        public void LoadPage()
        {
            CurrentPage = B_Lebi_Theme_Page.GetModel("Code='P_Product'");
            int id = Rint("id");

            product = GetProduct(id);
            Lebi_Site site = B_Lebi_Site.GetModel("IsMobile=1 order by Sort desc");

            Shop.Bussiness.Site website = new Shop.Bussiness.Site();
            if (site != null)
            {
                if (site.Domain != "")
                {
                    tourl = "http://" + site.Domain + "/product.aspx?id=" + product.id;
                }
                else
                {
                    tourl = "http://" + ShopCache.GetMainSite().Domain + website.WebPath;
                    tourl = tourl.TrimEnd('/') + site.Path;
                    tourl = tourl.TrimEnd('/') + "/product.aspx?id=" + product.id;
                }
            }
            Response.Write(tourl);
            tourl = QRfromGoogle(tourl);
        }
コード例 #2
0
ファイル: js.aspx.cs プロジェクト: zwkjgs/LebiShop
        public void LoadPage()
        {
            if (!AjaxLoadCheck())
            {
                return;
            }
            StringBuilder sb = new StringBuilder();

            sb.Append("languagetags['长度不能小于']='" + Tag("长度不能小于") + "';\r\n");
            sb.Append("languagetags['长度不能大于']='" + Tag("长度不能大于") + "';\r\n");
            sb.Append("languagetags['请填写您的邮箱']='" + Tag("请填写您的邮箱") + "';\r\n");
            sb.Append("languagetags['邮箱格式错误']='" + Tag("邮箱格式错误") + "';\r\n");
            sb.Append("languagetags['登录']='" + Tag("登录") + "';\r\n");
            sb.Append("languagetags['系统异常']='" + Tag("系统异常") + "';\r\n");
            sb.Append("languagetags['正在处理']='" + Tag("正在处理") + "';\r\n");
            sb.Append("languagetags['字数']='" + Tag("字数") + "';\r\n");
            sb.Append("languagetags['操作成功']='" + Tag("操作成功") + "';\r\n");
            sb.Append("languagetags['长度限制']='" + Tag("长度限制") + "';\r\n");
            sb.Append("languagetags['已过期']='" + Tag("已过期") + "';\r\n");
            sb.Append("languagetags['正在处理']='" + Tag("正在处理") + "';\r\n");
            sb.Append("languagetags['加入常购清单']='" + Tag("加入常购清单") + "';\r\n");
            sb.Append("var path='" + WebPath.TrimEnd('/') + "';\r\n");
            if (ShopCache.GetMainSite().id != CurrentSite.id && CurrentSite.Domain != "")
            {
                sb.Append("var sitepath='" + WebPath.Replace("//", "/").TrimEnd('/') + "';\r\n");
            }
            else
            {
                sb.Append("var sitepath='" + (WebPath + CurrentSite.Path).Replace("//", "/").TrimEnd('/') + "';\r\n");
            }
            langs = sb.ToString();
        }
コード例 #3
0
        /// <summary>
        /// 编辑会员
        /// </summary>
        public void User_Edit()
        {
            if (!EX_Admin.Power("user_edit", "编辑会员"))
            {
                AjaxNoPower();
                return;
            }
            int    id             = RequestTool.RequestInt("id", 0);
            int    User_id_parent = RequestTool.RequestInt("User_id_parent", 0);
            string UserName       = RequestTool.RequestString("UserName");

            string where = "UserName=lbsql{'" + UserName + "'}";
            if (id > 0)
            {
                where += " and id!=" + id + "";
            }
            int count = B_Lebi_User.Counts(where);

            if (count > 0 && UserName != "")
            {
                Response.Write("{\"msg\":\"帐号已存在\"}");
                return;
            }
            Lebi_User model = B_Lebi_User.GetModel(id);

            if (model == null)
            {
                model = new Lebi_User();
            }
            B_Lebi_User.SafeBindForm(model);

            if (model.id == 0)
            {
                model.Site_id = ShopCache.GetMainSite().id;
                B_Lebi_User.Add(model);
                model.id = B_Lebi_User.GetMaxId();
                EX_User.UserRegister(model);//触发事件
            }
            else
            {
                //<-{更新会员下级用户数量 by lebi.kingdge 2015-04-09
                if (User_id_parent > 0)
                {
                    int    Count_sonuser = B_Lebi_User.Counts("id = " + User_id_parent + "");
                    string sql           = "update [Lebi_User] set Count_sonuser="******" where id=" + User_id_parent + "";
                    Common.ExecuteSql(sql);
                }
                model.Count_sonuser = B_Lebi_User.Counts("User_id_parent = " + id + "");
                //}->
                B_Lebi_User.Update(model);
                EX_User.UserInfoEdit(model);//触发编辑用户资料事件
            }
            Log.Add("编辑会员信息", "User", id.ToString(), CurrentAdmin, model.UserName);
            string result = "{\"msg\":\"OK\", \"id\":\"" + id + "\"}";

            Response.Write(result);
        }
コード例 #4
0
        /// <summary>
        /// 编辑会员
        /// </summary>
        public void User_Edit()
        {
            if (!EX_Admin.Power("user_edit", "编辑会员"))
            {
                AjaxNoPower();
                return;
            }
            int    id             = RequestTool.RequestInt("id", 0);
            int    User_id_parent = RequestTool.RequestInt("User_id_parent", 0);
            string UserName       = RequestTool.RequestString("UserName");

            string where = "UserName=lbsql{'" + UserName + "'}";
            if (id > 0)
            {
                where += " and id!=" + id + "";
            }
            int count = B_Lebi_User.Counts(where);

            if (count > 0 && UserName != "")
            {
                Response.Write("{\"msg\":\"帐号已存在\"}");
                return;
            }
            Lebi_User model = B_Lebi_User.GetModel(id);

            if (model == null)
            {
                model = new Lebi_User();
            }
            B_Lebi_User.SafeBindForm(model);

            if (model.id == 0)
            {
                string PWD1 = RequestTool.RequestString("PWD1");
                string PWD2 = RequestTool.RequestString("PWD2");
                MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
                string PWD = BitConverter.ToString(hashmd5.ComputeHash(Encoding.Default.GetBytes(PWD1))).Replace("-", "").ToLower();
                if (PWD1 != PWD2)
                {
                    Response.Write("{\"msg\":\"两次输入的密码不一致\"}");
                    return;
                }
                model.Password = PWD;
                model.Site_id  = ShopCache.GetMainSite().id;
                B_Lebi_User.Add(model);
                model.id = B_Lebi_User.GetMaxId();
                EX_User.UserRegister(model);//触发事件
            }
            else
            {
                //<-{更新会员下级用户数量 by lebi.kingdge 2015-04-09
                if (User_id_parent > 0)
                {
                    int    Count_sonuser = B_Lebi_User.Counts("id = " + User_id_parent + "");
                    string sql           = "update [Lebi_User] set Count_sonuser="******" where id=" + User_id_parent + "";
                    Common.ExecuteSql(sql);
                }
                model.Count_sonuser = B_Lebi_User.Counts("User_id_parent = " + id + "");
                //}->
                B_Lebi_User.Update(model);
                EX_User.UserInfoEdit(model);//触发编辑用户资料事件
            }
            Log.Add("编辑会员信息", "User", id.ToString(), CurrentAdmin, model.UserName);
            string result = "{\"msg\":\"OK\", \"id\":\"" + id + "\"}";

            Response.Write(result);
        }