Пример #1
0
        /// <summary>
        /// 删除管理员
        /// </summary>
        public void Project_Del()
        {
            if (!EX_Admin.Power("admin_project", "项目列表"))
            {
                AjaxNoPower();
                return;
            }
            string ids = RequestTool.RequestString("id");

            B_Lebi_Project.Delete("id in (lbsql{" + ids + "})");
            Log.Add("删除项目", "Project", ids, CurrentAdmin, ids);
            Response.Write("{\"msg\":\"OK\"}");
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!EX_Admin.Power("emailtask_edit", "群发邮件"))
     {
         PageNoPower();
     }
     id    = RequestTool.RequestInt("id", 0);
     model = B_Lebi_EmailTask.GetModel(id);
     if (model == null)
     {
         model = new Lebi_EmailTask();
     }
 }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("fileedit", "文件编辑"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            file = RequestTool.RequestString("file");
            if (file.IndexOf("/") == 0)
            {
                file = file.Substring(1, file.Length - 1);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     ids = RequestTool.RequestString("ids");
     if (!EX_Admin.Power("product_edit", "编辑商品"))
     {
         WindowNoPower();
     }
     if (ids == "")
     {
         Response.Write("参数错误");
         Response.End();
     }
 }
Пример #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("prodesc_edit", "编辑商品通用描述"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            model = B_Lebi_ProDesc.GetList("", "").FirstOrDefault();
            if (model == null)
            {
                model = new Lebi_ProDesc();
            }
        }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("tongbu_taobao", "淘宝同步"))
            {
                PageNoPower();
            }


            shopnick = B_BaseConfig.Get("platform_taobao_shopnick");

            dateFrom = System.DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd HH:mm:ss");
            dateTo   = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        }
Пример #7
0
        /// <summary>
        /// 编辑权限-编辑过滤页面
        /// </summary>
        public void url_Edit()
        {
            if (!EX_Admin.Power("supplier_group_edit", "编辑商家分组"))
            {
                AjaxNoPower();
                return;
            }
            int    id  = RequestTool.RequestInt("id", 0);
            int    gid = RequestTool.RequestInt("gid", 0);
            string url = RequestTool.RequestString("Url");
            Lebi_Supplier_Group group = B_Lebi_Supplier_Group.GetModel(gid);

            if (url == "")
            {
                Response.Write("{\"msg\":\"" + Tag("地址不能为空") + "\"}");
                return;
            }
            if (group == null)
            {
                Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}");
                return;
            }
            Lebi_Supplier_Power p = B_Lebi_Supplier_Power.GetModel(id);

            if (p == null)
            {
                p = B_Lebi_Supplier_Power.GetList("Admin_Group_id=" + group.id + " and Url=lbsql{'" + url + "'}", "").FirstOrDefault();
                if (p != null)
                {
                    Response.Write("{\"msg\":\"" + Tag("地址已经存在") + "\"}");
                    return;
                }
                p = new Lebi_Supplier_Power();
                p.Supplier_Group_id = group.id;
                p.Url = url;
                B_Lebi_Supplier_Power.Add(p);
                string action      = Tag("添加过滤页面");
                string description = url;
                Log.Add(action, "Supplier_Group", p.id.ToString(), CurrentAdmin, description);
            }
            else
            {
                p.Url = url;
                B_Lebi_Supplier_Power.Update(p);
                string action      = Tag("编辑过滤页面");
                string description = url;
                Log.Add(action, "Supplier_Group", p.id.ToString(), CurrentAdmin, description);
            }

            Response.Write("{\"msg\":\"OK\"}");
        }
