/// <summary> /// 编辑身份验证项目 /// </summary> public void Verified_Edit() { if (!EX_Admin.Power("supplier_verified", "身份验证")) { AjaxNoPower(); return; } int id = RequestTool.RequestInt("id", 0); bool addflag = false; Lebi_Supplier_Verified model = B_Lebi_Supplier_Verified.GetModel(id); if (model == null) { addflag = true; model = new Lebi_Supplier_Verified(); } model = B_Lebi_Supplier_Verified.BindForm(model); model.Name = Language.RequestString("Name"); if (addflag) { B_Lebi_Supplier_Verified.Add(model); Log.Add("添加身份验证", "Supplier_Verified", id.ToString(), CurrentAdmin, Shop.Bussiness.Language.Content(model.Name, CurrentLanguage.Code)); } else { B_Lebi_Supplier_Verified.Update(model); Log.Add("编辑身份验证", "Supplier_Verified", id.ToString(), CurrentAdmin, Shop.Bussiness.Language.Content(model.Name, CurrentLanguage.Code)); } Response.Write("{\"msg\":\"OK\"}"); }
public string VerifiedName(int id) { Lebi_Supplier_Verified model = B_Lebi_Supplier_Verified.GetModel(id); if (model == null) { return(""); } return(Lang(model.Name)); }
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(); } }
/// <summary> /// 商家分组的验证内容 /// </summary> /// <param name="ids"></param> /// <returns></returns> public string CheckBox(string ids) { string str = ""; List <Lebi_Supplier_Verified> models = B_Lebi_Supplier_Verified.GetList("", "Sort desc"); foreach (Lebi_Supplier_Verified model in models) { string sel = ""; if (("," + ids + ",").Contains("," + model.id + ",")) { sel = "checked"; } str += "<label><input name=\"Verified_ids\" type=\"checkbox\" shop=\"true\" " + sel + " value=\"" + model.id + "\">" + Lang(model.Name) + "</label>"; } return(str); }
/// <summary> /// 编辑身份验证项目 /// </summary> public void Verified_Edit() { if (!Power("supplier_verified", "身份验证")) { AjaxNoPower(); return; } int id = RequestTool.RequestInt("id", 0); int Type_id_BillType = RequestTool.RequestInt("Type_id_BillType", 0); bool addflag = false; string where = ""; where = "Verified_id = " + id + " and Supplier_id = " + CurrentSupplier.id + ""; Lebi_Supplier_Verified Verified = B_Lebi_Supplier_Verified.GetModel(id); if (Verified == null) { Verified = new Lebi_Supplier_Verified(); } Lebi_Supplier_Verified_Log model = B_Lebi_Supplier_Verified_Log.GetModel(where); if (model == null) { addflag = true; model = new Lebi_Supplier_Verified_Log(); } model = B_Lebi_Supplier_Verified_Log.SafeBindForm(model); model.Type_id_SupplierVerifiedStatus = 9020; model.Time_Add = DateTime.Now; if (addflag) { model.Verified_id = id; model.Supplier_id = CurrentSupplier.id; B_Lebi_Supplier_Verified_Log.Add(model); id = B_Lebi_Supplier_Verified_Log.GetMaxId(); Log.Add("身份验证", "Supplier_Verified", id.ToString(), CurrentSupplier, Lang(Verified.Name)); } else { B_Lebi_Supplier_Verified_Log.Update(model); Log.Add("身份验证", "Supplier_Verified", id.ToString(), CurrentSupplier, Lang(Verified.Name)); } string result = "{\"msg\":\"OK\", \"id\":\"" + id + "\"}"; Response.Write(result); }
/// <summary> /// 删除身份验证项目 /// </summary> public void Verified_Del() { if (!EX_Admin.Power("supplier_verified", "身份验证")) { AjaxNoPower(); return; } string id = RequestTool.RequestString("ids"); if (id == "") { Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}"); return; } B_Lebi_Supplier_Verified.Delete("id in (lbsql{" + id + "})"); Log.Add("删除身份验证", "Supplier_Verified", id.ToString(), CurrentAdmin, id.ToString()); Response.Write("{\"msg\":\"OK\"}"); }
protected void Page_Load(object sender, EventArgs e) { if (!EX_Admin.Power("supplier_verified", "身份验证")) { PageReturnMsg = PageNoPowerMsg(); } PageSize = RequestTool.getpageSize(25); key = RequestTool.RequestString("key"); string where = "1=1"; if (key != "") { where += " and Name like lbsql{'%" + key + "%'}"; } models = B_Lebi_Supplier_Verified.GetList(where, "Sort desc", PageSize, page); int recordCount = B_Lebi_Supplier_Verified.Counts(where); PageString = Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount); }
protected void Page_Load(object sender, EventArgs e) { int id = RequestTool.RequestInt("id", 0); int vid = RequestTool.RequestInt("vid", 0); if (!Power("supplier_verified", "身份验证")) { WindowNoPower(); } Verified = B_Lebi_Supplier_Verified.GetModel(id); if (Verified == null) { Verified = new Lebi_Supplier_Verified(); } model = B_Lebi_Supplier_Verified_Log.GetModel("Supplier_id = " + CurrentSupplier.id + " and id =" + vid + ""); if (model == null) { model = new Lebi_Supplier_Verified_Log(); } }
protected override void LoadPage(string themecode, int siteid, string languagecode, string pcode) { LoadTheme(themecode, siteid, languagecode, pcode); site = new Site_Supplier(); backurl = RequestTool.RequestString("url").Replace("<", "").Replace(">", ""); if (backurl == "") { backurl = site.AdminPath + "/login.aspx"; } if (CurrentUser.id == 0) { Response.Redirect(URL("P_Login", "" + HttpUtility.UrlEncode(RequestTool.GetRequestUrlNonDomain()) + "," + GetUrlToken(RequestTool.GetRequestUrlNonDomain()) + "")); } path = "<a href=\"" + URL("P_Index", "") + "\" class=\"home\" title=\"" + Tag("Ê×Ò³") + "\"><span>" + Tag("Ê×Ò³") + "</span></a><em class=\"home\">»</em><a>" + Tag("É̼Ò×¢²á") + "</a>"; verifieds = B_Lebi_Supplier_Verified.GetList("", "Sort desc"); logintype = RequestTool.RequestString("logintype", ""); List <Lebi_Supplier> suppliers = B_Lebi_Supplier.GetList("User_id=" + CurrentUser.id + "", "id desc"); if (suppliers.Count == 0) { supplier = new Lebi_Supplier(); supplier.Type_id_SupplierStatus = 441; } if (logintype == "" && suppliers.Count > 0) { supplier = suppliers.FirstOrDefault(); Lebi_Supplier_Group group = B_Lebi_Supplier_Group.GetModel(supplier.Supplier_Group_id); logintype = group.type; } else { foreach (Lebi_Supplier sup in suppliers) { Lebi_Supplier_Group group = B_Lebi_Supplier_Group.GetModel(sup.Supplier_Group_id); if (logintype == group.type) { supplier = sup; } } } logintype = logintype == "" ? "supplier" : logintype; if (supplier == null) { supplier = new Lebi_Supplier(); supplier.Address = CurrentUser.Address; supplier.Area_id = CurrentUser.Area_id; supplier.Fax = CurrentUser.Fax; supplier.Email = CurrentUser.Email; supplier.MobilePhone = CurrentUser.MobilePhone; supplier.Msn = CurrentUser.Msn; supplier.Phone = CurrentUser.Phone; supplier.Postalcode = CurrentUser.Postalcode; supplier.QQ = CurrentUser.QQ; supplier.RealName = CurrentUser.RealName; supplier.UserName = CurrentUser.UserName; supplier.User_id = CurrentUser.id; supplier.Type_id_SupplierStatus = 441; status = Tag("ÐÂ×¢²á"); } else { if (supplier.Type_id_SupplierStatus == 442) { Response.Redirect(site.AdminPath + "/login.aspx"); } status = TypeName(supplier.Type_id_SupplierStatus); } }
/// <summary> /// 用户这注册 /// </summary> public void User_Reg() { string verifycode = RequestTool.RequestString("verifycode"); string code = CurrentCheckCode; string UserName = RequestTool.RequestSafeString("UserName"); //检查用户名存在 if (CurrentUser.id == 0 || CurrentUser.IsAnonymous == 1) { Response.Write("{\"msg\":\"" + Tag("请登录") + "\"}"); return; } if (SYS.Verifycode_SupplierRegister == "1") { if (code != verifycode) { Response.Write("{\"msg\":\"" + Tag("验证码错误") + "\"}"); return; } } //检查用户名存在 int count = B_Lebi_Supplier.Counts("UserName !='' and UserName=lbsql{'" + CurrentUser.UserName + "'}"); if (count > 0) { Response.Write("{\"msg\":\"" + Tag("商家已注册") + "\"}"); return; } Lebi_Supplier model = B_Lebi_Supplier.GetModel("User_id=" + CurrentUser.id + ""); if (model == null) { model = new Lebi_Supplier(); } Lebi_Supplier_Group group = B_Lebi_Supplier_Group.GetModel(RequestTool.RequestInt("Supplier_Group_id")); if (group == null) { Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}"); return; } B_Lebi_Supplier.SafeBindForm(model); model.User_id = CurrentUser.id; model.UserName = CurrentUser.UserName; model.Email = RequestTool.RequestSafeString("Email"); model.RealName = RequestTool.RequestSafeString("RealName"); model.Company = RequestTool.RequestSafeString("Company"); model.Name = RequestTool.RequestSafeString("Name"); model.Name = "[{\"L\":\"" + Language.DefaultLanguage().Code + "\",\"C\":\"" + model.Name + "\"}]"; model.SubName = RequestTool.RequestSafeString("SubName"); model.MobilePhone = RequestTool.RequestSafeString("MobilePhone"); model.Phone = RequestTool.RequestSafeString("Phone"); model.QQ = RequestTool.RequestSafeString("QQ"); model.Language = CurrentLanguage.Code; model.Time_Reg = DateTime.Now; model.Time_This = DateTime.Now; model.Time_Last = DateTime.Now; model.Count_Login = 1; model.IP_This = RequestTool.GetClientIP(); model.IP_Last = RequestTool.GetClientIP(); model.Type_id_SupplierStatus = 441; model.BillingDays = group.BillingDays; model.Money_Service = group.ServicePrice; model.Money_Margin = group.MarginPrice; model.Time_Begin = DateTime.Now; model.Time_End = DateTime.Now.AddDays(group.ServiceDays); if (model.id == 0) { B_Lebi_Supplier.Add(model); model.id = B_Lebi_Supplier.GetMaxId(); } else { B_Lebi_Supplier.Update(model); } if (group.Verified_ids != "") { List <Lebi_Supplier_Verified> models = B_Lebi_Supplier_Verified.GetList("id in (" + group.Verified_ids + ")", "Sort desc"); foreach (Lebi_Supplier_Verified m in models) { string where = "Verified_id = " + m.id + " and Supplier_id = " + model.id + ""; Lebi_Supplier_Verified_Log log = B_Lebi_Supplier_Verified_Log.GetModel(where); if (log == null) { log = new Lebi_Supplier_Verified_Log(); } //log = B_Lebi_Supplier_Verified_Log.SafeBindForm(log); log.ImageUrl = RequestTool.RequestSafeString("Image" + m.id); log.Type_id_SupplierVerifiedStatus = 9020; log.Time_Add = DateTime.Now; log.Verified_id = m.id; log.Supplier_id = model.id; if (log.id == 0) { B_Lebi_Supplier_Verified_Log.Add(log); } else { B_Lebi_Supplier_Verified_Log.Update(log); } } } EX_Supplier.SupplierRegister(model);//触发事件 Response.Write("{\"msg\":\"OK\"}"); }