📄 info.aspx.cs
字号:
//======================================================
//== (c)2008 aspxcms inc by NeTCMS v1.0 ==
//== Forum:bbs.aspxcms.com ==
//== Website:www.aspxcms.com ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NetCMS.Content;
using NetCMS.Content.Common;
using NetCMS.Model;
public partial class user_show_info : NetCMS.Web.UI.BasePage
{
UserMisc rd = new UserMisc();
rootPublic pd = new rootPublic();
Constr con = new Constr();
Discuss dis = new Discuss();
DefineTable tab = new DefineTable();
public static string _STR = "";
public string tmpDir = NetCMS.Config.UIConfig.UserdirFile;
public string tmpDir1 = NetCMS.Config.UIConfig.dirFile;
public string dirdumm = NetCMS.Config.UIConfig.dirDumm;
protected void Page_Load(object sender, EventArgs e)
{
copyright.InnerHtml = CopyRight;
string _s = Request.QueryString["s"];
string u_name = Request.QueryString["uid"];
string uID = "";
getDefine(NetCMS.Global.Current.UserNum);
ePointName.InnerHtml = pd.getgPointName();
if (dirdumm.Trim() != string.Empty)
{
tmpDir = dirdumm + "/" + NetCMS.Config.UIConfig.UserdirFile;
tmpDir1 = dirdumm + "/" + NetCMS.Config.UIConfig.dirFile;
}
this.PageNavigator1.OnPageChange += new PageChangeHandler(PageNavigator1_PageChange);
this.PageNavigator2.OnPageChange += new PageChangeHandler(PageNavigator2_PageChange);
this.PageNavigator3.OnPageChange += new PageChangeHandler(PageNavigator3_PageChange);
if (!IsPostBack)
{
if (u_name != "" && u_name != null)
{
uID = pd.getUserNameUserNum(u_name.ToString());
if (uID == "0")
{
PageError("找不到用户 [" + u_name.ToString() + "] 的信息.<li>原因:此用户未注册或者被管理员删除!</li>", "");
}
Contentlist(1);
Photolists(1);
grouplist(1);
switch (_s)
{
case "content":
contentClass.InnerHtml = cclass(uID);
this.Constrlist.Visible = true;
this.infobase.Visible = false;
this.Photolist.Visible = false;
this.infogroup.Visible = false;
this.infolink.Visible = false;
this.bbslist.Visible = false;
break;
case "photo":
this.Constrlist.Visible = false;
this.infobase.Visible = false;
this.Photolist.Visible = true;
this.infogroup.Visible = false;
this.infolink.Visible = false;
this.bbslist.Visible = false;
break;
case "group":
this.Constrlist.Visible = false;
this.infobase.Visible = false;
this.Photolist.Visible = false;
this.infogroup.Visible = true;
this.infolink.Visible = false;
this.bbslist.Visible = false;
break;
case "bbs":
this.Constrlist.Visible = false;
this.infobase.Visible = false;
this.Photolist.Visible = false;
this.infogroup.Visible = false;
this.bbslist.Visible = true;
break;
case "link":
linkList.InnerHtml = linkContent();
this.Constrlist.Visible = false;
this.infobase.Visible = false;
this.Photolist.Visible = false;
this.infogroup.Visible = false;
this.bbslist.Visible = false;
this.infolink.Visible = true;
break;
default:
break;
}
}
else
{
PageError("参数传递错误", "");
}
#region 个人资料
DataTable dt = rd.sel_Misc(uID,2);
if (dt != null)
{
if (dt.Rows.Count > 0)
{
if(rd.getisAdmin()!=1)
{
if (dt.Rows[0]["islock"].ToString() == "1"){PageError("此会员已被锁定!", "");}
}
string isOpen = dt.Rows[0]["isOpen"].ToString();
if (isOpen == "0")
{
if ((u_name.ToString()).ToUpper() != (NetCMS.Global.Current.UserName).ToUpper())
{
marriTF.Visible = false;
mobileTF.Visible = false;
otherTF.Visible = false;
linkTF.Visible = false;
}
}
#region 基本资料--------------------------------------
string userflag = pd.getGroupNameFlag(uID);
string _Tmpls = dt.Rows[0]["UserName"].ToString();
if (userflag.IndexOf("|") != -1)
{
string[] userflagARR = userflag.Split('|');
_Tmpls = userflagARR[0] + _Tmpls + userflagARR[1];
}
else
{
_Tmpls = userflag + _Tmpls;
}
this.UserNamex.Text = _Tmpls;//用户名
this.NickNamex.Text = dt.Rows[0]["NickName"].ToString();//会员昵称
this.RealNamex.Text = dt.Rows[0]["RealName"].ToString();//会员真实姓名
if (dt.Rows[0]["Sex"].ToString() != "")
{
int Sex = Convert.ToInt32(dt.Rows[0]["Sex"].ToString());//会员性别
switch (Sex)
{
case 0:
this.Sexx.Text = "保密";
break;
case 1:
this.Sexx.Text = "男";
break;
case 2:
this.Sexx.Text = "女";
break;
}
}
else
{
this.Sexx.Text = "保密";
}
#endregion
levelsFace.InnerHtml = getlevels(int.Parse(dt.Rows[0]["iPoint"].ToString()));
//--------------------------出生日期-----------------------------------
this.birthdayx.Text = dt.Rows[0]["birthday"].ToString();
//-------------------------------------------------------------
if (dt.Rows[0]["UserFace"].ToString() != "")
{
this.UserFacex.ImageUrl = dt.Rows[0]["UserFace"].ToString().ToLower().Replace("{@userdirfile}", tmpDir).Replace("{@dirfile}", tmpDir1);//头像
}
if (dt.Rows[0]["marriage"].ToString() != "")
{
int marriage = int.Parse(dt.Rows[0]["marriage"].ToString());//是否结婚
switch (marriage)
{
case 0:
this.marriagex.Text = "保密";
break;
case 1:
this.marriagex.Text = "未婚";
break;
case 2:
this.marriagex.Text = "已婚";
break;
}
}
else
{
this.marriagex.Text = "保密";
}
this.Userinfox.Text = dt.Rows[0]["Userinfo"].ToString();//用户签名
this.UserGroupNumberx.Text = pd.getGroupName("" + dt.Rows[0]["UserGroupNumber"] + "");//会员所属于的会员组
#region 以前的
this.iPointx.Text = dt.Rows[0]["iPoint"].ToString();//积分
this.gPointx.Text = dt.Rows[0]["gPoint"].ToString();//金币
#endregion
this.cPointx.Text = dt.Rows[0]["cPoint"].ToString();//魅力值
this.ePointx.Text = dt.Rows[0]["ePoint"].ToString();//人气值
this.aPointx.Text = dt.Rows[0]["aPoint"].ToString();//活跃值
this.RegTimex.Text = dt.Rows[0]["RegTime"].ToString();//注册日期
this.OnlineTimex.Text = dt.Rows[0]["OnlineTime"].ToString();//用户在线时间
this.LoginNumberx.Text = dt.Rows[0]["LoginNumber"].ToString();//用户登陆次数
//-----------------------联系方式--------------------------------------
this.Mobilex.Text = dt.Rows[0]["Mobile"].ToString(); //手机
//-------------------------------------------------------------
dt.Clear();
dt.Dispose();
}
else
{
PageError("错误的参数<li>找不到此用户</li>", "index.aspx");
}
}
DataTable dts = rd.sel_Misc(pd.getUserNameUserNum(u_name.ToString()),12);
if (dts != null)
{
if (dts.Rows.Count > 0)
{
this.Jobx.Text = dts.Rows[0]["Job"].ToString();//职业
this.provincex.Text = dts.Rows[0]["province"].ToString();//省
this.Cityx.Text = dts.Rows[0]["City"].ToString();//市
//------------------------详细资料-------------------------------------
this.Nationx.Text = dts.Rows[0]["Nation"].ToString();//民族
this.nativeplacex.Text = dts.Rows[0]["nativeplace"].ToString();//籍贯
this.orgSchx.Text = dts.Rows[0]["orgSch"].ToString();//组织关系
this.characterx.Text = dts.Rows[0]["character"].ToString();//性格
this.UserFanx.Text = dts.Rows[0]["UserFan"].ToString();//用户爱好
this.educationx.Text = dts.Rows[0]["education"].ToString();//学历
this.Lastschoolx.Text = dts.Rows[0]["Lastschool"].ToString();//毕业学校
this.Addressx.Text = dts.Rows[0]["Address"].ToString();//地址
this.Postcodex.Text = dts.Rows[0]["Postcode"].ToString(); //邮政编码
this.FaTelx.Text = dts.Rows[0]["FaTel"].ToString(); //家庭联系电话
this.WorkTelx.Text = dts.Rows[0]["WorkTel"].ToString(); //工作单位联系电话
this.Faxx.Text = dts.Rows[0]["Fax"].ToString(); //传真
this.QQx.Text = dts.Rows[0]["QQ"].ToString(); //QQ
this.MSNx.Text = dts.Rows[0]["MSN"].ToString(); //MSN号
}
dts.Clear();
dts.Dispose();
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -