Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_smsconfig", "手机短信设置"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            B_BaseConfig_Supplier bconfig = new B_BaseConfig_Supplier();

            //model = bconfig.LoadConfig();
            model        = ShopCache.GetBaseConfig_Supplier(CurrentSupplier.id);
            SMS_password = model.SMS_password;
            try
            {
                if (model.SMS_server == "0" && model.SMS_state == "1")
                {
                    smsClient = new SMSClient("sms.todaynic.com", Convert.ToInt32(model.SMS_serverport), model.SMS_user, model.SMS_password);
                    account   = smsClient.getBalance();
                }
            }
            catch
            {
            }
            if (SMS_password != "")
            {
                SMS_password = "******";
            }
        }
Example #2
0
        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();
        }
Example #3
0
        /// <summary>
        /// 邮件分享朋友
        /// </summary>
        public void SendFriend()
        {
            int          id           = RequestTool.RequestInt("id", 0);
            string       FromUserName = RequestTool.RequestSafeString("UserName");
            string       FromEmail    = RequestTool.RequestSafeString("Email");
            string       Content      = RequestTool.RequestSafeString("Content");
            string       ToUserName   = RequestTool.RequestSafeString("ToUserName");
            string       ToEmail      = RequestTool.RequestSafeString("ToEmail");
            Lebi_Product product      = B_Lebi_Product.GetModel(id);

            if (product == null)
            {
                Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}");
                return;
            }
            //发送邮件
            try
            {
                if (ShopCache.GetBaseConfig().MailSign.ToLower().Contains("sendfriend"))
                {
                    Email.SendEmail_sendfriend(FromUserName + "|" + FromEmail, ToUserName + "|" + ToEmail, Content, product, CurrentLanguage.Code);
                }
            }
            catch (Exception ex)
            {
                Response.Write("{\"msg\":\"" + ex.Message + "\"}");
            }
            Response.Write("{\"msg\":\"OK\"}");
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("servicepanel_config", "编辑客服面板配置"))
            {
                WindowNoPower();
            }
            B_ServicePanel config = new B_ServicePanel();

            model = ShopCache.GetBaseConfig();

            string con = model.ServicePanel;

            sp = B_ServicePanel.GetModel(con);

            //===================================
            //这么取数据
            //string con = "[{\"x\":\"111\",\"y\":\"112\".....}]";
            //Shop.Model.ServicePanel sp = B_ServicePanel.GetModel(con);

            //这个sp里面就有你要的数据了
            //例如   sp.x


            //保存的话,可以把以上的sp直接转化为json格式的字符串
            //如
            //Model.ServicePanel sp = new Model.ServicePanel();
            //sp.x = "";
            //sp.y = "";
            //sp.theme = "";

            //string json = B_ServicePanel.ToJson(sp);
            //=====================================
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("product_edit", "编辑商品"))
            {
                WindowNoPower();
            }
            id = RequestTool.RequestInt("id");
            string       sql      = "";
            Lebi_Product pro      = B_Lebi_Product.GetModel(id);
            int          SonCount = B_Lebi_Product.Counts("Product_id = " + pro.id + "");

            if (SonCount == 0)
            {
                sql = "a.Product_id = " + pro.id;
            }
            else
            {
                sql = "a.Product_id in (select Lebi_Product.id from Lebi_Product where Lebi_Product.Product_id = " + pro.id + ")";
            }
            //string where = "select a.id from Lebi_Order_Product as a inner join  Lebi_Order as b on a.Order_id = b.id where Product_Number=lbsql{'" + Number + "'} and a.Count > a.Count_Shipped and b.IsInvalid = 0";
            string where = "select a.id from Lebi_Order_Product as a inner join  Lebi_Order as b on a.Order_id = b.id where " + sql + " and (a.Count - a.Count_Shipped)!=0 and b.IsInvalid = 0 and b.IsCompleted = 0 and b.Type_id_OrderType = 211";
            if (ShopCache.GetBaseConfig().ProductStockFreezeTime == "orderconfirm")
            {
                where += " and IsVerified=1";
            }
            //where += " and IsShipped=0";
            pros = B_Lebi_Order_Product.GetList("id in (" + where + ")", "");
        }
        public void LoadPage()
        {
            if (!AjaxLoadCheck())
            {
                return;
            }
            string msg = "";

            HttpFileCollection files = HttpContext.Current.Request.Files;
            BaseConfig         conf  = ShopCache.GetBaseConfig();
            B_WaterConfig      bc    = new B_WaterConfig();
            WaterConfig        mx    = bc.LoadConfig();

            if (files.Count > 0)
            {
                ///'检查文件扩展名字
                HttpPostedFile postedFile = files[0];
                string         name = "icon";
                string         savepath = GetPath();
                string         fileName, fileExtension;
                fileName      = System.IO.Path.GetFileName(postedFile.FileName);
                fileExtension = System.IO.Path.GetExtension(fileName);
                name          = name + fileExtension;
                string ServerPath = System.Web.HttpContext.Current.Server.MapPath("/");
                string fdir  = ServerPath + savepath + "/icon" + fileExtension;
                string fdirs = ServerPath + savepath + "/icon_small" + fileExtension;
                if (File.Exists(fdir))
                {
                    File.Delete(fdir);
                }
                if (File.Exists(fdirs))
                {
                    File.Delete(fdirs);
                }
                int status = ImageHelper.SaveImage(postedFile, savepath, name);
                if (status != 290)
                {
                    msg = Language.Tag(EX_Type.TypeName(status));
                    Response.Write("{\"msg\":\"" + msg + "\"}");
                    return;
                }

                string OldImage = savepath + name;
                //生成所有自定义规格
                ImageHelper.UPLoad(OldImage, savepath, "icon_small" + fileExtension, 100, 100, "Cut");

                //写入数据库
                Lebi_Image model = new Lebi_Image();
                model.Image     = name;
                model.Keyid     = 0;
                model.Size      = "100,100";
                model.TableName = "temp";
                B_Lebi_Image.Add(model);
                msg = "OK";
                Response.Write("{\"msg\":\"" + msg + "\",\"ImageUrl\":\"" + model.Image + "\"}");
                return;
            }
            msg = Language.Tag("没有选择任何文件", "");
            Response.Write("{\"msg\":\"" + msg + "\"}");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_product_list", "商品列表"))
            {
                WindowNoPower();
            }
            id = RequestTool.RequestInt("id");
            string       sql      = "";
            Lebi_Product pro      = B_Lebi_Product.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id);
            int          SonCount = B_Lebi_Product.Counts("Supplier_id = " + CurrentSupplier.id + " and Product_id = " + pro.id + "");

            if (SonCount == 0)
            {
                sql = "Product_id = " + pro.id;
            }
            else
            {
                sql = "Product_id in (select Lebi_Product.id from Lebi_Product where Lebi_Product.Product_id = " + pro.id + ")";
            }
            //string where = "select a.id from Lebi_Order_Product as a inner join  Lebi_Order as b on a.Order_id = b.id where Product_Number=lbsql{'" + Number + "'} and a.Count > a.Count_Shipped and b.IsInvalid = 0";
            string where = "select a.id from Lebi_Order_Product as a inner join  Lebi_Order as b on a.Order_id = b.id where b.Supplier_id = " + CurrentSupplier.id + " and " + sql + " and a.Count > a.Count_Shipped and b.IsInvalid = 0";
            if (ShopCache.GetBaseConfig().ProductStockFreezeTime == "orderconfirm")
            {
                where += " and IsVerified=1";
            }

            pros = B_Lebi_Order_Product.GetList("id in (" + where + ")", "");
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_edit", "编辑订单"))
            {
                NewPageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            string where = "id = " + id + "";
            if (!string.IsNullOrEmpty(EX_Admin.Project().Site_ids))
            {
                where += " and (Site_id in (" + EX_Admin.Project().Site_ids + "))";
            }
            if (!string.IsNullOrEmpty(EX_Admin.Project().Supplier_ids))
            {
                where += " and (Supplier_id in (" + EX_Admin.Project().Supplier_ids + "))";
            }
            model = B_Lebi_Order.GetModel(where);
            if (model == null)
            {
                model = new Lebi_Order();
            }
            config = ShopCache.GetBaseConfig();
            pros   = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", "");
            comms  = B_Lebi_Comment.GetList("TableName='Order' and Keyid=" + model.id + " and User_id = " + model.User_id + " and Admin_id = 0", "id desc");
        }
