Esempio n. 1
0
        public string Getpro131List(int pid)
        {
            string str = "";
            List <Lebi_ProPerty> ps = B_Lebi_ProPerty.GetList("parentid=" + pid + "", "Sort desc");

            foreach (Lebi_ProPerty p in ps)
            {
                string sel = "";

                if (("," + modelp.ProPerty131 + ",").Contains("," + p.id + ","))
                {
                    sel = "checked";
                }
                str += " <label><input type=\"checkbox\" name=\"Property131\" shop=\"true\" " + sel + " value=\"" + p.id + "\"" + " />" + Language.Content(p.Name, CurrentLanguage.Code) + "</label>&nbsp;";
            }
            return(str);
        }
Esempio n. 2
0
 protected int sid = 0;//结算供应商ID
 protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode)
 {
     LoadTheme(themecode, siteid, languagecode, pcode);
     if (CurrentUser.id == 0)
     {
         //未登录
         if (SYS.IsAnonymousUser != "1")
         {
             Response.Redirect(URL("P_Login", "" + HttpUtility.UrlEncode(RequestTool.GetRequestUrlNonDomain()) + "," + GetUrlToken(RequestTool.GetRequestUrlNonDomain()) + ""));
         }
     }
     sid = RequestTool.RequestInt("sid", 0);
     if (SYS.IsSupplierCash == "1")
     {
         supplier = B_Lebi_Supplier.GetModel(sid);
     }
     if (supplier == null)
     {
         supplier = new Lebi_Supplier();
     }
     CookieTool.SetCookieString("supplier", supplier.id.ToString(), 60);
     path   = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em><a href=\"" + URL("P_Basket", "") + "\"><span>" + Tag("购物车") + "</span></a><em>&raquo;</em><a href=\"" + URL("P_CheckOut", "") + "\"><span>" + Tag("收银台") + "</span></a>";
     basket = new Basket(sid);
     if (basket.Products.Count == 0)
     {
         Response.Redirect(URL("P_Basket", ""));
     }
     if (CurrentUser.id > 0)
     {
         string sqlwhere = "";
         if (DataBase.DBType == "sqlserver")
         {
             sqlwhere = " and datediff(d,Time_End,'" + FormatTime(System.DateTime.Now) + "')<0";
         }
         if (DataBase.DBType == "access")
         {
             sqlwhere = " and datediff('d',Time_End,'" + FormatTime(System.DateTime.Now) + "')<0";
         }
         cards      = B_Lebi_Card.GetList("User_id=" + CurrentUser.id + " and Type_id_CardType=312 and Type_id_CardStatus in (201,203) " + sqlwhere + "", "id asc");//状态为已发放或部分使用
         moneycards = B_Lebi_Card.GetList("User_id=" + CurrentUser.id + " and Type_id_CardType=311 and Type_id_CardStatus in (201,203) " + sqlwhere + "", "id asc");
     }
     ProPerty135 = B_Lebi_ProPerty.GetList("Type_id_ProPertyType=135", "Sort desc");
 }
Esempio n. 3
0
        /// <summary>
        /// 返回规格
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public string getproperty(string ids)
        {
            string str = "";
            List <Lebi_ProPerty> list;

            try
            {
                list = B_Lebi_ProPerty.GetList("id in (lbsql{" + ids + "})", "parentSort desc");
            }
            catch (System.Data.SqlClient.SqlException)
            {
                list = new List <Lebi_ProPerty>();
            }
            foreach (Lebi_ProPerty model in list)
            {
                str += Language.Content(model.Name, CurrentLanguage.Code) + ", ";
            }
            return(str);
        }
Esempio n. 4
0
 /// <summary>
 /// 返回商品的自定义文字属性
 /// </summary>
 /// <returns></returns>
 public void GetProWords()
 {
     ProPertys = new List <KeyValue>();
     try
     {
         List <KeyValue> kvs = Common.KeyValueToList(product.ProPerty133);
         foreach (KeyValue kv in kvs)
         {
             Lebi_ProPerty pro = B_Lebi_ProPerty.GetModel("id=" + kv.K + "");
             KeyValue      rkv = new KeyValue();
             rkv.K = Lang(pro.Name);
             rkv.V = Lang(kv.V);
             ProPertys.Add(rkv);
         }
     }
     catch
     {
         ProPertys = new List <KeyValue>();
     }
 }
Esempio n. 5
0
        public string Getpro132List(Lebi_ProPerty pmodel)
        {
            string str = "";
            List <Lebi_ProPerty> ps = B_Lebi_ProPerty.GetList("parentid=" + pmodel.id + "", "Sort desc");

            foreach (Lebi_ProPerty p in ps)
            {
                string sel = "";
                if (("," + model.ProPerty132 + ",").Contains("," + p.id + ","))
                {
                    sel = "checked";
                }
                str += " <label><input type=\"checkbox\" name=\"Property132\" shop=\"true\" " + sel + " value=\"" + p.id + "\"" + " />";
                if (p.ImageUrl != "")
                {
                    str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                }
                str += Language.Content(p.Name, CurrentLanguage.Code) + "</label>";
            }
            return(str);
        }
Esempio n. 6
0
        /// <summary>
        /// 属性规格选择
        /// </summary>
        /// <param name="selid"></param>
        /// <returns></returns>
        public string Property(string selid, int t)
        {
            string str = "<div class=\"input-group\">";
            List <Lebi_ProPerty> pros = B_Lebi_ProPerty.GetList("parentid=0 and Type_id_ProPertyType=" + t + "", "Sort desc");

            foreach (Lebi_ProPerty pro in pros)
            {
                string sel = "";
                if (("," + selid + ",").Contains("," + pro.id + ""))
                {
                    sel = "checked";
                }
                if (!string.IsNullOrEmpty(RequestTool.GetConfigKey("SystemAdmin").Trim()))
                {
                    str += "<label class=\"custom-control custom-checkbox m-r-20\"><input type=\"checkbox\" id=\"Property" + t + "" + pro.id + "\" name=\"Property" + t + "\" value=\"" + pro.id + "\" class=\"custom-control-input\" shop=\"true\" " + sel + "><span class=\"custom-control-label\">";
                    str += Language.Content(pro.Name, CurrentLanguage.Code);
                    if (pro.Code != "")
                    {
                        str += "(" + pro.Code + ")";
                    }
                    str += "</span></label>";
                }
                else
                {
                    str += "<label><input " + sel + " type=\"checkbox\" value=\"" + pro.id + "\" shop=\"true\" name=\"ProPerty" + t + "\"/>";
                    if (pro.ImageUrl != "")
                    {
                        str += "<img src=\"" + Image(pro.ImageUrl, 16, 16) + "\">";
                    }
                    str += Language.Content(pro.Name, CurrentLanguage.Code);
                    if (pro.Code != "")
                    {
                        str += "(" + pro.Code + ")";
                    }
                    str += "</label>&nbsp;";
                }
            }
            str += "</div>";
            return(str);
        }
