/// <summary> /// 显示购物车数据 /// </summary> protected void cart() { string number = Request.Cookies["userSett"]["number"]; string emid = Q("emid"), count = Q("count"); string[] gdInfo = DBHelp.frS_string("select [emid],[title],[price],[ImgS] from [e_goods] where [emid]='" + emid + "'"); string[] Text = { "Number", "upid", "emid", "title", "price", "ImgS", "count" }; string[] value = { IdNumber.NumberSec("e_cart", "ca"), number, emid, gdInfo[1], gdInfo[2], gdInfo[3], count }; string ck = DBHelp.fr_string("select [Number] from [e_cart] where [emid]='" + emid + "'"); if (!string.IsNullOrEmpty(ck)) { if (UpdateClass.fromUpdate("e_cart", Text, value, "[emid]='" + emid + "'")) { Write("Xerror|2|已加入购物车"); } else { Write("Xerror|0|加入购物车出错"); } } else { if (AddClass.fromAdd("e_cart", Text, value)) { Write("Xerror|1|已加入购物车"); } else { Write("Xerror|0|加入购物车出错"); } } }
/// <summary> /// 增加和修改 /// </summary> protected void Bu_Click() { if (!string.IsNullOrEmpty(this.lblID.Text)) { if (UpdateClass.fromUpdate("e_navigation", "title|sitetitle|Keywords|Description|url", this.form1, " [Number]='" + this.lblID.Text + "'")) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("修改操作出错"); } } else { int stat = config.Sort_max("select max(Stat) from [e_navigation]"); string Number = IdNumber.NumberSman("e_navigation", "N"); string upid = this.title.Text == "首页" ? "1" : "0"; string[] Text = { "Number", "upid", "Stat" }; string[] Value = { Number, upid, stat.ToString() }; if (AddClass.fromAdd("e_navigation", "title|sitetitle|Keywords|Description|url", Text, Value, this.form1)) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("添加操作出错"); } } }
/// <summary> /// 收货地址 /// </summary> private void vipAddr() { string number = Q("m"); string recName = R("recName"), ddlCity = R("ddlCity"), adrDetail = R("adr-detail"), postcode = R("postcode"), mobile = R("mobile"), phone = R("phone"); string check = DBHelp.fr_string("select [receN] from [e_address] where [upid]='" + number + "'"); string[] Text = { "Number", "upid", "receN", "receA", "receAD", "Code", "Mobile", "Phone" }; string[] Value = { IdNumber.NumberSec("e_address", "ar"), number, recName, ddlCity, adrDetail, postcode, mobile, phone }; if (!string.IsNullOrEmpty(check)) { if (UpdateClass.fromUpdate("e_address", Text, Value, "[upid]='" + number + "'")) { Write("Xerror|1|保存成功"); } else { Write("Xerror|0|保存失败"); } } else { if (AddClass.fromAdd("e_address", Text, Value)) { Write("Xerror|1|保存成功"); } else { Write("Xerror|0|保存失败"); } } }
protected void Bu_Click() { string Number = this.lblID.Text; if (string.IsNullOrEmpty(Number)) { Number = IdNumber.NumberSec("e_member", "m"); } string Pass = this.Password.Text; if (string.IsNullOrEmpty(Pass)) { Pass = Vr[2]; } else { Pass = ask.Web.EncryptHelper.Encrypt(Pass); } string Imgad = string.Empty; if (!string.IsNullOrEmpty(this.FImgS.FileName)) { Imgad = shopfile.FileGet(this.FImgS, "bxite-" + Number, "~/upload/vip", 50000000); } else { Imgad = ImgS.Text; } string T = "NickName|Birth|Mobile|RealName|Email|Address|Content|Lotimes"; string[] Text = { "Number", "Name", "Password", "Sex", "UserPic" }; string[] Value = { Number, R("Name"), Pass, R("Sex"), Imgad }; if (!string.IsNullOrEmpty(this.lblID.Text)) { if (UpdateClass.fromUpdate("e_member", T, "CloseS", Text, Value, this.form1, " [Number]='" + this.lblID.Text + "'")) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("修改操作出错"); } } else { if (AddClass.fromAdd("e_member", T, "CloseS", Text, Value, this.form1)) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("添加操作出错"); } } }
protected void Bu_Click() { string Number = this.lblID.Text; if (string.IsNullOrEmpty(Number)) { Number = IdNumber.NumberSman("e_ads_flash", "A"); } string Imgad = string.Empty; if (!string.IsNullOrEmpty(this.FImgS.FileName)) { Imgad = shopfile.FileGet(this.FImgS, "bxite-" + Number, "~/upload/ads_flash", 50000000); } else { Imgad = ImgS.Text; } string[] Text = { "ImgS", "Description" }; string[] Value = { Imgad, Description.Text }; if (!string.IsNullOrEmpty(this.lblID.Text)) { if (UpdateClass.fromUpdate("e_ads_flash", "title|url", "CloseS|Reded", Text, Value, this.form1, " [Number]='" + this.lblID.Text + "'")) { Cleload(this.lblID.Text); } else { jsFontcion.ResponseW("修改操作出错"); } } else { int stat = config.Sort_max("select max(Stat) from [e_ads_flash] "); Text = new string[] { "Number", "ImgS", "Description", "Stat" }; Value = new string[] { Number, Imgad, Description.Text, stat + "" }; if (AddClass.fromAdd("e_ads_flash", "title|url", "CloseS|Reded", Text, Value, this.form1)) { Cleload(Number); } else { jsFontcion.ResponseW("添加操作出错"); } } }
/// <summary> /// 增加和修改 /// </summary> protected void Bu_Click() { string Number = this.lblID.Text; if (string.IsNullOrEmpty(Number)) { Number = Useid.Number("e_goods_cate", 8, "C"); } string Grade = "0"; if (this.DropDupid.SelectedValue != "0") { int F = 0; int.TryParse(LGrade.Text, out F); F = F + 1; Grade = F.ToString(); } string[] Text = { "upid", "Grade" }; string[] Value = { this.DropDupid.SelectedValue, Grade }; if (!string.IsNullOrEmpty(this.lblID.Text)) { if (UpdateClass.fromUpdate("e_goods_cate", "title|sitetitle|Keywords|Description", "CloseS|Reded|top", Text, Value, this.form1, " [Number]='" + this.lblID.Text + "'")) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("修改操作出错"); } } else { int stat = config.Sort_max("select max(Stat) from [e_goods_cate] where [upid]='" + this.DropDupid.SelectedValue + "'"); Text = new string[] { "upid", "Number", "Stat", "Grade" }; Value = new string[] { this.DropDupid.SelectedValue, Number, stat.ToString(), Grade }; if (AddClass.fromAdd("e_goods_cate", "title|sitetitle|Keywords|Description", "CloseS|Reded|top", Text, Value, this.form1)) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("添加操作出错"); } } }
/// <summary> /// 增加和修改 /// </summary> protected void Bu_Click() { string Number = this.lblID.Text; string Grade = "0"; if (this.DropDupid.SelectedValue != "0") { int F = 0; int.TryParse(LGrade.Text, out F); F = F + 1; Grade = F.ToString(); } string[] Text = { "upid", "Grade" }; string[] Value = { this.DropDupid.SelectedValue, Grade }; if (string.IsNullOrEmpty(Number)) { Number = Useid.Number("e_helplist", 4, "H"); } if (!string.IsNullOrEmpty(this.lblID.Text)) { if (UpdateClass.fromUpdate("e_helplist", "title", "CloseS", Text, Value, this.form1, " [Number]='" + this.lblID.Text + "'")) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("修改操作出错"); } } else { string upid = this.DropDupid.SelectedValue; int stat = config.Sort_max("select max(Stat) from [e_helplist] where upid='" + upid + "'"); Text = new string[] { "upid", "Grade", "Number", "Stat" }; Value = new string[] { upid, Grade, Number, stat.ToString() }; if (AddClass.fromAdd("e_helplist", "title", "CloseS", Text, Value, this.form1)) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("添加操作出错"); } } }
protected void vipPost() { string nickn = R("nickn"), sex = R("sex"), year = R("year"), month = R("month"), ddlCity = R("ddlCity"), mobile = R("mobile"), email = R("email"), Content = R("Content"); string number = Q("m"); string[] Text = { "NickName", "Sex", "Birth", "Mobile", "Email", "Address", "Content" }; string[] Value = { nickn, sex, year + "/" + month, mobile, email, ddlCity, Content }; if (UpdateClass.fromUpdate("e_member", Text, Value, "[Number]='" + number + "'")) { //更新cookies HttpCookie myCook = Request.Cookies["userSett"]; myCook.Values.Set("nickname", nickn); Response.AppendCookie(myCook); Write("Xerror|1|修改成功"); } else { Write("Xerror|0|修改出错"); } }
protected void btn_preview_Click(object sender, EventArgs e) { string Imgad = string.Empty; string Number = Request.Cookies["userSett"]["number"]; if (!string.IsNullOrEmpty(this.FImgS.FileName)) { Imgad = shopfile.FileGet(this.FImgS, "bxite-" + Number, "~/upload/vip", 50000000); if (UpdateClass.fromUpdate("e_member", new string[] { "UserPic" }, new string[] { Imgad }, "[Number]='" + Number + "'")) { this.tips.Text = "修改成功"; } else { this.tips.Text = "修改出错,请重试"; } } else { this.tips.Text = "请先选择图片"; } }
/// <summary> /// 增加和修改 /// </summary> protected void Bu_Click() { string Number = this.lblID.Text; if (string.IsNullOrEmpty(Number)) { Number = IdNumber.NumberSman("e_keydata", "K"); } string[] Text = { "num" }; string[] Value = { R("num") }; if (!string.IsNullOrEmpty(this.lblID.Text)) { if (UpdateClass.fromUpdate("e_keydata", "keywords", "CloseS|Reded|hot", Text, Value, this.form1, " [Number]='" + this.lblID.Text + "'")) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("修改操作出错"); } } else { int stat = config.Sort_max("select max(Stat) from [e_keydata]"); Text = new string[] { "Number", "Stat", "num", "keydate", "UserHostAddress", "UserHostName" }; Value = new string[] { Number, stat.ToString(), R("num"), DateTime.Now.ToShortDateString(), Request.UserHostAddress, Request.UserHostName }; if (AddClass.fromAdd("e_keydata", "keywords", "CloseS|Reded|hot", Text, Value, this.form1)) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("添加操作出错"); } } }
protected void vipPwd() { string number = Q("m"); string pwd = R("pwd"), newpwd = R("newpwd"), newpwd2 = R("newpwd2"); string Pass = DBHelp.fr_string("select [Password] from [e_member] where [Number]='" + number + "'"); //密码加密 pwd = ask.Web.EncryptHelper.Encrypt(pwd); if (pwd != Pass) { Write("Xerror|2|旧密码错误"); return; } if (newpwd != newpwd2) { Write("Xerror|2|新密码不一致"); return; } newpwd = ask.Web.EncryptHelper.Encrypt(newpwd); if (UpdateClass.fromUpdate("e_member", new string[] { "Password" }, new string[] { newpwd }, "[Number]='" + number + "'")) { //更新cookies if (Request.Cookies["uremember"] != null) { HttpCookie myReme = Request.Cookies["uremember"]; myReme.Values.Set("password", newpwd); Response.AppendCookie(myReme); } HttpCookie myUser = Request.Cookies["userSett"]; myUser.Values.Set("password", newpwd); Response.AppendCookie(myUser); Write("Xerror|1|修改成功"); } else { Write("Xerror|0|修改出错"); } }
/// <summary> /// 增加和修改 /// </summary> protected void Bu_Click() { string Number = this.lblID.Text; if (string.IsNullOrEmpty(Number)) { Number = R("Number"); } if (string.IsNullOrEmpty(Number)) { Number = IdNumber.NumberSman("e_goods_pic", "P"); } string ImgSd; if (!string.IsNullOrEmpty(this.FImgS.FileName)) { ImgSd = shopfile.FileGet(this.FImgS, Number, "~/upload/list", 50000000); } else { ImgSd = ImgS.Text; } string tat = this.Stat.Text; int m = 0; int.TryParse(tat, out m); if (m < 1) { m = 1; } tat = m.ToString(); if (!string.IsNullOrEmpty(this.lblID.Text)) { string[] Text = { "upid", "Stat", "ImgS" }; string[] Value = { this.upid.Text, tat, ImgSd }; if (UpdateClass.fromUpdate("e_goods_pic", "title", "CloseS", Text, Value, this.form1, " [Number]='" + this.lblID.Text + "'")) { jsFontcion.listload(); } else { jsFontcion.ResponseW("修改操作出错"); } } else { if (string.IsNullOrEmpty(tat) || tat == "1") { tat = config.Sort_max("select max(stat) from [e_goods_pic] where [upid]='" + this.upid.Text + "'").ToString(); } string[] Text = { "Number", "upid", "Stat", "ImgS" }; string[] Value = { Number, this.upid.Text, tat, ImgSd }; if (AddClass.fromAdd("e_goods_pic", "title", "CloseS", Text, Value, this.form1)) { jsFontcion.listload(); } else { jsFontcion.ResponseW("添加操作出错"); } } }
/// <summary> /// 增加和修改 /// </summary> protected void Bu_Click() { string Number = this.lblID.Text, upids = Request.Form["upids"]; if (string.IsNullOrEmpty(Number)) { Number = Request.Form["Number"]; } if (string.IsNullOrEmpty(Number)) { Number = IdNumber.NumberSman("e_goods", "G"); } string ImgS1 = ""; if (!string.IsNullOrEmpty(this.FImgS.FileName)) { ImgS1 = shopfile.FileGet(this.FImgS, "bxite-" + Number, "~/upload/goods", 50000000); } else { ImgS1 = ImgS.Text; } string T = "title|subtitle|emid|BuyT|ScanT|sitetitle|PackList|Keywords|Description|Content"; string[] Text = { "upid", "ImgS", "upids" }; string[] Value = { Request.Form["upid"], ImgS1, upids }; string[] mont = { "price" }; double m = 0.00; double.TryParse(this.price.Text, out m); double[] money = { m }; if (!string.IsNullOrEmpty(this.lblID.Text)) { if (UpdateClass.fromUpdate("e_goods", T, "CloseS|Reded|hot", mont, money, Text, Value, this.form1, " [Number]='" + this.lblID.Text + "'")) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("修改操作出错"); } } else { int stat = 0; if (!string.IsNullOrEmpty(Request.Form["upid"])) { stat = config.Sort_max("select max(Stat) from [e_goods] where [upid]='" + Request.Form["upid"] + "'"); } Text = new string[] { "upid", "Number", "Stat", "ImgS", "upids" }; Value = new string[] { Request.Form["upid"], Number, stat.ToString(), ImgS1, upids }; if (AddClass.fromAdd("e_goods", T, "CloseS|Reded|hot", mont, money, Text, Value, this.form1)) { jsFontcion.Cleload(); } else { jsFontcion.ResponseW("添加操作出错"); } } }