Example #9
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);
        }
Example #10
0
        public void LoadPage()
        {
            if (!AjaxLoadCheck())
            {
                return;
            }
            string             msg   = "";
            HttpFileCollection files = HttpContext.Current.Request.Files;

            if (files.Count > 0)
            {
                ///'检查文件扩展名字
                HttpPostedFile postedFile = files[0];
                //string name = DateTime.Now.ToString("yyMMddssfff") + "_w$h_";
                string savepath = GetPath(ShopCache.GetBaseConfig().UpLoadPath);
                string fileName, fileExtension;
                fileName      = System.IO.Path.GetFileName(postedFile.FileName);
                fileExtension = System.IO.Path.GetExtension(fileName);
                //name = name + fileExtension;
                int status = FileHelper.UPLoad(postedFile, savepath, fileName);
                if (status != 290)
                {
                    msg = Language.Tag(EX_Type.TypeName(status));
                    Response.Write("{\"msg\":\"" + msg + "\"}");
                    return;
                }
                else
                {
                    Response.Write("{\"msg\":\"OK\",\"url\":\"" + savepath + fileName + "\"}");
                    return;
                }
            }
            msg = Language.Tag("没有选择任何文件");
            Response.Write("{\"msg\":\"" + msg + "\"}");
        }
Example #11
0
        /// <summary>
        /// 验证消息真实性
        /// </summary>
        /// <returns></returns>
        public bool Check()
        {
            BaseConfig bcf       = ShopCache.GetBaseConfig();
            string     signature = RequestTool.RequestString("signature");
            string     timestamp = RequestTool.RequestString("timestamp");
            string     nonce     = RequestTool.RequestString("nonce");
            string     echostr   = RequestTool.RequestString("echostr");
            string     token     = bcf.platform_weixin_custemtoken;

            string[] arr = { token, timestamp, nonce };
            Array.Sort(arr);
            string temp = arr[0] + arr[1] + arr[2];
            string sha1 = FormsAuthentication.HashPasswordForStoringInConfigFile(temp, "SHA1").ToLower();

            //SystemLog.Add(sha1 + "---------" + signature + "------------" + echostr);
            if (sha1 == signature)
            {
                if (echostr != "")
                {
                    Response.Write(echostr);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #12
0
        /// <summary>
        /// 下载商品分类
        /// </summary>
        public void Taobao_category()
        {
            List <Lebi_Pro_Type> ts = Shop.LebiAPI.Service.Instanse.Taobao_ProType();

            if (ts == null)
            {
                Response.Write("{\"msg\":\"系统异常\"}");
            }
            else
            {
                List <Lebi_Pro_Type> parents = (from m in ts
                                                where m.Parentid == 0
                                                select m).ToList();
                foreach (Lebi_Pro_Type t in parents)
                {
                    int                  pid   = t.id;
                    Lebi_Pro_Type        model = DoOneCategory(t);
                    List <Lebi_Pro_Type> sons  = (from m in ts
                                                  where m.Parentid == pid
                                                  select m).ToList();
                    foreach (Lebi_Pro_Type sont in sons)
                    {
                        sont.Parentid = model.id;
                        DoOneCategory(sont);
                    }
                }
                ShopCache.SetProductType();
                Response.Write("{\"msg\":\"OK\"}");
            }
        }
Example #13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!EX_Admin.Power("baseconfig_edit", "基本设置"))
     {
         PageReturnMsg = PageNoPowerMsg();
     }
     model = ShopCache.GetBaseConfig();
 }
Example #14
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);
        }