Esempio n. 7
0
        /// <summary>
        /// 删除商家
        /// </summary>
        public void User_Del()
        {
            if (!EX_Admin.Power("supplier_user_del", "删除商家"))
            {
                AjaxNoPower();
                return;
            }
            string id = RequestTool.RequestString("ids");

            if (id == "")
            {
                Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}");
                return;
            }
            B_Lebi_Supplier.Delete("id in (lbsql{" + id + "})");
            List <Lebi_Order> modellist = B_Lebi_Order.GetList("Supplier_id in (lbsql{" + id + "})", "");

            foreach (Lebi_Order model in modellist)
            {
                B_Lebi_Order.Delete("id = " + model.id + "");
                B_Lebi_Order_Log.Delete("Order_id = " + model.id + "");
                B_Lebi_Order_Product.Delete("Order_id = " + model.id + "");
            }
            B_Lebi_Brand.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ProPerty.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ProPerty_Tag.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Cash.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Message.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Money.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Bank.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_BillType.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_ProductType.Delete("Supplier_id in (lbsql{" + id + "})");
            //B_Lebi_Supplier_Verified.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Verified_Log.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Log.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ServicePanel.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ServicePanel_Group.Delete("Supplier_id in (lbsql{" + id + "})");
            Log.Add("删除商家", "Supplier_User", id.ToString(), CurrentAdmin, id.ToString());
            Response.Write("{\"msg\":\"OK\"}");
        }
Esempio n. 8
0
        public string Getpro131List(int pid)
        {
            string str = "<div class=\"input-group\">";
            List <Lebi_ProPerty> ps = B_Lebi_ProPerty.GetList("parentid=" + pid + "", "Sort desc");

            foreach (Lebi_ProPerty p in ps)
            {
                string sel = "";
                if (("," + model.ProPerty131 + ",").Contains("," + p.id + ","))
                {
                    sel = "checked";
                }
                if (!string.IsNullOrEmpty(RequestTool.GetConfigKey("SystemAdmin").Trim()))
                {
                    str += "<label class=\"custom-control custom-checkbox m-r-20\"><input type=\"checkbox\" id=\"Property131" + p.id + "\" name=\"Property131\" value=\"" + p.id + "\" class=\"custom-control-input\" shop=\"true\" " + sel + "><span class=\"custom-control-label\">";
                    if (p.Code != "")
                    {
                        str += "(" + p.Code + ")";
                    }
                    str += "</span></label>";
                }
                else
                {
                    str += " <label><input type=\"checkbox\" name=\"Property131\" shop=\"true\" " + sel + " value=\"" + p.id + "\"" + " />";
                    if (p.ImageUrl != "")
                    {
                        str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                    }
                    str += Language.Content(p.Name, CurrentLanguage.Code);
                    if (p.Code != "")
                    {
                        str += "(" + p.Code + ")";
                    }
                    str += "</label>";
                }
            }
            str += "</div>";
            return(str);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("property_add", "添加属性规格") || !EX_Admin.Power("property_edit", "编辑属性规格"))
            {
                WindowNoPower();
            }
            int pid = RequestTool.RequestInt("pid", 0);
            int id  = RequestTool.RequestInt("id", 0);

            model  = B_Lebi_ProPerty.GetModel(id);
            pmodel = B_Lebi_ProPerty.GetModel(pid);
            if (pmodel == null)
            {
                pmodel = new Lebi_ProPerty();
                Response.Write("参数错误");
                Response.End();
            }
            if (model == null)
            {
                model = new Lebi_ProPerty();
            }
        }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("property_add", "添加属性规格") || !EX_Admin.Power("property_edit", "编辑属性规格"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize     = RequestTool.getpageSize(25);
            pid          = RequestTool.RequestInt("pid", 0);
            key          = RequestTool.RequestString("key");
            pmodel       = B_Lebi_ProPerty.GetModel(pid);
            string where = "parentid=" + pid;
            if (key != "")
            {
                where += " and (Name like lbsql{'%" + key + "%'} or Code like lbsql{'%" + key + "%'})";
            }
            models = B_Lebi_ProPerty.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_ProPerty.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&pid=" + pid + "&key=" + key + "", page, PageSize, recordCount);
            tmodel     = B_Lebi_Type.GetModel(pmodel.Type_id_ProPertyType);
        }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int tid = RequestTool.RequestInt("tid", 0);
            int pid = RequestTool.RequestInt("pid", 0);

            model = B_Lebi_Product.GetModel(pid);
            if (model == null)
            {
                model = new Lebi_Product();
            }
            //Lebi_ProPerty_Type ptype = B_Lebi_ProPerty_Type.GetModel(tid);
            string property = EX_Product.ProductType_ProPertystr(tid, CurrentSupplier.id);

            if (property != "")
            {
                pros = B_Lebi_ProPerty.GetList("Type_id_ProPertyType in (132,133) and id in (" + property + ")", "Sort desc");
            }
            if (pros == null)
            {
                pros = new List <Lebi_ProPerty>();
            }
            ProPerty133 = Common.KeyValueToList(model.ProPerty133);
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            id     = RequestTool.RequestInt("id", 0);
            modelp = B_Lebi_Product.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id);
            if (modelp == null)
            {
                modelp = new Lebi_Product();
                modelp.ProPertyMain = RequestTool.RequestInt("ProPertyMain", 0);
                modelp.ProPerty131  = RequestTool.RequestString("ProPerty131");
            }
            if (!Power("supplier_product_edit", "编辑商品"))
            {
                WindowNoPower();
            }
            string property = EX_Product.ProductType_ProPertystr(modelp.Pro_Type_id);

            if (property != "")
            {
                try
                {
                    ggs = B_Lebi_ProPerty.GetList("Type_id_ProPertyType=131 and id in (lbsql{" + property + "})", "Sort desc");
                }
                catch (System.Data.SqlClient.SqlException)
                {
                    ggs = new List <Lebi_ProPerty>();
                }
            }
            if (ggs == null)
            {
                ggs = new List <Lebi_ProPerty>();
            }
            modelLan     = Language.DefaultLanguage();
            string where = "";
            where        = "Product_id=" + id + " and Product_id!=0 and (IsDel!=1 or IsDel is null)";
            models       = B_Lebi_Product.GetList(where, "");
        }
