Exemplo n.º 1
0
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        Ektron.Cms.ContentAPI refContApi = new Ektron.Cms.ContentAPI();
        Ektron.Cms.SiteAPI refSiteApi = new Ektron.Cms.SiteAPI();
        Ektron.Cms.Site.EkSite refSite = new Ektron.Cms.Site.EkSite(refContApi.RequestInformationRef);
        long folder = 0;
        @internal.Text = refSite.GetEditorInternal();
        if (LCaseQueryString("mode") == "forum")
        {
            strButtons = Request.QueryString["toolButtons"];
            string[] arTools = strButtons.ToLower().Split(",".ToCharArray());
            foreach (string Item in arTools)
            {
                if (!(options.ContainsKey(Item)))
                {
                    options.Add(Item, Item);
                }
            }
        }
        Response.ContentType = "text/xml";
        m_refMsg = refSiteApi.EkMsgRef;
        settings_data = refSiteApi.GetSiteVariables(-1);
        refSite = refContApi.EkSiteRef;
        FontList = refContApi.GetFontConfigList();
        EKSLK = refSite.GetInternal();
        AppeWebPath = refContApi.AppPath + refContApi.AppeWebPath;

        if (LCaseQueryString("FormToolbarVisible") == "true")
        {
            FormToolbarVisible = "true";
            FormToolbarEnabled = "true";
        }
        else
        {
            FormToolbarVisible = "false";
            FormToolbarEnabled = "true";
        }
        if ("0" == LCaseQueryString("wiki"))
        {
            bWikiButton = bool.Parse("false");
        }
        else
        {
            bWikiButton = bool.Parse("true");
        }
        //Set the state for word styles
        if (settings_data.PreserveWordStyles == true)
        {
            PresWrdStyl = "true";
        }
        else
        {
            PresWrdStyl = "false";
        }
        if (settings_data.PreserveWordClasses == true)
        {
            PresWrdCls = "true";
        }
        else
        {
            PresWrdCls = "false";
        }
        switch (settings_data.Accessibility)
        {
            case "1":
                sAccess = "loose";
                bAccessEval = "true";
                break;
            case "2":
                sAccess = "strict";
                bAccessEval = "true";
                break;
            default:
                sAccess = "none";
                bAccessEval = "false";
                break;
        }
        NoSrcView = LCaseQueryString("nosrc");
        mode = LCaseQueryString("mode");
        if (mode == "")
        {
            mode = "wysiwyg";
        }

        if (mode == "forum")
        {
            mode = "wysiwyg";
            IsForum = true;
        }

        if ("datadesign" == mode || "dataentry" == mode)
        {
            DefaultGetContentType = "datadesignpackage";
        }
        else if ("formdesign" == mode)
        {
            DefaultGetContentType = "designpage";
        }

        ExtUI = LCaseQueryString("extui");

        InterfaceName = LCaseQueryString("InterfaceName");
        if ("" == InterfaceName)
        {
            if ("datadesign" == mode || "formdesign" == mode || "dataentry" == mode)
            {
                InterfaceName = mode;
                FormToolbarEnabled = "false";
            }
            else
            {
                InterfaceName = "standard";
            }
        }
        else if ("none" == InterfaceName)
        {
            MinimalFeatureSet = false;
            FormToolbarEnabled = "false";
        }
        else if ("minimal" == InterfaceName || "calendar" == InterfaceName || "task" == InterfaceName)
        {
            if (strButtons.Length > 0 && true == options.ContainsKey("wmv"))
            {
                MinimalFeatureSet = false;
            }
            else
            {
                MinimalFeatureSet = true;
            }
            FormToolbarEnabled = "false";
        }

        if (settings_data.EnableFontButtons || true == options.ContainsKey("fontmenu"))
        {
            bEnableFontButtons = true;
        }

        string strFolder;
        strFolder = Request.QueryString["folder"];
        if (strFolder != null)
        {
            if (Information.IsNumeric(strFolder))
            {
                folder = Convert.ToInt64(strFolder);
            }
        }
        Ektron.Cms.LibraryConfigData lib_settings;
        extensions = "";
        try
        {
            // Only make this call if we are logged in
            Ektron.Cms.ContentAPI refContentApi = new Ektron.Cms.ContentAPI();
            Ektron.Cms.Content.EkContent refContent;
            refContent = refContentApi.EkContentRef;

            if (refContent.IsAllowed(0, 0, "users", "IsLoggedIn", 0))
            {
                // An exception will be thrown if the user is not authenticated.
                lib_settings = refContApi.GetLibrarySettings(folder);
                if (lib_settings != null)
                {
                    extensions = lib_settings.ImageExtensions + "," + lib_settings.FileExtensions;
                }
            }
        }
        catch (Exception)
        {
            // ignore error
        }

        ContentLanguage = refContApi.RequestInformationRef.ContentLanguage;

        PopulateDataLists(refContApi);
    }
