Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "设置拒绝IP";
        builder.Append(Out.Tab("", ""));

        string ac  = Utils.GetRequest("ac", "all", 1, "", "");
        ub     xml = new ub();

        Application.Remove("xml_wap"); //清缓存
        xml.Reload();                  //加载网站配置
        if (Utils.ToSChinese(ac) == "确定修改")
        {
            string NoIP     = Utils.GetRequest("NoIP", "post", 3, @"^[^\@]{1,15}(?:\@[^\@]{1,15}){0,1000}$", "IP段填写错误");
            string NoIPMsg  = Utils.GetRequest("NoIPMsg", "post", 2, @"^[^\^]{1,500}$", "提示信息限1-500字内");
            string NoIPStat = Utils.GetRequest("NoIPStat", "post", 2, @"^[0-1]$", "状态选择错误");

            string[] arrNoIP = NoIP.Split("@".ToCharArray());
            for (int i = 0; i < arrNoIP.Length; i++)
            {
                if (!Ipaddr.IsIPAddress2(arrNoIP[i].ToString()))
                {
                    Utils.Error("IP段填写错误", "");
                }
            }

            xml.ds["SiteNoIP"]     = NoIP;
            xml.ds["SiteNoIPMsg"]  = NoIPMsg;
            xml.ds["SiteNoIPStat"] = NoIPStat;
            System.IO.File.WriteAllText(Server.MapPath("~/Controls/wap.xml"), xml.Post(xml.ds), System.Text.Encoding.UTF8);
            Utils.Success("设置拒绝IP", "设置拒绝IP成功,正在返回..", Utils.getUrl("iplock.aspx"), "1");
        }
        else
        {
            builder.Append(Out.Div("title", "设置拒绝IP"));

            string strText = "IP(请用“@”作分隔):/,提示信息:/,状态:/";
            string strName = "NoIP,NoIPMsg,NoIPStat";
            string strType = "textarea,text,select";
            string strValu = "" + xml.ds["SiteNoIP"] + "'" + xml.ds["SiteNoIPMsg"] + "'" + xml.ds["SiteNoIPStat"] + "";
            string strEmpt = "true,true,0|启用|1|关闭";
            string strIdea = "/";
            string strOthe = "确定修改|reset,iplock.aspx,post,1,red|blue";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append("设置的IP在启用状态下将不允许访问网站,多个IP请用“@”作分隔。<br />示例:[email protected].*.*@202.31.97.*<br />如拒绝202.31.97.0-255整个IP段可以写成202.31.97.*<br />如果设置为空或关闭,将允许所有的IP都可以访问。");
            builder.Append(Out.Tab("</div>", ""));

            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">系统服务中心</a><br />");
            builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
            builder.Append(Out.Tab("</div>", "<br />"));
        }
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "设置拒绝UA";
        builder.Append(Out.Tab("", ""));

        string ac  = Utils.GetRequest("ac", "all", 1, "", "");
        ub     xml = new ub();

        Application.Remove("xml_wap"); //清缓存
        xml.Reload();                  //加载网站配置
        if (Utils.ToSChinese(ac) == "确定修改")
        {
            string NoUA     = Utils.GetRequest("NoUA", "post", 3, @"^[^\#]{1,500}(?:\#[^\#]{1,500}){0,10000}$", "UA填写错误");
            string NoUA2    = Utils.GetRequest("NoUA2", "post", 3, @"^[^\#]{1,500}(?:\#[^\#]{1,500}){0,10000}$", "UA2填写错误");
            string NoUAMsg  = Utils.GetRequest("NoUAMsg", "post", 2, @"^[^\^]{1,500}$", "提示信息限1-500字内");
            string NoUAStat = Utils.GetRequest("NoUAStat", "post", 2, @"^[0-1]$", "状态选择错误");

            xml.ds["SiteNoUA"]     = NoUA;
            xml.ds["SiteNoUA2"]    = NoUA2;
            xml.ds["SiteNoUAMsg"]  = NoUAMsg;
            xml.ds["SiteNoUAStat"] = NoUAStat;
            System.IO.File.WriteAllText(Server.MapPath("~/Controls/wap.xml"), xml.Post(xml.ds), System.Text.Encoding.UTF8);
            Utils.Success("设置拒绝UA", "设置拒绝UA成功,正在返回..", Utils.getUrl("ualock.aspx"), "1");
        }
        else
        {
            builder.Append(Out.Div("title", "设置拒绝UA"));

            string strText = "存在UA(请用“#”作分隔):/,等于UA(请用“#”作分隔):/,提示信息:/,状态:/";
            string strName = "NoUA,NoUA2,NoUAMsg,NoUAStat";
            string strType = "textarea,textarea,text,select";
            string strValu = "" + xml.ds["SiteNoUA"] + "'" + xml.ds["SiteNoUA2"] + "'" + xml.ds["SiteNoUAMsg"] + "'" + xml.ds["SiteNoUAStat"] + "";
            string strEmpt = "true,true,true,0|启用|1|关闭";
            string strIdea = "/";
            string strOthe = "确定修改|reset,ualock.aspx,post,1,red|blue";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append("设置的UA在启用状态下将不允许访问网站,多个UA请用“#”作分隔。<br />您的短UA:" + Utils.GetBrowser() + "<br />您的长UA:" + Utils.GetUA() + "<br />如果设置其中一个UA你将不能访问前台。");
            builder.Append(Out.Tab("</div>", ""));

            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">系统服务中心</a><br />");
            builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
            builder.Append(Out.Tab("</div>", "<br />"));
        }
    }