Esempio n. 13
0
        /// <summary>
        /// 处理添加一个商品
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        private Lebi_Product DoOneProduct(Lebi_Product pro)
        {
            Lebi_Pro_Type t   = new Lebi_Pro_Type();
            string        ids = pro.taobaoid_type;

            if (ids != "")
            {
                ids = "'0" + ids.Replace(",", "','") + "0'";
                List <Lebi_Pro_Type> models = B_Lebi_Pro_Type.GetList("taobaoid in (lbsql{" + ids + "})", "");
                t = models.FirstOrDefault();
            }

            if (t == null)
            {
                t = new Lebi_Pro_Type();
            }
            string p131ids = pro.ProPerty131;
            string p132ids = pro.ProPerty132;

            if (p131ids != "")
            {
                p131ids = "'" + p131ids.Replace(",", "','") + "'";
                List <Lebi_ProPerty> p131s = B_Lebi_ProPerty.GetList("taobaoid in (" + p131ids + ")", "");
                p131ids = "";
                foreach (Lebi_ProPerty p in p131s)
                {
                    if (p131ids == "")
                    {
                        p131ids = p.id.ToString();
                    }
                    else
                    {
                        p131ids += "," + p.id.ToString();
                    }
                }
            }
            if (p132ids != "")
            {
                p132ids = "'" + p132ids.Replace(",", "','") + "'";
                List <Lebi_ProPerty> p132s = B_Lebi_ProPerty.GetList("taobaoid in (" + p132ids + ")", "");
                p132ids = "";
                foreach (Lebi_ProPerty p in p132s)
                {
                    if (p132ids == "")
                    {
                        p132ids = p.id.ToString();
                    }
                    else
                    {
                        p132ids += "," + p.id.ToString();
                    }
                }
            }
            pro.ProPerty131 = p131ids;
            pro.ProPerty132 = p132ids;
            pro.Pro_Type_id = t.id;
            B_Lebi_Product.Add(pro);
            pro.id = B_Lebi_Product.GetMaxId();

            return(pro);
        }
Esempio n. 14
0
        public string GetproList(Lebi_ProPerty pmodel)
        {
            string str = "";

            List <Lebi_ProPerty> ps = B_Lebi_ProPerty.GetList("parentid=" + pmodel.id + "", "Sort desc");

            if (pmodel.Type_id_ProPertyType == 132)
            {
                foreach (Lebi_ProPerty p in ps)
                {
                    string sel = "";
                    if (("," + model.ProPerty132 + ",").Contains("," + p.id + ","))
                    {
                        sel = "checked";
                    }
                    str += " <label><input type=\"checkbox\" name=\"Property132\" shop=\"true\" " + sel + " value=\"" + p.id + "\"" + " />";
                    if (p.ImageUrl != "")
                    {
                        str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                    }
                    str += Language.Content(p.Name, CurrentLanguage.Code) + "</label>";
                }
            }
            else if (pmodel.Type_id_ProPertyType == 133)
            {
                List <Lebi_Language_Code> langs = Language.Languages();
                KeyValue kv;
                try
                {
                    kv = (from m in ProPerty133
                          where m.K == pmodel.id.ToString()
                          select m).ToList().FirstOrDefault();
                }
                catch
                {
                    kv = new KeyValue();
                }
                if (kv == null)
                {
                    kv = new KeyValue();
                }
                foreach (Lebi_Language_Code lang in langs)
                {
                    string val = "";
                    if (kv != null && kv.V != null)
                    {
                        val = kv.V;
                    }
                    str += lang.Code + " <input type=\"text\" name=\"Property133_" + pmodel.id + lang.Code + "\" shop=\"true\" value=\"" + Language.Content(val, lang.Code) + "\"" + " class=\"input\"  /> ";
                }
            }
            else if (pmodel.Type_id_ProPertyType == 134)
            {
                foreach (Lebi_ProPerty p in ps)
                {
                    string sel = "";
                    if (("," + model.ProPerty134 + ",").Contains("," + p.id + ","))
                    {
                        sel = "checked";
                    }
                    str += " <label><input type=\"checkbox\" name=\"Property134\" shop=\"true\" " + sel + " value=\"" + p.id + "\"" + " />";
                    if (p.ImageUrl != "")
                    {
                        str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                    }
                    str += Language.Content(p.Name, CurrentLanguage.Code) + "</label>";
                }
            }
            return(str);
        }