Exemplo n.º 2
0
        private void Display_MetadataTab()
        {
            StringBuilder sbAttrib = new StringBuilder();
            StringBuilder sbResult = new StringBuilder();
            string strResult;
            string strAttrResult;
            string strImage = "";

            //Dim enhancedMetadataScript As New Literal
            //enhancedMetadataScript.Text = Replace(CustomFields.GetEnhancedMetadataScript(), "src=""java/", "src=""../java/")
            //Me.Page.Header.Controls.Add(enhancedMetadataScript)
            EnhancedMetadataArea.Text = CustomFields.GetEnhancedMetadataArea();
            if ((meta_data != null) || (prod_type_data != null))
            {
                m_refSite = new Ektron.Cms.Site.EkSite(this.m_refContentApi.RequestInformationRef);
                Hashtable hPerm = m_refSite.GetPermissions(m_iFolder, 0, "folder");
                if (meta_data != null)
                {
                    sbResult = CustomFields.WriteFilteredMetadataForEdit(meta_data.ToArray(), false, m_sEditAction, m_iFolder, ref lValidCounter, hPerm);
                    if (sbResult.ToString().Contains("<span style=\"color:red\">"))
                        metadataRequired = true;
                }
                if (prod_type_data != null)
                {

                    if (Util_IsEditable())
                    {

                        sbAttrib = CustomFields.WriteFilteredAttributesForEdit(entry_edit_data.Attributes, m_sEditAction, xid, prod_type_data.Attributes, ref lValidCounter, hPerm);
                    }
                    else
                    {
                        sbAttrib.Append(CustomFields.WriteFilteredAttributesForView(entry_edit_data.Attributes, xid, false, prod_type_data.Attributes));
                    }
                }
            }
            if (m_sEditAction == "update")
            {
                strImage = entry_edit_data.Image;
                string strThumbnailPath = entry_edit_data.ImageThumbnail;
                if (entry_edit_data.ImageThumbnail == "")
                {
                    strThumbnailPath = m_refContentApi.AppImgPath + "spacer.gif";
                }
                else
                {
                    strThumbnailPath = m_refContentApi.SitePath + strThumbnailPath;
                }
                if (System.IO.Path.GetExtension(strThumbnailPath).ToLower().IndexOf(".gif") != -1 && strThumbnailPath.ToLower().IndexOf("spacer.gif") == -1)
                {
                    strThumbnailPath = strThumbnailPath.Replace(".gif", ".png");
                }
                // sbResult.Append("<fieldset><legend>Image Data:</legend><table><tr><td class=""info"" align=""left"">Image:</td><td><span id=""sitepath""" & Me.m_refContentApi.SitePath & "</span><input type=""textbox"" size=""30"" readonly=""true"" id=""entry_image"" name=""entry_image"" value=""" & strImage & """ /> <a href=""#"" onclick=""PopUpWindow('../mediamanager.aspx?scope=images&upload=true&retfield=entry_image&showthumb=false&autonav=" & catalog_data.Id & "', 'Meadiamanager', 790, 580, 1,1);return false;"">Change</a>&nbsp;<a href=""#"" onclick=""RemoveEntryImage('" & m_refContentApi.AppImgPath & "spacer.gif');return false"">Remove</a></td></tr><tr><td colomnspan=""2""><img id=""entry_image_thumb"" src=""" & strThumbnailPath & """ /></td></tr></table></fieldset>")
            }
            else
            {
                // sbResult.Append("<fieldset><legend>Image Data:</legend><table><tr><td class=""info"" align=""left"">Image:</td><td><span id=""sitepath""" & Me.m_refContentApi.SitePath & "</span><input type=""textbox"" size=""30"" readonly=""true"" id=""entry_image"" name=""entry_image"" value=""" & strImage & """ /> <a href=""#"" onclick=""PopUpWindow('../mediamanager.aspx?scope=images&upload=true&retfield=entry_image&showthumb=false&autonav=" & catalog_data.Id & "', 'Meadiamanager', 790, 580, 1,1);return false;"">Change</a>&nbsp;<a href=""#"" onclick=""RemoveEntryImage('" & m_refContentApi.AppImgPath & "spacer.gif');return false"">Remove</a></td></tr><tr><td colomnspan=""2""><img id=""entry_image_thumb"" src=""" & m_refContentApi.AppImgPath & "spacer.gif"" /></td></tr></table></fieldset>")
            }

            if (this.m_sEditAction == "addlang")
            {
                sbResult.Append("<input type=\"hidden\" id=\"entry_image\" name=\"entry_image\" value=\"" + entry_edit_data.Image + "\" />");
            }

            strAttrResult = (string)(sbAttrib.ToString().Trim());
            strAttrResult = strAttrResult.Replace("src=\"java/", "src=\"../java/");
            strAttrResult = strAttrResult.Replace("src=\"images/", "src=\"../images/");

            strResult = sbResult.ToString().Trim();
            strResult = Util_FixPath(strResult);
            strResult = strResult.Replace("src=\"java/", "src=\"../java/");
            strResult = strResult.Replace("src=\"images/", "src=\"../images/");

            ltr_meta.Text = strResult;
            ltr_attrib.Text = strAttrResult;
        }
