/// <summary> /// If the cookies failed to supply required ProductEntity data for BreadCrumb picking, then let's get it from the database the hard way /// Important Notes: Manufacturer need not to be lookuped since it doesn't have hierarchy. /// AppLogic.GetFirstProductEntityID cannot be used here since it is not guaranteed to return the Primary ProductEntity! /// </summary> /// <param name="SourceEntity"></param> /// <param name="SourceEntityInstanceName"></param> /// <param name="SourceEntityID"></param> /// <param name="emptySource"></param> private void PickupBreadCrumb(ref string SourceEntity, ref string SourceEntityInstanceName, ref string SourceEntityID, bool emptySource) { if (CommonLogic.IsStringNullOrEmpty(SourceEntity)) { SourceEntity = "Category"; } EntityHelper hlp = AppLogic.LookupHelper(SourceEntity); if (emptySource) { SourceEntityID = EntityHelper.GetProductsFirstEntity(ItemCode, SourceEntity).ToString(); if (!CommonLogic.IsStringNullOrEmpty(SourceEntityID) & SourceEntityID != "0") { emptySource = false; SourceEntityInstanceName = hlp.GetEntityName(SourceEntityID, ThisCustomer.LocaleSetting); } if (emptySource) { SourceEntity = "Department"; SourceEntityID = EntityHelper.GetProductsFirstEntity(ItemCode, SourceEntity).ToString(); if (!CommonLogic.IsStringNullOrEmpty(SourceEntityID) & SourceEntityID != "0") { emptySource = false; hlp = AppLogic.LookupHelper(SourceEntity); SourceEntityInstanceName = hlp.GetEntityName(SourceEntityID, ThisCustomer.LocaleSetting); } } } String ParentID = hlp.GetParentEntity(SourceEntityID); while (ParentID.Length != 0) { SectionTitle = "<a class=\"SectionTitleText\" href=\"" + SE.MakeEntityLink(SourceEntity, ParentID, "") + "\">" + hlp.GetEntityField(ParentID, "Description", ThisCustomer.LocaleSetting) + "</a> → " + SectionTitle; ParentID = hlp.GetParentEntity(ParentID); } //Get the description of the entity for display. string entityDisplayName = hlp.GetEntityField(SourceEntityID, "Description", ThisCustomer.LocaleSetting); //If the description was null or empty the use the entity instance name. if (string.IsNullOrEmpty(entityDisplayName)) { entityDisplayName = SourceEntityInstanceName; } //See if the source entity instance name is set. if (!string.IsNullOrEmpty(SourceEntityInstanceName)) { //Append the link to the entity and the product name to the end. SectionTitle += "<a class=\"SectionTitleText\" href=\"" + SE.MakeEntityLink(SourceEntity, SourceEntityID, SourceEntityInstanceName) + "\">" + entityDisplayName + "</a> → "; } }
public string GetInventoryItemsJSON() { var items = ServiceFactory.GetInstance <IProductService>().GetInventoryItems(); var categories = ServiceFactory.GetInstance <IProductService>().GetInventoryCategories(); foreach (var item in items) { item.Categories = categories.Where(c => c.ItemCode == item.ItemCode).ToList(); string seName = (item.ItemDescription.IsNullOrEmptyTrimmed()) ? item.ItemName : item.ItemDescription; string entityID = item.Counter.ToString(); item.ItemURL = SE.MakeEntityLink(DomainConstants.EntityProduct, entityID, seName); } return(items.OrderBy(i => i.ItemName).ToList().ToJSON()); }
private void ExtractEntity(string entityName, XPathNodeIterator entityIterator, SiteMapNode parentNode) { while (entityIterator.MoveNext()) { XmlNode entityNode = ExtractXmlNode(entityIterator.Current); int entityId = XmlCommon.XmlFieldNativeInt(entityNode, "EntityID"); string name = XmlCommon.XmlFieldByLocale(entityNode, "Description", Customer.Current.LocaleSetting); string url = SE.MakeEntityLink(entityName, entityId.ToString(), name); SiteMapNode entitySiteMapNode = new SiteMapNode(this, NewKey(), url, name); AddNode(entitySiteMapNode, parentNode); // recurse ExtractEntity(entityName, entityNode.CreateNavigator().Select("Entity"), entitySiteMapNode); } }
/// <summary> /// Extract entity ID, name,description to the list /// </summary> /// <param name="entityName">Entity name(category,section,manufacturer)</param> /// <param name="entityIterator"></param> private void ExtractEntity(string entityName, XPathNodeIterator entityIterator) { while (entityIterator.MoveNext()) { XmlNode entityNode = ExtractXmlNode(entityIterator.Current); int entityId = XmlCommon.XmlFieldNativeInt(entityNode, "EntityID"); string name = XmlCommon.XmlFieldByLocale(entityNode, "Name", ThisCustomer.LocaleSetting); string description = XmlCommon.XmlFieldByLocale(entityNode, "Description", ThisCustomer.LocaleSetting); string url = SE.MakeEntityLink(entityName, entityId, name); _resources.Add(new MobileResource(name, url, description)); // recurse ExtractEntity(entityName, entityNode.CreateNavigator().Select("Entity")); } }
protected void Page_Load(object sender, System.EventArgs e) { Response.ContentType = "text/xml"; Response.ContentEncoding = new System.Text.UTF8Encoding(); Response.Write("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); Response.Write("<rss version=\"2.0\" xmlns:ror=\"http://rorweb.com/0.1/\">"); Response.Write("<channel>"); Response.Write("<title>Products</title>"); String EntityName = CommonLogic.QueryStringCanBeDangerousContent("EntityName"); AppLogic.CheckForScriptTag(EntityName); int EntityID = CommonLogic.QueryStringUSInt("EntityID"); EntityHelper eHlp = AppLogic.LookupHelper(EntityName, 0); Response.Write("<item>"); Response.Write("<ror:type>Products</ror:type>"); Response.Write("<link>" + XmlCommon.XmlEncode(AppLogic.GetStoreHTTPLocation(false) + SE.MakeEntityLink(EntityName, EntityID, String.Empty)) + "</link> "); Response.Write("</item>"); Response.Write(eHlp.GetEntityRorObjectList(EntityID, Localization.GetDefaultLocale(), 0, 0)); Response.Write("</channel>"); Response.Write("</rss>"); }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> public void Page_Load(object sender, EventArgs e) { if (AppLogic.AppConfigBool("GoNonSecureAgain")) { m_SkinBase.GoNonSecureAgain(); } n = m_EntityHelper.m_TblMgr.SetContext(m_EntityInstanceID); //Determine if the entity is map to the current store. if (n == null) { HttpContext.Current.Server.Transfer("pagenotfound.aspx"); } //Checking for multi store. CachelessStore store = new CachelessStore(); store.StoreID = AppLogic.StoreID(); MappedObject map = store.GetMapping(m_EntitySpecs.m_EntityName, m_EntityInstanceID); if (AppLogic.GlobalConfigBool("AllowEntityFiltering") == true && !map.IsMapped) { HttpContext.Current.Server.Transfer("pagenotfound.aspx"); } m_ThisEntityNodeContext = n; String SENameINURL = CommonLogic.QueryStringCanBeDangerousContent("SEName"); if (SENameINURL.Equals(XmlCommon.XmlField(GetActiveEntityNodeContext, "SEName"), StringComparison.InvariantCultureIgnoreCase) == false) { string QS = BuildQueryString(); String NewURL = string.Format("{0}{1}{2}", AppLogic.GetStoreHTTPLocation(false, false), SE.MakeEntityLink(m_EntityHelper.GetEntitySpecs.m_EntityName, m_EntityInstanceID, XmlCommon.XmlField(GetActiveEntityNodeContext, "SEName")), QS); HttpContext.Current.Response.Write("<html><head><title>Object Moved</title></head><body><b>Object moved to <a href=\"" + NewURL + "\">HERE</a></b></body></html>"); HttpContext.Current.Response.Status = "301 Moved Permanently"; HttpContext.Current.Response.AddHeader("Location", NewURL); m_URLValidated = false; } if (m_URLValidated) { m_CategoryFilterID = CommonLogic.QueryStringUSInt("CategoryFilterID"); m_SectionFilterID = CommonLogic.QueryStringUSInt("SectionFilterID"); m_ProductTypeFilterID = CommonLogic.QueryStringUSInt("ProductTypeFilterID"); m_ManufacturerFilterID = CommonLogic.QueryStringUSInt("ManufacturerFilterID"); m_DistributorFilterID = CommonLogic.QueryStringUSInt("DistributorFilterID"); m_GenreFilterID = CommonLogic.QueryStringUSInt("GenreFilterID"); m_VectorFilterID = CommonLogic.QueryStringUSInt("VectorFilterID"); if (CommonLogic.QueryStringCanBeDangerousContent("CategoryFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && AppLogic.AppConfigBool("PersistFilters") && CommonLogic.CookieUSInt("CategoryFilterID") != 0) { m_CategoryFilterID = CommonLogic.CookieUSInt("CategoryFilterID"); } } if (CommonLogic.QueryStringCanBeDangerousContent("SectionFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && AppLogic.AppConfigBool("PersistFilters") && CommonLogic.CookieUSInt("SectionFilterID") != 0) { m_SectionFilterID = CommonLogic.CookieUSInt("SectionFilterID"); } } if (CommonLogic.QueryStringCanBeDangerousContent("ProductTypeFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && AppLogic.AppConfigBool("PersistFilters") && CommonLogic.CookieUSInt("ProductTypeFilterID") != 0) { m_ProductTypeFilterID = CommonLogic.CookieUSInt("ProductTypeFilterID"); } if (m_ProductTypeFilterID != 0 && !AppLogic.ProductTypeHasVisibleProducts(m_ProductTypeFilterID)) { m_ProductTypeFilterID = 0; } } if (CommonLogic.QueryStringCanBeDangerousContent("ManufacturerFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && AppLogic.AppConfigBool("PersistFilters") && CommonLogic.CookieUSInt("ManufacturerFilterID") != 0) { m_ManufacturerFilterID = CommonLogic.CookieUSInt("ManufacturerFilterID"); } } if (CommonLogic.QueryStringCanBeDangerousContent("DistributorFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && AppLogic.AppConfigBool("PersistFilters") && CommonLogic.CookieUSInt("DistributorFilterID") != 0) { m_DistributorFilterID = CommonLogic.CookieUSInt("DistributorFilterID"); } } if (CommonLogic.QueryStringCanBeDangerousContent("GenreFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && AppLogic.AppConfigBool("PersistFilters") && CommonLogic.CookieUSInt("GenreFilterID") != 0) { m_GenreFilterID = CommonLogic.CookieUSInt("GenreFilterID"); } } if (CommonLogic.QueryStringCanBeDangerousContent("VectorFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && AppLogic.AppConfigBool("PersistFilters") && CommonLogic.CookieUSInt("VectorFilterID") != 0) { m_VectorFilterID = CommonLogic.CookieUSInt("VectorFilterID"); } } if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length != 0) { m_CategoryFilterID = 0; m_SectionFilterID = 0; m_ManufacturerFilterID = 0; m_DistributorFilterID = 0; m_GenreFilterID = 0; m_VectorFilterID = 0; m_ProductTypeFilterID = 0; } if (AppLogic.AppConfigBool("PersistFilters")) { HttpContext.Current.Profile.SetPropertyValue("CategoryFilterID", m_CategoryFilterID.ToString()); HttpContext.Current.Profile.SetPropertyValue("SectionFilterID", m_SectionFilterID.ToString()); HttpContext.Current.Profile.SetPropertyValue("ManufacturerFilterID", m_ManufacturerFilterID.ToString()); HttpContext.Current.Profile.SetPropertyValue("DistributorFilterID", m_DistributorFilterID.ToString()); HttpContext.Current.Profile.SetPropertyValue("GenreFilterID", m_GenreFilterID.ToString()); HttpContext.Current.Profile.SetPropertyValue("VectorFilterID", m_VectorFilterID.ToString()); HttpContext.Current.Profile.SetPropertyValue("ProductTypeFilterID", m_ProductTypeFilterID.ToString()); } m_EntityInstanceName = m_EntityHelper.m_TblMgr.CurrentName(n, m_SkinBase.ThisCustomer.LocaleSetting); HttpContext.Current.Profile.SetPropertyValue("LastViewedEntityName", m_EntitySpecs.m_EntityName); HttpContext.Current.Profile.SetPropertyValue("LastViewedEntityInstanceID", m_EntityInstanceID.ToString()); HttpContext.Current.Profile.SetPropertyValue("LastViewedEntityInstanceName", m_EntityInstanceName); #region Vortx Mobile Xml Package Modification m_XmlPackage = Vortx.MobileFramework.MobileXmlPackageController.XmlPackageHook(m_EntityHelper.m_TblMgr.CurrentField(n, "XmlPackage").ToLowerInvariant(), m_SkinBase.ThisCustomer); #endregion if (m_XmlPackage.Length == 0) { m_XmlPackage = AppLogic.ro_DefaultEntityXmlPackage; // provide a default for backwards compatibility } String RunTimeParms = String.Format("EntityName={0}&EntityID={1}", m_EntitySpecs.m_EntityName, m_EntityInstanceID.ToString()); RunTimeParms += String.Format("&CatID={0}", CommonLogic.IIF(m_EntitySpecs.m_EntityName.Trim().Equals("CATEGORY", StringComparison.InvariantCultureIgnoreCase), m_EntityInstanceID.ToString(), m_CategoryFilterID.ToString())); RunTimeParms += String.Format("&SecID={0}", CommonLogic.IIF(m_EntitySpecs.m_EntityName.Trim().Equals("SECTION", StringComparison.InvariantCultureIgnoreCase), m_EntityInstanceID.ToString(), m_SectionFilterID.ToString())); RunTimeParms += String.Format("&ManID={0}", CommonLogic.IIF(m_EntitySpecs.m_EntityName.Trim().Equals("MANUFACTURER", StringComparison.InvariantCultureIgnoreCase), m_EntityInstanceID.ToString(), m_ManufacturerFilterID.ToString())); RunTimeParms += String.Format("&DistID={0}", CommonLogic.IIF(m_EntitySpecs.m_EntityName.Trim().Equals("DISTRIBUTOR", StringComparison.InvariantCultureIgnoreCase), m_EntityInstanceID.ToString(), m_DistributorFilterID.ToString())); RunTimeParms += String.Format("&GenreID={0}", CommonLogic.IIF(m_EntitySpecs.m_EntityName.Trim().Equals("GENRE", StringComparison.InvariantCultureIgnoreCase), m_EntityInstanceID.ToString(), m_GenreFilterID.ToString())); RunTimeParms += String.Format("&VectorID={0}", CommonLogic.IIF(m_EntitySpecs.m_EntityName.Trim().Equals("VECTOR", StringComparison.InvariantCultureIgnoreCase), m_EntityInstanceID.ToString(), m_VectorFilterID.ToString())); RunTimeParms += String.Format("&ProductTypeFilterID={0}", m_ProductTypeFilterID.ToString()); // CacheEntityPageHTML is an UNSUPPORTED and UNDOCUMENTED AppConfig // caching does NOT honor cross entity filtering, or other filters. Use it only on high traffic sites // with entity pages that do NOT vary by params other than those used in the CacheName string below. // if you are showing prices, they will remain the same during the cache duration (AppLogic.CacheDurationMinutes setting, usually 1 hr) String CacheName = String.Empty; m_SkinBase.SETitle = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SETitle", m_SkinBase.ThisCustomer.LocaleSetting); if (m_SkinBase.SETitle.Length == 0) { m_SkinBase.SETitle = Security.HtmlEncode(AppLogic.AppConfig("StoreName") + " - " + m_EntityInstanceName); } m_SkinBase.SEDescription = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SEDescription", m_SkinBase.ThisCustomer.LocaleSetting); if (m_SkinBase.SEDescription.Length == 0) { m_SkinBase.SEDescription = Security.HtmlEncode(m_EntityInstanceName); } m_SkinBase.SEKeywords = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SEKeywords", m_SkinBase.ThisCustomer.LocaleSetting); if (m_SkinBase.SEKeywords.Length == 0) { m_SkinBase.SEKeywords = Security.HtmlEncode(m_EntityInstanceName); } m_SkinBase.SENoScript = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SENoScript", m_SkinBase.ThisCustomer.LocaleSetting); m_SkinBase.SectionTitle = Breadcrumb.GetEntityBreadcrumb(m_EntityInstanceID, m_EntityInstanceName, m_EntitySpecs.m_EntityName, m_SkinBase.ThisCustomer); if (m_URLValidated) { m_PageOutput = "<!-- XmlPackage: " + m_XmlPackage + " -->\n"; if (m_XmlPackage.Length == 0) { m_PageOutput += "<p><b><font color=red>XmlPackage format was chosen, but no XmlPackage was specified!</font></b></p>"; } else { String s = null; if (AppLogic.AppConfigBool("CacheEntityPageHTML")) { CacheName = String.Format("CacheEntityPageHTML|{0}|{1}|{2}|{3}|{4}|{5}|{6}", m_EntitySpecs.m_EntityName, m_EntityInstanceID.ToString(), m_SkinBase.ThisCustomer.CustomerLevelID.ToString(), m_SkinBase.ThisCustomer.LocaleSetting, CommonLogic.QueryStringUSInt("PageNum").ToString(), m_SkinBase.ThisCustomer.AffiliateID.ToString(), Vortx.MobileFramework.MobileHelper.isMobile() ? "Mobile" : "Desktop" ); s = (String)HttpContext.Current.Cache.Get(CacheName); if (s != null) { s = "<!-- CacheEntityPageHTML -->" + s; } m_SkinBase.SectionTitle = (String)HttpContext.Current.Cache.Get(CacheName + "|SectionTitle"); m_SkinBase.SETitle = (String)HttpContext.Current.Cache.Get(CacheName + "|SETitle"); m_SkinBase.SEDescription = (String)HttpContext.Current.Cache.Get(CacheName + "|SEDescription"); m_SkinBase.SEKeywords = (String)HttpContext.Current.Cache.Get(CacheName + "|SEKeywords"); m_SkinBase.SENoScript = (String)HttpContext.Current.Cache.Get(CacheName + "|SENoScript"); if (m_SkinBase.SectionTitle == null) { m_SkinBase.SectionTitle = String.Empty; } if (m_SkinBase.SETitle == null) { m_SkinBase.SETitle = String.Empty; } if (m_SkinBase.SEDescription == null) { m_SkinBase.SEDescription = String.Empty; } if (m_SkinBase.SEKeywords == null) { m_SkinBase.SEKeywords = String.Empty; } if (m_SkinBase.SENoScript == null) { m_SkinBase.SENoScript = String.Empty; } } if (s == null || s.Length == 0) { using (XmlPackage2 p = new XmlPackage2(m_XmlPackage, m_SkinBase.ThisCustomer, m_SkinBase.SkinID, "", RunTimeParms, String.Empty, true)) { s = AppLogic.RunXmlPackage(p, m_SkinBase.GetParser, m_SkinBase.ThisCustomer, m_SkinBase.SkinID, true, true); if (p.SectionTitle != "") { m_SkinBase.SectionTitle = p.SectionTitle; } if (p.SETitle != "") { m_SkinBase.SETitle = p.SETitle; } if (p.SEDescription != "") { m_SkinBase.SEDescription = p.SEDescription; } if (p.SEKeywords != "") { m_SkinBase.SEKeywords = p.SEKeywords; } if (p.SENoScript != "") { m_SkinBase.SENoScript = p.SENoScript; } if (AppLogic.AppConfigBool("CacheEntityPageHTML")) { HttpContext.Current.Cache.Insert(CacheName, s, null, DateTime.Now.AddMinutes(AppLogic.CacheDurationMinutes()), TimeSpan.Zero); HttpContext.Current.Cache.Insert(CacheName + "|SectionTitle", p.SectionTitle, null, DateTime.Now.AddMinutes(AppLogic.CacheDurationMinutes()), TimeSpan.Zero); HttpContext.Current.Cache.Insert(CacheName + "|SETitle", p.SETitle, null, DateTime.Now.AddMinutes(AppLogic.CacheDurationMinutes()), TimeSpan.Zero); HttpContext.Current.Cache.Insert(CacheName + "|SEDescription", p.SEDescription, null, DateTime.Now.AddMinutes(AppLogic.CacheDurationMinutes()), TimeSpan.Zero); HttpContext.Current.Cache.Insert(CacheName + "|SEKeywords", p.SEKeywords, null, DateTime.Now.AddMinutes(AppLogic.CacheDurationMinutes()), TimeSpan.Zero); HttpContext.Current.Cache.Insert(CacheName + "|SENoScript", p.SENoScript, null, DateTime.Now.AddMinutes(AppLogic.CacheDurationMinutes()), TimeSpan.Zero); } } } m_PageOutput += s; } } } AppLogic.eventHandler("ViewEntityPage").CallEvent("&ViewEntityPage=true"); //check if the postback was caused by the TableOrderAddToCart button if (m_SkinBase.IsPostBack && isTableOrderAddToCartPostBack) { HandleTableOrderAddToCart(); } }
public void Page_Load(object sender, System.EventArgs e) { if (AppLogic.AppConfigBool("GoNonSecureAgain")) { SkinBase.GoNonSecureAgain(); } n = m_EntityHelper.m_TblMgr.SetContext(m_EntityInstanceID); if (n == null) { HttpContext.Current.Response.Redirect("t-error404.aspx"); } m_CategoryFilterID = CommonLogic.QueryStringCanBeDangerousContent("CategoryFilterID"); m_SectionFilterID = CommonLogic.QueryStringCanBeDangerousContent("SectionFilterID"); m_ProductTypeFilterID = CommonLogic.QueryStringCanBeDangerousContent("ProductTypeFilterID"); m_ManufacturerFilterID = CommonLogic.QueryStringCanBeDangerousContent("ManufacturerFilterID"); m_AttributeFilterID = CommonLogic.QueryStringCanBeDangerousContent("AttributeFilterID"); m_AttributeFilter = CommonLogic.GetAttributeFilter(); if (CommonLogic.QueryStringCanBeDangerousContent("CategoryFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && CommonLogic.CookieUSInt("CategoryFilterID") != 0) { m_CategoryFilterID = CommonLogic.CookieCanBeDangerousContent("CategoryFilterID", false); } } if (CommonLogic.QueryStringCanBeDangerousContent("SectionFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && CommonLogic.CookieUSInt("SectionFilterID") != 0) { m_SectionFilterID = CommonLogic.CookieCanBeDangerousContent("SectionFilterID", false); } } if (CommonLogic.QueryStringCanBeDangerousContent("ProductTypeFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && CommonLogic.CookieUSInt("ProductTypeFilterID") != 0) { m_ProductTypeFilterID = CommonLogic.CookieCanBeDangerousContent("ProductTypeFilterID", false); } if (m_ProductTypeFilterID != String.Empty && !AppLogic.ProductTypeHasVisibleProducts(m_ProductTypeFilterID)) { m_ProductTypeFilterID = String.Empty; } } if (CommonLogic.QueryStringCanBeDangerousContent("ManufacturerFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && CommonLogic.CookieUSInt("ManufacturerFilterID") != 0) { m_ManufacturerFilterID = CommonLogic.CookieCanBeDangerousContent("ManufacturerFilterID", false); } } if (CommonLogic.QueryStringCanBeDangerousContent("AttributeFilterID").Length == 0) { if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length == 0 && CommonLogic.CookieUSInt("AttributeFilterID") != 0) { m_AttributeFilterID = CommonLogic.CookieCanBeDangerousContent("AttributeFilterID", false); } } if (CommonLogic.QueryStringCanBeDangerousContent("ResetFilters").Length != 0) { m_CategoryFilterID = String.Empty; m_SectionFilterID = String.Empty; m_ManufacturerFilterID = String.Empty; m_ProductTypeFilterID = String.Empty; m_AttributeFilterID = String.Empty; m_AttributeFilter = String.Empty; } m_EntityInstanceName = m_EntityHelper.m_TblMgr.CurrentName(n, m_SkinBase.ThisCustomer.LocaleSetting); m_EntityInstanceNameForDisplay = CommonLogic.IIF(m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "Description", m_SkinBase.ThisCustomer.LocaleSetting) != String.Empty, m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "Description", m_SkinBase.ThisCustomer.LocaleSetting), m_EntityHelper.m_TblMgr.CurrentName(n, m_SkinBase.ThisCustomer.LocaleSetting)); AppLogic.SetCookie("LastViewedEntityName", m_EntitySpecs.m_EntityName, new TimeSpan(1, 0, 0, 0, 0)); AppLogic.SetCookie("LastViewedEntityInstanceID", m_EntityInstanceID.ToString(), new TimeSpan(1, 0, 0, 0, 0)); AppLogic.SetCookie("LastViewedEntityInstanceName", m_EntityInstanceNameForDisplay, new TimeSpan(1, 0, 0, 0, 0)); m_SkinBase.SETitle = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SETitle", m_SkinBase.ThisCustomer.LocaleSetting); if (m_SkinBase.SETitle.Length == 0) { m_SkinBase.SETitle = HttpContext.Current.Server.HtmlEncode(AppLogic.AppConfig("StoreName") + " - " + m_EntityInstanceName); } m_SkinBase.SEDescription = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SEDescription", m_SkinBase.ThisCustomer.LocaleSetting); if (m_SkinBase.SEDescription.Length == 0) { m_SkinBase.SEDescription = HttpContext.Current.Server.HtmlEncode(m_EntityInstanceName); } m_SkinBase.SEKeywords = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SEKeywords", m_SkinBase.ThisCustomer.LocaleSetting); if (m_SkinBase.SEKeywords.Length == 0) { m_SkinBase.SEKeywords = HttpContext.Current.Server.HtmlEncode(m_EntityInstanceName); } m_SkinBase.SENoScript = m_EntityHelper.m_TblMgr.CurrentFieldByLocale(n, "SENoScript", m_SkinBase.ThisCustomer.LocaleSetting); m_SkinBase.SectionTitle = "<span class=\"SectionTitleText\">"; String ParentName = String.Empty; String ParentID = m_EntityHelper.GetParentEntity(m_EntityInstanceID); while (ParentID != String.Empty) { ParentName = CommonLogic.IIF(m_EntityHelper.GetEntityField(ParentID, "Description", m_SkinBase.ThisCustomer.LocaleSetting) != String.Empty, m_EntityHelper.GetEntityField(ParentID, "Description", m_SkinBase.ThisCustomer.LocaleSetting), m_EntityHelper.GetEntityName(ParentID, m_SkinBase.ThisCustomer.LocaleSetting)); m_SkinBase.SectionTitle = "<a class=\"SectionTitleText\" href=\"" + SE.MakeEntityLink(m_EntitySpecs.m_EntityName, ParentID, ParentName) + "\">" + ParentName + "</a> → " + m_SkinBase.SectionTitle; ParentID = m_EntityHelper.GetParentEntity(ParentID); } m_SkinBase.SectionTitle += m_EntityInstanceNameForDisplay; m_SkinBase.SectionTitle += "</span>"; AppLogic.LogEvent(m_SkinBase.ThisCustomer.CustomerCode, 9, m_EntityInstanceID.ToString()); //Include for mobile manufacturer if (CurrentContext.IsRequestingFromMobileMode(m_SkinBase.ThisCustomer)) { m_XmlPackage = m_EntityHelper.m_TblMgr.CurrentField(n, "MobileXmlPackage").ToLowerInvariant(); if (m_XmlPackage.IsNullOrEmptyTrimmed()) { m_XmlPackage = m_EntityHelper.m_TblMgr.CurrentField(n, "XmlPackage").ToLowerInvariant(); } } else { m_XmlPackage = m_EntityHelper.m_TblMgr.CurrentField(n, "XmlPackage").ToLowerInvariant(); } if (m_XmlPackage.Length == 0) { m_XmlPackage = AppLogic.ro_DefaultEntityXmlPackage; // provide a default for backwards compatibility } GeneratePageOutput(); }
protected void Page_Load(object sender, System.EventArgs e) { Response.CacheControl = "private"; Response.Expires = 0; Response.AddHeader("pragma", "no-cache"); String EntityName = CommonLogic.QueryStringCanBeDangerousContent("EntityName"); AppLogic.CheckForScriptTag(EntityName); int EntityID = CommonLogic.QueryStringUSInt("EntityID"); if (EntityName.Length != 0 && EntityID != 0) { EntityHelper eHlp = AppLogic.CategoryStoreEntityHelper[0]; Response.Write(XmlCommon.XmlEncode(AppLogic.GetStoreHTTPLocation(false) + SE.MakeEntityLink(EntityName, EntityID, String.Empty)) + Environment.NewLine); Response.Write(eHlp.GetEntityYahooObjectList(EntityID, Localization.GetDefaultLocale(), 0, 0)); } }
protected void Page_Load(object sender, System.EventArgs e) { Response.ContentType = "text/xml"; Response.ContentEncoding = new System.Text.UTF8Encoding(); Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); String EntityName = CommonLogic.QueryStringCanBeDangerousContent("EntityName"); AppLogic.CheckForScriptTag(EntityName); int EntityID = CommonLogic.QueryStringUSInt("EntityID"); EntityHelper eHlp = AppLogic.LookupHelper(EntityName, AppLogic.StoreID()); Response.Write("<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9' xmlns:mobile='http://www.google.com/schemas/sitemap-mobile/1.0'>\n"); Response.Write("<url>"); Response.Write("<loc>" + XmlCommon.XmlEncode(AppLogic.GetStoreHTTPLocation(false, false) + SE.MakeEntityLink(EntityName, EntityID, String.Empty)) + "</loc> "); Response.Write("<changefreq>" + AppLogic.AppConfig("GoogleSiteMap.EntityChangeFreq") + "</changefreq> "); Response.Write("<priority>" + AppLogic.AppConfig("GoogleSiteMap.EntityPriority") + "</priority> "); Response.Write("<mobile:mobile/></url>\n"); Response.Write(GetMobileEntityGoogleObjectList(EntityDefinitions.LookupSpecs(EntityName), EntityID, Localization.GetDefaultLocale(), 0, 0)); Response.Write("</urlset>"); }
protected void Page_Load(object sender, System.EventArgs e) { Response.ContentType = "text/xml"; Response.ContentEncoding = new System.Text.UTF8Encoding(); Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); String EntityName = CommonLogic.QueryStringCanBeDangerousContent("EntityName"); AppLogic.CheckForScriptTag(EntityName); int EntityID = CommonLogic.QueryStringUSInt("EntityID"); EntityHelper eHlp = AppLogic.LookupHelper(EntityName, 0); Response.Write("<urlset xmlns=\"" + AppLogic.AppConfig("GoogleSiteMap.Xmlns") + "\">\n"); Response.Write("<url>"); Response.Write("<loc>" + XmlCommon.XmlEncode(AppLogic.GetStoreHTTPLocation(false, false) + SE.MakeEntityLink(EntityName, EntityID, String.Empty)) + "</loc> "); Response.Write("<changefreq>" + AppLogic.AppConfig("GoogleSiteMap.EntityChangeFreq") + "</changefreq> "); Response.Write("<priority>" + AppLogic.AppConfig("GoogleSiteMap.EntityPriority") + "</priority> "); Response.Write("</url>\n"); Response.Write(GoogleSiteMap.GetGoogleEntityProductURLNodes(EntityName, EntityID)); Response.Write("</urlset>"); }
protected void Page_Load(object sender, System.EventArgs e) { Response.CacheControl = "private"; Response.Expires = 0; Response.AddHeader("pragma", "no-cache"); String EntityName = CommonLogic.QueryStringCanBeDangerousContent("EntityName"); if (EntityName.IndexOf("<script>", StringComparison.InvariantCultureIgnoreCase) != -1) { throw new ArgumentException("SECURITY EXCEPTION"); } String EntityID = CommonLogic.QueryStringCanBeDangerousContent("EntityID"); if (EntityName.Length != 0 && EntityID != String.Empty) { EntityHelper eHlp = new EntityHelper(EntityDefinitions.LookupSpecs(EntityName)); Response.Write(XmlCommon.XmlEncode(AppLogic.GetStoreHTTPLocation(false) + SE.MakeEntityLink(EntityName, EntityID, String.Empty)) + Environment.NewLine); Response.Write(eHlp.GetEntityYahooObjectList(EntityID, Localization.WebConfigLocale, String.Empty, String.Empty)); } }
protected void Page_Load(object sender, System.EventArgs e) { Response.ContentType = "text/xml"; Response.ContentEncoding = new System.Text.UTF8Encoding(); Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); String EntityName = CommonLogic.QueryStringCanBeDangerousContent("EntityName"); if (EntityName.IndexOf("<script>", StringComparison.InvariantCultureIgnoreCase) != -1) { throw new ArgumentException("SECURITY EXCEPTION"); } String EntityID = CommonLogic.QueryStringCanBeDangerousContent("EntityID"); EntityHelper eHlp = new EntityHelper(EntityDefinitions.LookupSpecs(EntityName)); Response.Write("<urlset xmlns=\"" + AppLogic.AppConfig("GoogleSiteMap.Xmlns") + "\">"); Response.Write("<url>"); Response.Write("<loc>" + XmlCommon.XmlEncode(AppLogic.GetStoreHTTPLocation(false) + SE.MakeEntityLink(EntityName, EntityID, String.Empty)) + "</loc> "); Response.Write("<changefreq>" + AppLogic.AppConfig("GoogleSiteMap.EntityChangeFreq") + "</changefreq> "); Response.Write("<priority>" + AppLogic.AppConfig("GoogleSiteMap.EntityPriority") + "</priority> "); Response.Write("</url>"); Response.Write(eHlp.GetEntityGoogleObjectList(EntityID, Localization.WebConfigLocale, String.Empty, String.Empty)); Response.Write("</urlset>"); }