Esempio n. 15
0
        public string Get_guigeforwap(Lebi_Product model)
        {
            string res = "";

            if (model.ProPerty134 != "")
            {
                List <Lebi_ProPerty> ps134 = B_Lebi_ProPerty.GetList("id in (" + model.ProPerty134 + ")", "Sort desc");
                string Msige = Language.DefaultCurrency().Msige;
                if (ps134.Count > 0)
                {
                    foreach (Lebi_ProPerty p in ps134)
                    {
                        res += "<dd class=\"clearfix\"><em>" + Lang(p.Name) + ":</em><em><input type=\"hidden\" name=\"Property134\" propertyid=\"" + p.id + "\" value=\"" + Lang(p.Name) + Msige + p.Price + ":\" />";
                        List <Lebi_ProPerty> ps134list = B_Lebi_ProPerty.GetList("parentid = " + p.id + "", "Sort desc");
                        if (ps134list.Count > 0)
                        {
                            res += "<select id=\"Property134_" + p.id + "\" >";
                            foreach (Lebi_ProPerty pl in ps134list)
                            {
                                if (pl.Price > 0)
                                {
                                    res += "<option propertypriceid=\"" + pl.id + "\" value=\"" + Lang(pl.Name) + Msige + pl.Price + "\">" + Lang(pl.Name) + " " + Msige + pl.Price + "</option>";
                                }
                                else
                                {
                                    res += "<option propertypriceid=\"" + pl.id + "\" value=\"" + Lang(pl.Name) + "\">" + Lang(pl.Name) + "</option>";
                                }
                            }
                            res += "</select>";
                        }
                        else
                        {
                            res += "<input type=\"text\" id=\"Property134_" + p.id + "\" class=\"input\" value=\"\" />";
                        }
                        res += "</em></dd>";
                    }
                }
            }
            List <ProductProperty> rmodels = new List <ProductProperty>();

            if (model.Product_id == 0)
            {
                //无同款子商品
                return(res);
            }
            List <Lebi_Product> pros = B_Lebi_Product.GetList("(IsDel!=1 or IsDel is null) and Product_id=" + model.Product_id + "", "");

            if (pros.Count == 0)
            {
                return(res);
            }
            Lebi_Product pmodel = B_Lebi_Product.GetModel(model.Product_id);

            if (pmodel == null)
            {
                return(res);
            }
            string property = EX_Product.ProductType_ProPertystr(model.Pro_Type_id, 131);

            if (property == "")
            {
                return(res);
            }
            List <Lebi_ProPerty> pps = B_Lebi_ProPerty.GetList("id in (" + property + ")", "Sort desc");
            List <Lebi_ProPerty> ps  = B_Lebi_ProPerty.GetList("parentid in (" + property + ")", "Sort desc");
            //分析当前商品的规格
            //将当前商品的规格与主父规格进行对应
            List <Lebi_ProPerty> Currentpps = new List <Lebi_ProPerty>();//保存当前商品的父规则值

            string[] temps = model.ProPerty131.Split(',');
            foreach (string k in temps)
            {
                Lebi_ProPerty p = (from m in ps
                                   where m.id == Convert.ToInt32(k)
                                   select m).ToList().FirstOrDefault();
                if (p != null)
                {
                    Lebi_ProPerty kv = (from m in pps
                                        where m.id == p.parentid
                                        select m).ToList().FirstOrDefault();
                    kv.Sort = p.id;//临时征用排序字段,存放规格
                    Currentpps.Add(kv);
                }
            }
            foreach (Lebi_ProPerty pp in Currentpps)
            {
                List <Lebi_ProPerty> cps = (from m in ps
                                            where m.parentid == pp.id
                                            select m).ToList();
                if (cps.Count == 0)
                {
                    continue;
                }


                res += "<dd class=\"cartOption\"><em>" + Lang(pp.Name) + ":</em><em><select name=\"select_same_goods_\" onChange=\"window.location=$(this).val();\">";

                foreach (Lebi_ProPerty p in cps)
                {
                    //计算对应的商品
                    string       propertystr = ("," + model.ProPerty131 + ",").Replace("," + pp.Sort + ",", "," + p.id + ",");
                    Lebi_Product pro         = (from m in pros
                                                where ("," + m.ProPerty131 + ",") == propertystr
                                                select m).ToList().FirstOrDefault();
                    if (pro == null)
                    {
                        continue;
                    }
                    if (pp.Sort == p.id)
                    {
                        res += " <option value=\"" + URL("P_Product", pro.id) + "\" selected>" + Lang(p.Name) + "</option>";
                    }
                    else
                    {
                        res += " <option value=\"" + URL("P_Product", pro.id) + "\">" + Lang(p.Name) + "</option>";
                    }
                }

                res += "</select></em><em></em></dd>";
            }
            return(res);
        }