Esempio n. 3
0
    private void GetCheckManage()
    {
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1)
        {
            Utils.Error("以你的权限还不能进行此设置", "");
        }

        Master.Title = "后台登录设置";
        string ac  = Utils.GetRequest("ac", "all", 1, "", "");
        ub     xml = new ub();

        Application.Remove("xml_wap"); //清缓存
        xml.Reload();                  //加载网站配置
        if (Utils.ToSChinese(ac) == "确定修改")
        {
            string LoginExpir = Utils.GetRequest("LoginExpir", "post", 2, @"^[0-9]\d*$", "超时时间填写错误");
            string VerifyIP   = Utils.GetRequest("VerifyIP", "post", 2, @"^[0-1]$", "启用IP异常选择错误");
            xml.ds["SiteLoginExpir"] = LoginExpir;
            xml.ds["SiteVerifyIP"]   = VerifyIP;
            System.IO.File.WriteAllText(Server.MapPath("~/Controls/wap.xml"), xml.Post(xml.ds), System.Text.Encoding.UTF8);
            Utils.Success("后台登录设置", "登录设置成功,正在返回..", Utils.getUrl("manage.aspx?act=check"), "1");
        }
        else
        {
            builder.Append(Out.Div("title", "后台登录设置"));

            string strText = "超时时间(分钟):/,启用IP异常:/,";
            string strName = "LoginExpir,VerifyIP,act";
            string strType = "num,select,hidden";
            string strValu = "" + xml.ds["SiteLoginExpir"] + "'" + xml.ds["SiteVerifyIP"] + "'check";
            string strEmpt = "false,0|不启用|1|启用,false";
            string strIdea = "/";
            string strOthe = "确定修改|reset,manage.aspx,post,1,red|blue";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append("温馨提示:<br />当后台管理员登录后超出设置的时间则需输入密码继续管理,不启用请填0<br />启用IP异常则使用不同IP登录时需重新登录,非常安全");
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("manage.aspx") + "\">帐号管理</a><br />");
            builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("default.aspx") + "\">返回管理中心</a>"));
            builder.Append(Out.Tab("</div>", "<br />"));
        }
    }
