ShopAdmin/App_Code/InitAppValue.cs

(完整代码) 1KB

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// InitAppValue 的摘要说明
/// </summary>
public class InitAppValue
{
    public InitAppValue() { }
    public static void bindGlobalData_App()
    {
        int YearNum = DateTime.Now.Year, stateValue = YearNum - 60;
        IList list = new ArrayList();
        for (int i = stateValue; i <= YearNum; i++)
        {
            list.Add(i);
        }
        HttpContext.Current.Application["myYearList"] = list;

        DataSet ds1 = new DataSet();
        ds1.ReadXml(HttpContext.Current.Server.MapPath("~/XML/DanWeiList.xml"));
        HttpContext.Current.Application["shopDanWeiList"] = ds1;

        DataSet ds2 = new DataSet();
        ds2.ReadXml(HttpContext.Current.Server.MapPath("~/XML/QQList.xml"));
        HttpContext.Current.Application["shopQQList"] = ds2;
    }

    public static void FCC()
    {
        string resultIp = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (null == resultIp || resultIp == String.Empty)
        {
            HttpContext.Current.Response.Write("本站支持代IP登录!!");
            HttpContext.Current.Response.End();
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。