示例#1
0
        private static void LoadConfig()
        {
            string     strXmlFile = HttpContext.Current.Server.MapPath("~/xmlconfig/sendcloud_sms.config");
            XmlControl XmlTool    = new XmlControl(strXmlFile);

            SMS_api_user = XmlTool.GetText("Root/api_user");
            SMS_api_key  = XmlTool.GetText("Root/api_key");
            XmlTool.Dispose();
        }
示例#2
0
        public void Create(int loid, string title, string number)
        {
            XmlControl xmlControl = new XmlControl(ConfigurationManager.AppSettings["DataUrl"].ToString() + (object)loid + ".xml");

            xmlControl.Update("Root/Title", title);
            xmlControl.Update("Root/Number", number);
            xmlControl.Save();
            xmlControl.Dispose();
        }
示例#3
0
        public void Create(int loid, string title, string number)
        {
            string     arg        = ConfigurationManager.AppSettings["DataUrl"].ToString();
            string     xmlFile    = arg + loid + ".xml";
            XmlControl xmlControl = new XmlControl(xmlFile);

            xmlControl.Update("Root/Title", title);
            xmlControl.Update("Root/Number", number);
            xmlControl.Save();
            xmlControl.Dispose();
        }
示例#4
0
        static DiscuzSessionHelper()
        {
            String     strXmlFile = System.Web.HttpContext.Current.Server.MapPath("~/_data/config/site.config");
            XmlControl XmlTool    = new XmlControl(strXmlFile);

            apikey = XmlTool.GetText("Root/ForumAPIKey"); //API Key
            secret = XmlTool.GetText("Root/ForumSecret"); //密钥
            url    = XmlTool.GetText("Root/ForumUrl");    //论坛地址
            XmlTool.Dispose();
            ds = new DiscuzSession(apikey, secret, url);
        }
示例#5
0
 public void Create()
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = "SELECT * FROM Sys_PlaySmallType where IsOpen=0";
         DataTable dataTable = dbOperHandler.GetDataTable();
         for (int i = 0; i < dataTable.Rows.Count; i++)
         {
             DataRow dataRow = dataTable.Rows[i];
             string  text    = "ssc";
             if (Convert.ToInt32(dataRow["LotteryId"]) == 1)
             {
                 text = "ssc";
             }
             if (Convert.ToInt32(dataRow["LotteryId"]) == 2)
             {
                 text = "11x5";
             }
             if (Convert.ToInt32(dataRow["LotteryId"]) == 3)
             {
                 text = "dpc";
             }
             if (Convert.ToInt32(dataRow["LotteryId"]) == 4)
             {
                 text = "pk10";
             }
             string xmlFile = HttpContext.Current.Server.MapPath(string.Concat(new object[]
             {
                 "~/WEB-INF/",
                 text,
                 "/",
                 dataRow["Title2"],
                 ".xml"
             }));
             XmlControl xmlControl = new XmlControl(xmlFile);
             xmlControl.Update("play/id", dataRow["Id"].ToString());
             xmlControl.Update("play/type", dataRow["type"].ToString());
             xmlControl.Update("play/typename", dataRow["title0"].ToString());
             xmlControl.Update("play/name", dataRow["Title"].ToString());
             xmlControl.Update("play/minbonus", dataRow["Minbonus"].ToString());
             xmlControl.Update("play/posbonus", dataRow["Posbonus"].ToString());
             xmlControl.Update("play/maxbonus", dataRow["Maxbonus"].ToString());
             xmlControl.Update("play/remark", dataRow["remark"].ToString());
             xmlControl.Update("play/example", dataRow["example"].ToString());
             xmlControl.Update("play/help", dataRow["help"].ToString());
             xmlControl.Save();
             xmlControl.Dispose();
         }
     }
 }
示例#6
0
    public static void GetConfig()
    {
        string     strXmlFile = HttpContext.Current.Server.MapPath("/Site.Config");
        XmlControl xmlTool    = new XmlControl(strXmlFile);

        siteName        = xmlTool.GetText("Root/SiteName");
        siteAuthor      = xmlTool.GetText("Root/SiteAuthor");
        siteKeywords    = xmlTool.GetText("Root/SiteKeywords");
        siteDescription = xmlTool.GetText("Root/SiteDescription");
        pagePerNumber   = xmlTool.GetText("Root/PagePerNumber");
        siteTips        = xmlTool.GetText("Root/SiteTips");
        messageCode     = xmlTool.GetText("Root/MessageCode");
        siteMessage     = xmlTool.GetText("Root/SiteMessage");
        phoneMessage    = xmlTool.GetText("Root/PhoneMessage");
        xmlTool.Dispose();
    }
