protected void Page_Load(object sender, System.EventArgs e)
    {
        if (!Page.IsPostBack)
            {
                Session["EkDavSessionVal"] = null;
            }
            m_refMsg = m_refContApi.EkMsgRef;
            Utilities.ValidateUserLogin();
            RegisterResources();
            aHelp.HRef = "#Help";
            aHelp.Attributes.Add("onclick", "window.open('" + m_refContApi.fetchhelpLink("add_assets") + "', '', 'width=800,height=500,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');return false;");
            setLocalizedStrings();
            if (Request.QueryString["folderiD"] != null)
            {
                _folderID = Convert.ToInt64(Request.QueryString["folderID"]);
                jsFolderID.Text = _folderID.ToString();

            }

            if (Request.QueryString["TaxonomyId"] != null)
            {
                _taxonomyID = Convert.ToInt64(Request.QueryString["TaxonomyId"]);
                jsTaxonomyId.Text = _taxonomyID.ToString();
                jsTaxonomyIdReloadFrame.Text = _taxonomyID.ToString();
                jsTaxID.Text = _taxonomyID.ToString();
                isMetadataOrTaxonomyRequired = true;
            }

            if (Request.QueryString["LangType"] != null)
            {
                _contentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                jsLanguageID.Text = _contentLanguage.ToString();
            }

            if (m_refContApi.EkContentRef.DoesFolderRequireMetadataOrTaxonomy(_folderID, _contentLanguage))
            {
                isMetadataOrTaxonomyRequired = true;
            }

            ExplorerDragDrop dragDrop = new ExplorerDragDrop();

            bool _useSSL = Ektron.Cms.Common.EkFunctions.GetConfigBoolean("ek_UseOffloadingSSL", false);
            string _scheme = string.Empty;
            if (_useSSL)
            {
                _scheme = "https";
            }
            else
            {
                _scheme = Page.Request.Url.Scheme;
            }

            destination.Value = Convert.ToString(_scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath) + "processMultiupload.aspx?close=true";
            PostURL.Value = Convert.ToString(_scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath) + "processMultiupload.aspx?close=true";
            NextUsing.Value = Convert.ToString(_scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + m_refContApi.ApplicationPath + "content.aspx");
            content_id.Value = "-1";
            content_folder.Value = _folderID.ToString();
            content_language.Value = _contentLanguage.ToString();
            requireMetaTaxonomy.Value = isMetadataOrTaxonomyRequired.ToString();
            taxonomyselectedtree.Value = _taxonomyID.ToString();
            content_teaser.Value = "";
            HtmlGenericControl linebreak = new HtmlGenericControl("div");
            linebreak.InnerHtml += "<div id=\'divFileTypes\' style=\'display:none;float:left;\'> " + m_refMsg.GetMessage("lbl valid file types") + "<p class=\'dmsSupportedFileTypes\' style=\'font-size:11px;\'>" + DocumentManagerData.Instance.FileTypes + "</p></div>";
            linebreak.InnerHtml += "<br />";
            linebreak.InnerHtml += "<div id=idMultipleView style=\'display:inline\'>";
            linebreak.InnerHtml += (string) ("<script type=\"text/javascript\">" + Environment.NewLine);
            linebreak.InnerHtml += (string) (" AC_AX_RunContent(\'id\',\'idUploadCtl\',\'name\',\'idUploadCtl\',\'classid\',\'CLSID:07B06095-5687-4d13-9E32-12B4259C9813\',\'width\',\'100%\',\'height\',\'350px\');" + Environment.NewLine);
            linebreak.InnerHtml += Environment.NewLine + " </script> </div> " + Environment.NewLine;
            linebreak.InnerHtml += "<br /><br />";
            //tabMultipleDMS.Controls.Add(linebreak);
            if (Request.Cookies[DMSCookieName] != null && !string.IsNullOrEmpty(Request.Cookies[DMSCookieName].Value))
            {
                pnl_versionToggle.Visible = pnl_DMSMultiUpload.Visible = true;
                pnl_OfficeVerSelector.Visible = false;

                if (Request.Cookies[DMSCookieName].Value == "2010")
                {
                    ExplorerDragDrop edd = new ExplorerDragDrop();
                    string ekdavurl=edd.GetFolderPath(_folderID).Replace(Page.Request.Url.GetLeftPart(UriPartial.Authority), "");
                    try
                    {
                        string[] urlparts = ekdavurl.Split('_');
                        urlparts[4] = _taxonomyID.ToString();
                        ekdavurl = string.Join("_", urlparts);
                    }
                    catch
                    { }
                    destination.Value = ekdavurl;//edd.GetFolderPath(_folderID).Replace(Page.Request.Url.GetLeftPart(UriPartial.Authority), "");
                    putopts.Value = "false";
                    Upload.OnClientClick = "return MultipleDocumentUpload(0);";
                    lbtn_toggleVersion.Attributes.Add("onclick", string.Format(m_refMsg.GetMessage("js office version toggle confirm format"), m_refMsg.GetMessage("li text office 2010 name")));
                    lbtn_toggleVersion.Text = m_refMsg.GetMessage("lbtn dms switch office version") + "(Office 2010 selected)";
                }
                else
                {
                    destination.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath + "processMultiupload.aspx?close=true";
                    PostURL.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath + "processMultiupload.aspx?close=true";
                    putopts.Value = "true";
                    Upload.OnClientClick = "MultipleDocumentUpload(1);";
                    lbtn_toggleVersion.Attributes.Add("onclick", string.Format(m_refMsg.GetMessage("js office version toggle confirm format"), m_refMsg.GetMessage("li text other office ver name")));
                    lbtn_toggleVersion.Text = m_refMsg.GetMessage("lbtn dms switch office version") + "(Office 2003/2007 selected)";

                }
                tabMultipleDMS.Controls.Add(linebreak);
            }
            else
            {
                pnl_versionToggle.Visible = pnl_DMSMultiUpload.Visible = false;
                pnl_OfficeVerSelector.Visible = true;
            }

            if (Request.QueryString["showtab"] != null && Request.QueryString["showtab"] == "multiple")
            {
                ltrNoUpload.Text = m_refMsg.GetMessage("lbl upload file");
                ClientScript.RegisterStartupScript(this.GetType(), "selectTab", "var ddTabs = $ektron('#DMStabs').tabs({select: function(event, ui){ResizeDocumentContainer(ui);}}); ddTabs.tabs('select', 1);", true);
            }

            if (! Page.IsPostBack)
            {

                dragDrop.FolderID = _folderID;
                dragDrop.TaxonomyId = _taxonomyID;

                if (_contentLanguage != -1)
                {
                    dragDrop.ContentLanguage = _contentLanguage;
                }

                HelpMessage.Text = "Fill out the description and then click next to upload image(s)."; //m_refMsg.GetMessage("lbl fill out the description and then click next to drag and drop image(s)")
                btnNext.Text = m_refMsg.GetMessage("next") + ">>";
                ImagegalleryTitleLbl = m_refMsg.GetMessage("generic title label");
                ImagegalleryImageWidthLbl = m_refMsg.GetMessage("lbl maximum width");
                ImagegalleryAddressLbl = m_refMsg.GetMessage("lbl image mapaddress");
                ImagegalleryDescriptionLbl = m_refMsg.GetMessage("description label");
                HeaderLabel.Text = m_refMsg.GetMessage("lbl photo data");
                btnNext.Attributes.Add("onclick", "ResizeContainer();");

                if ((Request.QueryString["prop"] != null)&& Request.QueryString["prop"] != "" && (Request.QueryString["type"] == "update") || (Request.QueryString["prop"] == "image"))
                {
                    // Content Designer
                    ctlEditor.FolderId = _folderID;
                    ctlEditor.AllowFonts = true;

                    if (Request.QueryString["prop"] == "image")
                    {
                        dragDrop.IsImage = 1;
                    }

                    this.panelImageProperties.Visible = true;
                    this.panelDragDrop.Visible = false;
                    if ((Request.QueryString["type"] != null)&& Request.QueryString["type"] == "update")
                    {
                        HelpMessage.Text = m_refMsg.GetMessage("lbl fill out the description and then click save");
                        btnNext.Attributes.Add("onclick", "return HideContainer(this);");
                        long id = 0;
                        if (Request.QueryString["id"] != null)
                        {
                            id = Convert.ToInt64(Request.QueryString["id"]);
                        }
                        ekImagegalleryImageWidthLbl.Visible = false;
                        ekImagegalleryImageWidth.Visible = false;
                        if (id > 0)
                        {
                            Ektron.Cms.ContentData data;
                            Ektron.Cms.ContentAPI api = new Ektron.Cms.ContentAPI();
                            data = api.GetContentById(id, 0);
                            this.ekImagegalleryTitle.Value = Server.HtmlDecode(data.Title);
                            ctlEditor.Content = data.Teaser;
                            if (Request.QueryString["prop"] == "image")
                            {
                                this.HeaderLabel.Text = "Image Properties";
                                foreach (Ektron.Cms.ContentMetaData item in data.MetaData)
                                {
                                    if (item.TypeName.ToLower() == "mapaddress")
                                    {
                                        this.ekImagegalleryAddress.Value = item.Text;
                                        break;
                                    }
                                }
                            }
                            else
                            {
                                this.HeaderLabel.Text = "Document Properties";
                                this.ekImagegalleryAddress.Visible = false;
                                this.ekImagegalleryAddressLbl.Visible = false;
                            }
                            btnNext.Text = "Save";
                        }
                    }
                    else
                    {
                        ekImagegalleryTitleLbl.Visible = false;
                        ekImagegalleryTitle.Visible = false;
                    }
                }
                else
                {
                    this.panelImageProperties.Visible = false;
                    this.panelDragDrop.Visible = true;
                }
            }
            else
            {
                Ektron.Cms.CommonApi api = new Ektron.Cms.CommonApi();
                string desc = "";
                int width = 800;
                string address = "";
                desc = (string) ctlEditor.Content;
                if (Request.Form["ekImagegalleryImageWidth"] != null)
                {
                    width = System.Convert.ToInt32(Request.Form["ekImagegalleryImageWidth"].ToString());
                }
                if (Request.Form["ekImagegalleryAddress"] != null)
                {
                    address = (string) (Request.Form["ekImagegalleryAddress"].ToString());
                }

                string[] imageProp = new string[4];
                imageProp[0] = width.ToString(); //width
                imageProp[1] = "-1"; //height
                imageProp[2] = address; //mapaddress
                imageProp[3] = desc; //Descriptions

                if (Request.QueryString["type"] != "update")
                {
                    Ektron.ASM.EkDavProtocol.Constants.GetCustomCacheManger().Remove(api.UserId.ToString() + "_" + api.UniqueId.ToString() + "_MapMeta");
                    Ektron.ASM.EkDavProtocol.Constants.GetCustomCacheManger().Add(api.UserId.ToString() + "_" + api.UniqueId.ToString() + "_MapMeta", imageProp);
                }
            }

            if (Request.Browser.Type.IndexOf("Firefox") != -1)
            {
                liDragDrop.Visible = true;
                tabDragDrop.Visible = true;
                tabDragDrop.Controls.Add(dragDrop);
            }

            literal_wait.Text = m_refMsg.GetMessage("one moment msg");
    }
    protected void btn_VersionSelect_Click(object sender, EventArgs e)
    {
        //Set hidden values accordingly
            if (rbl_OfficeVersion.SelectedValue == "2010")
            {
                //2010 uploader values
                ExplorerDragDrop edd = new ExplorerDragDrop();
                destination.Value = edd.GetFolderPath(_folderID).Replace(Page.Request.Url.GetLeftPart(UriPartial.Authority), ""); //contentAPI.ApplicationPath + "uploadedfiles";
                PostURL.Value = "";
                putopts.Value = "false";
                Upload.OnClientClick = "return MultipleDocumentUpload(0);";
                lbtn_toggleVersion.Attributes.Add("onclick", string.Format(m_refMsg.GetMessage("js office version toggle confirm format"), m_refMsg.GetMessage("li text office 2010 name")));
                lbtn_toggleVersion.Text = m_refMsg.GetMessage("lbtn dms switch office version") + "(Office 2010 selected)";
            }
            else
            {   //Keep the original values
                bool _useSSL = Ektron.Cms.Common.EkFunctions.GetConfigBoolean("ek_UseOffloadingSSL", false);
                string _scheme = string.Empty;
                if (_useSSL)
                    _scheme = "https";
                else
                    _scheme = Page.Request.Url.Scheme;
                destination.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath + "processMultiupload.aspx?close=true";
                PostURL.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath + "processMultiupload.aspx?close=true";
                putopts.Value = "true";
                Upload.OnClientClick = "MultipleDocumentUpload(1);";
                lbtn_toggleVersion.Attributes.Add("onclick", string.Format(m_refMsg.GetMessage("js office version toggle confirm format"), m_refMsg.GetMessage("li text other office ver name")));
                lbtn_toggleVersion.Text = m_refMsg.GetMessage("lbtn dms switch office version") + "(Office 2003/2007 selected)";

            }

            //Create the control
            string filetypes = "";
            if (this.isImage.Value == "1")
            {
                string[] AllowedFileTypes = null;
                if (DocumentManagerData.Instance.FileTypes.Length > 0)
                {
                    AllowedFileTypes = DocumentManagerData.Instance.FileTypes.Split(',');
                    if (AllowedFileTypes != null && AllowedFileTypes.Length > 0)
                    {
                        foreach (string filetype in AllowedFileTypes)
                        {
                            if (EkFunctions.IsImage(filetype.Trim().Replace("*", "")))
                            {
                                if (filetypes.Length > 0)
                                    filetypes += "," + filetype;
                                else
                                    filetypes = filetype;
                            }
                        }
                    }
                }
            }
            else
                filetypes = DocumentManagerData.Instance.FileTypes;
            HtmlGenericControl linebreak = new HtmlGenericControl("div");
            linebreak.InnerHtml += "<div id='divFileTypes'> " + m_refMsg.GetMessage("lbl valid file types") + "<p class='dmsSupportedFileTypes'>" + filetypes + "</p></div>";
            linebreak.InnerHtml += "<div id=idMultipleView style='display:inline'>";
            linebreak.InnerHtml += "<script type=\"text/javascript\">" + Environment.NewLine;
            linebreak.InnerHtml += " AC_AX_RunContent('id','idUploadCtl','name','idUploadCtl','classid','CLSID:07B06095-5687-4d13-9E32-12B4259C9813','width','100%','height','350px');" + Environment.NewLine;
            linebreak.InnerHtml += Environment.NewLine + " </script> </div> " + Environment.NewLine;
            tabMultipleDMS.Controls.Add(linebreak);

            //Create cookie
            HttpCookie c = new HttpCookie(DMSCookieName, rbl_OfficeVersion.SelectedValue);
            c.Expires = DateTime.Now.AddYears(50);
            Response.Cookies.Remove(c.Name);
            Response.Cookies.Add(c);

            //reset UI
            pnl_versionToggle.Visible = pnl_DMSMultiUpload.Visible = true;
            pnl_OfficeVerSelector.Visible = false;
            ClientScript.RegisterStartupScript(this.GetType(), "selectTab", "var ddTabs = $ektron('#DMStabs').tabs({select: function(event, ui){ResizeDocumentContainer(ui);}}); ddTabs.tabs('select', 1);", true);
    }
    protected void lbtn_toggleVersion_Click(object sender, EventArgs e)
    {
        string cookieVal = "";

            if (Request.Cookies[DMSCookieName].Value == "2010")
            {
                cookieVal = "other";
                bool _useSSL = Ektron.Cms.Common.EkFunctions.GetConfigBoolean("ek_UseOffloadingSSL", false);
                string _scheme = string.Empty;
                if (_useSSL)
                    _scheme = "https";
                else
                    _scheme = Page.Request.Url.Scheme;
                destination.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath + "processMultiupload.aspx?close=true";
                PostURL.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + m_refContApi.ApplicationPath + "processMultiupload.aspx?close=true";
                putopts.Value = "true";
                Upload.OnClientClick = "MultipleDocumentUpload(1);";
                lbtn_toggleVersion.Attributes.Add("onclick", string.Format(m_refMsg.GetMessage("js office version toggle confirm format"), m_refMsg.GetMessage("li text other office ver name")));
                lbtn_toggleVersion.Text = m_refMsg.GetMessage("lbtn dms switch office version") + "(Office 2003/2007 selected)";
            }
            else
            {
                cookieVal = "2010";
                ExplorerDragDrop edd = new ExplorerDragDrop();
                destination.Value = edd.GetFolderPath(_folderID).Replace(Page.Request.Url.GetLeftPart(UriPartial.Authority), "");
                putopts.Value = "false";
                Upload.OnClientClick = "return MultipleDocumentUpload(0);";
                lbtn_toggleVersion.Attributes.Add("onclick", string.Format(m_refMsg.GetMessage("js office version toggle confirm format"), m_refMsg.GetMessage("li text office 2010 name")));
                lbtn_toggleVersion.Text = m_refMsg.GetMessage("lbtn dms switch office version") + "(Office 2010 selected)";
            }
            HttpCookie c = new HttpCookie(DMSCookieName, cookieVal);
            c.Expires = DateTime.Now.AddYears(50);
            Response.Cookies.Remove(c.Name);
            Response.Cookies.Add(c);
            ClientScript.RegisterStartupScript(this.GetType(), "selectTab", "var ddTabs = $ektron('#DMStabs').tabs({select: function(event, ui){ResizeDocumentContainer(ui);}}); ddTabs.tabs('select', 1);", true);
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Session["EkDavSessionVal"] = null;
        }
        jsMetaUrl.Text = "";
        _messageHelper = contentAPI.EkMsgRef;
        if (!Ektron.Site.SiteData.Current.User.IsLoggedIn)
        {
            Response.Redirect(contentAPI.ApplicationPath + "reterror.aspx?info=" + Server.UrlEncode(_messageHelper.GetMessage("msg login cms user")), false);
            return;
        }
        RegisterResources();
        //set help link
        aHelp.HRef = "#Help";
        aHelp.Attributes.Add("onclick", "window.open('" + contentAPI.fetchhelpLink("add_assets") + "', '', 'width=800,height=500,resizable=yes,toolbar=no,scrollbars=yes,location=no,directories=no,status=no,menubar=no,copyhistory=no');return false;");
        ExplorerDragDrop dropuploader = new ExplorerDragDrop();
        if (Request.QueryString["mode"] == null || Request.QueryString["mode"] == "0")
        {
            if (Request.QueryString["addforlang"] == null || Request.QueryString["addforlang"] == "0")
            {
                if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
                {
                    _folderID = Convert.ToInt64(Request.QueryString["id"]);
                    dropuploader.FolderID = _folderID;
                }
                else
                {
                    if (Request.QueryString["folder_id"] != null && Request.QueryString["folder_id"] != "")
                        _folderID = Convert.ToInt64(Request.QueryString["folder_id"]);
                    else
                        _folderID = Convert.ToInt64(Request.QueryString["mode_id"]);
                    dropuploader.FolderID = _folderID;
                }
            }
            else
            {
                if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
                    dropuploader.AssetID = Request.QueryString["id"];
                else
                    dropuploader.AssetID = Request.QueryString["mode_id"];

                if (((Request.QueryString["lang_id"] != null) && Microsoft.VisualBasic.Information.IsNumeric(Request.QueryString["lang_id"]) && (0 < Convert.ToInt32(Request.QueryString["lang_id"]))))
                {
                    _contentLanguage = Convert.ToInt32(Request.QueryString["lang_id"]);
                    dropuploader.ContentLanguage = _contentLanguage;
                }
                _folderID = Convert.ToInt64(Request.QueryString["folder_id"]);
                dropuploader.FolderID = _folderID;
            }
        }
        else
        {
            if (Request.QueryString["id"] != null && Request.QueryString["id"] != "")
            {
                dropuploader.AssetID = Request.QueryString["id"];
            }
            else
            {
                dropuploader.AssetID = Request.QueryString["mode_id"];
            }
            _folderID = Convert.ToInt64(Request.QueryString["folder_id"]);
            dropuploader.FolderID = _folderID;
        }
        if (Request.QueryString["lang_id"] != null && Request.QueryString["lang_id"] != "")
        {
            _contentLanguage = Convert.ToInt32(Request.QueryString["lang_id"]);
            dropuploader.ContentLanguage = _contentLanguage;
        }
        if (Request.QueryString["TaxonomyId"] != null && Request.QueryString["TaxonomyId"] != "")
        {
            dropuploader.TaxonomyId = Convert.ToInt64(Request.QueryString["TaxonomyId"]);
            _taxonomyIdList = Request.QueryString["TaxonomyId"].ToString();
        }

        this.isImage.Value = "0";
        if (Request.QueryString["isimage"] != null && Request.QueryString["isimage"] != "")
        {
            dropuploader.IsImage = Convert.ToInt32(Request.QueryString["isimage"]);
            if (dropuploader.IsImage == 1)
                this.isImage.Value = "1";
        }

        if (Request.QueryString["overrideextension"] != null && Request.QueryString["overrideextension"] != "")
        {
            dropuploader.OverrideExtension = Request.QueryString["overrideextension"];
        }
        if (Request.QueryString["hidecancel"] != null && Request.QueryString["hidecancel"] == "true")
        {
            btnCancel.Visible = false;
        }

        if (Request.QueryString["isimagegallery"] != null && Request.QueryString["isimagegallery"] == "true")
        {
            _isImageGallery = true;
        }

        if (contentAPI.EkContentRef.DoesFolderRequireMetadataOrTaxonomy(_folderID, _contentLanguage))
        {
            isMetadataOrTaxonomyRequired = true;
        }
        isUrlAliasRequired = false;

        fdTmp = this.contentAPI.EkContentRef.GetFolderById(_folderID);

        Ektron.Cms.UrlAliasing.UrlAliasSettingsApi m_urlAliasSettings = new Ektron.Cms.UrlAliasing.UrlAliasSettingsApi();

        if (m_urlAliasSettings.IsManualAliasEnabled)
        {
            if (fdTmp.AliasRequired)
            {
                isUrlAliasRequired = true;
            }
        }

        //Hide Multiple and Dragdrop
        if (Request.QueryString["hideMultiple"] != null && Request.QueryString["hideMultiple"] == "true")
        {
            hideMultiple = true;
        }

        //Force the extension to be same
        if (Request.QueryString["forceExtension"] != null && Request.QueryString["forceExtension"] == "true")
        {
            forceExtension.Value = "true";
            oldfilename.Value = GetOldFileName(Convert.ToInt64(Request.QueryString["AssetID"])); //AssetID= ContentID
        }

        //If the browser if firefox, showing the drag drop tab
        if (Request.Browser.Type.IndexOf("Firefox") != -1)
        {
            //If updatemode of assetcontrol, do not display drag and drop tab.
            if ((Request.QueryString["mode"] == null || (Request.QueryString["mode"] != null && Request.QueryString["mode"] != "1")) && !hideMultiple)
            {
                liDragDrop.Visible = true;
                tabDragDrop.Visible = true;
                tabDragDrop.Controls.Add(dropuploader);
            }
        }

        assetcontrolupdate.Value = "";
        //If updatemode, doesn't make sense to display multiple dms as one can only select one file.
        if ((Request.QueryString["mode"] != null && Request.QueryString["mode"] == "1") )
        {
            liMultipleDMS.Visible = false;
            tabMultipleDMS.Visible = false;
            assetcontrolupdate.Value = "update";
            long id = 0;
            Int64.TryParse(dropuploader.AssetID, out id);
            oldfilename.Value = GetOldFileName(id);

        }
        else if(hideMultiple)
        {
            liMultipleDMS.Visible = false;
            tabMultipleDMS.Visible = false;
        }

        bool _useSSL = Ektron.Cms.Common.EkFunctions.GetConfigBoolean("ek_UseOffloadingSSL", false);
        string _scheme = string.Empty;
        if (_useSSL)
            _scheme = "https";
        else
            _scheme = Page.Request.Url.Scheme;

        NextUsing.Value = _scheme + Uri.SchemeDelimiter + Page.Request.Url.Authority + contentAPI.ApplicationPath + "content.aspx";

        content_id.Value = "-1";
        content_folder.Value = _folderID.ToString();
        content_language.Value = _contentLanguage.ToString();
        content_teaser.Value = FillImageGalleryDescription();
        requireMetaTaxonomy.Value = isMetadataOrTaxonomyRequired.ToString();
        taxonomyselectedtree.Value = _taxonomyIdList.ToString();

        string filetypes = "";
        if (this.isImage.Value == "1")
        {
            string[] AllowedFileTypes = null;
            if (DocumentManagerData.Instance.FileTypes.Length > 0)
            {
                AllowedFileTypes = DocumentManagerData.Instance.FileTypes.Split(',');
                if (AllowedFileTypes != null && AllowedFileTypes.Length > 0)
                {
                    foreach (string filetype in AllowedFileTypes)
                    {
                        if (EkFunctions.IsImage(filetype.Trim().Replace("*", "")))
                        {
                            if (filetypes.Length > 0)
                                filetypes += "," + filetype;
                            else
                                filetypes = filetype;
                        }
                    }
                }
            }
        }
        else
            filetypes = DocumentManagerData.Instance.FileTypes;

        HtmlGenericControl linebreak = new HtmlGenericControl("div");
        linebreak.InnerHtml += "<div id='divFileTypes'> " + _messageHelper.GetMessage("lbl valid file types") + "<p class='dmsSupportedFileTypes'>" + filetypes + "</p></div>";
        linebreak.InnerHtml += "<div id=idMultipleView style='display:inline'>";
        linebreak.InnerHtml += "<script type=\"text/javascript\">" + Environment.NewLine;
        linebreak.InnerHtml += " AC_AX_RunContent('id','idUploadCtl','name','idUploadCtl','classid','CLSID:07B06095-5687-4d13-9E32-12B4259C9813','width','100%','height','350px');" + Environment.NewLine;
        linebreak.InnerHtml += Environment.NewLine + " </script> </div> " + Environment.NewLine;

        //Checkif ManualAlias is required by this folder

        if (isUrlAliasRequired)
        {
            jsfolderRequireManualAlias.Text = "true";
            jsManualAliasAlert.Text = _messageHelper.GetMessage("js:url aliasing is required dms mupload");// "Url aliasing is required for this folder. Non-image assets will be uploaded but unpublished.";
        }

        if (Request.Cookies[DMSCookieName]!=null && !string.IsNullOrEmpty(Request.Cookies[DMSCookieName].Value))
        {
            pnl_versionToggle.Visible = pnl_DMSMultiUpload.Visible = true;
            pnl_OfficeVerSelector.Visible = false;

            if (Request.Cookies[DMSCookieName].Value == "2010")
            {
                ExplorerDragDrop edd = new ExplorerDragDrop();
                if (Request.QueryString["TaxonomyId"] != null && Request.QueryString["TaxonomyId"] != "")
                {
                    edd.TaxonomyId = Convert.ToInt64(Request.QueryString["TaxonomyId"]);
                }
                edd.ContentLanguage = this._contentLanguage;
                destination.Value = edd.GetFolderPath(_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")));
                lbtn_toggleVersion.Text = _messageHelper.GetMessage("lbtn dms switch office version")+"(Office 2010 selected)";
            }
            else
            {
                if (this.isImage.Value == "1")
                {
                    destination.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&isimage=" + this.isImage.Value+"&searc="+fdTmp.IscontentSearchable;
                    PostURL.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&isimage=" + this.isImage.Value + "&searc=" + fdTmp.IscontentSearchable;
                }
                else
                {
                    destination.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&searc="+fdTmp.IscontentSearchable;
                    PostURL.Value = _scheme + Uri.SchemeDelimiter + this.Page.Request.Url.Authority + contentAPI.ApplicationPath + "processMultiupload.aspx?close=true&searc=" + fdTmp.IscontentSearchable;
                }
                putopts.Value = "true";
                btnMUpload.OnClientClick = "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")));
                lbtn_toggleVersion.Text = _messageHelper.GetMessage("lbtn dms switch office version")+"(Office 2003/2007 selected)";

            }
            tabMultipleDMS.Controls.Add(linebreak);
        }
        else
        {
            pnl_versionToggle.Visible = pnl_DMSMultiUpload.Visible = false;
            pnl_OfficeVerSelector.Visible = true;
        }

        GenerateStrings();
        if (Request.QueryString["showtab"] != null && Request.QueryString["showtab"] == "multiple")
        {
            ltrNoUpload.Text = _messageHelper.GetMessage("lbl upload file");
            ClientScript.RegisterStartupScript(this.GetType(), "selectTab", "var ddTabs = $ektron('#DMStabs').tabs({select: function(event, ui){ReSizeContainer(ui);}}); ddTabs.tabs('select', 1);", true);
        }
    }