Esempio n. 16
0
        protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode)
        {
            LoadTheme(themecode, siteid, languagecode, pcode);
            id        = Rint_Para("0");    //商品分类
            pid       = Rint_Para("1");    //品牌
            cid       = Rstring_Para("2"); //属性
            list      = Rstring_Para("3"); //列表或网格
            sort      = Rstring_Para("4"); //排序
            tid       = Rint_Para("5");    //商品标签
            transport = Rint_Para("7");    //配送 0全部 1商城 2商家
            stock     = Rint_Para("8");    //是否有库存 1只显示有货
            pageindex = RequestTool.RequestInt("page", 1);
            keyword   = Rstring("keyword");
            pro_type  = B_Lebi_Pro_Type.GetModel(id);
            if (pro_type == null)
            {
                pro_type = new Lebi_Pro_Type();
            }
            if (Lang(pro_type.Url) != "")  //如果存在自定义URL 跳转至自定义URL by kingdge 2014-10-30
            {
                Response.Redirect(Lang(pro_type.Url));
                Response.End();
                return;
            }
            property = EX_Product.ProductType_ProPerty(pro_type);
            if (property == null)
            {
                property = new Lebi_Pro_Type(); property.ProPerty132 = "0";
            }
            if (property.ProPerty132 == "")
            {
                property.ProPerty132 = "0";
            }
            path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("首页") + "\"><span>" + Tag("首页") + "</span></a><em class=\"home\">&raquo;</em>";
            if (pro_type.id > 0)
            {
                CategoryPath = Categorypath(id);
                for (int i = 0; i <= CategoryPath.GetUpperBound(0); i++)
                {
                    path += "<a href=\"" + URL("P_ProductCategory", "" + CategoryPath[i, 0] + "", CategoryPath[i, 2]) + "\"><span>" + CategoryPath[i, 1] + "</span></a>";
                    if (i < CategoryPath.GetUpperBound(0))
                    {
                        path += "<em>&raquo;</em>";
                    }
                }
            }
            else if (tid == 0)
            {
                path += "<a href=\"" + URL("P_ProductCategory", "0") + "\"><span>" + Tag("商品列表") + "</span></a>";
            }
            if (tid > 0)
            {
                tag = B_Lebi_Pro_Tag.GetModel(tid);
                if (tag != null)
                {
                    path += "<em>&raquo;</em><a href=\"" + URL("P_ProductCategory", "" + id + ",$,$,$,$," + tid + "") + "\"><span>" + Lang(tag.Name) + "</span></a>";
                }
            }
            where = ProductWhere + " and Type_id_ProductType <> 323";
            if (pid > 0)
            {
                where += " and Brand_id=" + pid + "";
                brand  = B_Lebi_Brand.GetModel(pid);
                path  += "<em>&raquo;</em><a href=\"" + URL("P_ProductCategory", "" + id + "," + pid + ",$,$,$,$") + "\"><span>" + Lang(brand.Name) + "</span></a>";
            }
            if (cid != "")
            {
                where += " and " + Categorywhere(cid);
                string _cidlast = "";
                if (cid.IndexOf("$") > -1)
                {
                    string[] cidarr = cid.Split('$');
                    for (int i = 0; i < cidarr.Count(); i++)
                    {
                        if (cidarr[i].IndexOf("|") > -1)
                        {
                            string[] _cids = cidarr[i].Split('|');
                            _cidlast = _cids[1];
                            Lebi_ProPerty ProPerty = B_Lebi_ProPerty.GetModel(int.Parse(_cidlast));
                            if (ProPerty != null)
                            {
                                path += "<em>&raquo;</em><a href=\"" + URL("P_ProductCategory", "" + id + "," + pid + "," + ProPerty.parentid + "|" + ProPerty.id + ",$,$,$") + "\"><span>" + Lang(ProPerty.Name) + "</span></a>";
                            }
                        }
                    }
                }
                else
                {
                    if (cid.IndexOf("|") > -1)
                    {
                        string[] _cids = cid.Split('|');
                        _cidlast = _cids[1];
                        Lebi_ProPerty ProPerty = B_Lebi_ProPerty.GetModel(int.Parse(_cidlast));
                        if (ProPerty != null)
                        {
                            path += "<em>&raquo;</em><a href=\"" + URL("P_ProductCategory", "" + id + "," + pid + "," + ProPerty.parentid + "|" + ProPerty.id + ",$,$,$") + "\"><span>" + Lang(ProPerty.Name) + "</span></a>";
                        }
                    }
                }
            }
            if (id > 0)
            {
                where += " and " + CategoryWhere(id);
                //where += " and (Pro_Type_id in (" + Categorywhereforid(id) + ")";
                //if (DataBase.DBType == "sqlserver")
                //{
                //    where += " or Charindex('," + id + ",',','+Pro_Type_id_other+',')>0)";
                //}
                //if (DataBase.DBType == "access")
                //{
                //    where += " or Instr(','+Pro_Type_id_other+',','," + id + ",')>0)";
                //}
            }
            if (tid > 0)
            {
                if (LB.DataAccess.DB.BaseUtilsInstance.DBType == "sqlserver")
                {
                    where += " and Charindex('," + tid + ",',','+Pro_Tag_id+',')>0";
                }
                else if (LB.DataAccess.DB.BaseUtilsInstance.DBType == "access")
                {
                    where += " and Instr(','+Pro_Tag_id+',','," + tid + ",')>0";
                }
                else if (LB.DataAccess.DB.BaseUtilsInstance.DBType == "mysql")
                {
                    where += " and Instr(','+Pro_Tag_id+',','," + tid + ",')>0";
                }
            }
            if (transport == 1)
            {
                where += " and IsSupplierTransport  = 0";
            }
            else if (transport == 2)
            {
                where += " and IsSupplierTransport  = 1";
            }
            if (stock == 1)
            {
                where += " and Count_Stock > 0";
            }
            if (keyword != "")
            {
                //增加空格划词搜索 by kingdge 2013-09-18
                string wherekeyword = "";
                if (keyword.IndexOf(" ") > -1)
                {
                    string[] keywordsArr;
                    keywordsArr = keyword.Split(new char[1] {
                        ' '
                    });
                    foreach (string keywords in keywordsArr)
                    {
                        if (keywords != "")
                        {
                            if (wherekeyword == "")
                            {
                                wherekeyword = "Name like lbsql{'%" + keywords + "%'}";
                            }
                            else
                            {
                                wherekeyword += " and Name like lbsql{'%" + keywords + "%'}";
                            }
                        }
                    }
                }
                else
                {
                    wherekeyword = "Name like lbsql{'%" + keyword + "%'}";
                }
                where += " and ((" + wherekeyword + ") or Number like lbsql{'%" + keyword + "%'} or Code like lbsql{'%" + keyword + "%'})";
            }

            if (sort == "1")
            {
                order = " Count_Sales_Show desc"; ordertmp = "a";
            }
            else if (sort == "1a")
            {
                order = " Count_Sales_Show asc"; ordertmp = "";
            }
            else if (sort == "2")
            {
                order = " Price desc"; ordertmp = "a";
            }
            else if (sort == "2a")
            {
                order = " Price asc"; ordertmp = "";
            }
            else if (sort == "3")
            {
                order = " Count_Comment desc"; ordertmp = "a";
            }
            else if (sort == "3a")
            {
                order = " Count_Comment asc"; ordertmp = "";
            }
            else if (sort == "4")
            {
                order = " Time_Add desc"; ordertmp = "a";
            }
            else if (sort == "4a")
            {
                order = " Time_Add asc"; ordertmp = "";
            }
            else if (sort == "5")
            {
                order = " Count_Views_Show desc"; ordertmp = "a";
            }
            else if (sort == "5a")
            {
                order = " Count_Views_Show asc"; ordertmp = "";
            }
            else if (sort == "6")
            {
                order = " Count_Stock desc"; ordertmp = "a";
            }
            else if (sort == "6a")
            {
                order = " Count_Stock asc"; ordertmp = "";
            }
            else
            {
                order = " Sort desc,id desc"; ordertmp = "";
            }
            products    = B_Lebi_Product.GetList(where, order, PageSize, pageindex);
            recordCount = B_Lebi_Product.Counts(where);
            //id={0}&pid={1}&cid={2}&list={3}&sort={4}&tid={5}&page={6}
            string url = URL("P_ProductCategory", id + "," + pid + "," + cid + "," + list + "," + sort + "," + tid + ",{0}," + transport + "," + stock + "," + keyword + "", Lang(pro_type.Url));

            HeadPage = Shop.Bussiness.Pager.GetPaginationStringForWebSimple(url, pageindex, PageSize, recordCount, CurrentLanguage);
            FootPage = Shop.Bussiness.Pager.GetPaginationStringForWeb(url, pageindex, PageSize, recordCount, CurrentLanguage);
            NextPage = URL("P_ProductCategory", id + "," + pid + "," + cid + "," + list + "," + sort + "," + tid + "," + (pageindex + 1) + "," + transport + "," + stock + "," + keyword + "", Lang(pro_type.Url));
        }