示例#7
0
 public void Create()
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = "SELECT * FROM Sys_PlaySmallType where IsOpen=0";
         DataTable dataTable = dbOperHandler.GetDataTable();
         for (int index = 0; index < dataTable.Rows.Count; ++index)
         {
             DataRow row = dataTable.Rows[index];
             string  str = "ssc";
             if (Convert.ToInt32(row["LotteryId"]) == 1)
             {
                 str = "ssc";
             }
             if (Convert.ToInt32(row["LotteryId"]) == 2)
             {
                 str = "11x5";
             }
             if (Convert.ToInt32(row["LotteryId"]) == 3)
             {
                 str = "dpc";
             }
             if (Convert.ToInt32(row["LotteryId"]) == 4)
             {
                 str = "pk10";
             }
             XmlControl xmlControl = new XmlControl(HttpContext.Current.Server.MapPath("~/WEB-INF/" + str + "/" + row["Title2"] + ".xml"));
             xmlControl.Update("play/id", row["Id"].ToString());
             xmlControl.Update("play/type", row["type"].ToString());
             xmlControl.Update("play/typename", row["title0"].ToString());
             xmlControl.Update("play/name", row["Title"].ToString());
             xmlControl.Update("play/minbonus", row["Minbonus"].ToString());
             xmlControl.Update("play/posbonus", row["Posbonus"].ToString());
             xmlControl.Update("play/maxbonus", row["Maxbonus"].ToString());
             xmlControl.Update("play/remark", row["remark"].ToString());
             xmlControl.Update("play/example", row["example"].ToString());
             xmlControl.Update("play/help", row["help"].ToString());
             xmlControl.Save();
             xmlControl.Dispose();
         }
     }
 }
