EasyShop/AJAX/Ajax_SelCity.ashx.cs

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Easy.COMMON;
using System.Text;
using System.IO;
using BLL;
using System.Xml;
namespace EasyShop.AJAX
{
    /// <summary>
    /// Ajax_SelCity 的摘要说明
    /// </summary>
    public class Ajax_SelCity : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            if (Util.IsValidatorReferer())
            {
                string CS40001 = Util.GetPageParams("mode");
                if (CS40001 != null)
                {
                    if (!(CS40001 == "selcity"))
                    {
                        if (CS40001 == "selcountry")
                        {
                            this.selCity();
                        }
                    }
                    else
                    {
                        this.selCity();
                    }
                }
            }
        }
        private void selCity()
        {
            XmlDocument doc = new XmlDocument();
            string sCity = HttpContext.Current.Request.QueryString["type"];
            StringBuilder strbud = new StringBuilder();
            string NowID = HttpContext.Current.Server.UrlDecode(HttpContext.Current.Request.QueryString["NowID"]);
            string mpath = HttpContext.Current.Request.MapPath("/Area.xml");
            if (File.Exists(mpath))
            {
                string cityName;
                XmlNodeList xmlNod;
                doc.Load(mpath);
                XmlNodeList items = doc.SelectSingleNode("address").SelectNodes("province");
                switch (sCity)
                {
                    case "province":
                        foreach (XmlNode ment in items)
                        {
                            if (!string.IsNullOrEmpty(NowID))
                            {
                                if (NowID.Split(new char[] { '-' })[0].ToString() == ment.Attributes["name"].InnerText)
后面还有 96 行代码,购买后查看完整代码

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

AI 解读 AI

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

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