代码修改后的版本,全部提交

This commit is contained in:
ss001
2026-02-07 15:48:27 +08:00
parent cccbaa37c9
commit c2cda58c65
15604 changed files with 2455502 additions and 0 deletions

View File

@@ -0,0 +1,144 @@
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Globalization;
using System.IO;
namespace Mtxfw.shop.bbs
{
/// <summary>
/// myShoppingCart <20><>ժҪ˵<D2AA><CBB5><EFBFBD><EFBFBD>
/// </summary>
public partial class updateuser : Mtxfw.Utility.MemberBase
{
Mtxfw.DAL.Ads daoAds = new Mtxfw.DAL.Ads();
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
public Mtxfw.DAL.forum daoforum = new Mtxfw.DAL.forum();
public Mtxfw.DAL.bbs daobbs = new Mtxfw.DAL.bbs();
Mtxfw.Utility.Config config = new Mtxfw.Utility.Config();
protected int MemberId=0;
protected string AdsName01, AdsName02;
protected string indexTP01, indexTP02;
protected string indexTPLink01, indexTPLink02;
protected string strposition = "", strimg="";
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
// <20>ڴ˴<DAB4><CBB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Գ<EFBFBD>ʼ<EFBFBD><CABC>ҳ<EFBFBD><D2B3>
System.Data.DataSet Ds_Ads = daoAds.GetCacheList("top 1", "utype=N'<27><>̳<EFBFBD><CCB3><EFBFBD><EFBFBD>' Order By AdsSort desc", "bbs_Ads2");
System.Data.DataTable Dt_Ads = Ds_Ads != null && Ds_Ads.Tables[0] != null ? Ds_Ads.Tables[0] : null;
foreach (System.Data.DataRow Dr in Dt_Ads.Rows)
{
indexTP01 = Dr["AdsPic"].ToString();
indexTPLink01 = Dr["AdsUrl"].ToString();
AdsName01 = Dr["AdsName"].ToString();
}
if (!Page.IsPostBack)
{
if (Request.UrlReferrer != null)
{
Hidd_Url.Value = Request.UrlReferrer.ToString();
}
if (Hidd_Url.Value.Trim() == "")
{
Hidd_Url.Value = "/";
}
if (Session["MemberId"] == null)
{
Session["returnurl"] = Hidd_Url.Value;
Mtxfw.Utility.Tools.Message("<22><><EFBFBD><EFBFBD>û<EFBFBD>е<EFBFBD>¼<EFBFBD><C2BC>", "/login.aspx");
}
else
{
Page.Title = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-" + config.webName;
Page.MetaDescription = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-" + config.webDescription;
Page.MetaKeywords = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-" + config.webKeywords;
strposition = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
Mtxfw.Model.user_info umodel = daoUser.GetModel(Card);
if (umodel != null)
{
Text_NCName.Text = umodel.NCName;
Text_MTZNLConent.Text = umodel.MTZNLConent;
Text_BBSConent.Text = umodel.BBSConent;
if (!String.IsNullOrEmpty(umodel.UserPic))
{
Image_PicTrue.Visible = true;
Image_PicTrue.ImageUrl = Mtxfw.Utility.Common.GetCoverPic(umodel.UserPic, "250x250", "cut");
Hidd_PicTrue.Value = umodel.UserPic;
}
PanelBBSConent.Visible = true;
}
}
}
}
protected void Btn_Update_Click(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(Text_NCName.Text))
{
string strpic = "";
if (File_PicTrue.FileContent.Length > 0)
{
Mtxfw.Utility.UploadFile upload = new Mtxfw.Utility.UploadFile(File_PicTrue.PostedFile, config.webUpPath, config.webUpType, int.Parse(config.webUpSize));
if (upload.StatrUpFile())
{
strpic = upload.UploadPath;
}
else strpic = String.Empty;
}
else strpic = Hidd_PicTrue.Value;
if (strpic == "")
{
Mtxfw.Utility.Tools.Message("<22><><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>");
}
else
{
if (!Mtxfw.Utility.Common.IsAllowedExtension(Server.MapPath("/image/" + strpic)))
{
File.Delete(Server.MapPath("/image/" + strpic));
Mtxfw.Utility.Tools.Message(<><D6BB><EFBFBD>ϴ<EFBFBD>ͼƬ", "updateuser.aspx");
}
else
{
if (Hidd_PicTrue.Value != "")
{
if (File.Exists(Server.MapPath("/image/" + Hidd_PicTrue.Value)))
{
File.Exists(Server.MapPath("/image/" + Hidd_PicTrue.Value));
}
}
Mtxfw.Model.user_info umodel = daoUser.GetModel(Card);
if (umodel != null)
{
umodel.NCName = Text_NCName.Text;
umodel.MTZNLConent = Text_MTZNLConent.Text;
umodel.BBSConent = Text_BBSConent.Text;
umodel.UserPic = strpic;
daoUser.UpdateBBS(umodel);
Mtxfw.Utility.Tools.Message("<22>ϴ<EFBFBD><CFB4>ɹ<EFBFBD><C9B9><EFBFBD>", "updateuser.aspx");
}
}
}
}
else
{
Mtxfw.Utility.Tools.Message("<22><><EFBFBD><EFBFBD><EFBFBD>dzƲ<C7B3><C6B2><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>");
}
}
}
}