示例#8
0
        public void CreateSiteConfig()
        {
            SiteModel  siteModel  = this.CreateEntity();
            string     xmlFile    = HttpContext.Current.Server.MapPath("~/WEB-INF/site.xml");
            XmlControl xmlControl = new XmlControl(xmlFile);

            xmlControl.Update("Root/Name", siteModel.Name);
            xmlControl.Update("Root/Dir", siteModel.Dir);
            xmlControl.Update("Root/WebIsOpen", string.Concat(siteModel.WebIsOpen));
            xmlControl.Update("Root/WebCloseSeason", siteModel.WebCloseSeason);
            xmlControl.Update("Root/ZHIsOpen", string.Concat(siteModel.ZHIsOpen));
            xmlControl.Update("Root/RegIsOpen", string.Concat(siteModel.RegIsOpen));
            xmlControl.Update("Root/BetIsOpen", string.Concat(siteModel.BetIsOpen));
            xmlControl.Update("Root/CSUrl", siteModel.CSUrl);
            xmlControl.Update("Root/SignMinTotal", string.Concat(siteModel.SignMinTotal));
            xmlControl.Update("Root/SignMaxTotal", string.Concat(siteModel.SignMaxTotal));
            xmlControl.Update("Root/SignNum", string.Concat(siteModel.SignNum));
            xmlControl.Update("Root/WarnTotal", string.Concat(siteModel.WarnTotal));
            xmlControl.Update("Root/MaxBet", string.Concat(siteModel.MaxBet));
            xmlControl.Update("Root/MaxWin", string.Concat(siteModel.MaxWin));
            xmlControl.Update("Root/MaxWinFK", string.Concat(siteModel.MaxWinFK));
            xmlControl.Update("Root/MaxLevel", string.Concat(siteModel.MaxLevel));
            xmlControl.Update("Root/MinCharge", string.Concat(siteModel.MinCharge));
            xmlControl.Update("Root/Points", string.Concat(siteModel.Points));
            xmlControl.Update("Root/PriceOutCheck", string.Concat(siteModel.PriceOutCheck));
            xmlControl.Update("Root/PriceOut", string.Concat(siteModel.PriceOut));
            xmlControl.Update("Root/PriceOut2", string.Concat(siteModel.PriceOut2));
            xmlControl.Update("Root/PriceNum", string.Concat(siteModel.PriceNum));
            xmlControl.Update("Root/PriceTime1", siteModel.PriceTime1);
            xmlControl.Update("Root/PriceTime2", siteModel.PriceTime2);
            xmlControl.Update("Root/BankTime", string.Concat(siteModel.BankTime));
            xmlControl.Update("Root/PriceOutPerson", string.Concat(siteModel.PriceOutPerson));
            xmlControl.Update("Root/ClientVersion", siteModel.ClientVersion);
            xmlControl.Update("Root/UpdateTime", string.Concat(siteModel.UpdateTime));
            xmlControl.Update("Root/NewsUpdateTime", string.Concat(siteModel.NewsUpdateTime));
            xmlControl.Update("Root/AutoLottery", string.Concat(siteModel.AutoLottery));
            xmlControl.Update("Root/ProfitModel", string.Concat(siteModel.ProfitModel));
            xmlControl.Update("Root/ProfitMargin", string.Concat(siteModel.ProfitMargin));
            xmlControl.Update("Root/AutoRanking", string.Concat(siteModel.AutoRanking));
            xmlControl.Update("Root/Version", siteModel.Version);
            xmlControl.Save();
            xmlControl.Dispose();
        }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string siteName        = this.SiteNameBox.Text.Trim();
        string siteAuthor      = this.SiteAuthorBox.Text.Trim();
        string siteKeywords    = this.SiteKeywordsBox.Text.Trim();
        string siteDescription = this.SiteDescriptionBox.Text.Trim();
        string pagePerNumber   = this.PagePerNumberBox.Text.Trim();
        string siteTips        = Utility.ReplaceString(this.SiteTipsBox.Text.Trim());
        string messageCode     = this.MessageCodeBox.Text.Trim();
        string siteMessage     = Utility.ReplaceString(this.SiteMessageBox.Text.Trim());
        string phoneMessage    = Utility.ReplaceString(this.PhoneMessageBox.Text.Trim());
        string userWorkDay     = this.UserWorkDayBox.Text.Trim();
        string categoryRate    = this.CategoryRateBox.Text.Trim();

        string     strXmlFile = Server.MapPath("~/Site.Config");
        XmlControl xmlTool    = new XmlControl(strXmlFile);

        xmlTool.Update("Root/SiteName", siteName);
        xmlTool.Update("Root/SiteAuthor", siteAuthor);
        xmlTool.Update("Root/SiteKeywords", siteKeywords);
        xmlTool.Update("Root/SiteDescription", siteDescription);
        xmlTool.Update("Root/PagePerNumber", pagePerNumber);
        xmlTool.Update("Root/SiteTips", siteTips);
        xmlTool.Update("Root/MessageCode", messageCode);
        xmlTool.Update("Root/SiteMessage", siteMessage);
        xmlTool.Update("Root/PhoneMessage", phoneMessage);
        xmlTool.Update("Root/UserWorkDay", userWorkDay);
        xmlTool.Update("Root/CategoryRate", categoryRate);

        bool success = xmlTool.Save();

        xmlTool.Dispose();
        if (success)
        {
            WebConfiguration.GetConfig();
            Utility.Alert(this, "修改成功。", "AdminSiteConfig.aspx");
        }
        else
        {
            Utility.Alert(this, "修改失败!");
        }
    }
示例#10
0
    public static void SetConfig()
    {
        string     strXmlFile = HttpContext.Current.Server.MapPath("~/Site.Config");
        XmlControl xmlTool    = new XmlControl(strXmlFile);

        xmlTool.Update("Root/SiteName", SiteName);
        xmlTool.Update("Root/SiteAuthor", SiteAuthor);
        xmlTool.Update("Root/SiteKeywords", SiteKeywords);
        xmlTool.Update("Root/SiteDescription", SiteDescription);
        xmlTool.Update("Root/PagePerNumber", PagePerNumber);
        xmlTool.Update("Root/SiteTips", SiteTips);
        xmlTool.Update("Root/MessageCode", MessageCode);
        xmlTool.Update("Root/SiteMessage", SiteMessage);
        xmlTool.Update("Root/PhoneMessage", PhoneMessage);
        xmlTool.Update("Root/UserWorkDay", UserWorkDay);
        xmlTool.Update("Root/CategoryRate", CategoryRate);

        xmlTool.Save();
        xmlTool.Dispose();
    }
