// ItemDisplayer.ItemLayoutOptions itemLayoutOptions = ItemDisplayer.ItemLayoutOptions.Columns; // ItemDisplayer.ItemLayoutOptions itemLayoutOptions = ItemDisplayer.ItemLayoutOptions.Categorized; protected void Page_Load(object sender, EventArgs e) { dbOps = DBOperations.Instance; links = Links.Instance; general = General.Instance; gui = GUIVariables.Instance; categories = Categories.Instance; engine = ProcessingEngine.Instance; imageEngine = ImageEngine.Instance; itemDisplayer = ItemDisplayer.Instance; seperator = gui.Seperator; // requestedTag = Request.QueryString["category"].Trim(); requestedCategory = Request.QueryString.Get("category"); if (!string.IsNullOrEmpty(Request.QueryString["startItem"])) { bool isStartItemInt = int.TryParse(Request.QueryString["startItem"].Trim(), out startItem); if (!isStartItemInt) { startItem = 0; } if (startItem < 0) { startItem = 0; } } else { startItem = 0; } if (!string.IsNullOrEmpty(Request.QueryString["sort"])) { string sortStr = Convert.ToString(Request.QueryString["sort"]); sort = engine.GetSortType(sortStr); } if (Request.Cookies["getputsLayoutCookie"] != null) { HttpCookie getputsLayoutCookie = Request.Cookies["getputsLayoutCookie"]; itemLayoutOptions = itemDisplayer.GetItemLayoutOptionsType(dbOps.Decrypt(getputsLayoutCookie["layout"].ToString().Trim())); } #region CookieAlreadyExists // START: If a getputsCookie with the Username already exists, do not show the Login Page. if (Request.Cookies["getputsCookie"] != null) { HttpCookie getputsCookie = Request.Cookies["getputsCookie"]; UID = dbOps.Decrypt(getputsCookie["UID"].ToString().Trim()); } if (string.IsNullOrEmpty(UID)) { } else { } // END: If a getputsCookie with the Username already exists, do not show the Login Page. #endregion CookieAlreadyExists if (string.IsNullOrEmpty(requestedCategory)) { LoadGenericCategoryTable(); } else if (!(categories.CategoriesList.Contains(requestedCategory) || categories.CategoriesList.Contains(requestedCategory.ToLower()))) { MessageLabel.Text = gui.RedFontStart + "Invalid Category" + gui.RedFontEnd; } else { string currentCategory = requestedCategory; if (imageEngine.IsIconsOn) { string iconLocation = imageEngine.LoadIconLocation(currentCategory); if (!string.IsNullOrEmpty(iconLocation)) { System.Web.UI.WebControls.Image icon = new System.Web.UI.WebControls.Image(); // icon.ImageUrl = links.DomainLink + iconLocation; icon.ImageUrl = iconLocation; icon.ToolTip = currentCategory; CategoryDiv.Controls.Add(icon); CategoryDiv.Controls.Add(new LiteralControl(" ")); } } MessageLabel.Text = gui.GreenFontStart + requestedCategory + gui.GreenFontEnd; // MessageLabel.Text = gui.WhiteFontStart + requestedCategory + gui.WhiteFontEnd; LoadCategoryTable(requestedCategory, sort); } }