Example #15
0
        public weixin(int _DT_id, Lebi_Site CurrentSite = null)
        {
            DT_id = _DT_id;
            BaseConfig_DT dtbcf = null;

            if (DT_id > 0)
            {
                dtbcf = ShopCache.GetBaseConfig_DT(DT_id);
                if (dtbcf != null)
                {
                    appid          = dtbcf.platform_weixin_id;
                    appkey         = dtbcf.platform_weixin_secret;
                    number         = dtbcf.platform_weixin_number;
                    platform_image = dtbcf.platform_weixin_image;
                }
            }
            if (DT_id == 0 || dtbcf == null)
            {
                if (CurrentSite != null)
                {
                    if (CurrentSite.platform_weixin_id != "" && CurrentSite.platform_weixin_secret != "")
                    {
                        appid  = CurrentSite.platform_weixin_id;
                        appkey = CurrentSite.platform_weixin_secret;
                        number = CurrentSite.platform_weixin_number;
                    }
                    if (appid == "")
                    {
                        appid = ShopCache.GetBaseConfig().platform_weixin_id;
                    }
                    if (appkey == "")
                    {
                        appkey = ShopCache.GetBaseConfig().platform_weixin_secret;
                    }
                    if (number == "")
                    {
                        number = ShopCache.GetBaseConfig().platform_weixin_number;
                    }
                    platform_image = ShopCache.GetBaseConfig().platform_weixin_image;
                }
                else
                {
                    BaseConfig bcf = ShopCache.GetBaseConfig();
                    appid          = bcf.platform_weixin_id;
                    appkey         = bcf.platform_weixin_secret;
                    number         = bcf.platform_weixin_number;
                    platform_image = bcf.platform_weixin_image;
                }
            }
            Model.weixin.token t = GetToken();
            Token = t.access_token;

            Shop.Bussiness.Site site = new Shop.Bussiness.Site();
            url      = "https://api.weixin.qq.com/";
            reurnurl = ShopCache.GetBaseConfig().HTTPServer + "://" + RequestTool.GetRequestDomain() + site.WebPath + "/platform/login_weixin.aspx";
        }
