Example #1
0
 static DiscuzSessionHelper()
 {
     string strXmlFile = System.Web.HttpContext.Current.Server.MapPath("~/_data/config/site.config");
     JumboTCMS.DBUtility.XmlControl XmlTool = new JumboTCMS.DBUtility.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);
 }
Example #2
0
 /// <summary>
 /// 频道首页
 /// </summary>
 public static string Channel(string _siteDir, bool urlRewrite)
 {
     string strXmlFile = HttpContext.Current.Server.MapPath(_siteDir + "_data/config/pageformat.config");
     JumboTCMS.DBUtility.XmlControl XmlTool = new JumboTCMS.DBUtility.XmlControl(strXmlFile);
     string TempUrl = "";
     if (urlRewrite)
         TempUrl = XmlTool.GetText("Pages/Channel/P_1");
     else
         TempUrl = XmlTool.GetText("Pages/Channel/P_0");
     XmlTool.Dispose();
     return TempUrl;
 }
Example #3
0
 /// <summary>
 /// 栏目页
 /// </summary>
 public static string Class(bool _isHtml, string _siteDir, bool urlRewrite, int page)
 {
     string strXmlFile = HttpContext.Current.Server.MapPath(_siteDir + "_data/config/pageformat.config");
     JumboTCMS.DBUtility.XmlControl XmlTool = new JumboTCMS.DBUtility.XmlControl(strXmlFile);
     string TempUrl = "";
     if (_isHtml)
     {
         if (page == 1)
             TempUrl = XmlTool.GetText("Pages/Class/P_2_1");
         else
             TempUrl = XmlTool.GetText("Pages/Class/P_2_N");
     }
     else
     {
         if (urlRewrite)
             if (page == 1)
                 TempUrl = XmlTool.GetText("Pages/Class/P_1_1");
             else
                 TempUrl = XmlTool.GetText("Pages/Class/P_1_N");
         else
             if (page == 1)
                 TempUrl = XmlTool.GetText("Pages/Class/P_0_1");
             else
                 TempUrl = XmlTool.GetText("Pages/Class/P_0_N");
     }
     XmlTool.Dispose();
     return TempUrl;
 }
Example #4
0
        static Config()
        {
            string strXmlFile = HttpContext.Current.Server.MapPath("~/_data/config/payment_alipay.config");
            JumboTCMS.DBUtility.XmlControl XmlTool = new JumboTCMS.DBUtility.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 = JumboTCMS.Utils.App.Url + JumboTCMS.Utils.App.Path + "api/alipay/return_url.aspx";
            notify_url = JumboTCMS.Utils.App.Url + JumboTCMS.Utils.App.Path + "api/alipay/notify_url.aspx";

            //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

            //字符编码格式 目前支持 gbk 或 utf-8
            input_charset = "utf-8";

            //签名方式 不需修改
            sign_type = "MD5";

            //访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http
            transport = "https";
        }