Esempio n. 17
0
        public override string ThemePageMeta(string code, string tag)
        {
            string str           = "";
            string Page_Title    = "";
            string Page_Keywords = "";

            if (cid != "")
            {
                string _cidlast = "";
                if (cid.IndexOf("$") > -1)
                {
                    string[] cidarr = cid.Split('$');
                    for (int i = 0; i < cidarr.Count(); i++)
                    {
                        if (cidarr[i].IndexOf("|") > -1)
                        {
                            string[] _cids = cidarr[i].Split('|');
                            _cidlast = _cids[1];
                            Lebi_ProPerty ProPerty = B_Lebi_ProPerty.GetModel(int.Parse(_cidlast));
                            if (ProPerty != null)
                            {
                                Page_Title    += Lang(ProPerty.Name) + " - ";
                                Page_Keywords += Lang(ProPerty.Name) + ",";
                            }
                        }
                    }
                }
                else
                {
                    if (cid.IndexOf("|") > -1)
                    {
                        string[] _cids = cid.Split('|');
                        _cidlast = _cids[1];
                        Lebi_ProPerty ProPerty = B_Lebi_ProPerty.GetModel(int.Parse(_cidlast));
                        if (ProPerty != null)
                        {
                            Page_Title    += Lang(ProPerty.Name) + " - ";
                            Page_Keywords += Lang(ProPerty.Name) + ",";
                        }
                    }
                }
            }
            if (pid > 0)
            {
                Lebi_Brand brand = B_Lebi_Brand.GetModel(pid);
                Page_Title    += Lang(brand.Name) + " - ";
                Page_Keywords += Lang(brand.Name) + ",";
            }
            if (pro_type.id > 0)
            {
                string[,] parr = Categorypath(id);
                for (int i = parr.GetUpperBound(0); i >= 0; i--)
                {
                    Page_Title    += parr[i, 1];
                    Page_Keywords += parr[i, 1];
                    if (i < parr.GetUpperBound(0))
                    {
                        Page_Title    += " - ";
                        Page_Keywords += ",";
                    }
                }
            }
            if (tid > 0)
            {
                Lebi_Pro_Tag Tag = B_Lebi_Pro_Tag.GetModel(tid);
                if (Tag != null)
                {
                    Page_Title += Lang(Tag.Name) + " - ";
                }
            }
            switch (tag.ToLower())
            {
            case "description":
                if (Lang(pro_type.SEO_Description) == "")
                {
                    str = Page_Keywords;
                }
                else
                {
                    str = Lang(pro_type.SEO_Description) + ",";
                }
                break;

            case "keywords":
                if (Lang(pro_type.SEO_Keywords) == "")
                {
                    str = Page_Keywords;
                }
                else
                {
                    str = Lang(pro_type.SEO_Keywords) + ",";
                }
                break;

            default:
                if (Lang(pro_type.SEO_Title) == "")
                {
                    str = Page_Title;
                }
                else
                {
                    str = Lang(pro_type.SEO_Title);
                }
                break;
            }
            return(ThemePageMeta(code, tag, str));
        }
Esempio n. 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            pid     = RequestTool.RequestInt("pid", 0);
            tid     = RequestTool.RequestInt("tid", 0);
            randnum = RequestTool.RequestInt("randnum", 0);
            if (pid == 0 || (pid > 0 && randnum > 0))
            {
                if (!Power("supplier_product_add", "添加商品"))
                {
                    WindowNoPower();
                }
            }
            else
            {
                if (!Power("supplier_product_edit", "编辑商品"))
                {
                    WindowNoPower();
                }
            }
            if (pid > 0 && randnum > 0)
            {
                modelp = B_Lebi_Product.GetModel(randnum);
            }
            else
            {
                modelp = B_Lebi_Product.GetModel(pid);
            }
            if (modelp == null)
            {
                modelp = new Lebi_Product();
                modelp.ProPertyMain = RequestTool.RequestInt("ProPertyMain", 0);
                modelp.ProPerty131  = RequestTool.RequestString("ProPerty131");
            }
            if (tid == 0)
            {
                tid = modelp.Pro_Type_id;
            }
            string property = EX_Product.ProductType_ProPertystr(tid, CurrentSupplier.id);

            if (property != "")
            {
                try
                {
                    ggs = B_Lebi_ProPerty.GetList("Type_id_ProPertyType=131 and id in (" + property + ")", "Sort desc");
                }
                catch (System.Data.SqlClient.SqlException)
                {
                    ggs = new List <Lebi_ProPerty>();
                }
            }
            if (ggs == null)
            {
                ggs = new List <Lebi_ProPerty>();
            }
            modelLan     = Language.DefaultLanguage();
            string where = "Product_id!=0 and (IsDel!=1 or IsDel is null)";
            if (pid == 0 || (pid > 0 && randnum > 0))
            {
                where += " and Supplier_id = " + CurrentSupplier.id + " and Product_id=" + randnum + "";
            }
            else
            {
                where += " and Supplier_id = " + CurrentSupplier.id + " and Product_id=" + pid + "";
            }
            models = B_Lebi_Product.GetList(where, "");
        }