Пример #8
0
        /// <summary>
        /// 编辑模板-页面
        /// </summary>
        public void Skin_Edit()
        {
            if (RequestTool.GetConfigKey("OnlineFileEdit").Trim() != "1")
            {
                AjaxNoPower();
                return;
            }
            int             id    = RequestTool.RequestInt("id", 0);
            Lebi_Theme_Skin model = B_Lebi_Theme_Skin.GetModel(id);

            if (model == null)
            {
                model = new Lebi_Theme_Skin();
            }
            B_Lebi_Theme_Skin.BindForm(model);
            //if (model.IsPage == 1)
            //    model.Code = "";
            if (model.id == 0)
            {
                if (!EX_Admin.Power("theme_skin_add", "添加模板页面"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Theme_Skin.Add(model);
                id = B_Lebi_Theme_Skin.GetMaxId();
                Log.Add("添加模板-页面", "Theme_Skin", id.ToString(), CurrentAdmin, model.Name);
            }
            else
            {
                if (!EX_Admin.Power("theme_skin_edit", "编辑模板页面"))
                {
                    AjaxNoPower();
                    return;
                }
                B_Lebi_Theme_Skin.Update(model);
                Log.Add("编辑模板-页面", "Theme_Skin", id.ToString(), CurrentAdmin, model.Name);
            }
            //生成页面
            string SkinContent = Request["SkinContent"];

            if (SkinContent != "" && model.Path_Skin != "") //如果模板内容为空则不生成页面 by lebi.kingdge 2015-02-25
            {
                Lebi_Theme theme    = B_Lebi_Theme.GetModel(model.Theme_id);
                string     SkinPath = theme.Path_Files + "/" + model.Path_Skin;
                GreatSkin(SkinPath, SkinContent);
            }
            string result = "{\"msg\":\"OK\", \"id\":\"" + id + "\"}";

            Response.Write(result);
        }
Пример #9
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 + "\"}");
        }
Пример #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("supplier_group_edit", "编辑商家分组"))
            {
                PageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Supplier_Limit.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Supplier_Limit();
            }
        }
Пример #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = RequestTool.RequestInt("id", 0);

            if (!EX_Admin.Power("question_list", "安全问题"))
            {
                PageNoPower();
            }
            model = B_Lebi_User_Question.GetModel(id);
            if (model == null)
            {
                model = new Lebi_User_Question();
            }
        }
Пример #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = RequestTool.RequestInt("id", 0);

            if (!EX_Admin.Power("supplier_verified", "身份验证"))
            {
                WindowNoPower();
            }
            model = B_Lebi_Supplier_Verified.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Supplier_Verified();
            }
        }
Пример #13
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();
        }
Пример #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("fileedit", "文件编辑"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            if (RequestTool.GetConfigKey("OnlineFileEdit").Trim() != "1")
            {
                PageReturnMsg = PageNoEditMsg();
            }

            FileName    = RequestTool.RequestString("file");
            SkinContent = GetSkinStr(FileName);
        }
Пример #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!EX_Admin.Power("admin_data", "系统桌面"))
     {
         PageReturnMsg = PageNoPowerMsg();
     }
     if (!EX_Admin.Power("product_price_cost", "管理成本价"))
     {
     }
     if (!Shop.LebiAPI.Service.Instanse.Check("managelicenese"))
     {
         serviceinfo = "<div class=\"float_notice\"><iframe src=\"http://www.lebi.cn/support/notice/index.html\" name=\"news\" width=\"100%\" marginwidth=\"0\" marginheight=\"0\" hspace=\"0\" vspace=\"0\" frameborder=\"0\" scrolling=\"no\"></iframe></div>";
     }
 }
Пример #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("cash_edit", "提现管理"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Cash.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Cash();
            }
        }
Пример #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!EX_Admin.Power("cardtype_edit", "编辑优惠券"))
     {
         PageNoPower();
     }
     int id = RequestTool.RequestInt("id", 0);
     model = B_Lebi_CardOrder.GetModel(id);
     if (model == null)
     {
         model = new Lebi_CardOrder();
         model.Type_id_CardType = 311;
     }
 }
Пример #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("agent_config", "代理-参数设置"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize     = RequestTool.getpageSize(25);
            string where = "Grade > 0";
            models       = B_Lebi_UserLevel.GetList(where, "Grade asc", PageSize, page);
            int recordCount = B_Lebi_UserLevel.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}", page, PageSize, recordCount);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("admin_limit_edit", "编辑权限"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Admin_Limit.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Admin_Limit();
            }
        }
Пример #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("log_view", "查看操作日志"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Log.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Log();
            }
        }
Пример #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("admin_group_edit", "编辑权限组"))
            {
                PageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Admin_Group.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Admin_Group();
            }
        }
Пример #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("admin_group_list", "权限组列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize     = RequestTool.getpageSize(25);
            string where = "1=1";
            models       = B_Lebi_Admin_Group.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_Admin_Group.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}", page, PageSize, recordCount);
        }
Пример #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_price_edit", "编辑订单金额"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Order.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Order();
            }
        }
Пример #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("tips_list", "每日箴言"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Tips.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Tips();
            }
        }