Example #16
0
        /// <summary>
        /// 设置授权
        /// </summary>
        public void Licence_Set()
        {
            if (!EX_Admin.Power("License_set", "账户设置"))
            {
                AjaxNoPower();
                return;
            }
            string LicenseUserName = RequestTool.RequestString("LicenseUserName");
            string LicensePWD      = RequestTool.RequestString("LicensePWD");

            if (LicensePWD == "******")
            {
                LicensePWD = SYS.LicensePWD;
            }
            string LicenseDomain = RequestTool.RequestString("LicenseDomain").ToLower();

            BaseConfig cf = new BaseConfig();

            cf.LicensePWD      = LicensePWD;
            cf.LicenseUserName = LicenseUserName;
            cf.LicenseDomain   = LicenseDomain;
            B_BaseConfig dob = new B_BaseConfig();

            //============================================
            //获取服务端权限
            LBAPI_Licencse api;

            try
            {
                string res = Shop.LebiAPI.Service.Instanse.License_Set("SetUser", "username="******"&pwd=" + LicensePWD + "&domain=" + LicenseDomain + "&Version=" + ShopCache.GetBaseConfig().Version + "&Version_Son=" + ShopCache.GetBaseConfig().Version_Son + "&code=" + cf.InstallCode);
                JavaScriptSerializer jss = new JavaScriptSerializer();
                api               = jss.Deserialize <LBAPI_Licencse>(res);
                cf.LicenseMD5     = api.md5 == null ? "" : api.md5;
                cf.LicenseString  = api.data == null ? "" : api.data;
                cf.LicenseDomain  = api.domain;
                cf.SpreadCode     = api.spreadcode == null ? "" : api.spreadcode;
                cf.LicensePackage = api.servicepackage == null ? "" : api.servicepackage;
                dob.SaveConfig(cf);
                ////<-{修改Web.config文件让授权即时生效 by lebi.kingdge 2018.10.12
                //string path = base.Server.MapPath("../../Web.config");
                //try
                //{
                //    string contents = string.Empty;
                //    contents = File.ReadAllText(path) + "\r\n";
                //    File.WriteAllText(path, contents);
                //}
                //catch (Exception e) { }
                ////}->
                ShopCache.SetLicense();
                Response.Write("{\"msg\":\"" + api.msg + "\"}");
            }
            catch (Exception ex)
            {
                Response.Write("{\"msg\":\"" + ex.Message + "\"}");
            }
        }