示例#11
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string siteName = this.SiteNameBox.Text.Trim();
        string siteAuthor = this.SiteAuthorBox.Text.Trim();
        string siteKeywords = this.SiteKeywordsBox.Text.Trim();
        string siteDescription = this.SiteDescriptionBox.Text.Trim();
        string pagePerNumber = this.PagePerNumberBox.Text.Trim();
        string siteTips = Utility.ReplaceString(this.SiteTipsBox.Text.Trim());
        string messageCode = this.MessageCodeBox.Text.Trim();
        string siteMessage = Utility.ReplaceString(this.SiteMessageBox.Text.Trim());
        string phoneMessage = Utility.ReplaceString(this.PhoneMessageBox.Text.Trim());
        string userWorkDay = this.UserWorkDayBox.Text.Trim();
        string categoryRate = this.CategoryRateBox.Text.Trim();

        string strXmlFile = Server.MapPath("~/Site.Config");
        XmlControl xmlTool = new XmlControl(strXmlFile);
        xmlTool.Update("Root/SiteName", siteName);
        xmlTool.Update("Root/SiteAuthor", siteAuthor);
        xmlTool.Update("Root/SiteKeywords", siteKeywords);
        xmlTool.Update("Root/SiteDescription", siteDescription);
        xmlTool.Update("Root/PagePerNumber", pagePerNumber);
        xmlTool.Update("Root/SiteTips", siteTips);
        xmlTool.Update("Root/MessageCode", messageCode);
        xmlTool.Update("Root/SiteMessage", siteMessage);
        xmlTool.Update("Root/PhoneMessage", phoneMessage);
        xmlTool.Update("Root/UserWorkDay", userWorkDay);
        xmlTool.Update("Root/CategoryRate", categoryRate);

        bool success = xmlTool.Save();
        xmlTool.Dispose();
        if (success)
        {
            WebConfiguration.GetConfig();
            Utility.Alert(this, "修改成功。", "AdminSiteConfig.aspx");
        }
        else
        {
            Utility.Alert(this, "修改失败!");
        }
    }
示例#12
0
        static Config()
        {
            String     strXmlFile = HttpContext.Current.Server.MapPath("/App_Data/Alipay.config");
            XmlControl XmlTool    = new XmlControl(strXmlFile);

            Seller_email = XmlTool.GetText("Root/seller_email"); //商家签约时的支付宝帐号,即收款的支付宝帐号
            Partner      = XmlTool.GetText("Root/partner");      //partner合作伙伴id(必须填写)
            Key          = XmlTool.GetText("Root/key");          //partner 的对应交易安全校验码(必须填写)
            XmlTool.Dispose();

            Return_url = "http://localhost/api/alipay/return_url.aspx";
            Notify_url = "http://localhost/api/alipay/notify_url.aspx";


            //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
            //字符编码格式 目前支持 gbk 或 utf-8
            Input_charset = "utf-8";
            //签名方式 不需修改
            Sign_type = "MD5";
            //访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http
            Transport = "https";
        }
示例#13
0
    public static void GetConfig()
    {
        string strXmlFile = HttpContext.Current.Server.MapPath("/Site.Config");
        XmlControl xmlTool = new XmlControl(strXmlFile);

        siteName = xmlTool.GetText("Root/SiteName");
        siteAuthor = xmlTool.GetText("Root/SiteAuthor");
        siteKeywords = xmlTool.GetText("Root/SiteKeywords");
        siteDescription = xmlTool.GetText("Root/SiteDescription");
        pagePerNumber = xmlTool.GetText("Root/PagePerNumber");
        siteTips = xmlTool.GetText("Root/SiteTips");
        messageCode = xmlTool.GetText("Root/MessageCode");
        siteMessage = xmlTool.GetText("Root/SiteMessage");
        phoneMessage = xmlTool.GetText("Root/PhoneMessage");
        xmlTool.Dispose();
    }