using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Memories; using Memories.Entities; public partial class Gallery_FolderView : System.Web.UI.Page { public string path = ""; public Settings settings; public string folderName = ""; public string comment = ""; protected void Page_Load(object sender, EventArgs e) { settings = new Settings(); path = Request.QueryString["path"]; SetBreadCrumbs(); MyPager.PageSize = settings.PageSize; MyPager.LinkTemplate = settings.UrlFormatter.GetFolderViewPagerTemplate(path); MyPager.SelectedLinkTemplate = "{0} "; Folder folder = MemoriesDB.GetFolder(settings, path); comment = folder.Comment; folderName = folder.Name; ImageList.DataSource = MemoriesDB.GetPagedFiles(folder, MyPager.CurrentPageNo, MyPager.PageSize, ref MyPager.PageCount); ImageList.DataBind(); if(folder.Folders.Count > 0) { FolderList.DataSource = folder.Folders; FolderList.DataBind(); } this.Title = "Systema-PTW | Gallery | " + folder.Name; } private void SetBreadCrumbs() { MyBreadCrumb.Links.Add(new Link(Utilities.ApplicationPath, "Gallery", "Gallery")); if (!String.IsNullOrEmpty(Request.QueryString["path"])) { string path = settings.UrlFormatter.Decrypt(Request.QueryString["path"]); string url = ""; foreach (string s in path.Trim('/').Split('/')) { url += s + "/"; Link link = new Link(settings.UrlFormatter.GetFolderViewUrl(url), s, s); MyBreadCrumb.Links.Add(link); } } } }