Exemplo n.º 3
0
    private StringBuilder CaptureMetadata(long contentId, long folderId)
    {
        StringBuilder metadataOutput = new StringBuilder();
        ContentAPI myContentAPI = new ContentAPI();
        ContentData myContentEditData = new ContentData();
        ContentMetaData[] myContentMetadata;
        string myType = "update";
        int myCounter = 0;
        Ektron.Cms.Site.EkSite myEkSite = new Ektron.Cms.Site.EkSite();

        int ContentLanguage = EkConstants.CONTENT_LANGUAGES_UNDEFINED;

        if (Page.Request.QueryString["LangType"] != null)
        {
            if (Page.Request.QueryString["LangType"] != "")
            {
                ContentLanguage = Convert.ToInt32(Page.Request.QueryString["LangType"]);
                myContentAPI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
            }
            else
            {
                if (myContentAPI.GetCookieValue("LastValidLanguageID") != "")
                {
                    ContentLanguage = Convert.ToInt32(myContentAPI.GetCookieValue("LastValidLanguageID"));
                }
            }
        }
        else
        {
            if (myContentAPI.GetCookieValue("LastValidLanguageID") != "")
            {
                ContentLanguage = Convert.ToInt32(myContentAPI.GetCookieValue("LastValidLanguageID"));
            }
        }

        if (ContentLanguage == EkConstants.CONTENT_LANGUAGES_UNDEFINED)
        {
            myContentAPI.ContentLanguage = EkConstants.ALL_CONTENT_LANGUAGES;
        }
        else
        {
            myContentAPI.ContentLanguage = ContentLanguage;
        }

        if (contentId != -1)
        {
            myEkSite = myContentAPI.EkSiteRef;
            myContentEditData = myContentAPI.GetContentById(contentId, 0);
            myContentMetadata = myContentEditData.MetaData;

            if (myContentMetadata.Length > 0)
            {
                metadataOutput = Ektron.Cms.CustomFields.WriteFilteredMetadataForEdit(myContentMetadata, false, myType, folderId, ref myCounter, myEkSite.GetPermissions(folderId, 0, "folder"));
                if (metadataOutput.Length > 0)
                {
                    ltrShowMetadata.Text = "<li><a id=\"metadataAnchor\" href=\"#\" onclick=\"dmsMetadataShowHideCategory(\'metadata\');return false;\" title=\"View Metadata\" class=\"selected\">" + myContentAPI.EkMsgRef.GetMessage("metadata text") + "</a></li>";
                }
            }
        }

        return metadataOutput;
    }