Esempio n. 19
0
        /// <summary>
        /// 生成规格选项
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public string Get_guige(Lebi_Product model)
        {
            string res = "";

            if (model.ProPerty134 != "")
            {
                List <Lebi_ProPerty> ps134 = B_Lebi_ProPerty.GetList("id in (" + model.ProPerty134 + ")", "Sort desc");
                string Msige = Language.DefaultCurrency().Msige;
                foreach (Lebi_ProPerty p in ps134)
                {
                    res += "<dl class=\"clearfix\"><dt>" + Lang(p.Name) + ":</dt><dd>";
                    res += "<input type=\"hidden\" name=\"Property134\" propertyid=\"" + p.id + "\" value=\"" + Lang(p.Name) + "\" />";
                    List <Lebi_ProPerty> ps134list = B_Lebi_ProPerty.GetList("parentid = " + p.id + "", "Sort desc");
                    if (ps134list.Count > 0)
                    {
                        Lebi_ProPerty ps134listfirst = ps134list.FirstOrDefault();
                        res += "<select id=\"Property134_" + p.id + "\" selectname=\"Property134\">";
                        foreach (Lebi_ProPerty pl in ps134list)
                        {
                            if (pl.Price > 0)
                            {
                                res += "<option propertypriceid=\"" + pl.id + "\" value=\"" + Lang(pl.Name) + Msige + pl.Price + "\">" + Lang(pl.Name) + " " + Msige + pl.Price + "</option>";
                            }
                            else
                            {
                                res += "<option propertypriceid=\"" + pl.id + "\" value=\"" + Lang(pl.Name) + "\">" + Lang(pl.Name) + "</option>";
                            }
                        }
                        res += "</select>";
                    }
                    else
                    {
                        res += "<input type=\"text\" id=\"Property134_" + p.id + "\" class=\"input\" value=\"\" />";
                    }
                    res += "</dd></dl>";
                }
            }
            //return "model.ProPerty134" + model.ProPerty134;
            List <ProductProperty> rmodels = new List <ProductProperty>();

            if (model.Product_id == 0)
            {
                //无同款子商品
                return(res);
            }
            List <Lebi_Product> pros = B_Lebi_Product.GetList("(IsDel!=1 or IsDel is null) and Product_id=" + model.Product_id + "", "");

            if (pros.Count == 0)
            {
                return(res);
            }
            Lebi_Product pmodel = B_Lebi_Product.GetModel(model.Product_id);

            if (pmodel == null)
            {
                return(res);
            }
            string property = EX_Product.ProductType_ProPertystr(model.Pro_Type_id, 131, model.Supplier_id);

            if (property == "")
            {
                return(res);
            }
            List <Lebi_ProPerty> pps = B_Lebi_ProPerty.GetList("id in (" + property + ")", "Sort desc");
            List <Lebi_ProPerty> ps  = B_Lebi_ProPerty.GetList("parentid in (" + property + ")", "Sort desc");
            //分析当前商品的规格
            //将当前商品的规格与主父规格进行对应
            List <Lebi_ProPerty> Currentpps = new List <Lebi_ProPerty>();//保存当时商品的父规则值

            string[] temps = model.ProPerty131.Split(',');
            foreach (string k in temps)
            {
                Lebi_ProPerty p = (from m in ps
                                   where m.id == Convert.ToInt32(k)
                                   select m).ToList().FirstOrDefault();
                if (p != null)
                {
                    Lebi_ProPerty kv = (from m in pps
                                        where m.id == p.parentid
                                        select m).ToList().FirstOrDefault();
                    kv.Sort = p.id;//临时征用排序字段,存放规格
                    Currentpps.Add(kv);
                }
            }

            foreach (Lebi_ProPerty pp in Currentpps)
            {
                List <Lebi_ProPerty> cps = (from m in ps
                                            where m.parentid == pp.id
                                            select m).ToList();
                if (cps.Count == 0)
                {
                    continue;
                }
                bool showimage = true;
                if (cps.FirstOrDefault().ImageUrl == "")
                {
                    showimage = false;
                }
                if (pp.id == model.ProPertyMain)
                {
                    //res += "<dl class=\"choose-image clearfix\"><dt>" + Lang(pp.Name) + ":</dt><dd>";
                    if (!showimage)
                    {
                        res += "<dl class=\"choose-text clearfix\"><dt>" + Lang(pp.Name) + ":</dt><dd>";
                    }
                    else
                    {
                        res += "<dl class=\"choose-image clearfix\"><dt>" + Lang(pp.Name) + ":</dt><dd>";
                    }
                    foreach (Lebi_ProPerty p in cps)
                    {
                        //计算对应的商品
                        string       propertystr = ("," + model.ProPerty131 + ",").Replace("," + pp.Sort + ",", "," + p.id + ",");
                        Lebi_Product pro         = (from m in pros
                                                    where ("," + m.ProPerty131 + ",") == propertystr
                                                    select m).ToList().FirstOrDefault();
                        if (pro == null)
                        {
                            continue;
                        }
                        if (showimage)
                        {
                            if (pro.Type_id_ProductStatus == 100 || (EX_Product.ProductStock(pro) < 1 && SYS.IsNullStockSale != "1"))//下架 无库存
                            {
                                if (pp.Sort == p.id)
                                {
                                    res += "<div><a class=\"spva-imgonout\"><img src=\"" + Image(model.ImageOriginal) + "\" width=\"50\" title=\"" + Lang(p.Name) + "\" alt=\"" + Lang(p.Name) + "\"/><span></span></a></div>";
                                }
                                else
                                {
                                    res += "<div><a class=\"spva-imgout\" href=\"" + URL("P_Product", pro.id) + "\"><img src=\"" + Image(pro.ImageOriginal) + "\" width=\"50\" title=\"" + Lang(p.Name) + "\" alt=\"" + Lang(p.Name) + "\"/><span></span></a></div>";
                                }
                                continue;
                            }
                            if (pp.Sort == p.id)
                            {
                                res += "<div><a class=\"spva-imgon\" href=\"" + URL("P_Product", model.id) + "\"><img src=\"" + Image(model.ImageOriginal) + "\" width=\"50\" title=\"" + Lang(p.Name) + "\" alt=\"" + Lang(p.Name) + "\"/><span></span></a></div>";
                            }
                            else
                            {
                                res += "<div><a class=\"spva-img\" href=\"" + URL("P_Product", pro.id) + "\"><img src=\"" + Image(pro.ImageOriginal) + "\" width=\"50\" title=\"" + Lang(p.Name) + "\" alt=\"" + Lang(p.Name) + "\"/><span></span></a></div>";
                            }
                        }
                        else
                        {
                            if (pro.Type_id_ProductStatus == 100 || (EX_Product.ProductStock(pro) < 1 && SYS.IsNullStockSale != "1"))//下架 无库存
                            {
                                if (pp.Sort == p.id)
                                {
                                    res += "<div><a class=\"spvaonout\">" + Lang(p.Name) + "<span></span></a></div>";
                                }
                                else
                                {
                                    res += "<div><a class=\"spvaout\" href=\"" + URL("P_Product", pro.id) + "\">" + Lang(p.Name) + "<span></span></a></div>";
                                }
                                continue;
                            }
                            if (pp.Sort == p.id)
                            {
                                res += "<div><a class=\"spvaon\" href=\"" + URL("P_Product", model.id) + "\">" + Lang(p.Name) + "<span></span></a></div>";
                            }
                            else
                            {
                                res += "<div><a class=\"spva\" href=\"" + URL("P_Product", pro.id) + "\">" + Lang(p.Name) + "<span></span></a></div>";
                            }
                        }
                    }
                }
                else
                {
                    if (!showimage)
                    {
                        res += "<dl class=\"choose-text clearfix\"><dt>" + Lang(pp.Name) + ":</dt><dd>";
                    }
                    else
                    {
                        res += "<dl class=\"choose-image clearfix\"><dt>" + Lang(pp.Name) + ":</dt><dd>";
                    }
                    foreach (Lebi_ProPerty p in cps)
                    {
                        //计算对应的商品
                        string       propertystr = ("," + model.ProPerty131 + ",").Replace("," + pp.Sort + ",", "," + p.id + ",");
                        Lebi_Product pro         = (from m in pros
                                                    where ("," + m.ProPerty131 + ",") == propertystr
                                                    select m).ToList().FirstOrDefault();
                        if (pro == null)
                        {
                            continue;
                        }
                        string tt     = "";
                        string aclass = "";
                        if (p.ImageUrl == "")
                        {
                            tt = Lang(p.Name);
                        }
                        else
                        {
                            tt = "<img src=\"" + p.ImageUrl + "\" width=\"50\"\" />";
                        }

                        if (pro.Type_id_ProductStatus == 100 || (EX_Product.ProductStock(pro) < 1 && SYS.IsNullStockSale != "1"))//下架 无库存
                        {
                            if (pp.Sort == p.id)
                            {
                                if (cps.FirstOrDefault().ImageUrl == "")
                                {
                                    aclass = "spvaonout";
                                }
                                else
                                {
                                    aclass = "spva-imgonout";
                                }
                                res += "<div><a class=\"" + aclass + "\" title=\"" + Lang(p.Name) + "\">" + tt + "<span></span></a></div>";
                            }
                            else
                            {
                                if (cps.FirstOrDefault().ImageUrl == "")
                                {
                                    aclass = "spvaout";
                                }
                                else
                                {
                                    aclass = "spva-imgout";
                                }
                                res += "<div><a class=\"" + aclass + "\" href=\"" + URL("P_Product", pro.id) + "\" title=\"" + Lang(p.Name) + "\">" + tt + "<span></span></a></div>";
                            }
                            continue;
                        }

                        if (pp.Sort == p.id)
                        {
                            if (!showimage)
                            {
                                aclass = "spvaon";
                            }
                            else
                            {
                                aclass = "spva-imgon";
                            }
                            res += "<div><a class=\"" + aclass + "\" href=\"" + URL("P_Product", model.id) + "\" title=\"" + Lang(p.Name) + "\">" + tt + "<span></span></a></div>";
                        }
                        else
                        {
                            if (!showimage)
                            {
                                aclass = "spva";
                            }
                            else
                            {
                                aclass = "spva-img";
                            }
                            res += "<div><a class=\"" + aclass + "\" href=\"" + URL("P_Product", pro.id) + "\" title=\"" + Lang(p.Name) + "\">" + tt + "<span></span></a></div>";
                        }
                    }
                }
                res += "</dd></dl>";
            }
            return(res);
        }
