Exemple #1
0
        protected void LoadCustomEditor()
        {
            string subId = SessionHelper.GetSession(SessionKey.SubDomain);

            if (!subId.Equals(Guid.Empty.ToString()))
            {
                SubDomain subdomain = SubDomainCollection.GetSubDomainCollection().SingleOrDefault(sub => sub.Id == new Guid(subId));
                if (subdomain == null) // homepage
                {
                    Libs.Ultility.SettingEditor(redHTMLBlog, "");
                }
                else
                {
                    Libs.Ultility.SettingEditor(redHTMLBlog, subdomain.Name);
                }
            }
        }
Exemple #2
0
        protected void LoadCustomEditor()
        {
            Guid subId = SessionHelper.GetSession(SessionKey.SubDomain) == string.Empty ? Guid.Empty : new Guid(SessionHelper.GetSession(SessionKey.SubDomain));

            if (!(subId == Guid.Empty))
            {
                SubDomain subdomain =
                    SubDomainCollection.GetSubDomainCollection().SingleOrDefault(sub => sub.Id == subId);
                if (subdomain == null) // homepage
                {
                    Libs.Ultility.SettingEditor(RadEditor1, "");
                }
                else
                {
                    Libs.Ultility.SettingEditor(RadEditor1, subdomain.Name);
                }
            }
        }
        protected void LoadCustomEditor()
        {
            Guid subId = SessionHelper.GetSession(SessionKey.SubDomain) == string.Empty ? Guid.Empty : new Guid(SessionHelper.GetSession(SessionKey.SubDomain));

            if (!(subId == Guid.Empty))
            {
                SubDomain subdomain =
                    SubDomainCollection.GetSubDomainCollection().SingleOrDefault(sub => sub.Id == subId);
                if (subdomain == null) // homepage
                {
                    Libs.Ultility.SettingEditor(reDescription, "");
                    Libs.Ultility.SettingEditor(reContent, "");
                }
                else
                {
                    Libs.Ultility.SettingEditor(reDescription, subdomain.Name);
                    Libs.Ultility.SettingEditor(reContent, subdomain.Name);
                }
            }
            else
            {
                reContent.DocumentManager.SearchPatterns     = new[] { "*.*" };
                reContent.MediaManager.SearchPatterns        = new[] { "*.*" };
                reContent.FlashManager.SearchPatterns        = new[] { "*.*" };
                reContent.ImageManager.SearchPatterns        = new[] { "*.*" };
                reDescription.DocumentManager.SearchPatterns = new[] { "*.*" };
                reDescription.MediaManager.SearchPatterns    = new[] { "*.*" };
                reDescription.FlashManager.SearchPatterns    = new[] { "*.*" };
                reDescription.ImageManager.SearchPatterns    = new[] { "*.*" };
            }
            FileManagerDialogParameters documentManagerParameters = new FileManagerDialogParameters();

            documentManagerParameters.ViewPaths         = new string[] { "~/Resources/AlbumBookSlider" };
            documentManagerParameters.UploadPaths       = new string[] { "~/Resources/AlbumBookSlider" };
            documentManagerParameters.DeletePaths       = new string[] { "~/Resources/AlbumBookSlider" };
            documentManagerParameters.MaxUploadFileSize = 52428800;
            documentManagerParameters.SearchPatterns    = new[] { "*.pdf" };
            DialogDefinition documentManager = new DialogDefinition(typeof(DocumentManagerDialog), documentManagerParameters);

            documentManager.ClientCallbackFunction = "DocumentManagerFunction";
            documentManager.Width  = Unit.Pixel(694);
            documentManager.Height = Unit.Pixel(440);
            DialogOpener1.DialogDefinitions.Add("DocumentManager", documentManager);
        }
Exemple #4
0
        public static bool CheckAllowFunction(FUNCTIONS function)
        {
            if (System.Web.HttpContext.Current.User.IsInRole(System.Configuration.ConfigurationManager.AppSettings["GroupAdmin"]))
            {
                return(true);
            }
            string      subId     = SessionHelper.GetSession(SessionKey.SubDomain);
            List <Role> listRoles = GetRolesForFunction(function);

            foreach (Role role in listRoles)
            {
                if (System.Web.HttpContext.Current.User.IsInRole(role.Name))
                {
                    SubDomainCollection sub = SubDomainCollection.GetSubDomainCollection(role);
                    if (sub.Count(a => a.Id == new Guid(subId)) > 0)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Exemple #5
0
        protected void LoadCustomEditor()
        {
            string subId = SessionHelper.GetSession(SessionKey.SubDomain);

            if (subId == string.Empty)
            {
                return;
            }
            int    video_manage = 61;
            string groupAdmin   = System.Configuration.ConfigurationManager.AppSettings["GroupAdmin"];

            if (System.Web.HttpContext.Current.User.IsInRole(groupAdmin))
            {
                RadFileExplorer1.Visible = true;
            }
            else
            {
                bool check = PSCPortal.Security.SystemAuthentication.CheckAllowFunction(PSCPortal.Security.Function.Parse(video_manage));
                if (check == true)
                {
                    RadFileExplorer1.Visible = true;
                }
                else
                {
                    RadFileExplorer1.Visible = false;
                }
            }


            if (!subId.Equals(Guid.Empty.ToString()))
            {
                SubDomain subdomain = SubDomainCollection.GetSubDomainCollection().SingleOrDefault(sub => sub.Id == new Guid(subId));
                Libs.Ultility.SettingFileExplorer(RadFileExplorer1, "~/Resources/VideoClips/SubDomain/", subdomain.Name);
            }
            else
            {
                Libs.Ultility.SettingFileExplorer(RadFileExplorer1, "~/Resources/VideoClips/", "");
            }
        }
Exemple #6
0
        protected void LoadCustomEditor()
        {
            string subId = SessionHelper.GetSession(SessionKey.SubDomain);

            if (!subId.Equals(Guid.Empty.ToString()))
            {
                SubDomain subdomain = SubDomainCollection.GetSubDomainCollection().SingleOrDefault(sub => sub.Id == new Guid(subId));
                if (subdomain == null) // homepage
                {
                    Libs.Ultility.SettingEditor(redHTMLBlog, "");
                }
                else
                {
                    Libs.Ultility.SettingEditor(redHTMLBlog, subdomain.Name);
                }
            }
            else
            {
                redHTMLBlog.DocumentManager.SearchPatterns = new[] { "*.*" };
                redHTMLBlog.MediaManager.SearchPatterns    = new[] { "*.*" };
                redHTMLBlog.FlashManager.SearchPatterns    = new[] { "*.*" };
                redHTMLBlog.ImageManager.SearchPatterns    = new[] { "*.*" };
            }
        }