58 lines
2.4 KiB
C#
58 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace Mtxfw.VipSite.Controls
|
|
{
|
|
public partial class Left : System.Web.UI.UserControl
|
|
{
|
|
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
|
public string user_pic = "", user_name = "", struLevel = "", RealName="";
|
|
public int Card = 0, MemberuLevel2=0;
|
|
public int eIFStores = 0, msgCount=0;
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|
public bool IsMobile = true;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
string str_u = Request.ServerVariables["HTTP_USER_AGENT"].Trim().ToLower();
|
|
IsMobile = Mtxfw.Utility.Common.IsMobile(str_u);
|
|
if (Session["MemberId"] != null && Session["MemberIFStores"] != null)
|
|
{
|
|
Card = int.Parse(Session["MemberId"].ToString());
|
|
|
|
int IFStores = int.Parse(Session["MemberIFStores"].ToString());
|
|
if (IFStores == 1)
|
|
{
|
|
int GoToMemberId = 0;
|
|
if (Session["GoToMemberId"] != null)
|
|
{
|
|
GoToMemberId = int.Parse(Session["GoToMemberId"].ToString());
|
|
}
|
|
if (GoToMemberId > 0)
|
|
{
|
|
Card = GoToMemberId;
|
|
}
|
|
}
|
|
Mtxfw.Model.user_info umodel = daoUser.GetModel(Card);
|
|
if (umodel != null)
|
|
{
|
|
eIFStores = umodel.IFStores;
|
|
MemberuLevel2 = umodel.uLevel2;
|
|
/*struLevel = Mtxfw.Utility.Common.GetuLevelname(umodel.uLevel);
|
|
if (umodel.uLevel4 > 0)
|
|
{
|
|
struLevel += " " + Mtxfw.Utility.Common.GetuLevel4name(umodel.uLevel4);
|
|
}*/
|
|
user_pic = "<img src=\"" + (umodel.UserPic == "" ? "/images/profile.png" : Mtxfw.Utility.Common.GetCoverPic(umodel.UserPic, "100x100", "cut")) + "\">";
|
|
user_name = umodel.UserName;
|
|
RealName = umodel.RealName;
|
|
}
|
|
msgCount = new Mtxfw.DAL.Article().GetCount("receiverid=" + Card + " And ParentID=20 And wtype2<>2 And Seef=0");
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
} |