Example #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("transport_kuaidi100_edit", "快递100配置"))
            {
                WindowNoPower();
            }
            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model = ShopCache.GetBaseConfig();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("appconfig_edit", "APP设置"))
            {
                WindowNoPower();
            }
            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model = ShopCache.GetBaseConfig();
        }
Example #19
0
        /// <summary>
        /// 晒单评论
        /// </summary>
        public void Comment_reply()
        {
            int          id         = RequestTool.RequestInt("id", 0);
            int          Product_id = 0;
            Lebi_Product product    = B_Lebi_Product.GetModel(id);

            if (product != null)
            {
                Product_id = product.Product_id;
            }
            Lebi_Comment pmodel = B_Lebi_Comment.GetModel(id);

            if (pmodel == null)
            {
                Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}");
                return;
            }
            string Content = RequestTool.RequestSafeString("comment");

            if (Content == "")
            {
                Response.Write("{\"msg\":\"" + Tag("内容不能为空") + "\"}");
                return;
            }
            Lebi_Comment model = new Lebi_Comment();

            model.TableName = "Product";
            model.Keyid     = id;
            //model.Admin_UserName = CurrentUser.NickName;
            model.Admin_id      = 0;
            model.User_id       = CurrentUser.id;
            model.User_UserName = CurrentUser.NickName;
            model.Content       = Content;
            model.Parentid      = id;
            model.Status        = 280;
            model.Time_Add      = System.DateTime.Now;
            model.Language_Code = CurrentLanguage.Code;
            model.Product_id    = Product_id;
            model.IsRead        = 0;
            model.Supplier_id   = product.Supplier_id;
            if (!Comment.CheckSafeWord(model.Content))
            {
                Response.Write("{\"msg\":\"" + Tag("内容中包含敏感词") + "\"}");
                return;
            }
            B_Lebi_Comment.Add(model);
            //发送邮件
            if (ShopCache.GetBaseConfig().AdminMailSign.ToLower().Contains("comment"))
            {
                Lebi_User user = B_Lebi_User.GetModel(CurrentUser.id);
                Email.SendEmail_comment(user, model);
            }
            Response.Write("{\"msg\":\"OK\"}");
        }
Example #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("backup_config", "数据备份配置"))
            {
                WindowNoPower();
            }
            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model    = ShopCache.GetBaseConfig();
            IsEnable = CheckServer();
        }
Example #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("agent_config", "代理-参数设置"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model = ShopCache.GetBaseConfig();
        }
Example #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("platformconfig_edit", "第三方平台设置"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model = ShopCache.GetBaseConfig();
        }