Exemplo n.º 4
0
    protected void Page_Load(System.Object sender, System.EventArgs e)
    {
        m_refStyle = new StyleHelper();
        divPropertyText.Text = "Standard";
        divMetadataText.Text = "Advanced";
        checkAccess();
        g_isIEFlagInitialized = false;
        lngCompareCategoryID = 0;
        lngCompareTaskTypeID = 0;
        completedColor = "#ccffff";
        CommentKeyId = -1;
        RefType = "T";
        RefId = Convert.ToInt64(Request.QueryString["tid"]);
        CommentId = 0;
        iMaxContLength = "64000";
        localeFileString = "0000";
        if (!string.IsNullOrEmpty(Request.QueryString["orderby"]))
        {
            OrderBy = Request.QueryString["orderby"].ToString();
        }
        if (!string.IsNullOrEmpty(Request.QueryString["LangType"]))
        {
            ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
            AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
        }
        else
        {
            if (!string.IsNullOrEmpty(AppUI.GetCookieValue("LastValidLanguageID")))
            {
                ContentLanguage = Convert.ToInt32(AppUI.GetCookieValue("LastValidLanguageID"));
            }
        }
        AppUI.ContentLanguage = ContentLanguage;
        currentUserID = AppUI.UserId;
        AppPath = AppUI.AppPath;
        AppImgPath = AppUI.AppImgPath;
        sitePath = AppUI.SitePath;
        AppeWebPath = AppUI.ApplicationPath + AppUI.AppeWebPath;
        AppName = AppUI.AppName;
        EnableMultilingual = AppUI.EnableMultilingual;
        gtSiteObj = AppUI.EkSiteRef;
        if (AppUI.EnableMultilingual == 1)
            colActiveLanguages = gtSiteObj.GetAllActiveLanguages();
        else
        {
            colActiveLanguages = gtSiteObj.GetLanguageByID(AppUI.DefaultContentLanguage);
            if (colActiveLanguages.Count > 0)
            {
                languageName = colActiveLanguages["Name"].ToString();
            }
        }
        strIs_Child = Strings.LCase(Strings.Trim(Convert.ToString(Server.HtmlEncode(Request.QueryString["is_child"]))));
        lngCategory_tmp = Convert.ToInt64(Request.QueryString["saved_task_category"]);
        lngType_tmp = Convert.ToInt64(Request.QueryString["saved_task_type"]);

        if (!string.IsNullOrEmpty(strIs_Child))
            is_child = Convert.ToBoolean("true" == strIs_Child);
        else
            is_child = false;

        if (Request.ServerVariables["HTTP_USER_AGENT"].IndexOf("Windows") + 1 > 0)
        {
            IsMac = 0;
        }
        else
        {
            IsMac = 1;
        }
        cContObj = AppUI.EkContentRef;
        canI = cContObj.CanIv2_0(-1, "tasks");
        //var1 = Request.ServerVariables["SERVER_NAME"].ToString();
        //string ty = null;
        //ty = "tasks";
        //var2 = cContObj.GetEditorVariablev2_0(0, ty);
        if (m_refContentApi.GetCookieValue("user_id") != "0")
        {
            m_EmailHelper.MakeEmailArea();
            MakeTaskTypeArea();
        }
        if (!string.IsNullOrEmpty(Request.QueryString["close"]))
        {
            closeOnFinish = "&close=true";
        }
        m_ekSite = AppUI.EkSiteRef;
        cDbRecs = m_ekSite.GetPermissions(0, 0, "folder");
        IsAdmin = Convert.ToBoolean(cDbRecs["IsAdmin"]);

        action = Server.HtmlEncode(Request.QueryString["action"]);
        actiontype = Server.HtmlEncode(Request.QueryString["ty"]);
        if ((string.IsNullOrEmpty(actiontype)))
        {
            actiontype = "both";
        }

        if (IsPostBack)
        {
            switch (Action)
            {
                case "AddTask":
                    Process_AddTask();
                    break;
                case "EditTask":
                    Process_EditTask();
                    break;
                case "DeleteAllTasks":
                    Process_DeleteAllTasks();
                    break;
                case "UpdateStatePurge":
                    Process_UpdateStatePurge();
                    break;
            }
        }
        else
        {
            switch (Action)
            {
                case "ApproveTask":
                    Process_ApproveTask();
                    break;
                case "EditTask":
                    Display_EditTask();
                    break;
                case "AddTask":
                    Display_AddTask();
                    break;
                case "ViewTasks":
                    Display_ViewTasks();
                    break;
                case "ViewTask":
                    Display_ViewTask();
                    break;
                case "viewcontenttask":
                    Display_ViewContentTask();
                    break;
                case "ViewTaskType":
                    Display_ViewTaskType();
                    break;
                case "DeleteAllTasks":
                    Display_DeleteAllTasks();
                    break;
                case "DeleteTask":
                    Process_DeleteTask();
                    break;
                case "EditTaskType":
                    Display_EditTaskType();
                    break;
                case "AddTaskType":
                    Display_AddTaskType();
                    break;
                case "DeleteTaskType":
                    Process_DeleteTaskType();
                    break;
                default:
                    Session["RedirectLnk"] = "tasks.aspx?" + Server.HtmlEncode(Request.QueryString.ToString());
                    Response.Redirect("login.aspx?fromLnkPg=1");
                    break;
            }

        }

        RegisterResources();
    }
