Files
g.hnyhua.cn/Mtxfw.VipSite/sj.aspx.cs
2026-02-07 15:48:27 +08:00

107 lines
3.9 KiB
C#
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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<key>" + em.list[i].text + "</key>\n<string>" + em.list[i].name + ".png</string>");
}*/
/*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<emojiconsto>(json);
}
}
}