Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Call.SetBreadCrumb(Master, "<li>工作台</li><li>系统设置</li><li>方案管理</li><li class=\"active\">发布当前站点方案</li>");
     if (!IsPostBack)
     {
         string    tempdir  = SiteConfig.SiteOption.TemplateDir;
         string[]  temparr  = tempdir.Split(new string[] { @"/" }, StringSplitOptions.None);
         string    template = SiteConfig.SiteMapath() + temparr[1];
         DataTable newtable = FileSystemObject.GetDirectorySmall(template);
         if (newtable != null && newtable.Rows.Count > 0)
         {
             for (int i = 0; i < newtable.Rows.Count; i++)
             {
                 this.tempdirlist.Items.Add(new ListItem(newtable.Rows[i]["name"].ToString(), newtable.Rows[i]["name"].ToString()));
             }
         }
     }
 }
Esempio n. 2
0
 private void MyBind()
 {
     RPT.DataSource = FileSystemObject.GetDirectorySmall(SiteConfig.SiteMapath() + "Template");
     RPT.DataBind();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(ProDirName) || "setdir".Equals(Action))
            {
                function.Script(this, "showconfig('1');");
            }
            if (!B_ARoleAuth.Check(ZLEnum.Auth.other, "SiteConfig"))
            {
                function.WriteErrMsg("没有权限进行此项操作");
            }
            if (!IsPostBack)
            {
                txtStylePath.Text        = SiteConfig.SiteOption.StylePath;
                txtAdvertisementDir.Text = SiteConfig.SiteOption.AdvertisementDir;
                languages.SelectedValue  = SiteConfig.SiteOption.Language;

                TraditionalChinese.SelectedValue = System.Configuration.ConfigurationManager.AppSettings["TraditionalChinese"];
                SiteManageMode_Chk.Checked       = SiteConfig.SiteOption.SiteManageMode == 1;
                EnableSiteManageCod.Checked      = SiteConfig.SiteOption.EnableSiteManageCode;

                EnableSoftKey.Checked     = SiteConfig.SiteOption.EnableSoftKey;
                EnableUploadFiles.Checked = SiteConfig.SiteOption.EnableUploadFiles;
                rdoIapTrue.Checked        = SiteConfig.SiteOption.IsAbsoluatePath;
                rdoBtnLSh.Checked         = SiteConfig.SiteOption.RegPageStart;

                if (SiteConfig.SiteOption.IsOpenHelp == "0")
                {
                    DeleteLocal.Text   = "同时删除本地帮助文件";
                    PromptHelp.Visible = false;
                }
                else
                {
                    DeleteLocal.Text   = "从云端下载帮助文件放到Manage/help下";
                    PromptHelp.Visible = true;
                }
                MailPermission.Checked = SiteConfig.SiteOption.MailPermission == "1" ? true : false;
                FileN.Items[Convert.ToInt32(SiteConfig.SiteOption.FileN)].Selected = true;
                DomainMerge_Chk.Checked = SiteConfig.SiteOption.DomainMerge;

                //云盘权限
                for (int i = 0; i < cloud_ChkList.Items.Count && !string.IsNullOrEmpty(SiteConfig.SiteOption.Cloud_Auth); i++)
                {
                    cloud_ChkList.Items[i].Selected = SiteConfig.SiteOption.Cloud_Auth.Contains(cloud_ChkList.Items[i].Value);
                }
                //多用户网店
                IsMall.Checked = SiteConfig.SiteOption.IsMall;

                //是否开启短信
                OpenSendMessage.Checked = SiteConfig.SiteOption.OpenSendMessage;
                cloudLeadTips.Checked   = SiteConfig.SiteOption.CloudLeadTips == "1" ? true : false;

                //快递跟踪,订单提醒
                //if (SiteConfig.SiteOption.KDAPI == 0)
                //{
                //    RB_switch.Checked = false;
                //}
                //else
                //{
                //    RB_switch.Checked = true;
                //    Api.Style.Add("display", "block");
                //}
                KDKey_T.Text = SiteConfig.SiteOption.KDKey;
                SetCheckVal(OrderMsg_Chk, SiteConfig.SiteOption.OrderMsg_Chk);
                SetCheckVal(OrderMasterMsg_Chk, SiteConfig.SiteOption.OrderMasterMsg_Chk);
                SetCheckVal(OrderMasterEmail_Chk, SiteConfig.SiteOption.OrderMasterEmail_Chk);
                ReturnDate_T.Text                 = SiteConfig.SiteOption.THDate.ToString();
                OrderMsg_ordered_T.Text           = SetJsonVal(SiteConfig.SiteOption.OrderMsg_Tlp, "ordered");
                OrderMsg_payed_T.Text             = SetJsonVal(SiteConfig.SiteOption.OrderMsg_Tlp, "payed");
                OrderMasterMsg_ordered_Tlp.Text   = SetJsonVal(SiteConfig.SiteOption.OrderMasterMsg_Tlp, "ordered");
                OrderMasterMsg_payed_Tlp.Text     = SetJsonVal(SiteConfig.SiteOption.OrderMasterMsg_Tlp, "payed");
                OrderMasterEmail_ordered_Tlp.Text = SetJsonVal(SiteConfig.SiteOption.OrderMasterEmail_Tlp, "ordered");
                OrderMasterEmail_payed_Tlp.Text   = SetJsonVal(SiteConfig.SiteOption.OrderMasterEmail_Tlp, "payed");
                /*-------------------------------------------------------*/
                EditVer.SelectedValue = SiteConfig.SiteOption.EditVer;
                //freedomain.Text = SiteConfig.SiteOption.freedomain;
                DomainRoute_chk.Checked = SiteConfig.SiteOption.DomainRoute == "1" ? true : false;
                //Savadaylog.Text = SiteConfig.SiteOption.Savadaylog;
                //Savanumlog.Text = SiteConfig.SiteOption.Savanumlog;
                IndexEx.Text       = SiteConfig.SiteOption.IndexEx;
                SiteCollKey_T.Text = SiteConfig.SiteOption.SiteCollKey;
                PayType_Hid.Value  = SiteConfig.SiteOption.SiteID;
                //IsManageReg.Checked = SiteConfig.SiteOption.RegManager == 1;
                safeDomain_Chk.Checked = SiteConfig.SiteOption.SafeDomain.Equals("1");
                txtSiteManageCode.Text = SiteConfig.SiteOption.SiteManageCode;
                if (!string.IsNullOrEmpty(ProDirName))
                {
                    txtCssDir.Text = "/Template/" + ProDirName + "/style";
                }
                else
                {
                    DataTable Dfileinfo = FileSystemObject.GetDirectorySmall(function.VToP("/Template/"));
                    for (int i = 0; i < Dfileinfo.Rows.Count; i++)
                    {
                        ListItem li = new ListItem("/Template/" + Dfileinfo.Rows[i]["name"]);
                        if (li.Text.Equals(SiteConfig.SiteOption.TemplateDir))
                        {
                            li.Selected = true;
                        }
                        DropTemplateDir.Items.Add(li);
                    }
                    txtCssDir.Text = SiteConfig.SiteOption.CssDir;
                }
                if (!string.IsNullOrEmpty(SiteConfig.SiteOption.TemplateDir))
                {
                    IndexTemplate_DP_hid.Value = SiteConfig.SiteOption.IndexTemplate.Trim('/');
                }
                txtProjectServer.Text     = SiteConfig.SiteOption.ProjectServer.Trim();
                txtCatalog.Text           = SiteConfig.SiteOption.GeneratedDirectory;
                txtPdf.Text               = SiteConfig.SiteOption.PdfDirectory;//生成PDF目录
                ShopTemplate_DP_hid.Value = SiteConfig.SiteOption.ShopTemplate.Trim('/');
                txtUploadDir.Text         = SiteConfig.SiteOption.UploadDir;
                txtUploadFileExts.Text    = SiteConfig.SiteOption.UploadFileExts;
                txtUploadFileMaxSize.Text = webhelper.GetMaxFile();
                TxtUpPicExt.Text          = SiteConfig.SiteOption.UploadPicExts;
                TxtUpPicSize.Text         = SiteConfig.SiteOption.UploadPicMaxSize.ToString();
                TxtUpMediaExt.Text        = SiteConfig.SiteOption.UploadMdaExts;
                TxtUpMediaSize.Text       = SiteConfig.SiteOption.UploadMdaMaxSize.ToString();
                TxtUpFlashSize.Text       = SiteConfig.SiteOption.UploadFlhMaxSize.ToString();
                TxtSensitivity.Text       = SiteConfig.SiteOption.Sensitivity;
                //短消息提示
                if (SiteConfig.SiteOption.UAgent)
                {
                    UAgent.Checked = true;
                    uaMag.Visible  = true;
                }
                else
                {
                    UAgent.Checked = false;
                    uaMag.Visible  = false;
                }

                OpenMessage.Checked = SiteConfig.SiteOption.OpenMessage == 1 ? true : false;
                //标题查重
                //IsRepet.Checked = SiteConfig.SiteOption.FileRj == 1 ? true : false;
                DupTitleNum_T.Text       = SiteConfig.SiteOption.DupTitleNum.ToString();
                rdoIsSensitivity.Checked = SiteConfig.SiteOption.IsSensitivity == 1 ? true : false;
                OpenAudit.Checked        = SiteConfig.SiteOption.OpenAudit == 1 ? true : false;
                //商城配置
                OpenMoneySel_Chk.Checked = SiteConfig.SiteOption.OpenMoneySel;
                IsCheckPay.Checked       = SiteConfig.ShopConfig.IsCheckPay == 1;
                //txtSetPrice.Text = SiteConfig.ShopConfig.OrderNum.ToString();
                ItemRegular_T.Text  = SiteConfig.ShopConfig.ItemRegular;
                OrderExpired_T.Text = SiteConfig.ShopConfig.OrderExpired.ToString();
                PointRatio_T.Text   = SiteConfig.ShopConfig.PointRatiot.ToString();
                PointRate_T.Text    = SiteConfig.ShopConfig.PointRate.ToString();
                //EnablePointBuy_Chk.Checked = SiteConfig.ShopConfig.EnablePointBuy;
                Videourl.Text       = SiteConfig.SiteOption.Videourl;
                FlexKey.Text        = SiteConfig.SiteOption.FlexKey;
                APPAuth_T.Text      = SiteConfig.SiteOption.WxAppID;
                DeleteLocal.Checked = SiteConfig.SiteOption.DeleteLocal;
                IsOpenHelp.Checked  = SiteConfig.SiteOption.IsOpenHelp == "1" ? true : false;
                LoggedUrl_T.Text    = SiteConfig.SiteOption.LoggedUrl;
                CommentRule.Text    = SiteConfig.UserConfig.CommentRule.ToString();
                MastMoney_T.Text    = SiteConfig.SiteOption.MastMoney.ToString("F2");
                //---------------------
                XmlDocument xdoc = new XmlDocument();
                xdoc.Load(Server.MapPath("/Config/globalization.config"));
                XmlNode langNode = xdoc.SelectSingleNode("globalization");
                languages.SelectedValue = langNode.Attributes["uiCulture"].InnerText;
                Call.SetBreadCrumb(Master, "<li><a href='SiteInfo.aspx'>" + Resources.L.系统设置 + "</a></li><li><a href='SiteInfo.aspx'>" + Resources.L.网站配置 + "</a></li><li class=\"active\"><a href='SiteOption.aspx'>" + Resources.L.网站参数配置 + "</a></li>" + Call.GetHelp(3));
            }
        }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string prodirName = Request.QueryString["prodirName"];

        if (prodirName != null)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", "showconfig('1');", true);
        }
        if (!B_ARoleAuth.Check(ZLEnum.Auth.other, "SiteConfig"))
        {
            function.WriteErrMsg("没有权限进行此项操作");
        }
        if (!IsPostBack)
        {
            B_Node nll = new B_Node();
            txtStylePath.Text        = SiteConfig.SiteOption.StylePath;
            txtAdvertisementDir.Text = SiteConfig.SiteOption.AdvertisementDir;
            languages.SelectedValue  = SiteConfig.SiteOption.Language;

            TraditionalChinese.SelectedValue = System.Configuration.ConfigurationManager.AppSettings["TraditionalChinese"];
            //rblManage.SelectedValue = SiteConfig.SiteOption.SiteManageMode + "";
            EnableSiteManageCod.Checked = SiteConfig.SiteOption.EnableSiteManageCode;

            EnableSoftKey.Checked     = SiteConfig.SiteOption.EnableSoftKey;
            EnableUploadFiles.Checked = SiteConfig.SiteOption.EnableUploadFiles;

            if (SiteConfig.SiteOption.IsAbsoluatePath)
            {
                rdoIapTrue.Checked = true;
            }
            else
            {
                rdoIapFalse.Checked = true;
            }

            rdoBtnLSh.Checked = SiteConfig.SiteOption.RegPageStart;

            if (SiteConfig.SiteOption.IsOpenHelp == "0")
            {
                DeleteLocal.Text   = "同时删除本地帮助文件";
                PromptHelp.Visible = false;
            }
            else
            {
                DeleteLocal.Text   = "从云端下载帮助文件放到Manage/help下";
                PromptHelp.Visible = true;
            }
            MailPermission.Checked = SiteConfig.SiteOption.MailPermission == "1"?true:false;
            FileN.Items[Convert.ToInt32(SiteConfig.SiteOption.FileN)].Selected = true;
            //个人空间设置
            IsZone.Checked = SiteConfig.SiteOption.IsZone;

            //云盘权限
            for (int i = 0; i < cloud_ChkList.Items.Count && !string.IsNullOrEmpty(SiteConfig.SiteOption.Cloud_Auth); i++)
            {
                cloud_ChkList.Items[i].Selected = SiteConfig.SiteOption.Cloud_Auth.Contains(cloud_ChkList.Items[i].Value);
            }
            //多用户网店
            IsMall.Checked = SiteConfig.SiteOption.IsMall;

            //是否开启短信
            OpenSendMessage.Checked = SiteConfig.SiteOption.OpenSendMessage;

            cloudLeadTips.Checked = SiteConfig.SiteOption.CloudLeadTips == "1" ? true : false;

            //短消息提示
            //SMSTips.Checked=SiteConfig.SiteOption.SMSTips;

            //快递跟踪,订单提醒
            if (SiteConfig.SiteOption.KDAPI == 0)
            {
                RB_switch.Checked = false;
            }
            else
            {
                RB_switch.Checked = true;
                Api.Style.Add("display", "block");
            }
            TB_Api.Text = SiteConfig.SiteOption.KDKey;
            SetCheckVal(OrderMsg_Chk, SiteConfig.SiteOption.OrderMsg_Chk);
            SetCheckVal(OrderMasterMsg_Chk, SiteConfig.SiteOption.OrderMasterMsg_Chk);
            SetCheckVal(OrderMasterEmail_Chk, SiteConfig.SiteOption.OrderMasterEmail_Chk);
            ReturnDate_T.Text                 = SiteConfig.SiteOption.THDate.ToString();
            OrderMsg_ordered_T.Text           = SetJsonVal(SiteConfig.SiteOption.OrderMsg_Tlp, "ordered");
            OrderMsg_payed_T.Text             = SetJsonVal(SiteConfig.SiteOption.OrderMsg_Tlp, "payed");
            OrderMasterMsg_ordered_Tlp.Text   = SetJsonVal(SiteConfig.SiteOption.OrderMasterMsg_Tlp, "ordered");
            OrderMasterMsg_payed_Tlp.Text     = SetJsonVal(SiteConfig.SiteOption.OrderMasterMsg_Tlp, "payed");
            OrderMasterEmail_ordered_Tlp.Text = SetJsonVal(SiteConfig.SiteOption.OrderMasterEmail_Tlp, "ordered");
            OrderMasterEmail_payed_Tlp.Text   = SetJsonVal(SiteConfig.SiteOption.OrderMasterEmail_Tlp, "payed");
            /*-------------------------------------------------------*/
            EditVer.SelectedValue = SiteConfig.SiteOption.EditVer;
            //freedomain.Text = SiteConfig.SiteOption.freedomain;
            OpenLog.Checked = SiteConfig.SiteOption.OpenLog == "1"?true:false;
            //Savadaylog.Text = SiteConfig.SiteOption.Savadaylog;
            //Savanumlog.Text = SiteConfig.SiteOption.Savanumlog;
            IndexEx.Text       = SiteConfig.SiteOption.IndexEx;
            SiteCollKey_T.Text = SiteConfig.SiteOption.SiteCollKey;
            PayType_Hid.Value  = SiteConfig.SiteOption.SiteID;
            //IsManageReg.Checked = SiteConfig.SiteOption.RegManager == 1;
            //safeDomainT.Text = SiteConfig.SiteOption.SafeDomain;
            txtSiteManageCode.Text = SiteConfig.SiteOption.SiteManageCode;
            if (prodirName != null)
            {
                //Text = "/Template/" + prodirName;
                txtCssDir.Text = "/Template/" + prodirName + "/style";
            }
            else
            {
                DataTable Dfileinfo = FileSystemObject.GetDirectorySmall(function.VToP("/Template/"));
                for (int i = 0; i < Dfileinfo.Rows.Count; i++)
                {
                    ListItem li = new ListItem("/Template/" + Dfileinfo.Rows[i]["name"]);
                    if (li.Text.Equals(SiteConfig.SiteOption.TemplateDir))
                    {
                        li.Selected = true;
                    }
                    DropTemplateDir.Items.Add(li);
                }
                //txtTemplateDir.Text = SiteConfig.SiteOption.TemplateDir;
                txtCssDir.Text = SiteConfig.SiteOption.CssDir;
            }
            if (!string.IsNullOrEmpty(SiteConfig.SiteOption.TemplateDir))
            {
                BindDP(SiteConfig.SiteOption.TemplateDir);
                IndexTemplate_DP.SelectedValue = SiteConfig.SiteOption.IndexTemplate;
            }
            txtProjectServer.Text         = SiteConfig.SiteOption.ProjectServer.Trim();
            txtCatalog.Text               = SiteConfig.SiteOption.GeneratedDirectory;
            txtPdf.Text                   = SiteConfig.SiteOption.PdfDirectory;//生成PDF目录
            ShopTemplate_DP.SelectedValue = SiteConfig.SiteOption.ShopTemplate;
            txtUploadDir.Text             = SiteConfig.SiteOption.UploadDir;
            txtUploadFileExts.Text        = SiteConfig.SiteOption.UploadFileExts;
            txtUploadFileMaxSize.Text     = webhelper.GetMaxFile();

            TxtUpPicExt.Text  = SiteConfig.SiteOption.UploadPicExts;
            TxtUpPicSize.Text = SiteConfig.SiteOption.UploadPicMaxSize.ToString();

            TxtUpMediaExt.Text  = SiteConfig.SiteOption.UploadMdaExts;
            TxtUpMediaSize.Text = SiteConfig.SiteOption.UploadMdaMaxSize.ToString();

            TxtUpFlashSize.Text = SiteConfig.SiteOption.UploadFlhMaxSize.ToString();

            TxtSensitivity.Text = SiteConfig.SiteOption.Sensitivity;
            //短消息提示
            if (SiteConfig.SiteOption.UAgent)
            {
                UAgent.Checked = true;
                uaMag.Visible  = true;
            }
            else
            {
                UAgent.Checked = false;
                uaMag.Visible  = false;
            }

            OpenMessage.Checked = SiteConfig.SiteOption.OpenMessage == 1?true:false;
            //标题查重
            IsRepet.Checked          = SiteConfig.SiteOption.FileRj == 1 ? true : false;
            DupTitleNum_T.Text       = SiteConfig.SiteOption.DupTitleNum.ToString();
            rdoIsSensitivity.Checked = SiteConfig.SiteOption.IsSensitivity == 1?true:false;
            OpenAudit.Checked        = SiteConfig.SiteOption.OpenAudit == 1 ? true : false;
            //商城配置
            OpenMoneySel_Chk.Checked = SiteConfig.SiteOption.OpenMoneySel;
            IsCheckPay.Checked       = SiteConfig.ShopConfig.IsCheckPay == 1;
            //txtSetPrice.Text = SiteConfig.ShopConfig.OrderNum.ToString();
            ItemRegular_T.Text  = SiteConfig.ShopConfig.ItemRegular;
            OrderExpired_T.Text = SiteConfig.ShopConfig.OrderExpired.ToString();
            Videourl.Text       = SiteConfig.SiteOption.Videourl;
            FlexKey.Text        = SiteConfig.SiteOption.FlexKey;
            APPAuth_T.Text      = SiteConfig.SiteOption.WxAppID;
            MastMoney.Text      = SiteConfig.SiteOption.MastMoney.ToString("F2");
            DeleteLocal.Checked = SiteConfig.SiteOption.DeleteLocal;
            IsOpenHelp.Checked  = SiteConfig.SiteOption.IsOpenHelp == "1"?true:false;
            CommentRule.Text    = SiteConfig.UserConfig.CommentRule.ToString();
            // Getgooglemap();
            Call.SetBreadCrumb(Master, "<li><a href='SiteInfo.aspx'>系统设置</a></li><li><a href='SiteInfo.aspx'>网站配置</a></li><li class=\"active\"><a href='SiteOption.aspx'>网站参数配置</a></li>" + Call.GetHelp(3));
        }
    }