Esempio n. 20
0
        public string GetproList(Lebi_ProPerty pmodel)
        {
            string str = "<div class=\"input-group\">";
            List <Lebi_ProPerty> ps = B_Lebi_ProPerty.GetList("parentid=" + pmodel.id + "", "Sort desc");

            if (pmodel.Type_id_ProPertyType == 132)
            {
                foreach (Lebi_ProPerty p in ps)
                {
                    string sel = "";
                    if (("," + model.ProPerty132 + ",").Contains("," + p.id + ","))
                    {
                        sel = "checked";
                    }
                    if (!string.IsNullOrEmpty(RequestTool.GetConfigKey("SystemAdmin").Trim()))
                    {
                        str += "<label class=\"custom-control custom-checkbox m-r-20\"><input type=\"checkbox\" id=\"Property132" + p.id + "\" name=\"Property132\" value=\"" + p.id + "\" class=\"custom-control-input\" shop=\"true\" " + sel + "><span class=\"custom-control-label\">";
                        if (p.ImageUrl != "")
                        {
                            str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                        }
                        str += Language.Content(p.Name, CurrentLanguage.Code) + "</span></label>";
                    }
                    else
                    {
                        str += " <label><input type=\"checkbox\" name=\"Property132\" shop=\"true\" " + sel + " value=\"" + p.id + "\"" + " />";
                        if (p.ImageUrl != "")
                        {
                            str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                        }
                        str += Language.Content(p.Name, CurrentLanguage.Code) + "</label>";
                    }
                }
            }
            else if (pmodel.Type_id_ProPertyType == 133)
            {
                List <Lebi_Language_Code> langs = Language.Languages();
                KeyValue kv;
                try
                {
                    kv = (from m in ProPerty133
                          where m.K == pmodel.id.ToString()
                          select m).ToList().FirstOrDefault();
                }
                catch
                {
                    kv = new KeyValue();
                }
                if (kv == null)
                {
                    kv = new KeyValue();
                }
                foreach (Lebi_Language_Code lang in langs)
                {
                    string val = "";
                    if (kv != null && kv.V != null)
                    {
                        val = kv.V;
                    }
                    if (!string.IsNullOrEmpty(RequestTool.GetConfigKey("SystemAdmin").Trim()))
                    {
                        str += "<div class=\"input-group-prepend\"><span class=\"input-group-text\">" + lang.Code + "</span></div><input type=\"text\" name=\"Property133_" + pmodel.id + lang.Code + "\" shop=\"true\" value=\"" + Language.Content(val, lang.Code) + "\"" + " class=\"form-control form-contorl-sm m-r-20\" style=\"width:70px\"  /> ";
                    }
                    else
                    {
                        str += lang.Code + " <input type=\"text\" name=\"Property133_" + pmodel.id + lang.Code + "\" shop=\"true\" value=\"" + Language.Content(val, lang.Code) + "\"" + " class=\"input\"  /> ";
                    }
                }
            }
            else if (pmodel.Type_id_ProPertyType == 134)
            {
                foreach (Lebi_ProPerty p in ps)
                {
                    string sel = "";
                    if (("," + model.ProPerty134 + ",").Contains("," + p.id + ","))
                    {
                        sel = "checked";
                    }
                    if (!string.IsNullOrEmpty(RequestTool.GetConfigKey("SystemAdmin").Trim()))
                    {
                        str += "<label class=\"custom-control custom-checkbox m-r-20\"><input type=\"checkbox\" id=\"Property134" + p.id + "\" name=\"Property134\" value=\"" + p.id + "\" class=\"custom-control-input\" shop=\"true\" " + sel + "><span class=\"custom-control-label\">";
                        if (p.ImageUrl != "")
                        {
                            str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                        }
                        str += Language.Content(p.Name, CurrentLanguage.Code) + "</span></label>";
                    }
                    else
                    {
                        str += " <label><input type=\"checkbox\" name=\"Property134\" shop=\"true\" " + sel + " value=\"" + p.id + "\"" + " />";
                        if (p.ImageUrl != "")
                        {
                            str += "<img src=\"" + Image(p.ImageUrl, 16, 16) + "\">";
                        }
                        str += Language.Content(p.Name, CurrentLanguage.Code) + "</label>";
                    }
                }
            }
            str += "</div>";
            return(str);
        }