Пример #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("admin_project", "项目列表"))
            {
                PageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Project.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Project();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     ids = RequestTool.RequestString("ids");
     tid = RequestTool.RequestInt("tid", 133);
     if (!EX_Admin.Power("property_list", "属性规格列表"))
     {
         WindowNoPower();
     }
     if (ids == "")
     {
         Response.Write("参数错误");
         Response.End();
     }
 }
Пример #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("emailtask_edit", "群发邮件"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize     = RequestTool.getpageSize(25);
            string where = "1=1";
            models       = B_Lebi_Email.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_Email.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}", page, PageSize, recordCount);
        }
Пример #28
0
        /// <summary>
        /// 升级一个主题
        /// </summary>
        public void Theme_Update()
        {
            if (!EX_Admin.Power("theme_edit", "编辑模板"))
            {
                AjaxNoPower();
                return;
            }
            int        id    = RequestTool.RequestInt("id", 0);
            Lebi_Theme theme = B_Lebi_Theme.GetModel(id);

            string res = Shop.LebiAPI.Service.Instanse.Theme_DownLoad(0, theme);

            Response.Write("{\"msg\":\"" + res + "\"}");
        }
Пример #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("cashailipay", "支付宝批量提现"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            t        = RequestTool.RequestInt("t", 0);
            status   = RequestTool.RequestInt("status", 0);
            type     = RequestTool.RequestInt("type", 0);
            paytype  = RequestTool.RequestSafeString("paytype");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            key      = RequestTool.RequestSafeString("key");
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            string where = "PayType='alipay'";
            if (paytype != "")
            {
                where += " and PayType = lbsql{'" + paytype + "'}";
            }
            if (key != "")
            {
                where += " and (User_UserName like lbsql{'%" + key + "%'} or Supplier_User_UserName like lbsql{'%" + key + "%'} or AccountCode like lbsql{'%" + key + "%'} or AccountName like lbsql{'%" + key + "%'} or Bank like lbsql{'%" + key + "%'})";
            }
            if (status > 0)
            {
                where += "and Type_id_CashStatus=" + status;
            }
            if (type == 1)
            {
                where += "and Supplier_id=0";
            }
            if (type == 2)
            {
                where += "and Supplier_id=1";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and (datediff(d,Time_Add,'" + FormatDate(lbsql_dateFrom) + "')<=0 and datediff(d,Time_Add,'" + FormatDate(lbsql_dateTo) + "')>=0)";
            }
            PageSize = RequestTool.getpageSize(25);

            models = B_Lebi_Cash.GetList(where, "id desc", 1000, 1);
            int recordCount = B_Lebi_Cash.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&status=" + status + "&paytype=" + paytype + "&type=" + type + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&key=" + key, page, PageSize, recordCount);
        }
Пример #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("oftenbuy_list", "常购清单列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize = RequestTool.getpageSize(25);
            int user_id = RequestTool.RequestInt("user_id", 0);

            key      = RequestTool.RequestString("key");
            dateFrom = RequestTool.RequestString("dateFrom");
            dateTo   = RequestTool.RequestString("dateTo");
            type     = RequestTool.RequestInt("type", 0);
            if (type == 0)
            {
                type = 144;
            }
            DateTime lbsql_dateFrom = RequestTool.RequestDate("dateFrom");
            DateTime lbsql_dateTo   = RequestTool.RequestDate("dateTo");

            string where = "1=1";
            if (user_id > 0)
            {
                where += " and User_id=" + user_id;
            }
            if (type > 0)
            {
                where += " and Type_id_UserProductType=" + type + "";
            }
            if (key != "")
            {
                where += " and Product_id in (select id from Lebi_Product where Name like lbsql{'%" + key + "%'})";
            }
            if (dateFrom != "" && dateTo != "")
            {
                where += " and Time_Add>='" + FormatDate(lbsql_dateFrom) + "' and Time_Add<='" + FormatDate(lbsql_dateTo) + " 23:59:59'";
            }
            models = B_Lebi_User_Product.GetList(where, "id desc", PageSize, page);
            int recordCount = B_Lebi_User_Product.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&type = " + type, page, PageSize, recordCount);
            user       = B_Lebi_User.GetModel(user_id);
            if (user == null)
            {
                user          = new Lebi_User();
                user.UserName = Tag("全部会员");
            }
        }