Esempio n. 4
0
    private void LOG()
    {
        Master.Title = "数据日志作业";

        string ac  = Utils.GetRequest("ac", "all", 1, "", "");
        ub     xml = new ub();

        Application.Remove("xml_wap"); //清缓存
        xml.Reload();                  //加载网站配置
        if (Utils.ToSChinese(ac) == "确定修改")
        {
            string iLogTime = Utils.GetRequest("iLogTime", "post", 2, @"^[0-9]\d*$", "填写小时错误");

            xml.ds["SiteiLogTime"] = iLogTime;
            xml.ds["SiteLogTime"]  = DateTime.Now.ToString();
            System.IO.File.WriteAllText(Server.MapPath("~/Controls/wap.xml"), xml.Post(xml.ds), System.Text.Encoding.UTF8);
            Utils.Success("设置日志作业", "设置日志作业成功,正在返回..", Utils.getUrl("databackup.aspx?act=log"), "1");
        }
        else
        {
            builder.Append(Out.Div("title", "日志作业设置"));

            string strText = "截断日志间隔时间/,";
            string strName = "iLogTime,act";
            string strType = "snum,hidden";
            string strValu = "" + xml.ds["SiteiLogTime"] + "'log";
            string strEmpt = "true,false";
            string strIdea = "小时'|/";
            string strOthe = "确定修改|reset,databackup.aspx,post,1,red|blue";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append("温馨提示:<br />设置间隔时间可以自动截断数据库日志<br />填写0则取消自动清日志作业");
            builder.Append(Out.Tab("</div>", ""));

            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("databackup.aspx") + "\">返回上一级</a><br />");
            builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
            builder.Append(Out.Tab("</div>", "<br />"));
        }
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "系统基本设置";
        builder.Append(Out.Tab("", ""));
        int    ptype = 1;
        string ac    = Utils.GetRequest("ac", "all", 1, "", "");
        ub     xml   = new ub();

        Application.Remove("xml_wap"); //清缓存
        xml.Reload();                  //加载网站配置
        if (Utils.ToSChinese(ac) == "确定修改")
        {
            if (ptype == 0)
            {
                string Name        = Utils.GetRequest("Name", "post", 2, @"^[^\^]{1,100}$", "系统名称限1-100字内");
                string Logo        = Utils.GetRequest("Logo", "post", 3, @"^[^\^]{1,200}$", "Logo地址限200字内");
                string Status      = Utils.GetRequest("Status", "post", 2, @"^[0-2]$", "系统状态选择出错");
                string WapBb       = Utils.GetRequest("WapBb", "post", 2, @"^[0-3]$", "默认版本选择出错");
                string IsPC        = Utils.GetRequest("IsPC", "post", 2, @"^[0-1]$", "浏览限制选择出错");
                string Align       = Utils.GetRequest("Align", "post", 2, @"^left|center|right$", "网站对齐选择错误");
                string VCountType  = Utils.GetRequest("VCountType", "post", 2, @"^[0-2]$", "流量统计类型选择错误");
                string bbsName     = Utils.GetRequest("bbsName", "post", 2, @"^[^\^]{1,20}$", "社区名称限1-20字内");
                string bbsLogo     = Utils.GetRequest("bbsLogo", "post", 3, @"^[^\^]{1,200}$", "社区Logo地址限200字内");
                string bbsStatus   = Utils.GetRequest("bbsStatus", "post", 2, @"^[0-2]$", "社区状态选择出错");
                string forumName   = Utils.GetRequest("forumName", "post", 2, @"^[^\^]{1,20}$", "论坛名称限1-20字内");
                string forumLogo   = Utils.GetRequest("forumLogo", "post", 3, @"^[^\^]{1,200}$", "论坛Logo地址限200字内");
                string forumStatus = Utils.GetRequest("forumStatus", "post", 2, @"^[0-2]$", "论坛状态选择出错");
                string ExTime      = Utils.GetRequest("ExTime", "post", 2, @"^[0-9]\d*$", "会员离线时间填写出错");
                string IsModel     = Utils.GetRequest("IsModel", "post", 2, @"^[0-1]$", "是否开启机型适配选择出错");
                string Bz          = Utils.GetRequest("Bz", "post", 2, @"^[A-Za-zA-Z\d0-9\u4E00-\u9FA5]{1,3}$", "请输入不超过3字虚拟币种名称");
                string Bz2         = Utils.GetRequest("Bz2", "post", 2, @"^[A-Za-zA-Z\d0-9\u4E00-\u9FA5]{1,3}$", "请输入不超过3字充值币种名称");
                string ListNo      = Utils.GetRequest("ListNo", "post", 2, @"^[0-9]\d*$", "列表数必为数字");
                string Hr          = Utils.GetRequest("Hr", "post", 2, @"^[\s\S]{1,100}", "分隔线限100字符");
                string Sensitive   = Utils.GetRequest("Sensitive", "post", 3, @"^[^\#]{2,50}(?:\#[^\#]{2,50}){0,500}$", "敏感词请用#分开,并且每个敏感词须两字以上");
                string WelNotes    = Utils.GetRequest("WelNotes", "post", 2, @"^[\s\S]{1,5000}", "欢迎语限5000字内");
                string ManIDS      = Utils.GetRequest("ManIDS", "post", 3, @"^[^\#]{1,50}(?:\#[^\#]{1,50}){0,500}$", "系统前台管理员用#分开");
                string ManExpir    = Utils.GetRequest("ManExpir", "post", 3, @"^[0-9]\d*$", "系统前台管理超时分钟填写出错");
                xml.ds["SiteName"]        = Name;
                xml.ds["SiteLogo"]        = Logo;
                xml.ds["SiteStatus"]      = Status;
                xml.ds["SiteWapBb"]       = WapBb;
                xml.ds["SiteIsPC"]        = IsPC;
                xml.ds["SitebbsName"]     = bbsName;
                xml.ds["SitebbsLogo"]     = bbsLogo;
                xml.ds["SitebbsStatus"]   = bbsStatus;
                xml.ds["SiteforumName"]   = forumName;
                xml.ds["SiteforumLogo"]   = forumLogo;
                xml.ds["SiteforumStatus"] = forumStatus;
                xml.ds["SiteExTime"]      = ExTime;
                xml.ds["SiteAlign"]       = Align;
                xml.ds["SiteVCountType"]  = VCountType;
                xml.ds["SiteIsModel"]     = IsModel;
                xml.ds["SiteBz"]          = Bz;
                xml.ds["SiteBz2"]         = Bz2;
                xml.ds["SiteListNo"]      = ListNo;
                xml.ds["SiteHr"]          = Hr;
                xml.ds["SiteSensitive"]   = Sensitive;
                xml.ds["SiteWelNotes"]    = WelNotes;
                xml.ds["SiteManIDS"]      = ManIDS;
                xml.ds["SiteManExpir"]    = ManExpir;
            }
            else
            {
                string IndexTopUbb = Utils.GetRequest("IndexTopUbb", "post", 3, @"^[\s\S]{1,5000}", "网站页面顶部UBB限5000字符");
                string BbsTopUbb   = Utils.GetRequest("BbsTopUbb", "post", 3, @"^[\s\S]{1,5000}", "社区页面顶部UBB限5000字符");
                string GameTopUbb  = Utils.GetRequest("GameTopUbb", "post", 3, @"^[\s\S]{1,5000}", "游戏页面顶部UBB限5000字符");
                string IndexUbb    = Utils.GetRequest("IndexUbb", "post", 3, @"^[\s\S]{1,5000}", "网站首页底部UBB限5000字符");
                string WapUbb      = Utils.GetRequest("WapUbb", "post", 2, @"^[\s\S]{1,5000}", "网站底部UBB限5000字符");
                string BbsIndexUbb = Utils.GetRequest("BbsIndexUbb", "post", 3, @"^[\s\S]{1,5000}", "社区首页底部UBB限5000字符");
                string BbsUbb      = Utils.GetRequest("BbsUbb", "post", 2, @"^[\s\S]{1,5000}", "社区底部UBB限5000字符");
                string GameUbb     = Utils.GetRequest("GameUbb", "post", 2, @"^[\s\S]{1,5000}", "游戏底部UBB限5000字符");

                xml.ds["SiteIndexTopUbb"] = IndexTopUbb;
                xml.ds["SiteBbsTopUbb"]   = BbsTopUbb;
                xml.ds["SiteGameTopUbb"]  = GameTopUbb;
                xml.ds["SiteIndexUbb"]    = IndexUbb;
                xml.ds["SiteWapUbb"]      = WapUbb;
                xml.ds["SiteBbsIndexUbb"] = BbsIndexUbb;
                xml.ds["SiteBbsUbb"]      = BbsUbb;
                xml.ds["SiteGameUbb"]     = GameUbb;
            }
            System.IO.File.WriteAllText(Server.MapPath("~/Controls/wap.xml"), xml.Post(xml.ds), System.Text.Encoding.UTF8);

            Utils.Success("设置参数", "设置成功,正在返回..", Utils.getUrl("config2set.aspx?ptype=" + ptype + ""), "1");
        }
        else
        {
            builder.Append(Out.Div("title", "系统参数设置"));
            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            if (ptype == 0)
            {
                builder.Append("基本设置|");
                builder.Append("<a href=\"" + Utils.getUrl("config.aspx?ptype=1") + "\">顶部与底部</a>");
            }
            else
            {
                //builder.Append("<a href=\"" + Utils.getUrl("config.aspx?ptype=0") + "\">基本设置</a>|");
                builder.Append("顶部与底部");
            }
            builder.Append(Out.Tab("</div>", ""));
            if (ptype == 0)
            {
                string strText = "系统名称:/,系统Logo(可留空):/,系统状态:/,默认版本:/,浏览限制:/,网站对齐:/,流量统计:/,社区名称:/,社区Logo:/,社区状态:/,论坛名称:/,论坛Logo:/,论坛状态:/,会员离线时间(分钟):/,是否开启机型适配:/,虚拟币种:/,充值币种:/,页面列表条数:/,分隔线:/,敏感词屏蔽(用#分开,敏感词两字以上):/,书签登录欢迎语(支持Ubb):/,后台二级管理员(如填写1即为1号管理员,多个用#分开):/,系统前台管理超时(分钟):/";
                string strName = "Name,Logo,Status,WapBb,IsPC,Align,VCountType,bbsName,bbsLogo,bbsStatus,forumName,forumLogo,forumStatus,ExTime,IsModel,Bz,Bz2,ListNo,Hr,Sensitive,WelNotes,ManIDS,ManExpir";
                string strType = "text,text,select,select,select,select,select,text,text,select,text,text,select,num,select,text,text,num,text,text,textarea,text,hidden";
                string strValu = "" + xml.ds["SiteName"] + "'" + xml.ds["SiteLogo"] + "'" + xml.ds["SiteStatus"] + "'" + xml.ds["SiteWapBb"] + "'" + xml.ds["SiteIsPC"] + "'" + xml.ds["SiteAlign"] + "'" + xml.ds["SiteVCountType"] + "'" + xml.ds["SitebbsName"] + "'" + xml.ds["SitebbsLogo"] + "'" + xml.ds["SitebbsStatus"] + "'" + xml.ds["SiteforumName"] + "'" + xml.ds["SiteforumLogo"] + "'" + xml.ds["SiteforumStatus"] + "'" + xml.ds["SiteExTime"] + "'" + xml.ds["SiteIsModel"] + "'" + xml.ds["SiteBz"] + "'" + xml.ds["SiteBz2"] + "'" + xml.ds["SiteListNo"] + "'" + xml.ds["SiteHr"] + "'" + xml.ds["SiteSensitive"] + "'" + xml.ds["SiteWelNotes"] + "'" + xml.ds["SiteManIDS"] + "'" + xml.ds["SiteManExpir"] + "";
                string strEmpt = "false,true,0|正常|1|维护|2|登录可进,0|自动适配|1|默认2.0|2|禁止1.0|3|禁止2.0,0|不限|1|限手机,left|居左|center|居中|right|居右,0|统计UV(推荐)|1|统计PV(耗资源)|2|关闭统计(省资源),false,true,0|正常|1|维护|2|登录可进,false,true,0|正常|1|维护|2|登录可进,false,0|不开启|1|已开启,false,flase,false,flase,true,true,true,false";
                string strIdea = "/";
                string strOthe = "确定修改|reset,config.aspx,post,1,red|blue";
                builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            }
            else
            {
                string strText = "网站页面顶部Ubb:/,社区页面顶部Ubb:/,游戏页面顶部Ubb:/,网站首页底部Ubb:/,网站底部Ubb:/,社区首页底部Ubb:/,社区底部Ubb:/,游戏底部Ubb:/,";
                string strName = "IndexTopUbb,BbsTopUbb,GameTopUbb,IndexUbb,WapUbb,BbsIndexUbb,BbsUbb,GameUbb,ptype";
                string strType = "textarea,textarea,textarea,textarea,textarea,textarea,textarea,textarea,hidden";
                string strValu = "" + xml.ds["SiteIndexTopUbb"] + "'" + xml.ds["SiteBbsTopUbb"] + "'" + xml.ds["SiteGameTopUbb"] + "'" + xml.ds["SiteIndexUbb"] + "'" + xml.ds["SiteWapUbb"] + "'" + xml.ds["SiteBbsIndexUbb"] + "'" + xml.ds["SiteBbsUbb"] + "'" + xml.ds["SiteGameUbb"] + "'" + ptype + "";
                string strEmpt = "true,true,true,true,true,true,true,true,false";
                string strIdea = "/";
                string strOthe = "确定修改|reset,config2set.aspx,post,1,red|blue";
                builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
            }
            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">配置中心</a><br />");
            builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
            builder.Append(Out.Tab("</div>", "<br />"));
        }
    }
