using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; namespace Mtxfw.VipSite { public partial class Admin_Member_Networkmap : Mtxfw.Utility.MemberBase { public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info(); protected static Mtxfw.Utility.Config config = new Mtxfw.Utility.Config(); public int StrID = 0, IFNoData = 0; protected string[] Colors = { "#ABF295", "#F6E206", "#EB8675", "#1EC8A6", "#F54219", "#f283f1", "#acc5f7" }; protected string struLevels = "", SJ = "", SJ2 = "", sycUserName = "", sUserName = ""; public int gtype = 0; protected override void OnLoad(EventArgs e) { base.OnLoad(e); string hostname = Request.Url.Host; gtype = new DAL.host().GetId(hostname); Page.Title = "网络图谱 - " + GetWebName; try { if (Session["IFPassword"] == null) { Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_news.aspx"); } if (IFStores != 1) { Mtxfw.Utility.Tools.Message("您没有权限!", "/"); } string[] HFHEnable = config.HFHEnable.Split(','); foreach (KeyValuePair kv in Mtxfw.Utility.Common.GetuLevels()) { if (kv.Key == 0 && HFHEnable.Length > 0) { if (HFHEnable[0] == "1") { struLevels += "" + kv.Value + ""; } } if (kv.Key == 1 && HFHEnable.Length > 1) { if (HFHEnable[1] == "1") { struLevels += "" + kv.Value + ""; } } if (kv.Key == 2 && HFHEnable.Length > 2) { if (HFHEnable[2] == "1") { struLevels += "" + kv.Value + ""; } } if (kv.Key == 3 && HFHEnable.Length > 3) { if (HFHEnable[3] == "1") { struLevels += "" + kv.Value + ""; } } if (kv.Key == 4 && HFHEnable.Length > 4) { if (HFHEnable[4] == "1") { struLevels += "" + kv.Value + ""; } } if (kv.Key == 5 && HFHEnable.Length > 5) { if (HFHEnable[5] == "1") { struLevels += "" + kv.Value + ""; } } if (kv.Key == 6 && HFHEnable.Length > 6) { if (HFHEnable[6] == "1") { struLevels += "" + kv.Value + ""; } } } StrID = Card; if (IFStores == 1) { StrID = 68; if (Session["IFPassword"] == null) { Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_Networkmap.aspx"); } } else { if (config.JDTPEnable == "1") { Response.Redirect("/index.aspx"); } if (Session["IFPassword"] == null) { Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_Networkmap.aspx"); } } if (!String.IsNullOrEmpty(Request.QueryString["UserName"])) { sUserName = Request.QueryString["UserName"].ToString().Trim(); string strId = daoUser.Getzd("id", "gtype=" + gtype + " and UserName='" + sUserName + "'").ToString(); if (strId != "") { StrID = int.Parse(strId); } else { IFNoData = 1; } } else { if (!String.IsNullOrEmpty(Request.QueryString["ID"])) { StrID = int.Parse(Request.QueryString["ID"].ToString()); } sUserName = daoUser.Getzd("UserName", "id=" + StrID + "").ToString(); if (sUserName == "") { IFNoData = 1; } } if (!String.IsNullOrEmpty(Request.QueryString["SJ"])) { SJ = Request.QueryString["SJ"].ToString(); } if (!String.IsNullOrEmpty(Request.QueryString["SJ2"])) { SJ2 = Request.QueryString["SJ2"].ToString(); } Mtxfw.Model.user_info model = daoUser.GetModel(Card); if (model != null) { string strSuperiorsIDS = daoUser.Getzd("SuperiorsIDS", "id=" + StrID).ToString(); if (strSuperiorsIDS != "") { if (Card != StrID) { sycUserName = daoUser.Getzd("UserName", "id=(Select SuperiorsID From User_Info b where b.id=" + StrID + ")").ToString(); } /*if (model.SuperiorsIDS != "") { strSuperiorsIDS = strSuperiorsIDS.Replace(model.SuperiorsIDS, ""); } string[] stra = strSuperiorsIDS.Split(','); if (stra.Length >= 13) { ClientScript.RegisterStartupScript(this.GetType(), "", ""); }*/ } } } catch (Exception err) { Mtxfw.Utility.Common.WriteHtml("/weixin/Admin_Member_Networkmaperr.txt", err.ToString()); } } protected string Ccolor(int uLevel4) { string str = Colors[uLevel4]; return str; } protected string Ccolor0(string uLevel7) { string str = Colors[Convert.ToInt32(uLevel7)]; return str; } protected string Ccolor2(string userstate, string uLevel) { string str = (userstate == "未审核" ? "#f6edca" : Colors[Convert.ToInt32(uLevel)]);// return str; } } }