예제 #1
0
    private void DisplaySiteAlias()
    {
        System.Text.StringBuilder sJS = new System.Text.StringBuilder();
        Ektron.Cms.SiteAliasApi _refSiteAliasApi = new Ektron.Cms.SiteAliasApi();
        System.Collections.Generic.List<Ektron.Cms.Common.SiteAliasData> siteAliasList = new System.Collections.Generic.List<Ektron.Cms.Common.SiteAliasData>();
        Ektron.Cms.PagingInfo page = new Ektron.Cms.PagingInfo();

        siteAliasList = _refSiteAliasApi.GetList(page, _FolderData.Id);
        viewSiteAliasList.InnerHtml = "<table width=\"100%\">";
        foreach (Ektron.Cms.Common.SiteAliasData item in siteAliasList)
        {
            viewSiteAliasList.InnerHtml = viewSiteAliasList.InnerHtml + "<tr><td><img src=\"" + _ContentApi.AppPath + "images/ui/icons/folderSite.png\" /></td>";
            viewSiteAliasList.InnerHtml = viewSiteAliasList.InnerHtml + "<td>" + item.SiteAliasName + "</td></tr>";
        }
        viewSiteAliasList.InnerHtml = viewSiteAliasList.InnerHtml + "</table>";
    }
예제 #2
0
    private void DisplaySiteAlias()
    {
        System.Text.StringBuilder sJS = new System.Text.StringBuilder();
        Ektron.Cms.SiteAliasApi _refSiteAliasApi = new Ektron.Cms.SiteAliasApi();

        System.Collections.Generic.List<Ektron.Cms.Common.SiteAliasData> siteAliasList;
        Ektron.Cms.PagingInfo pagingInfo = new Ektron.Cms.PagingInfo();
        int index = 0;

        siteAliasList = _refSiteAliasApi.GetList(pagingInfo, _FolderData.Id);
        if (siteAliasList != null)
        {
            sJS.Append("arSiteAliasNames = new Array(");
            foreach (Ektron.Cms.Common.SiteAliasData item in siteAliasList)
            {
                if (item != null)
                {
                    if (index != 0)
                    {
                        sJS.Append(",");
                    }
                    sJS.Append("new item(\'" + item.SiteAliasName + "\'," + index + ")");
                    index++;
                }
            }
            sJS.AppendLine(");");
            sJS.AppendLine("renderSiteAliasNames();");
        }
        Page.ClientScript.RegisterStartupScript(this.GetType(), "renderSiteAliasNames", sJS.ToString(), true);
    }