Example #23
0
        /// <summary>
        /// 编辑页面
        /// </summary>
        public void ThemePage_Edit()
        {
            int             id    = RequestTool.RequestInt("id", 0);
            Lebi_Theme_Page model = B_Lebi_Theme_Page.GetModel(id);

            if (model == null)
            {
                model = new Lebi_Theme_Page();
            }
            B_Lebi_Theme_Page.BindForm(model);
            //model.Name = Language.RequestString("Name");
            model.StaticPath = "/" + model.StaticPath;
            model.StaticPath = ThemeUrl.CheckURL(model.StaticPath).TrimEnd('/');
            if (model.id == 0)
            {
                if (!EX_Admin.Power("themepage_add", "添加页面"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Theme_Page.Add(model);
                id = B_Lebi_Theme_Page.GetMaxId();
                string action = Tag("添加页面");
                Log.Add(action, "ThemePage", model.id.ToString(), CurrentAdmin);
            }
            else
            {
                if (!EX_Admin.Power("themepage_edit", "编辑页面"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Theme_Page.Update(model);
                string action = Tag("编辑页面");
                Log.Add(action, "ThemePage", model.id.ToString(), CurrentAdmin);
            }
            //更新模板中的生成路径
            List <Lebi_Theme_Skin> pages = B_Lebi_Theme_Skin.GetList("Code='" + model.Code + "'", "");

            foreach (Lebi_Theme_Skin page in pages)
            {
                page.PageName       = model.PageName;
                page.PageParameter  = model.PageParameter;
                page.StaticPageName = model.StaticPageName;
                B_Lebi_Theme_Skin.Update(page);
            }
            //处理静态
            ThemeUrl.CreateURLRewrite();
            ShopCache.SetThemePage();
            Response.Write("{\"msg\":\"OK\",\"id\":\"" + id + "\"}");
        }
Example #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            inputname = RequestTool.RequestString("n");
            i         = RequestTool.RequestString("i");

            if (inputname == "")
            {
                inputname = "Images";
            }
            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model = ShopCache.GetBaseConfig();
        }
Example #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("theme_sms_edit", "编辑短信模板"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            type = RequestTool.RequestString("type");
            if (type == "")
            {
                type = "user";
            }
            model = ShopCache.GetBaseConfig();
        }
Example #26
0
        public string GetList()
        {
            string str = "";

            try
            {
                string backpath = ShopCache.GetBaseConfig().DataBase_BackPath;
                string backname = ShopCache.GetBaseConfig().DataBase_BackName;


                //if (backpath.IndexOf("/") == 0)
                //{
                //    backpath = System.Web.HttpRuntime.AppDomainAppPath + "/" + backpath;
                //}
                //else
                //{
                backpath = System.Web.HttpRuntime.AppDomainAppPath + backpath;
                //}
                if (!Directory.Exists(backpath))
                {//目录不存在,创建目录
                    Directory.CreateDirectory(backpath);
                }
                DirectoryInfo mydir = new DirectoryInfo(backpath);
                FileInfo[]    files = mydir.GetFiles();
                foreach (FileInfo file in files)
                {
                    str += "<tr class=\"list\">";
                    if (!string.IsNullOrEmpty(RequestTool.GetConfigKey("SystemAdmin").Trim()))
                    {
                        str += "<td><label class=\"custom-control custom-checkbox\"><input type=\"checkbox\" id=\"checkbox" + file.Name + "\" name=\"files\" value=\"" + file.Name + "\" class=\"custom-control-input\" del=\"true\"><span class=\"custom-control-label\"></span></label></td>";
                    }
                    else
                    {
                        str += "<td class=\"center\"><input type=\"checkbox\" value=\"" + file.Name + "\" name=\"files\" del=\"true\" /></td>";
                    }
                    str += "<td>" + file.Name + "";
                    if (EX_Admin.Power("backup_down", "数据备份下载"))
                    {
                        str += "&nbsp;&nbsp;<a href=\"" + ShopCache.GetBaseConfig().DataBase_BackPath + "/" + file.Name + "\">" + Tag("下载") + "</a>";
                    }
                    str += "</td><td>" + Math.Round(Convert.ToDouble(file.Length) / 1024 / 1024, 2) + "</td><td>" + file.CreationTime + "</td>";
                    str += "</tr>";
                }
            }
            catch (Exception ex)
            {
            }
            return(str);
        }
Example #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_emailconfig", "邮件设置"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            B_BaseConfig_Supplier bconfig = new B_BaseConfig_Supplier();

            //model = bconfig.LoadConfig();
            model    = ShopCache.GetBaseConfig_Supplier(CurrentSupplier.id);
            password = model.MailPassWord;
            if (password != "")
            {
                password = "******";
            }
        }
Example #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("baseconfig_edit", "基本设置"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model  = ShopCache.GetBaseConfig();
            stepRs = B_BaseConfig.StepR(model.Refund_StepR);
            if (stepRs == null)
            {
                stepRs = new List <BaseConfigStepR>();
            }
        }
Example #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_order_print", "打印订单"))
            {
                NewPageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Order.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Order();
            }
            config = ShopCache.GetBaseConfig();
            pros   = B_Lebi_Order_Product.GetList("Supplier_id = " + CurrentSupplier.id + " and Order_id=" + model.id + "", "");
            comms  = B_Lebi_Comment.GetList("Supplier_id = " + CurrentSupplier.id + " and TableName='Order' and Keyid=" + model.id + " and User_id = " + model.User_id + " and Admin_id = 0", "id desc");
        }
Example #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("emailconfig_edit", "编辑邮件设置"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            B_BaseConfig bconfig = new B_BaseConfig();

            //model = bconfig.LoadConfig();
            model    = ShopCache.GetBaseConfig();
            password = model.MailPassWord;
            if (password != "")
            {
                password = "******";
            }
        }