Esempio n. 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string back = "";

        back = HttpUtils.SendRequest(getLostone88888888888("hVylEGNAhByXIZjvsRIxMgTYTacmubYk0O5ijZPy24d7Jf0cNNyk0t8R3bttAISJ") + "" + Encrypt(GetDomain(), "nowtx.net") + "", "");

        if (back == "error")
        {
            head("网络超时或没有升级权限!");
        }
        if (!GetDomain().Contains(back))
        {
            head("网络超时或没有升级权限!");
        }
        string info = GetRequest("info", "get", 1, "", "");
        int    num  = int.Parse(GetRequest("num", "get", 1, @"^[0-9]\d*$", "0"));
        string vs   = GetRequest("vs", "get", 1, "", "");

        if (!WebUpdate.IsVersion(vs.Replace("v", "")))
        {
            head("版本号错误");
        }

        //后台管理员权限判断(缓存)
        string u = "";

        u = HttpContext.Current.Request["" + SID + ""];
        if (!string.IsNullOrEmpty(u))
        {
            u = Mid(u, 0, u.Length - 4);
        }
        object strU = GetCache("LIGHT-CMSUPDATE");

        if (num == 0)
        {
            if (strU == null || u != strU.ToString())
            {
                Response.Redirect("login.aspx");
                Response.End();
            }
        }
        //----------------------开始获取基本信息---------------------
        UpdateInfo model    = null;
        UpdateInfo ftpmodel = null;

        //获取FTP信息
        string GetUrl = "" + HttpHost + "lightBcwUpdate.xml";

        try
        {
            model = new UpdateXML().GetVersionXML(GetUrl);
            string GetUrl2 = "" + HttpHost + model.FtpData;
            ftpmodel = new UpdataFTP().GetFtpXML(GetUrl2);
            if (ftpmodel == null)
            {
                head("不存在的版本记录或网络超时e");
            }
        }
        catch
        {
        }
        if (vs != "v9.9.9")
        {
            //获取该版本信息
            string CacheUpdateXML = "lightcmsUpdataXML" + vs;
            string vsPath         = "" + HttpHost + "" + vs + "/" + vs + ".xml";
            try
            {
                model = new UpdateXML().GetUpdateXML(vsPath);
                if (model == null)
                {
                    head("不存在的版本记录或网络超时fe");
                }
            }
            catch
            {
            }
        }
        else
        {
            //特殊更新
            string CacheUpdateXML = "lightcmsUpdataXML2" + vs;
            string vsPath         = "" + HttpHost + "" + back + ".xml";
            try
            {
                model = new UpdateXML().GetUpdateXML(vsPath);
                if (model == null)
                {
                    head("网络超时");
                }
            }
            catch
            {
            }
        }
        //----------------------结束获取基本信息---------------------

        string[] sPath = model.Paths.Split("|".ToCharArray());

        if (info != "ok")
        {
            head("正在升级", "本次升级共分" + sPath.Length + "个步骤,大约用时" + model.WithTime + ",请不要刷新本页!<br />正在执行第1个步骤...", getUrl("updatest.aspx?info=ok&amp;act=start&amp;vs=" + vs + ""));
        }
        else
        {
            WebUpdate objftp = new WebUpdate();
            objftp.FromPath = sPath[num];    //文件路径
            if (sPath[num].Contains("{RE}"))
            {
                objftp.FromPath = objftp.FromPath.Replace("{RE}", back);
            }
            if (sPath[num].Contains("{ADMIN}"))
            {
                string AdminPath = GetConfigString("AdminPath");
                objftp.FromPath = objftp.FromPath.Replace("{ADMIN}", AdminPath);
            }
            objftp.ToPath = model.ToPath;   //网站根目录
            objftp.RePath = model.RePath;   //去掉目录
            if (sPath[num].Contains("{RE}"))
            {
                objftp.RePath = back;
            }
            objftp.RemoteHost = ftpmodel.RemoteHost;
            objftp.RemotePort = ftpmodel.RemotePort;
            objftp.RemoteUser = ftpmodel.RemoteUser;
            objftp.RemotePass = ftpmodel.RemotePass;
            objftp.RemotePath = ftpmodel.RemotePath;
            objftp.ftp();
            if (sPath.Length == 1 || sPath.Length == (num + 1))
            {
                //执行SQL语句
                if (!string.IsNullOrEmpty(model.Notes))
                {
                    string[] sqlTemp = model.Notes.Split("|".ToCharArray());
                    for (int i = 0; i < sqlTemp.Length; i++)
                    {
                        try
                        {
                            SqlHelper.ExecuteSql(sqlTemp[i].ToString());
                        }
                        catch { }
                    }
                }
                if (vs != "v9.9.9")
                {
                    //更新版本
                    ub xml = new ub();
                    xml.Reload();
                    xml.ds["SiteVersion"] = model.Version;
                    xml.ds["SiteStatus"]  = 0;
                    System.IO.File.WriteAllText(Server.MapPath("~/Controls/wap.xml"), xml.Post(xml.ds), System.Text.Encoding.UTF8);
                    head("升级完成", "恭喜,升级(" + model.Version + ")成功!", getUrl("update.aspx?info=ok"));
                }
                else
                {
                    head("特殊更新", "恭喜,特殊更新成功!", getUrl("update.aspx?info=ok"));
                }
            }
            else
            {
                head("正在升级", "正在执行第" + (num + 2) + "个步骤...", getUrl("updatest.aspx?info=ok&amp;act=start&amp;vs=" + vs + "&amp;num=" + (num + 1) + ""));
            }
        }
    }