예제 #3
0
    private void Process_DoFolderUpdate()
    {
        bool bInheritanceIsDif;
        bInheritanceIsDif = false;
        int isub = 0;
        string init_xmlconfig = Request.Form["init_xmlconfig"];
        string init_frm_xmlinheritance = Request.Form["init_frm_xmlinheritance"];
        Ektron.Cms.Content.EkXmlIndexing XmlInd;
        FolderData folder_data = null;
        Ektron.Cms.Content.EkContent m_refContent;
        SubscriptionPropertiesData sub_prop_data = new SubscriptionPropertiesData();
        Collection page_subscription_data = new Collection();
        Collection page_sub_temp = new Collection();
        Array arrSubscriptions;
        int i = 0;
        BlogRollItem[] abriRoll;
        string sCatTemp = "";
        List<string> siteAliasList = new List<string>();
        string[] arSiteAliasList;

        Ektron.Cms.SiteAliasApi _refSiteAliasApi;
        bool subscriptionRestore = false;

        m_refContent = _ContentApi.EkContentRef;
        if (_FolderId == -1)
        {
            _FolderId = _Id; //i.e Request.Form(folder_id.UniqueID)
        }
        _FolderData = _ContentApi.GetFolderById(_Id, true, true);
        _FolderType = _FolderData.FolderType;

        if (Convert.ToString(_FolderId) != "")
        {

            if (_FolderType != (int)Ektron.Cms.Common.EkEnumeration.FolderType.Catalog)
            {
                if (!string.IsNullOrEmpty(Request.Form["web_alert_inherit_checkbox"]))
                {
                    sub_prop_data.BreakInheritance = false;
                    subscriptionRestore = true;
                }
                else
                {
                    sub_prop_data.BreakInheritance = true;
                    if (!string.IsNullOrEmpty(Request.Form["web_alert_restore_inherit_checkbox"]))
                    {
                        subscriptionRestore = true;
                    }
                }

                if (Request.Form["notify_option"] == ("Always"))
                {
                    sub_prop_data.NotificationType = Ektron.Cms.Common.EkEnumeration.SubscriptionPropertyNotificationTypes.Always;
                }
                else if (Request.Form["notify_option"] == ("Initial"))
                {
                    sub_prop_data.NotificationType = Ektron.Cms.Common.EkEnumeration.SubscriptionPropertyNotificationTypes.Initial;
                }
                else if (Request.Form["notify_option"] == ("Never"))
                {
                    sub_prop_data.NotificationType = Ektron.Cms.Common.EkEnumeration.SubscriptionPropertyNotificationTypes.Never;
                }

                sub_prop_data.SuspendNextNotification = false;
                sub_prop_data.SendNextNotification = false;

                sub_prop_data.OptOutID = Convert.ToInt64(Request.Form["notify_optoutid"]);
                if (!string.IsNullOrEmpty((Request.Form["use_message_button"])))
                {
                    sub_prop_data.DefaultMessageID = Convert.ToInt64(Request.Form["notify_messageid"]);
                }
                else
                {
                    sub_prop_data.DefaultMessageID = 0;
                }
                if (!string.IsNullOrEmpty(Request.Form["use_summary_button"]))
                {
                    sub_prop_data.SummaryID = 1;
                }
                else
                {
                    sub_prop_data.SummaryID = 0;
                }
                if (!string.IsNullOrEmpty(Request.Form["use_content_button"]))
                {
                    sub_prop_data.ContentID = Convert.ToInt64(Request.Form["frm_content_id"]);
                }
                else
                {
                    sub_prop_data.ContentID = 0;
                }
                sub_prop_data.UnsubscribeID = Convert.ToInt64(Request.Form["notify_unsubscribeid"]);

                if (!string.IsNullOrEmpty(Request.Form["notify_url"]))
                {
                    sub_prop_data.URL = Request.Form["notify_url"];
                }
                else
                {
                    sub_prop_data.URL = Request.ServerVariables["HTTP_HOST"];
                }

                if (!string.IsNullOrEmpty(Request.Form["notify_weblocation"]))
                {
                    sub_prop_data.FileLocation = Server.MapPath(_ContentApi.AppPath + "subscriptions");
                }
                else
                {
                    sub_prop_data.FileLocation = Server.MapPath(_ContentApi.AppPath + "subscriptions");
                }
                if (!string.IsNullOrEmpty(Request.Form["notify_weblocation"]))
                {
                    sub_prop_data.WebLocation = Request.Form["notify_weblocation"];
                }
                else
                {
                    sub_prop_data.WebLocation = "subscriptions";
                }

                if (!string.IsNullOrEmpty(Request.Form["notify_subject"]))
                {
                    sub_prop_data.Subject = Request.Form["notify_subject"];
                }
                else
                {
                    sub_prop_data.Subject = "";
                }
                if (!string.IsNullOrEmpty(Request.Form["notify_emailfrom"]))
                {
                    sub_prop_data.EmailFrom = Request.Form["notify_emailfrom"];
                }
                else
                {
                    sub_prop_data.EmailFrom = "";
                }

                sub_prop_data.UseContentTitle = "";

                if (!string.IsNullOrEmpty(Request.Form["use_contentlink_button"]))
                {
                    sub_prop_data.UseContentLink = 1;
                }
                else
                {
                    sub_prop_data.UseContentLink = 0;
                }

                if (!string.IsNullOrEmpty(Request.Form["content_sub_assignments"]))
                {
                    arrSubscriptions = Strings.Split(Strings.Trim(Request.Form["content_sub_assignments"]), " ", -1, 0);
                    if (arrSubscriptions.Length > 0)
                    {
                        for (isub = 0; isub <= (arrSubscriptions.Length - 1); isub++)
                        {
                            if (arrSubscriptions.GetValue(isub).ToString() != ",") // ignore empty value when web alerts are inherited
                            {
                                page_sub_temp = new Collection();
                                page_sub_temp.Add(long.Parse(Strings.Mid(arrSubscriptions.GetValue(isub).ToString(), 10)), "ID", null, null);
                                page_subscription_data.Add(page_sub_temp, null, null, null);
                            }
                        }
                    }
                }
                else
                {
                    page_subscription_data = null;
                }
                page_sub_temp = null;
            }

            _PageData = new Collection();
            _PageData.Add(Request.Form["foldername"].Trim(".".ToCharArray()), "FolderName", null, null);
            if (!string.IsNullOrEmpty(Request.Form["isblog"]))
            {
                _PageData.Add(Request.Form[tagline.UniqueID], "FolderDescription", null, null);
            }
            else
            {
                _PageData.Add(Request.Form[folderdescription.UniqueID], "FolderDescription", null, null);
            }
            _PageData.Add(Request.Form[folder_id.UniqueID], "FolderID", null, null);
            if (string.IsNullOrEmpty(Request.Form["TemplateTypeBreak"]))
            {
                _PageData.Add(Request.Form["templatefilename"], "TemplateFileName", null, null);
                //Defect # 54021 - Add failed. Duplicate key value supplied.
                //string templateName = (string)(Request.Form["templatefilename"].Split("(".ToCharArray())[0].TrimEnd());
                //TemplateData[] template_data;
                //template_data = _ContentApi.GetAllTemplates("TemplateFileName");
                //int j = 0;
                //for (j = 0; j <= template_data.Length - 1; j++)
                //{
                //    if (!(Request.Form["tinput_" + template_data[j].Id] == null) && template_data[j].FileName == templateName)
                //    {
                //        _PageData.Add(template_data[i].SubType, "TemplateSubType", null, null);
                //    }
                //}

                // Defect # 56113
                // Also added new hidden field to ascx + changes to TemplateConfigSave() in content.aspx
                if (!String.IsNullOrEmpty(Request.Form["defaultTemplateID"]))
                {
                    TemplateModel templateModel = new TemplateModel();
                    TemplateData template_data = templateModel.FindByID(long.Parse(Request.Form["defaultTemplateID"].ToString()));
                    _PageData.Add(template_data.SubType, "TemplateSubType", null, null);
                }
            }
            else
            {
                _PageData.Add("", "TemplateFileName", null, null);
            }
            //_PageData.Add(Request.Form("templatefilename"), "TemplateFileName")
            _PageData.Add(Request.Form["stylesheet"], "StyleSheet", null, null);
            if (_FolderType != (int)Ektron.Cms.Common.EkEnumeration.FolderType.Calendar)
            {
                if (Strings.LCase(Request.Form["TypeBreak"]) == "on")
                {
                    if (init_frm_xmlinheritance == "0")
                    {
                        bInheritanceIsDif = true;
                    }
                    _PageData.Add(true, "XmlInherited", null, null);
                }
                else
                {
                    if (init_frm_xmlinheritance == "1")
                    {
                        bInheritanceIsDif = true;
                    }
                    _PageData.Add(false, "XmlInherited", null, null);
                }
                _PageData.Add(Request.Form["xmlconfig"], "XmlConfiguration", null, null);
            }
            else
            {
                bInheritanceIsDif = false;
                _PageData.Add(false, "XmlInherited", null, null);
                _PageData.Add(Ektron.Cms.Content.Calendar.WebCalendar.WebEventSmartformId.ToString(), "XmlConfiguration", null, null);
            }

            // handle multitemplates if there are any
            i = 1;
            Collection altinfo = new Collection();
            //While (Request.Form("namealt" + CStr(i)) <> "")
            //    Dim namealt As String = Request.Form("namealt" + CStr(i))
            //    Dim xmlconfigalt As String = Request.Form("xmlconfigalt" + CStr(i))
            //    If (xmlconfigalt = "ignore") Then xmlconfigalt = -1
            //    Dim templatealt As String = Request.Form("templatealt" + CStr(i))
            //    If (templatealt = "ignore") Then templatealt = -1
            //    If ((xmlconfigalt > -1) Or (templatealt > -1)) Then
            //        ' add this multitemplate only if a template or config is selected
            //        Dim multitemplate As New Collection
            //        multitemplate.Add(m_intFolderId, "FolderID")
            //        multitemplate.Add(xmlconfigalt, "CollectionID")
            //        multitemplate.Add(templatealt, "TemplateFileID")
            //        multitemplate.Add("", "CSSFile")
            //        multitemplate.Add(namealt, "Name")
            //        altinfo.Add(multitemplate)
            //    End If
            //    i = i + 1
            //End While
            //m_refContentApi.UpdateFolderContentTemplates(m_intFolderId, altinfo)

            bool isPublishedAsPdf = System.Convert.ToBoolean((Request.Form["publishAsPdf"] == "on") ? true : false);
            _PageData.Add(isPublishedAsPdf, "PublishPdfActive", null, null);

            // handle dynamic replication properties
            if (folder_data == null)
            {
                folder_data = _ContentApi.GetFolderById(_FolderId, true, true);
            }
            if (!string.IsNullOrEmpty(Request.Form["EnableReplication"]) || folder_data.IsCommunityFolder)
            {
                _PageData.Add(1, "EnableReplication", null, null);
            }
            else
            {
                _PageData.Add(0, "EnableReplication", null, null);
            }

            // add domain properties if they're there
            if ((!string.IsNullOrEmpty(Request.Form["IsDomainFolder"])) && (!string.IsNullOrEmpty(Request.Form["DomainProduction"])))
            {
                _PageData.Add(true, "IsDomainFolder", null, null);
                string staging = Request.Form["DomainStaging"];
                string production = Request.Form["DomainProduction"];
                if (staging == null)
                {
                    staging = "";
                }
                if (production == null)
                {
                    production = "";
                }
                if (staging.EndsWith("/"))
                {
                    staging = staging.Substring(0, staging.Length - 1);
                }
                if (production.EndsWith("/"))
                {
                    production = production.Substring(0, production.Length - 1);
                }
                if (staging == "")
                {
                    staging = production;
                }
                _PageData.Add(staging, "DomainStaging", null, null);
                _PageData.Add(production, "DomainProduction", null, null);
            }
            else
            {
                _PageData.Add(false, "IsDomainFolder", null, null);
            }
            if (!string.IsNullOrEmpty(Request.Form["isblog"])) //isblog
            {
                _PageData.Add(true, "isblog", null, null);
                _PageData.Add(Request.Form["blog_visibility"], "blog_visibility", null, null);
                _PageData.Add(Request.Form["blogtitle"], "blogtitle", null, null);
                if (!string.IsNullOrEmpty(Request.Form["postsvisible"]))
                {
                    _PageData.Add(Request.Form["postsvisible"], "postsvisible", null, null);
                }
                else
                {
                    _PageData.Add(-1, "postsvisible", null, null);
                }
                if (!string.IsNullOrEmpty(Request.Form["enable_comments"]))
                {
                    _PageData.Add(true, "enablecomments", null, null);
                }
                else
                {
                    _PageData.Add(false, "enablecomments", null, null);
                }
                if (!string.IsNullOrEmpty(Request.Form["moderate_comments"]))
                {
                    _PageData.Add(true, "moderatecomments", null, null);
                }
                else
                {
                    _PageData.Add(false, "moderatecomments", null, null);
                }
                if (!string.IsNullOrEmpty(Request.Form["require_authentication"]))
                {
                    _PageData.Add(true, "requireauthentication", null, null);
                }
                else
                {
                    _PageData.Add(false, "requireauthentication", null, null);
                }
                _PageData.Add(Request.Form["notify_url"], "notifyurl", null, null);
                if (!string.IsNullOrEmpty(Request.Form["categorylength"]))
                {
                    for (i = 0; i <= (Convert.ToInt64(Request.Form["categorylength"]) - 1); i++)
                    {
                        if (Request.Form["category" + i.ToString()] != "")
                        {
                            if (i == (Convert.ToInt64(Request.Form["categorylength"]) - 1))
                            {
                                sCatTemp += Strings.Replace(Request.Form["category" + i.ToString()], ";", "~@~@~", 1, -1, 0);
                            }
                            else
                            {
                                sCatTemp += (string)(Strings.Replace(Request.Form["category" + i.ToString()], ";", "~@~@~", 1, -1, 0) + ";");
                            }
                        }
                    }
                }
                _PageData.Add(sCatTemp, "blogcategories", null, null);

                if (!string.IsNullOrEmpty(Request.Form["rolllength"]))
                {
                    abriRoll = new BlogRollItem[1];
                    for (i = 0; i <= (Convert.ToInt64(Request.Form["rolllength"]) - 1); i++)
                    {
                        Array.Resize(ref abriRoll, i + 1);
                        if (!string.IsNullOrEmpty(Request.Form["editfolder_linkname" + i.ToString()]) && !string.IsNullOrEmpty(Request.Form["editfolder_url" + i.ToString()]))
                        {
                            //add only if we have something with a name/url
                            abriRoll[i] = new BlogRollItem();
                            abriRoll[i].LinkName = Request.Form["editfolder_linkname" + i.ToString()];
                            abriRoll[i].URL = Request.Form["editfolder_url" + i.ToString()];
                            if (!string.IsNullOrEmpty(Request.Form["editfolder_short" + i.ToString()]))
                            {
                                abriRoll[i].ShortDescription = Request.Form["editfolder_short" + i.ToString()];
                            }
                            else
                            {
                                abriRoll[i].ShortDescription = "";
                            }
                            if (!string.IsNullOrEmpty(Request.Form["editfolder_rel" + i.ToString()]))
                            {
                                abriRoll[i].Relationship = Request.Form["editfolder_rel" + i.ToString()];
                            }
                            else
                            {
                                abriRoll[i].Relationship = "";
                            }
                        }
                        else
                        {
                            abriRoll[i] = null;
                        }
                    }
                    _PageData.Add(abriRoll, "blogroll", null, null);
                }
                else
                {
                    _PageData.Add(null, "blogroll", null, null);
                }
            }
            if ((!string.IsNullOrEmpty(Request.Form["hdnInheritSitemap"])) && (Request.Form["hdnInheritSitemap"].ToString().ToLower() == "true"))
            {
                _PageData.Add(true, "SitemapPathInherit", null, null);
            }
            else
            {
                _PageData.Add(false, "SitemapPathInherit", null, null);
            }

            _PageData.Add(Utilities.DeserializeSitemapPath(Request.Form, this._ContentLanguage), "SitemapPath", null, null);
            if ((!string.IsNullOrEmpty(Request.Form["break_inherit_button"])) && Request.Form["break_inherit_button"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "InheritMetadata", null, null); //break inherit button is check.
            }
            else
            {
                _PageData.Add(0, "InheritMetadata", null, null);
            }
            _PageData.Add(Request.Form["inherit_meta_from"], "InheritMetadataFrom", null, null);

            if ((!string.IsNullOrEmpty(Request.Form["TaxonomyTypeBreak"])) && Request.Form["TaxonomyTypeBreak"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "InheritTaxonomy", null, null);
                if ((!string.IsNullOrEmpty(Request.Form["CategoryRequired"])) && Request.Form["CategoryRequired"].ToString().ToLower() == "on")
                {
                    _PageData.Add(1, "CategoryRequired", null, null);
                }
                else
                {
                    _PageData.Add(Request.Form[parent_category_required.UniqueID], "CategoryRequired", null, null);
                }
            }
            else
            {
                _PageData.Add(0, "InheritTaxonomy", null, null);
                if ((!string.IsNullOrEmpty(Request.Form["CategoryRequired"])) && Request.Form["CategoryRequired"].ToString().ToLower() == "on")
                {
                    _PageData.Add(1, "CategoryRequired", null, null);
                }
                else
                {
                    _PageData.Add(0, "CategoryRequired", null, null);
                }
            }
            string IdRequests = "";
            if ((Request.Form["taxlist"] != null) && Request.Form["taxlist"] != "")
            {
                IdRequests = Request.Form["taxlist"];
            }
            _PageData.Add(IdRequests, "TaxonomyList", null, null);
            _PageData.Add(Request.Form[inherit_taxonomy_from.UniqueID], "InheritTaxonomyFrom", null, null);
            //--------------------IscontentSearchable-----------------------------
            if (Request.Form["chkInheritIscontentSearchable"] != null && Request.Form["chkInheritIscontentSearchable"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "IsContentSearchableInherited", null, null);
                if (Request.Form["chkIscontentSearchable"] != null && Request.Form["chkIscontentSearchable"].ToString().ToLower() == "on")
                {
                    _PageData.Add(1, "IscontentSearchable", null, null);
                }
                else
                {
                    _PageData.Add(Request.Form[current_IscontentSearchable.UniqueID], "IscontentSearchable", null, null);
                }
            }
            else
            {
                _PageData.Add(0, "IsContentSearchableInherited", null, null);
                if (Request.Form["chkIscontentSearchable"] != null && Request.Form["chkIscontentSearchable"].ToString().ToLower() == "on")
                {
                    _PageData.Add(1, "IscontentSearchable", null, null);
                }
                else
                {
                    _PageData.Add(0, "IscontentSearchable", null, null);
                }
            }
            _PageData.Add(Request.Form[inherit_IscontentSearchable_from.UniqueID], "IsContentSearchableInheritedFrom", null, null);
            //--------------------IsContentSearchable End -------------------------
            //-------------------DisplaySettings--------------------
            int totalTabs = 0;
            if (Request.Form["chkInheritIsDisplaySettings"] != null && Request.Form["chkInheritIsDisplaySettings"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "IsDisplaySettingsInherited", null, null);

                if ((Request.Form["chkIsDisplaySettingsAllTabs"] != null && Request.Form["chkIsDisplaySettingsAllTabs"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsMetaData"] != null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on"))
                {
                    if (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Summary;
                    }
                    if (Request.Form["chkIsDisplaySettingsMetaData"] != null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.MetaData;
                    }
                    if (Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Aliasing;
                    }
                    if (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Schedule;
                    }
                    if (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Comment;
                    }
                    if (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Templates;
                    }
                    if (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Taxonomy;
                    }
                    _PageData.Add(totalTabs, "DisplaySettings", null, null);
                }
                else
                {
                    _PageData.Add(Request.Form[current_IsDisplaySettings.UniqueID], "DisplaySettings", null, null);
                }
            }
            else
            {
                _PageData.Add(0, "IsDisplaySettingsInherited", null, null);
                if ((Request.Form["chkIsDisplaySettingsAllTabs"] != null && Request.Form["chkIsDisplaySettingsAllTabs"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsMetaData"] != null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on"))
                {
                    if (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Summary;
                    }
                    if (Request.Form["chkIsDisplaySettingsMetaData"] != null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.MetaData;
                    }
                    if (Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Aliasing;
                    }
                    if (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Schedule;
                    }
                    if (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Comment;
                    }
                    if (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Templates;
                    }
                    if (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on")
                    {
                        totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Taxonomy;
                    }
                    _PageData.Add(totalTabs, "DisplaySettings", null, null);
                }
                else
                {
                    _PageData.Add(1, "DisplaySettings", null, null);
                }
            }
            _PageData.Add(Request.Form[inherit_IsDisplaySettings_from.UniqueID], "DisplaySettingsInheritedFrom", null, null);
            //-------------------DisplaySettingsEnd------------------

            if (Request.Form["chkInheritAliases"] != null && Request.Form["chkInheritAliases"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "InheritAlias", null, null);
                if (Request.Form["chkForceAliasing"] != null && Request.Form["chkForceAliasing"].ToString().ToLower() == "on")
                {
                    _PageData.Add(1, "AliasRequired", null, null);
                }
                else
                {
                    _PageData.Add(Request.Form[current_alias_required.UniqueID], "AliasRequired", null, null);
                }
            }
            else
            {
                _PageData.Add(0, "InheritAlias", null, null);
                if (Request.Form["chkForceAliasing"] != null && Request.Form["chkForceAliasing"].ToString().ToLower() == "on")
                {
                    _PageData.Add(1, "AliasRequired", null, null);
                }
                else
                {
                    _PageData.Add(0, "AliasRequired", null, null);
                }
            }
            _PageData.Add(Request.Form[inherit_alias_from.UniqueID], "InheritAliasFrom", null, null);
            // Update - add flagging items:
            ProcessFlaggingPostBack(_PageData);

            m_refContent.UpdateFolderPropertiesv2_0(_PageData);
            if (folder_data.FolderType == 2) //OrElse folder_data.Id = 0 Avoiding root to be site aliased
            {
                arSiteAliasList = Request.Form["savedSiteAlias"].TrimStart(" ".ToCharArray()).TrimStart(",".ToCharArray()).Split(",".ToCharArray());
                foreach (string aliasStr in arSiteAliasList)
                {
                    if (aliasStr != string.Empty)
                    {
                        siteAliasList.Add(aliasStr);
                    }
                }
                _refSiteAliasApi = new Ektron.Cms.SiteAliasApi();
                _refSiteAliasApi.Save(folder_data.Id, siteAliasList);
            }
            if ((string.IsNullOrEmpty(Request.Form["suppress_notification"])) && (_FolderType != (int)Ektron.Cms.Common.EkEnumeration.FolderType.Catalog))
            {
                m_refContent.UpdateSubscriptionPropertiesForFolder(_FolderId, sub_prop_data);
                m_refContent.UpdateSubscriptionsForFolder(_FolderId, page_subscription_data);
            }
            if (subscriptionRestore)
            {
                m_refContent.DeleteSubscriptionsForContentinFolder(_FolderId);
            }

            if ((init_xmlconfig != Request.Form["xmlconfig"] || bInheritanceIsDif) && _FolderType != (int)Ektron.Cms.Common.EkEnumeration.FolderType.Calendar)
            {
                XmlInd = _ContentApi.EkXmlIndexingRef;
                if (Request.Form["xmlconfig"] != "0" && Request.Form["xmlconfig"] != "")
                {
                    XmlInd.ReIndexAllDoc(Convert.ToInt64(Request.Form["xmlconfig"]));
                }
                else // inheritance has been turned on
                {
                    if (Strings.LCase(Request.Form["frm_xmlinheritance"]) == "on")
                    {
                        folder_data = _ContentApi.GetFolderById(_FolderId, false, true);
                        if (!(folder_data.XmlConfiguration == null))
                        {
                            for (int x = 0; x <= (folder_data.XmlConfiguration.Length - 1); x++)
                            {
                                XmlInd.ReIndexAllDoc(folder_data.XmlConfiguration[x].Id);
                            }
                            //reverting 27535 - do not udpate xml_index table with new xml index search
                        }
                        else
                        {
                            XmlInd.RemoveAllIndexDoc(_FolderId);
                        }
                        //reverting 27535 - do not udpate xml_index table with new xml index search
                    }
                    else
                    {
                        XmlInd.RemoveAllIndexDoc(_FolderId);
                    }
                }

            }

            if (string.IsNullOrEmpty(Request.Form["break_inherit_button"]))
            {
                _CustomFieldsApi.ProcessCustomFields(_FolderId);
            }
            else if ((Request.Form["break_inherit_button"] != null) && Request.Form["break_inherit_button"].ToString().ToLower() == "on")
            {
                if (folder_data.MetaInherited == 0)
                {
                    _CustomFieldsApi.ProcessCustomFields(_FolderId);
                }
            }

            //If (Request.Form("break_inherit_button") IsNot Nothing AndAlso Request.Form("break_inherit_button").ToString().ToLower() = "on") Then
            //    'break inherit button is checked.
            //    _CustomFieldsApi.ProcessCustomFields(_FolderId)
            //ElseIf folder_data.MetaInherited = 0 Then
            //    _CustomFieldsApi.ProcessCustomFields(_FolderId)
            //ElseIf Request.Form("break_inherit_button") Is Nothing Then
            //    _CustomFieldsApi.ProcessCustomFields(_FolderId)
            //End If
        }
        if (Request.Form["oldfoldername"] == Request.Form["foldername"])
        {
            Response.Redirect((string)("content.aspx?LangType=" + _ContentLanguage + "&action=ViewFolder&id=" + Request.Form[folder_id.UniqueID]), false);
        }
        else
        {
            Response.Redirect("content.aspx?TreeUpdated=1&LangType=" + _ContentLanguage + "&action=ViewFolder&id=" + Request.Form[folder_id.UniqueID] + "&reloadtrees=Forms,Content,Library", false);
        }
        if (folder_data.FolderType == (int)Ektron.Cms.Common.EkEnumeration.FolderType.Catalog)
        {
            ProcessProductTemplatesPostBack();
        }
        else
        {
            ProcessContentTemplatesPostBack();
        }
    }
예제 #4
0
    private bool Process_DoAddFolder()
    {
        string tmpPath;
        Collection libSettings;
        string FolderPath;
        Ektron.Cms.Content.EkContent m_refContent;
        SubscriptionPropertiesData sub_prop_data = new SubscriptionPropertiesData();
        Collection page_subscription_data = new Collection();
        Collection page_sub_temp = new Collection();
        Array arrSubscriptions;
        int isub = 0;
        List<string> siteAliasList = new List<string>();
        string[] arSiteAliasList;

        Ektron.Cms.SiteAliasApi _refSiteAliasApi;

        m_refContent = _ContentApi.EkContentRef;
        _PageData = new Collection();
        _PageData.Add(Request.Form["foldername"].Trim(".".ToCharArray()), "FolderName", null, null);
        _PageData.Add(Request.Form["folderdescription"], "FolderDescription", null, null);
        _PageData.Add(_Id, "ParentID", null, null); //pagedata.Add(Request.Form("ParentID"), "ParentID")
        if (string.IsNullOrEmpty(Request.Form["TemplateTypeBreak"]))
        {
            _PageData.Add(Request.Form["templatefilename"], "TemplateFileName", null, null);
            //Defect # 54021 - Add failed. Duplicate key value supplied.
            //string templateName = (string)(Request.Form["templatefilename"].Split("(".ToCharArray())[0].TrimEnd());
            //TemplateData[] template_data;
            //template_data = _ContentApi.GetAllTemplates("TemplateFileName");
            //int j = 0;
            //for (j = 0; j <= template_data.Length - 1; j++)
            //{
            //    if (!(Request.Form["tinput_" + template_data[j].Id] == null) && template_data[j].FileName == templateName)
            //    {
            //        _PageData.Add(template_data[i].SubType, "TemplateSubType", null, null);
            //    }
            //}
            if (Request.Form["templatefilename"].Split("(".ToCharArray()).Length > 1)
            {
                _PageData.Add(EkEnumeration.TemplateSubType.Wireframes, "TemplateSubType", null, null);
            }
            else
            {
                _PageData.Add(EkEnumeration.TemplateSubType.Default, "TemplateSubType", null, null);
            }
        }
        else
        {
            _PageData.Add("", "TemplateFileName", null, null);
        }
        _PageData.Add(Request.Form["stylesheet"], "StyleSheet", null, null);
        if ((Request.Form["hdnInheritSitemap"] != null) && (Request.Form["hdnInheritSitemap"].ToString().ToLower() == "true"))
        {
            _PageData.Add(true, "SitemapPathInherit", null, null);
        }
        else
        {
            _PageData.Add(false, "SitemapPathInherit", null, null);
        }
        _PageData.Add(Utilities.DeserializeSitemapPath(Request.Form, this._ContentLanguage), "SitemapPath", null, null);

        Ektron.Cms.Library.EkLibrary objLib;
        objLib = _ContentApi.EkLibraryRef;
        libSettings = objLib.GetLibrarySettingsv2_0();
        tmpPath = Convert.ToString(libSettings["ImageDirectory"]);
        _PageData.Add(Server.MapPath(tmpPath), "AbsImageDirectory", null, null);
        tmpPath = Convert.ToString(libSettings["FileDirectory"]);
        _PageData.Add(Server.MapPath(tmpPath), "AbsFileDirectory", null, null);

        if (Request.Form["webalert_inherit_button"] != null && Request.Form["webalert_inherit_button"].ToString().Length > 0)
        {
            sub_prop_data.BreakInheritance = false;
        }
        else
        {
            sub_prop_data.BreakInheritance = true;
        }

        if (Request.Form["notify_option"] != null)
        {
            if (Request.Form["notify_option"] == "Always")
            {
                sub_prop_data.NotificationType = Ektron.Cms.Common.EkEnumeration.SubscriptionPropertyNotificationTypes.Always;
            }
            else if (Request.Form["notify_option"] == "Initial")
            {
                sub_prop_data.NotificationType = Ektron.Cms.Common.EkEnumeration.SubscriptionPropertyNotificationTypes.Initial;
            }
            else if (Request.Form["notify_option"] == "Never")
            {
                sub_prop_data.NotificationType = Ektron.Cms.Common.EkEnumeration.SubscriptionPropertyNotificationTypes.Never;
            }
        }

        sub_prop_data.SuspendNextNotification = false;
        sub_prop_data.SendNextNotification = false;

        sub_prop_data.OptOutID = Convert.ToInt64(Request.Form["notify_optoutid"]);
        if (Request.Form["use_message_button"] != null && Request.Form["use_message_button"].ToString().Length > 0)
        {
            sub_prop_data.DefaultMessageID = Convert.ToInt64(Request.Form["notify_messageid"]);
        }
        else
        {
            sub_prop_data.DefaultMessageID = 0;
        }
        if (Request.Form["use_summary_button"] != null && Request.Form["use_summary_button"].ToString().Length > 0)
        {
            sub_prop_data.SummaryID = 1;
        }
        else
        {
            sub_prop_data.SummaryID = 0;
        }
        if (Request.Form["use_content_button"] != null && Request.Form["use_content_button"].ToString().Length > 0)
        {
            sub_prop_data.ContentID = Convert.ToInt64(Request.Form["frm_content_id"]);
        }
        else
        {
            sub_prop_data.ContentID = 0;
        }
        sub_prop_data.UnsubscribeID = Convert.ToInt64(Request.Form["notify_unsubscribeid"]);

        if (Request.Form["notify_url"] != null && Request.Form["notify_url"] != "")
        {
            sub_prop_data.URL = Request.Form["notify_url"];
        }
        else
        {
            sub_prop_data.URL = Request.ServerVariables["HTTP_HOST"];
        }

        if (Request.Form["notify_weblocation"] != null && Request.Form["notify_weblocation"] != "")
        {
            sub_prop_data.FileLocation = Server.MapPath(_ContentApi.AppPath + "subscriptions");
        }
        else
        {
            sub_prop_data.FileLocation = Server.MapPath(_ContentApi.AppPath + "subscriptions");
        }
        if (Request.Form["notify_weblocation"] != null && Request.Form["notify_weblocation"] != "")
        {
            sub_prop_data.WebLocation = Request.Form["notify_weblocation"];
        }
        else
        {
            sub_prop_data.WebLocation = "subscriptions";
        }
        if (Request.Form["notify_subject"] != null && Request.Form["notify_subject"] != "")
        {
            sub_prop_data.Subject = Request.Form["notify_subject"];
        }
        else
        {
            sub_prop_data.Subject = "";
        }
        if (Request.Form["notify_emailfrom"] != null && Request.Form["notify_emailfrom"] != "")
        {
            sub_prop_data.EmailFrom = Request.Form["notify_emailfrom"];
        }
        else
        {
            sub_prop_data.EmailFrom = "";
        }

        sub_prop_data.UseContentTitle = "";

        if (Request.Form["use_contentlink_button"] != null && Request.Form["use_contentlink_button"].ToString().Length > 0)
        {
            sub_prop_data.UseContentLink = 1;
        }
        else
        {
            sub_prop_data.UseContentLink = 0;
        }

        if (Request.Form["content_sub_assignments"] != null && Request.Form["content_sub_assignments"].ToString().Length > 0)
        {
            arrSubscriptions = Strings.Split(Strings.Trim(Request.Form["content_sub_assignments"]), " ", -1, 0);
            if (arrSubscriptions.Length > 0)
            {
                for (isub = 0; isub <= (arrSubscriptions.Length - 1); isub++)
                {
                    page_sub_temp = new Collection();
                    page_sub_temp.Add(long.Parse(Strings.Mid(arrSubscriptions.GetValue(isub).ToString(), 10)), "ID", null, null);
                    page_subscription_data.Add(page_sub_temp, null, null, null);
                }
            }
        }
        else
        {
            page_subscription_data = null;
        }
        page_sub_temp = null;

        Utilities.AddLBpaths(_PageData);

        if (Request.Form["TypeBreak"] != null && Request.Form["TypeBreak"].ToString().ToLower() == "on") // old field name was frm_xmlinheritance in V7.x
        {
            _PageData.Add(true, "XmlInherited", null, null);
        }
        else
        {
            _PageData.Add(false, "XmlInherited", null, null);
        }
        _PageData.Add(Request.Form["xmlconfig"], "XmlConfiguration", null, null);

        bool isPublishedAsPdf = System.Convert.ToBoolean((Request.Form["publishAsPdf"] == "on") ? true : false);
        _PageData.Add(isPublishedAsPdf, "PublishPdfActive", null, null);
        _PageData.Add(false, "PublishHtmlActive", null, null);

        // handle dynamic replication properties
        if (Request.Form["EnableReplication"] != "" || Request.QueryString["type"] == "communityfolder")
        {
            _PageData.Add(Request.Form["EnableReplication"], "EnableReplication", null, null);
        }
        else
        {
            _PageData.Add(0, "EnableReplication", null, null);
        }

        if (string.IsNullOrEmpty(Request.Form["suppress_notification"]))
        {
            _PageData.Add(sub_prop_data, "SubscriptionProperties", null, null);
            _PageData.Add(page_subscription_data, "Subscriptions", null, null);
        }

        if (Request.Form["break_inherit_button"] != null && Request.Form["break_inherit_button"].ToString().ToLower() == "on")
        {
            _PageData.Add(0, "break_inherit_button", null, null); //inherit button is checked => Metadata is inherited from parent.
        }
        else
        {
            _PageData.Add(1, "break_inherit_button", null, null); //break inheritance, do NOT inherit from parent
        }

        _PageData.Add(Request.Form["folder_cfld_assignments"], "folder_cfld_assignments", null, null);

        // add domain properties if they're there
        if ((Request.Form["IsDomainFolder"] != null && Request.Form["IsDomainFolder"] != "") && (Request.Form["DomainProduction"] != null && Request.Form["DomainProduction"] != "") && LicenseManager.IsFeatureEnable(_ContentApi.RequestInformationRef, Feature.MultiSite) && !LicenseManager.IsSiteLimitReached(_ContentApi.RequestInformationRef))
        {
            _PageData.Add(true, "IsDomainFolder", null, null);
            string staging = Request.Form["DomainStaging"];
            string production = Request.Form["DomainProduction"];
            if (staging == null)
            {
                staging = "";
            }
            if (staging.EndsWith("/"))
            {
                staging = staging.Substring(0, staging.Length - 1);
            }

            if (production.EndsWith("/"))
            {
                production = production.Substring(0, production.Length - 1);
            }
            if (staging == "")
            {
                staging = production;
            }
            _PageData.Add(staging, "DomainStaging", null, null);
            _PageData.Add(production, "DomainProduction", null, null);
        }
        else
        {
            _PageData.Add(false, "IsDomainFolder", null, null);
        }
        if (Request.Form["break_inherit_button"] != null && Request.Form["break_inherit_button"].ToString().ToLower() == "on")
        {
            _PageData.Add(1, "InheritMetadata", null, null); //break inherit button is check.
        }
        else
        {
            _PageData.Add(0, "InheritMetadata", null, null);
        }
        _PageData.Add(Request.Form["inherit_meta_from"], "InheritMetadataFrom", null, null);

        if ((Request.QueryString["type"] != null) && (Request.QueryString["type"] == "communityfolder"))
        {
            _PageData.Add(true, "IsCommunityFolder", null, null);
        }
        if (Request.Form["TaxonomyTypeBreak"] != null && Request.Form["TaxonomyTypeBreak"].ToString().ToLower() == "on")
        {
            _PageData.Add(1, "InheritTaxonomy", null, null);
            if (Request.Form["CategoryRequired"] != null && Request.Form["CategoryRequired"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "CategoryRequired", null, null);
            }
            else
            {
                _PageData.Add(Request.Form[current_category_required.UniqueID], "CategoryRequired", null, null);
            }
        }
        else
        {
            _PageData.Add(0, "InheritTaxonomy", null, null);
            if ((Request.Form["CategoryRequired"] != null) && Request.Form["CategoryRequired"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "CategoryRequired", null, null);
            }
            else
            {
                _PageData.Add(0, "CategoryRequired", null, null);
            }
        }
        string IdRequests = "";
        if (Request.Form["taxlist"] != null && Request.Form["taxlist"] != "")
        {
            IdRequests = Request.Form["taxlist"];
        }
        _PageData.Add(IdRequests, "TaxonomyList", null, null);
        if (Request.Form["chkInheritAliases"] != null && Request.Form["chkInheritAliases"].ToString().ToLower() == "on")
        {
            _PageData.Add(1, "InheritAlias", null, null);
            if (Request.Form["chkForceAliasing"] != null && Request.Form["chkForceAliasing"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "AliasRequired", null, null);
            }
            else
            {
                _PageData.Add(Request.Form[current_alias_required.UniqueID], "AliasRequired", null, null);
            }
        }
        else
        {
            _PageData.Add(0, "InheritAlias", null, null);
            if (Request.Form["chkForceAliasing"] != null && Request.Form["chkForceAliasing"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "AliasRequired", null, null);
            }
            else
            {
                _PageData.Add(0, "AliasRequired", null, null);
            }
        }
        _PageData.Add(Request.Form[inherit_alias_from.UniqueID], "InheritAliasFrom", null, null);
        //-----------------IscontentSearchable-----------------------
        if (Request.Form["chkInheritIscontentSearchable"] != null && Request.Form["chkInheritIscontentSearchable"].ToString().ToLower() == "on")
        {
            _PageData.Add(1, "IsContentSearchableInherited", null, null);
            if (Request.Form["chkIscontentSearchable"] != null && Request.Form["chkIscontentSearchable"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "IscontentSearchable", null, null);
            }
            else
            {
                _PageData.Add(Request.Form[current_IscontentSearchable.UniqueID], "IscontentSearchable", null, null);
            }
        }
        else
        {
            _PageData.Add(0, "IsContentSearchableInherited", null, null);
            if (Request.Form["chkIscontentSearchable"] != null && Request.Form["chkIscontentSearchable"].ToString().ToLower() == "on")
            {
                _PageData.Add(1, "IscontentSearchable", null, null);
            }
            else
            {
                _PageData.Add(0, "IscontentSearchable", null, null);
            }
        }
        _PageData.Add(Request.Form[inherit_IscontentSearchable_from.UniqueID], "IsContentSearchableInheritedFrom", null, null);
        //-----------------IsContentSearchable End-------------------
        //-------------------DisplaySettings--------------------
        int totalTabs = 0;
        if (Request.Form["chkInheritIsDisplaySettings"] != null && Request.Form["chkInheritIsDisplaySettings"].ToString().ToLower() == "on")
        {
            _PageData.Add(1, "IsDisplaySettingsInherited", null, null);

            if ((Request.Form["chkIsDisplaySettingsAllTabs"] != null && Request.Form["chkIsDisplaySettingsAllTabs"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsMetaData"] != null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on"))
            {
                if (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Summary;
                }
                if (Request.Form["chkIsDisplaySettingsMetaData"] !=  null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.MetaData;
                }
                if (Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Aliasing;
                }
                if (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Schedule;
                }
                if (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Comment;
                }
                if (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Templates;
                }
                if (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Taxonomy;
                }
                _PageData.Add(totalTabs, "DisplaySettings", null, null);
            }
            else
            {
                _PageData.Add(Request.Form[current_IsDisplaySettings.UniqueID], "DisplaySettings", null, null);
            }
        }
        else
        {
            _PageData.Add(0, "IsDisplaySettingsInherited", null, null);
           if ((Request.Form["chkIsDisplaySettingsAllTabs"] != null && Request.Form["chkIsDisplaySettingsAllTabs"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsMetaData"] != null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on" )||( Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on" )|| (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on") || (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on"))
            {
                if (Request.Form["chkIsDisplaySettingsSummary"] != null && Request.Form["chkIsDisplaySettingsSummary"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Summary;
                }
                if (Request.Form["chkIsDisplaySettingsMetaData"] != null && Request.Form["chkIsDisplaySettingsMetaData"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.MetaData;
                }
                if (Request.Form["chkIsDisplaySettingsAliasing"] != null && Request.Form["chkIsDisplaySettingsAliasing"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Aliasing;
                }
                if (Request.Form["chkIsDisplaySettingsSchedule"] != null && Request.Form["chkIsDisplaySettingsSchedule"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Schedule;
                }
                if (Request.Form["chkIsDisplaySettingsComment"] != null && Request.Form["chkIsDisplaySettingsComment"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Comment;
                }
                if (Request.Form["chkIsDisplaySettingsTemplates"] != null && Request.Form["chkIsDisplaySettingsTemplates"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Templates;
                }
                if (Request.Form["chkIsDisplaySettingsTaxonomy"] != null && Request.Form["chkIsDisplaySettingsTaxonomy"].ToString().ToLower() == "on")
                {
                    totalTabs += (int)EkEnumeration.FolderTabDisplaySettings.Taxonomy;
                }
                _PageData.Add(totalTabs, "DisplaySettings", null, null);
            }
            else
            {
                _PageData.Add(1, "DisplaySettings", null, null);
            }
        }
        _PageData.Add(Request.Form[inherit_IsDisplaySettings_from.UniqueID], "DisplaySettingsInheritedFrom", null, null);
        //-------------------DisplaySettingsEnd------------------
        _PageData.Add(Request.Form[inherit_taxonomy_from.UniqueID], "InheritTaxonomyFrom", null, null);

        // Update - add flagging items:
        ProcessFlaggingPostBack(_PageData);

        if (m_refContent.DoesFolderExistsWithName((string)_PageData["FolderName"], (long)_PageData["ParentID"])) {
            ShowError(MessageHelper.GetMessage("com: subfolder already exists"));
            return false;
        } else {
        m_refContent.AddContentFolderv2_0(ref _PageData);
        }

        //_CustomFieldsApi.ProcessCustomFields(_PageData("FolderID"))

        FolderPath = m_refContent.GetFolderPath(Convert.ToInt64(_PageData["ParentID"]));
        if ((FolderPath.Substring(FolderPath.Length - 1, 1) == "\\"))
        {
            FolderPath = FolderPath.Substring(FolderPath.Length - (FolderPath.Length - 1));
        }
        FolderPath = FolderPath.Replace("\\", "\\\\");
        string close;
        close = Request.QueryString["close"];
        if (close == "true")
        {
            Response.Redirect("close.aspx", false);
        }
        else if (Request.Form[frm_callingpage.UniqueID] == "cmsform.aspx")
        {
            Response.Redirect((string)("cmsform.aspx?LangType=" + _ContentLanguage + "&action=ViewAllFormsByFolderID&folder_id=" + _Id + "&reloadtrees=Forms,Content,Library&TreeNav=" + FolderPath), false);
        }
        else
        {
            Response.Redirect((string)("content.aspx?LangType=" + _ContentLanguage + "&action=ViewContentByCategory&id=" + _Id + "&reloadtrees=Forms,Content,Library&TreeNav=" + FolderPath), false);
        }

        // find the folder_id we just created now...
        _FolderId = _ContentApi.EkContentRef.GetFolderID((string)(_ContentApi.EkContentRef.GetFolderPath(Convert.ToInt64(_PageData["ParentID"])) + "\\" + Request.Form["foldername"].Trim(".".ToCharArray())));
        if (_Type == "site")
        {
            arSiteAliasList = Request.Form["savedSiteAlias"].TrimStart(" ".ToCharArray()).TrimStart(",".ToCharArray()).Split(",".ToCharArray());
            foreach (string aliasStr in arSiteAliasList)
            {
                if (aliasStr != string.Empty)
                {
                    siteAliasList.Add(aliasStr);
                }
            }
            _refSiteAliasApi = new Ektron.Cms.SiteAliasApi();
            _refSiteAliasApi.Save(_FolderId, siteAliasList);
        }

        return true;
    }