using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Text; using System.Text.RegularExpressions; using Newtonsoft.Json; using System.Web.Script.Serialization; using System.IO; namespace Mtxfw.VipSite { public partial class Defaultsj : System.Web.UI.Page { public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config(""); public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info(); public string strprovince=""; public int GetCount = 0, GetCount2 = 0, GetCount3 = 0; protected void Page_Load(object sender, EventArgs e) { /*DirectoryInfo info = new DirectoryInfo(Server.MapPath("/App_Data/emojicons/")); //目录验证 if (info.Exists) { foreach (FileInfo fi in info.GetFiles()) { fi.MoveTo(Server.MapPath("/App_Data/emojicons0/" + fi.Name.Replace("Expression_",""))); } }*/ /*string str = Mtxfw.Utility.Common.LoadTemplet("/App_Data/emojicons.txt"); str = Regex.Replace(str, @"[\n\r]", ""); str = Regex.Replace(str, " ", ""); emojiconsto em = (emojiconsto)FromJson0(str); for (int i = 0; i < em.list.Count; i++) { Response.Write("\n" + em.list[i].text + "\n" + em.list[i].name + ".png"); }*/ /*string key = "894b1718c4085b8bbb9da94d49c8077a"; string streamName = "b001"; string domain = "87988.livepush.myqcloud.com"; string strkey = Mtxfw.Utility.Common.getPushUrl(domain, streamName, key, Convert.ToDateTime("2020-04-21 23:59:59")); Response.Write(strkey);*/ /*int IFStores=0; if (Session["MemberId"] != null && Session["MemberName"] != null) { if (Session["MemberIFStores"] != null) { IFStores = int.Parse(Session["MemberIFStores"].ToString()); } } if (config.CloseEnable == "1" && IFStores == 0) { Session.RemoveAll(); Response.Redirect("/CloseMsg.aspx"); }*/ if (!IsPostBack) { Title = config.webName; Page.MetaDescription = config.webName + " - " + config.webDescription; /*DateTime dt = DateTime.Now; //将本月月数+1 DateTime dt2 = dt.AddMonths(1); DateTime dt_Last = dt2.AddDays(-(dt.Day)); Response.Write(dt_Last);*/ } } // Date -> byte[2]         public static byte[] DateToByte(DateTime date)         {             int year = date.Year - 2000;             if (year < 0 || year > 127)                 return new byte[4];             int month = date.Month;             int day = date.Day;             int date10 = year * 512 + month * 32 + day;             return BitConverter.GetBytes((ushort)date10);         } public static string ToHexString(byte[] bytes) // 0xae00cf => "AE00CF " { string hexString = string.Empty; if (bytes != null) { StringBuilder strB = new StringBuilder(); for (int i = 0; i < bytes.Length; i++) { strB.Append(bytes[i].ToString("X2")); } hexString = strB.ToString(); } return hexString; } public object FromJson0(string json) { JavaScriptSerializer js = new JavaScriptSerializer(); return js.Deserialize(json); } } }