Exemplo n.º 5
0
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        bool bAddingNew = false;
        string tempStr;
        string referrerStr;
        try
        {
            //INITIALIZE THE VARIABLES
            if (Request.Browser.Type.IndexOf("IE") != -1)
            {
                IsBrowserIE = true;
            }
            jsIsMac.Text = "false";
            if (Request.Browser.Platform.IndexOf("Win") == -1)
            {
                IsMac = true;
            }
            // Ensure that this is not a browser refresh (Mac-Safari bug causes
            // the editor to load after publishing, if the browser is refreshing):
            if (IsMac && !IsBrowserIE)
            {
                referrerStr = Request.Url.LocalPath;
                if (referrerStr != null)
                {
                    tempStr = referrerStr.Substring(referrerStr.LastIndexOf("/"));
                    if (tempStr == "/workarea.aspx")
                    {
                        tempStr = referrerStr.Replace(tempStr, "/dashboard.aspx");
                        Response.Redirect(tempStr, false);
                        return;
                    }
                }
            }

            if (m_SelectedEditControl != "ContentDesigner")
            {
                m_ctlContentPane.Controls.Remove(m_ctlContentDesigner);
                m_ctlSummaryStandard.Controls.Remove(m_ctlSummaryDesigner);
                m_ctlSummaryRedirect.Controls.Remove(m_ctlFormResponseRedirect);
                m_ctlSummaryTransfer.Controls.Remove(m_ctlFormResponseTransfer);
            }

            Response.Expires = -1;
            Response.AddHeader("Pragma", "no-cache");
            Response.AddHeader("cache-control", "no-store");

            //THE NEXT THREE LINES MUST BE REMOVED BEFORE THE RELEASE
            if (Request.ServerVariables["Query_String"] == "")
            {
                return;
            }

            if (IsMac)
            {
                jsIsMac.Text = "true";
            }

            // Note: To fix a problem with the Ephox Editors on the
            // Mac-running-Safari (assumed if "IsMac and not IsBrowserIE")
            // we need to use different styles for the DIV-tags holding
            // the editors, etc., otherwise they frequently draw themselves
            // when they should remain hidden. These values cause problems
            // with the PC/Win/IE combination, (the summary editor fails to
            // provide a client area for the user to view/edit) so they cannot
            // cannot be used everywhere, hence our use of alternate style classes:
            // Pass class names to javascript:
            jsSelectedDivStyleClass.Text = m_sSelectedDivStyleClass;
            jsUnSelectedDivStyleClass.Text = m_sUnSelectedDivStyleClass;

            m_refContApi = new ContentAPI();
            m_refSiteApi = new SiteAPI();
            m_refContent = m_refContApi.EkContentRef;
            m_refSite = m_refContApi.EkSiteRef;
            m_refTask = m_refContApi.EkTaskRef;

            CurrentUserID = m_refContApi.UserId;
            AppImgPath = m_refContApi.AppImgPath;
            SitePath = m_refContApi.SitePath;
            Appname = m_refContApi.AppName;
            AppeWebPath = m_refContApi.ApplicationPath + m_refContApi.AppeWebPath;
            AppPath = m_refContApi.AppPath;
            EnableMultilingual = m_refContApi.EnableMultilingual;
            StyleSheetJS.Text = m_refStyle.GetClientScript();
            EnhancedMetadataScript.Text = CustomFields.GetEnhancedMetadataScript();
            EnhancedMetadataArea.Text = CustomFields.GetEnhancedMetadataArea();
            lbl_GenericTitleLabel.Text = m_refMsg.GetMessage("generic title label");

            if (!(Request.QueryString["id"] == null))
            {
                m_intItemId = Convert.ToInt64(Request.QueryString["id"]);
                m_intTaxFolderId = m_intItemId;
            }
            if (!(Request.QueryString["LangType"] == null))
            {
                if (Request.QueryString["LangType"] != "")
                {
                    m_intContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                    m_refContApi.SetCookieValue("LastValidLanguageID", m_intContentLanguage.ToString());
                }
                else
                {
                    if (m_refContApi.GetCookieValue("LastValidLanguageID") != "")
                    {
                        m_intContentLanguage = Convert.ToInt32(m_refContApi.GetCookieValue("LastValidLanguageID"));
                    }
                }
            }
            else
            {
                if (m_refContApi.GetCookieValue("LastValidLanguageID") != "")
                {
                    m_intContentLanguage = Convert.ToInt32(m_refContApi.GetCookieValue("LastValidLanguageID"));
                }
            }
            if (m_intContentLanguage == Ektron.Cms.Common.EkConstants.CONTENT_LANGUAGES_UNDEFINED || m_intContentLanguage == Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES)
            {
                m_intContentLanguage = m_refContApi.DefaultContentLanguage;
            }
            if (m_intContentLanguage == Ektron.Cms.Common.EkConstants.CONTENT_LANGUAGES_UNDEFINED)
            {
                m_refContApi.ContentLanguage = Ektron.Cms.Common.EkConstants.ALL_CONTENT_LANGUAGES;
            }
            else
            {
                m_refContApi.ContentLanguage = m_intContentLanguage;
            }
            if (!String.IsNullOrEmpty(Request.QueryString["folder_id"]))
            {
                m_intFolderId = Convert.ToInt64(Request.QueryString["folder_id"]);
            }

            if (Request.QueryString["form_type"] != null)
            {
                bNewPoll = System.Convert.ToBoolean("poll" == Convert.ToString(Request.QueryString["form_type"]).Trim().ToLower());
            }
            if (Request.QueryString["new"] != null)
            {
                bAddingNew = System.Convert.ToBoolean("true" == Convert.ToString(Request.QueryString["new"]).Trim().ToLower());
            }
            if (Request.QueryString["poll"] != null)
            {
                bReNewPoll = System.Convert.ToBoolean("renew" == Convert.ToString(Request.QueryString["poll"]).Trim().ToLower());
            }
            if (Request.Form["editaction"] != null)
            {
                m_strPageAction = Convert.ToString(Request.Form["editaction"]).ToLower().Trim();
            }
            if (Request.QueryString["translate"] != null)
            {
                translate.Value = "true";
            }
            if (Request.QueryString["type"] != null)
            {
                m_strType = Convert.ToString(Request.QueryString["type"]).ToLower().Trim();
            }
            else if (Request.Form["eType"] != null)
            {
                m_strType = Convert.ToString(Request.Form["eType"]).ToLower().Trim();
            }
            if (!String.IsNullOrEmpty(Request.QueryString["ctlupdateid"]))
            {
                commparams = (string)("&ctlupdateid=" + Request.QueryString["ctlupdateid"] + "&ctlmarkup=" + Request.QueryString["ctlmarkup"] + "&cltid=" + Request.QueryString["cltid"] + "&ctltype=" + Request.QueryString["ctltype"]);
                updateFieldId = Request.QueryString["ctlupdateid"];
                Page.ClientScript.RegisterHiddenField("ctlupdateid", updateFieldId);
            }
            if (!String.IsNullOrEmpty(Request.QueryString["cacheidentifier"]))
            {
                Page.ClientScript.RegisterHiddenField("cacheidentifier", Request.QueryString["cacheidentifier"]);
            }
            else
            {
                if ((Request.QueryString["mycollection"] != null) && (Request.QueryString["addto"] != null) && (Request.QueryString["type"] != null))
                {
                    if (Request.QueryString["type"] == "add" && Request.QueryString["addto"] == "menu")
                    {
                        Page.ClientScript.RegisterHiddenField("cacheidentifier", "menu_" + Request.QueryString["mycollection"] + m_intContentLanguage + "_mnu");
                    }
                }
            }

            //destination.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
            //PostURL.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
            //NextUsing.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "content.aspx";

            if (Request.Cookies[DMSCookieName] != null && !string.IsNullOrEmpty(Request.Cookies[DMSCookieName].Value))
            {

                if (Request.Cookies[DMSCookieName].Value == "2010")
                {
                    Ektron.Cms.Controls.ExplorerDragDrop edd = new Ektron.Cms.Controls.ExplorerDragDrop();
                    edd.ContentLanguage = this.m_intContentLanguage;
                    if (!string.IsNullOrEmpty(Request.QueryString["folderid"]))
                    {
                        destination.Value = edd.GetFolderPath(Int64.Parse(Request.QueryString["folderid"])).Replace(Page.Request.Url.GetLeftPart(UriPartial.Authority), "");
                        putopts.Value = "false";
                    }
                    //btnMUpload.OnClientClick = "return MultipleDocumentUpload(0);";
                    //lbtn_toggleVersion.Attributes.Add("onclick", string.Format(_messageHelper.GetMessage("js office version toggle confirm format"), _messageHelper.GetMessage("li text office 2010 name")));
                }
                else
                {
                    destination.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
                    PostURL.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "processMultiupload.aspx";
                    NextUsing.Value = Page.Request.Url.Scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + "/" + AppPath + "content.aspx";
                    putopts.Value = "true";
                    //btnMUpload.OnClientClick = "return MultipleDocumentUpload(1);";
                    //lbtn_toggleVersion.Attributes.Add("onclick", string.Format(_messageHelper.GetMessage("js office version toggle confirm format"), _messageHelper.GetMessage("li text other office ver name")));

                }
                //tabMultipleDMS.Controls.Add(linebreak);
            }

            if (!String.IsNullOrEmpty(Request.QueryString["ctlmarkup"]))
            {
                Page.ClientScript.RegisterHiddenField("ctlmarkup", Request.QueryString["ctlmarkup"]);
            }
            if (!String.IsNullOrEmpty(Request.QueryString["ctltype"]))
            {
                Page.ClientScript.RegisterHiddenField("ctltype", Request.QueryString["ctltype"]);
            }
            if (!String.IsNullOrEmpty(Request.QueryString["cltid"]))
            {
                Page.ClientScript.RegisterHiddenField("cltid", Request.QueryString["cltid"]);
            }

            if (m_strType == "update")
            {
                m_refContentId = m_intItemId;
            }
            else
            {
                if (!String.IsNullOrEmpty(Request.QueryString["content_id"]))
                {
                    m_refContentId = Convert.ToInt64(Request.QueryString["content_id"]);
                }
            }

            if (Request.QueryString["xid"] != null)
            {
                m_intXmlConfigId = Convert.ToInt64(Request.QueryString["xid"]);
            }
            else if (Request.Form["SelectedXid"] != null)
            {
                m_intXmlConfigId = Convert.ToInt64(Request.Form["SelectedXid"]);
            }
            else
            {
                if (Request.QueryString["type"] == "add")
                {
                    if (Request.QueryString["AllowHTML"] != "1")
                    {
                        m_intXmlConfigId = Utilities.GetDefaultXmlConfig(Convert.ToInt64(Request.QueryString["id"]));
                        if (m_intXmlConfigId == 0)
                        {
                            m_intXmlConfigId = -1;
                        }
                    }
                }
            }
            if (!String.IsNullOrEmpty(Request.QueryString["mycollection"]))
            {
                strMyCollection = Request.QueryString["mycollection"];
            }
            else if (!String.IsNullOrEmpty(Request.Form["mycollection"]))
            {
                strMyCollection = Request.Form["mycollection"];
            }
            if (!String.IsNullOrEmpty(Request.QueryString["addto"]))
            {
                strAddToCollectionType = Request.QueryString["addto"];
            }
            else if (!String.IsNullOrEmpty(Request.Form["addto"]))
            {
                strAddToCollectionType = Request.Form["addto"];
            }
            if (Request.QueryString["close"] == "false")
            {
                m_bClose = false;
            }
            if (Request.QueryString["back_folder_id"] != null)
            {
                back_folder_id = Convert.ToInt64(Request.QueryString["back_folder_id"]);
                m_intTaxFolderId = back_folder_id;
            }
            if (Request.QueryString["back_id"] != null)
            {
                back_id = Convert.ToInt64(Request.QueryString["back_id"]);
            }
            if (Request.QueryString["back_file"] != null)
            {
                back_file = Request.QueryString["back_file"];
            }
            if (Request.QueryString["back_action"] != null)
            {
                back_action = Request.QueryString["back_action"];
                if (back_action.ToLower() == "viewcontentbycategory" || back_action.ToLower() == "viewarchivecontentbycategory")
                {
                    back_folder_id = back_id;
                }
            }
            if (Request.QueryString["control"] != null)
            {
                controlName = Request.QueryString["control"];
            }
            if (Request.QueryString["buttonid"] != null)
            {
                buttonId.Value = Request.QueryString["buttonid"];
            }
            if (Request.QueryString["back_form_id"] != null)
            {
                back_form_id = Convert.ToInt64(Request.QueryString["back_form_id"]);
            }
            if (Request.QueryString["back_LangType"] != null)
            {
                back_LangType = Convert.ToInt32(Request.QueryString["back_LangType"]);
            }
            else
            {
                back_LangType = System.Convert.ToInt32(Ektron.Cms.CommonApi.GetEcmCookie()["DefaultLanguage"]);
            }
            if (Request.QueryString["back_callerpage"] != null)
            {
                back_callerpage = (string)("&back_callerpage=" + Request.QueryString["back_callerpage"]);
            }
            if (Request.QueryString["back_page"] != null)
            {
                back_callerpage = back_callerpage + "&back_page=" + Request.QueryString["back_page"];
            }
            if (Request.QueryString["back_origurl"] != null)
            {
                back_origurl = (string)("&back_origurl=" + EkFunctions.UrlEncode(Request.QueryString["back_origurl"]));
            }
            if (!String.IsNullOrEmpty(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]))
            {
                if (Ektron.Cms.Common.EkFunctions.IsNumeric(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]))
                {
                    g_ContentTypeSelected = System.Convert.ToInt32(Request.QueryString[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]);
                    m_refContApi.SetCookieValue(Ektron.Cms.Common.EkConstants.ContentTypeUrlParam, g_ContentTypeSelected.ToString());
                }
            }
            else if (Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam] != "")
            {
                if (Ektron.Cms.Common.EkFunctions.IsNumeric(Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]))
                {
                    g_ContentTypeSelected = System.Convert.ToInt32(Ektron.Cms.CommonApi.GetEcmCookie()[Ektron.Cms.Common.EkConstants.ContentTypeUrlParam]);
                }
            }
            if (Ektron.Cms.Common.EkConstants.CMSContentType_AllTypes == g_ContentTypeSelected)
            {
                if (Request.QueryString["multi"] != null)
                {
                    if ("" == Request.QueryString["multi"])
                    {
                        lContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content; //set content type to "content" as default value
                    }
                    else
                    {
                        lContentType = Convert.ToInt32(Request.QueryString["multi"]);
                        if (lContentType == 9876)
                        {
                            lContentType = 103;
                        }
                    }
                }
                else
                {
                    lContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content;
                }
            }
            else
            {
                lContentType = g_ContentTypeSelected;
                if (lContentType == 9876)
                {
                    lContentType = 103;
                }
            }

            language_data = m_refSiteApi.GetLanguageById(m_intContentLanguage);
            if (this.m_strType.ToLower() == "add" && (!String.IsNullOrEmpty(Request.QueryString["SelTaxonomyId"])))
            {
                TaxonomySelectId = Convert.ToInt64(Request.QueryString["SelTaxonomyId"]);
            }
            SettingsData settings_data;
            settings_data = m_refSiteApi.GetSiteVariables(m_refSiteApi.UserId);

            int UserLocale;
            UserLocale = m_refSiteApi.RequestInformationRef.UserCulture;
            AppLocaleString = GetLocaleFileString(UserLocale.ToString());
            jsMaxLengthMsg.Text = m_refMsg.GetMessage("js err encoded title exceeds max length");
            jsContentLanguage.Text = Convert.ToString((short)m_intContentLanguage);
            jsId.Text = Convert.ToString(m_intItemId);
            jsDefaultContentLanguage.Text = Convert.ToString(m_refContApi.DefaultContentLanguage);
            jsType.Text = Convert.ToString((short)m_intContentType);
            phAlias.Visible = false;
            Page.Title = m_refContApi.AppName + " " + m_refMsg.GetMessage("edit content page title") + " \"" + Ektron.Cms.CommonApi.GetEcmCookie()["username"] + "\"";
            string editaction = "";
            if (Request.Form["editaction"] != null)
            {
                editaction = Request.Form["editaction"];
            }
            if ("workoffline" == editaction || "cancel" == editaction || ("" == Convert.ToString(m_intItemId) && "" == editaction))
            {
                if (m_strType == "update")
                {
                    ret = m_refContent.UndoCheckOutv2_0(Convert.ToInt64(Request.Form["content_id"]));
                    blnUndoCheckOut_complete = true;
                }
                if (!m_bClose)
                {
                    ClosePanel.Text = "<script language=javascript>" + "\r\n" + "ResizeFrame(1); // Show the navigation-tree frame." + "\r\n" + "</script>";
                    Response.Redirect(GetBackPage(Convert.ToInt64(Request.Form["content_id"])), false);
                }
                else
                {
                    Response.Redirect("close.aspx", false);
                }
            }
            else if ((m_strPageAction == "save") || (m_strPageAction == "checkin") || (m_strPageAction == "publish") || (m_strPageAction == "summary_save") || (m_strPageAction == "meta_save"))
            {
                Process_FormSubmit();
                if (m_bClose && m_strPageAction != "save")
                {
                    if (updateFieldId != "")
                    {
                        string strQuery = "";
                        if (TaxonomySelectId > 0)
                        {
                            strQuery = (string)("&__taxonomyid=" + TaxonomySelectId);
                        }
                        else if (TaxonomyOverrideId > 0)
                        {
                            strQuery = (string)("&__taxonomyid=" + TaxonomyOverrideId);
                        }
                        Response.Redirect((string)("close.aspx?toggle=true" + strQuery), false);
                    }
                }
            }
            else
            {
                Display_EditControls();

                if (!(Page.IsPostBack) && bAddingNew)
                {
                    if (Request.QueryString["form_type"] != null)
                    {
                        newformwizard ucNewFormWizard;
                        ucNewFormWizard = (newformwizard)(LoadControl("controls/forms/newformwizard.ascx"));
                        ucNewFormWizard.ID = "ProgressSteps";
                        phNewFormWizard.Controls.Add(ucNewFormWizard);
                        if (bNewPoll)
                        {
                            PollHtmlScript();
                        }
                    }
                }
            }

            PermissionData cPerms;
            cPerms = m_refContApi.LoadPermissions(m_intContentFolder, "folder", 0);
            m_ctlContentDesigner.FolderId = m_intContentFolder;
            if (2 == m_intContentType)
            {
                m_ctlContentDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.Designer;
            }
            else if (editorPackage.Length > 0)
            {
                m_ctlContentDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.DataEntry;
            }
            else
            {
                m_ctlContentDesigner.ToolsFile = m_refContApi.ApplicationPath + "ContentDesigner/configurations/StandardEdit.aspx?wiki=1";
            }
            m_ctlContentDesigner.SetPermissions(cPerms);
            m_ctlContentDesigner.AllowFonts = true;
            m_ctlSummaryDesigner.FolderId = m_intContentFolder;
            if (2 == m_intContentType)
            {
                m_ctlSummaryDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.XsltDesigner;
            }
            else if (m_bIsBlog)
            {
                m_ctlSummaryDesigner.ToolsFile = m_refContApi.ApplicationPath + "ContentDesigner/configurations/InterfaceBlog.aspx?WMV=1";
            }
            else
            {
                m_ctlSummaryDesigner.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.Standard;
            }
            m_ctlSummaryDesigner.SetPermissions(cPerms);
            m_ctlSummaryDesigner.AllowFonts = true;
            m_ctlFormResponseRedirect.FolderId = m_intContentFolder;
            m_ctlFormResponseRedirect.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.NoToolbars;
            m_ctlFormResponseRedirect.SetPermissions(cPerms);
            m_ctlFormResponseRedirect.AllowFonts = true;
            m_ctlFormResponseTransfer.FolderId = m_intContentFolder;
            m_ctlFormResponseTransfer.Toolbars = Ektron.ContentDesignerWithValidator.Configuration.NoToolbars;
            m_ctlFormResponseTransfer.SetPermissions(cPerms);
            m_ctlFormResponseTransfer.AllowFonts = true;
            m_ctlContentValidator.Text = m_refMsg.GetMessage("content size exceeded");
            m_ctlSummaryValidator.Text = m_refMsg.GetMessage("content size exceeded");
            g_ContentTypeSelected = Ektron.Cms.Common.EkConstants.CMSContentType_AllTypes;
            m_refContApi.SetCookieValue(Ektron.Cms.Common.EkConstants.ContentTypeUrlParam, g_ContentTypeSelected.ToString());
        }
        catch (Exception ex)
        {
            Utilities.ShowError(ex.Message);
        }
    }