代码修改后的版本,全部提交
This commit is contained in:
119
Mtxfw.VipSite/gl.aspx.cs
Normal file
119
Mtxfw.VipSite/gl.aspx.cs
Normal file
@@ -0,0 +1,119 @@
|
||||
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 Defaultgl : 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)
|
||||
{
|
||||
//Response.Write(Mtxfw.Utility.Common.cqnurl("https://fv.pmhapp.cn/image/20230904140859.jpg"));
|
||||
//Response.Write(Mtxfw.Utility.Security.decrypt(20330749));
|
||||
//Response.Write(Mtxfw.Utility.Security.DecryptString("I1NUBj1MTG8="));
|
||||
//Response.Write(System.Web.HttpContext.Current.Request.PhysicalApplicationPath.ToString());
|
||||
/*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);
|
||||
}
|
||||
}
|
||||
public class emojiconsto
|
||||
{
|
||||
public List<emojicons> list { get; set; }
|
||||
}
|
||||
public class emojicons
|
||||
{
|
||||
public String name { get; set; }
|
||||
public String text { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user