public static void ProcessUrl(HttpContext context, ref EkRequestInformation RequestInfo) { //Check if this is a Asset request if (Ektron.ASM.EkHttpDavHandler.Utilities.IsAssetFile(context) || Ektron.ASM.EkHttpDavHandler.Utilities.IsPrivateAssetFile(context) || Ektron.ASM.EkHttpDavHandler.Utilities.IsDavFile(context)) { return; } //Skip workarea files if (context != null && context.Request.PhysicalPath.ToLower().IndexOf("\\workarea\\") >= 0) { return; } string fileExtension = string.Empty; fileExtension = System.IO.Path.GetExtension(HttpContext.Current.Request.PhysicalPath); if (fileExtension == string.Empty && !context.Request.Url.LocalPath.EndsWith("/")) { context.Response.Redirect(context.Request.Url.LocalPath + "/", true); } else { Ektron.Cms.Framework.Settings.UrlAliasing.CommonAliasManager aliasmanager = new Ektron.Cms.Framework.Settings.UrlAliasing.CommonAliasManager(); string targetUrl = aliasmanager.GetTarget(context.Request.Url); if (!string.IsNullOrEmpty(targetUrl)) { HttpContext.Current.Items["EkOriginalPath"] = HttpContext.Current.Request.Path; context.RewritePath(targetUrl, false); } } }
public void Initialize(EkRequestInformation requestInformation) { _messageHelper = new EkMessageHelper(requestInformation); _appPath = requestInformation.ApplicationPath; _appImgPath = requestInformation.AppImgPath; }
protected void Page_Load(object sender, System.EventArgs e) { MsgHelper = AppUI.EkMsgRef; m_refLib = AppUI.EkLibraryRef; CurrentUserId = AppUI.UserId; AppImgPath = (string)AppUI.AppImgPath; sitePath = AppUI.SitePath; AppName = AppUI.AppName; AppeWebPath = AppUI.AppeWebPath; AppPath = (string)AppUI.AppPath; EnableMultilingual = AppUI.EnableMultilingual; catid = Convert.ToInt64(Request.QueryString["catid"]); if (AppUI.ContentLanguage == -1) { AppUI.ContentLanguage = Convert.ToInt32(AppUI.GetCookieValue("DefaultLanguage")); } if (!string.IsNullOrEmpty(Request.QueryString["LangType"])) { ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]); AppUI.SetCookieValue("LastValidLanguageID", Convert.ToString(ContentLanguage)); } else { if (AppUI.GetCookieValue("LastValidLanguageID").ToString() != "") { ContentLanguage = System.Convert.ToInt32(AppUI.GetCookieValue("LastValidLanguageID")); } } AppUI.ContentLanguage = ContentLanguage; RI = AppUI.RequestInformationRef; RI.CallerId = Convert.ToInt64(Request.QueryString["uid"]); RI.CookieSite = Request.QueryString["siteid"]; RI.UserId = Convert.ToInt64(Request.QueryString["uid"]); m_refContent = new EkContent(RI); m_refLib = new Ektron.Cms.Library.EkLibrary(RI); m_refModule = new Ektron.Cms.Modules.EkModule(RI); action = Strings.Trim(Request.QueryString["action"]); if (action == "logintest") { username = Request.QueryString["u"]; password = Request.QueryString["p"]; domain = Request.QueryString["d"]; Login(username, password, domain); } else if (action == "categories") { string[] TestArray = new string[] { }; object loopnumber; loopnumber = 0; foldertype = Request.QueryString["foldertype"]; cFolders = m_refContent.GetFolderInfov2_0(0); OutputContentFolders("", 0, ref TestArray); if (ErrString != "") { Response.Write("<count>" + ((TestArray.Length - 1) - 0 + "</count>")); } else { if (foldertype == "all") { Response.Write("<count>" + ((TestArray.Length - 1) - 0 + 1) + "</count>"); Response.Write("<catid>0</catid><catname>\\</catname>"); } else { Response.Write("<count>" + ((TestArray.Length - 1) - 0 - 1) + "</count>"); } } for (int g = 0; g <= (TestArray.Length - 1) - 1; g++) { Response.Write(TestArray[g]); } } else if (action == "content") { Collection cTmp = new Collection(); int intTotalPages = 0; object[] ContentArray; ContentArray = new object[1]; loopcount = 0; cTmp.Add(catid, "FolderID", null, null); cTmp.Add("Title", "OrderBy", null, null); EkContentCol datacCol = m_refContent.GetAllViewableChildContentInfoV5_0(cTmp, 1, 0, ref intTotalPages); foreach (ContentBase item in datacCol) { Array.Resize(ref ContentArray, loopcount + 1 + 1); ContentArray[loopcount] = "<id>" + item.Id + "</id>" + "<title>" + item.Title + "</title>"; loopcount++; } Response.Write("<count>" + ((ContentArray.Length - 1) - 0 + "</count>")); for (int h = 0; h <= (ContentArray.Length - 1) - 1; h++) { Response.Write(ContentArray[h]); } } else if (action == "collections") { string orderby = "title"; NavArray = new object[1]; loopcount = 0; gtNavs = m_refContent.GetAllCollectionsInfo(catid, orderby); foreach (Collection tempLoopVar_gtNav in (IEnumerable)gtNavs) { gtNav = tempLoopVar_gtNav; Array.Resize(ref NavArray, loopcount + 1 + 1); NavArray[loopcount] = "<id>" + gtNav["CollectionID"] + "</id>" + "<title>" + gtNav["CollectionTitle"] + "</title>"; loopcount++; } Response.Write("<count>" + ((NavArray.Length - 1) - 0 + "</count>")); for (int h = 0; h <= (NavArray.Length - 1) - 1; h++) { Response.Write(NavArray[h]); } gtNavs = null; } else if (action == "collections_all") { NavArray = new object[1]; loopcount = 0; uid = Convert.ToInt64(Request.QueryString["uid"]); siteid = Request.QueryString["siteid"]; gtNavs = m_refContent.GetCollectionsReport(ref ErrorString); foreach (Collection tempLoopVar_gtNav in (IEnumerable)gtNavs) { gtNav = tempLoopVar_gtNav; Array.Resize(ref NavArray, loopcount + 1 + 1); NavArray[loopcount] = "<id>" + gtNav["CollectionID"] + "</id>" + "<title>id=" + gtNav["CollectionID"] + ", " + gtNav["CollectionTitle"] + "</title>"; loopcount++; } Response.Write("<count>" + ((NavArray.Length - 1) - 0 + "</count>")); for (int h = 0; h <= (NavArray.Length - 1) - 1; h++) { Response.Write(NavArray[h]); } gtNavs = null; } else if (action == "calendar") { NavArray = new object[1]; loopcount = 0; gtNavs = m_refModule.GetAllCalendarInfo(); foreach (Collection tempLoopVar_gtNav in (IEnumerable)gtNavs) { gtNav = tempLoopVar_gtNav; Array.Resize(ref NavArray, loopcount + 1 + 1); NavArray[loopcount] = "<id>" + gtNav["CalendarID"] + "</id>" + "<title>id=" + gtNav["CalendarID"] + ", " + gtNav["CalendarTitle"] + "</title>"; loopcount++; } Response.Write("<count>" + ((NavArray.Length - 1) - 0 + "</count>")); for (int h = 0; h <= (NavArray.Length - 1) - 1; h++) { Response.Write(NavArray[h]); } gtNavs = null; } else if (action == "ecmforms") { object gtForms; NavArray = new object[1]; loopcount = 0; gtForms = m_refModule.GetAllFormInfo(); foreach (Collection gtForm in (IEnumerable)gtForms) { Array.Resize(ref NavArray, loopcount + 1 + 1); NavArray[loopcount] = "<id>" + gtForm["FormID"] + "</id>" + "<title>id=" + gtForm["FormID"] + ", " + gtForm["FormTitle"] + "</title>"; loopcount++; } Response.Write("<count>" + ((NavArray.Length - 1) - 0 + "</count>")); for (int h = 0; h <= (NavArray.Length - 1) - 1; h++) { Response.Write(NavArray[h]); } gtNavs = null; } else if (action == "editcontent") { Collection cEContent; object myxmlstring; object PageInfo; object myhtmlcontent; object stylesheetpath = null; object mywhynoteditstring; Collection canI; PageInfo = "src=\"http://" + Request.ServerVariables["Server_name"] + "/"; cid = Convert.ToInt64(Request.QueryString["cid"]); canI = m_refContent.CanIv2_0(cid, "content"); if (Convert.ToBoolean(canI["CanIEdit"])) { cEContent = m_refContent.GetContentForEditingv2_0(cid); myhtmlcontent = cEContent["ContentHtml"]; if (Strings.Trim((string)(cEContent["StyleSheet"])) != "") { stylesheetpath = "http://" + Convert.ToString(Request.ServerVariables["Server_name"]) + sitePath + cEContent["StyleSheet"]; } myxmlstring = "<ektron_head_html><!-- Do not remove these xml tags <ektron_head><ektron_edit>yes</ektron_edit><ektron_content_id>" + cid + "</ektron_content_id> <ektron_title>" + cEContent["ContentTitle"] + "</ektron_title> <ektron_content_comment>" + cEContent["Comment"] + "</ektron_content_comment> <ektron_content_stylesheet>" + stylesheetpath + "</ektron_content_stylesheet> <ektron_folder_id>" + cEContent["FolderID"] + "</ektron_folder_id> <ektron_content_language>" + cEContent["ContentLanguage"] + "</ektron_content_language> <ektron_go_live>" + cEContent["GoLive"] + "</ektron_go_live> <ektron_end_date>" + cEContent["EndDate"] + "</ektron_end_date> <ektron_MetadataNumber>" + ((Collection)cEContent["ContentMetadata"]).Count + "</ektron_MetadataNumber> <ektron_PreviousState>" + cEContent["CurrentContentStatus"] + "</ektron_PreviousState> <ektron_iMaxContLength>" + cEContent["MaxContentSize"] + "</ektron_iMaxContLength> <ektron_content_Path>" + cEContent["Path"] + "</ektron_content_Path></ektron_head> --> </ektron_head_html> "; myxmlstring = myxmlstring + "<ektron_body_html>" + myhtmlcontent + "</ektron_body_html>"; } else { if (Convert.ToString(canI["ContentState"]) == "CheckedOut") { mywhynoteditstring = "You can not edit this cotent, content is checked out to: " + canI["UserName"]; } else { mywhynoteditstring = "You can not edit this this content. The content state is: " + canI["ContentState"] + "; The user is " + canI["UserName"]; } myxmlstring = "<ektron_head_html><!-- <ektron_edit>" + mywhynoteditstring + "</ektron_edit> --></ektron_head_html>"; } Response.Write(myxmlstring); canI = null; } else if (action == "publish_update_content") { ErrorString = ""; myerrormsg = ""; cid = Convert.ToInt64(Request.QueryString["cid"]); Collection cCont = m_refContent.GetContentByIDv2_0(cid); cCont.Remove("ContentHtml"); cCont.Add(Strings.Replace(Request.Form["ContentHTML"], "<myektronand/>", "&", 1, -1, 0), "ContentHtml", null, null); cCont.Remove("ContentTitle"); cCont.Add(Request.Form["content_title"], "ContentTitle", null, null); cCont.Remove("Comment"); cCont.Add(Request.Form["content_comment"], "Comment", null, null); cCont.Remove("ContentID"); cCont.Add(Request.Form["ektron_content_id"], "ContentID", null, null); cCont.Remove("FolderID"); cCont.Add(Request.Form["folder"], "FolderID", null, null); cCont.Remove("ContentLanguage"); cCont.Add(Request.Form["ektron_content_language"], "ContentLanguage", null, null); //cCont.Remove("SearchText") cCont.Add(Strings.Replace(Request.Form["searchhtml"], "<myektronand/>", "&", 1, -1, 0), "SearchText", null, null); cCont.Remove("GoLive"); cCont.Add(Request.Form["go_live"], "GoLive", null, null); cCont.Remove("EndDate"); cCont.Add(Request.Form["end_date"], "EndDate", null, null); cCont.Remove("ContentType"); cCont.Add(1, "ContentType", null, null); cCont.Remove("LockedContentLink"); cCont.Add(true, "LockedContentLink", null, null); try { ret = m_refContent.SaveContentv2_0(cCont); if (ErrorString != "") { myerrormsg = ErrorString; } else { ContentID = Convert.ToInt64(Request.Form["ektron_content_id"]); ret = m_refContent.CheckIn(ContentID, ""); if (ErrorString != "") { myerrormsg = ErrorString; } else { if (ret == false) { ret = m_refContent.SubmitForPublicationv2_0(ContentID, Convert.ToInt64(Request.Form["ektron_folder_id"]), 0, ""); } } } } catch (Exception ex) { myerrormsg = ex.Message.ToString(); } if (myerrormsg != "") { Response.Write(myerrormsg); } else { Response.Write("Content has been saved"); } } else if (action == "add_new_content") { cCont = new Collection(); try { cCont.Add((object)Strings.Replace(Convert.ToString(Request.Form["ContentHTML"]), "<myektronand/>", "&", 1, -1, 0), "ContentHtml", null, null); cCont.Add(Request.Form["content_title"], "ContentTitle", null, null); cCont.Add(Request.Form["content_comment"], "Comment", null, null); cCont.Add(System.Convert.ToInt32(Request.Form["folder"]), "FolderID", null, null); cCont.Add(Request.Form["ektron_content_language"], "ContentLanguage", null, null); cCont.Add(Strings.Replace(Request.Form["searchhtml"], "<myektronand/>", "&", 1, -1, 0), "SearchText", null, null); cCont.Add(Request.Form["go_live"], "GoLive", null, null); cCont.Add(Request.Form["end_date"], "EndDate", null, null); cCont.Add(true, "AddToQlink", null, null); cCont.Add(1, "ContentType", null, null); ErrorString = ""; ContentID = m_refContent.AddNewContentv2_0(cCont); } catch (Exception ex) { ErrorString = ex.Message.ToString(); } if (ErrorString != "") { myerrormsg = ErrorString; } else { ret = m_refContent.CheckIn(ContentID, ""); if (ErrorString != "") { myerrormsg = " Error CheckIn= " + ErrorString; } else { if (ret == false) { ret = m_refContent.SubmitForPublicationv2_0(ContentID, Convert.ToInt64(Request.Form["ektron_folder_id"]), 0, ""); if (ErrorString != "") { myerrormsg = "Error SubmitForPublicationv2_0= " + ErrorString; } } } } if (myerrormsg != "") { Response.Write(myerrormsg); } else { Response.Write("Content has been saved"); } } else if (action == "foldertypexml") { long folderid; folderid = Convert.ToInt64(Request.Form["folderid"]); myFolders = m_refContent.GetFolderInfov2_0(folderid, false, false); if (((Collection)myFolders["XmlConfiguration"]).Count == 0) { Response.Write("<XmlConfiguration>no</XmlConfiguration>"); } else { Response.Write("<XmlConfiguration>yes</XmlConfiguration>"); } myFolders = null; } else if (action == "canIsave") { cid = Convert.ToInt64(Request.Form["cid"]); cConts = m_refContent.GetContentByIDv2_0(cid); UserRights = m_refContent.CanIv2_0(cid, "content"); if (Convert.ToString(cConts["ContentStatus"]) == "O" && Convert.ToBoolean(UserRights["CanIEdit"])) { Response.Write("<canISave>yes</canISave>"); } else { if (Convert.ToString(cConts["ContentStatus"]) == "O") { Response.Write("<canISave>Did not save!!!!, Check out by " + Convert.ToString(UserRights["UserName"]) + "</canISave>"); } else { Response.Write("<canISave>Did not save!!! Content is not checked out to you, Its status is Status=" + Convert.ToString(cConts["ContentStatus"]) + " The user associated with this is " + Convert.ToString(UserRights["UserName"]) + "</canISave>"); } } } else if (action == "AddFolder") { object bRet1; object tmpPath; Collection libSettings; cFolder = new Collection(); cFolder.Add(Request.Form["foldername"], "FolderName", null, null); cFolder.Add(Request.Form["folderdescription"], "FolderDescription", null, null); cFolder.Add(Request.Form["ParentID"], "ParentID", null, null); cFolder.Add(Request.Form["templatefilename"], "TemplateFileName", null, null); cFolder.Add(Request.Form["stylesheet"], "StyleSheet", null, null); libSettings = m_refLib.GetLibrarySettingsv2_0(); tmpPath = libSettings["ImageDirectory"]; cFolder.Add(getPhysicalPath(tmpPath), "AbsImageDirectory", null, null); tmpPath = libSettings["FileDirectory"]; cFolder.Add(getPhysicalPath(tmpPath), "AbsFileDirectory", null, null); libSettings = null; bRet1 = addLBpaths(cFolder, uid, siteid); cFolder.Add(true, "XmlInherited", null, null); cFolder.Add(0, "XmlConfiguration", null, null); cFolder.Add(1, "InheritMetadata", null, null); //break inherit button is check. cFolder.Add(0, "InheritMetadataFrom", null, null); ret = m_refContent.AddContentFolderv2_0(ref cFolder); Response.Write("Folder added"); } else if (action == "metadata") { int loopcounter = 0; object cMetadataTypes; object[] MetaDataArray; MetaDataArray = new object[1]; cMetadataTypes = m_refContent.GetMetadataTypes("Name"); foreach (Collection cMetadataType in (IEnumerable)cMetadataTypes) { Array.Resize(ref MetaDataArray, loopcounter + 1 + 1); MetaDataArray[loopcounter] = "<meta>" + (cMetadataType["MetaTypeName"]) + "</meta>"; loopcounter++; } Response.Write("<count>" + ((MetaDataArray.Length - 1) - 0 + "</count>")); for (int j = 0; j <= (MetaDataArray.Length - 1) - 1; j++) { Response.Write(MetaDataArray[j]); } } else if (action == "ecmmenus") { object FolderID; FolderID = 0; Response.Write(GetMenuList(FolderID.ToString(), "Title")); } else if (action == "ecmxmconfig") { Response.Write(GetXmlConfigurationList("")); } else if (action == "ecmlanguages") { Response.Write(GetLanguages()); } else { Response.Write("DreamWeaver - No Action parameter"); } }
protected void Page_Load(object sender, EventArgs e) { ErrorPanel.Visible = false; if (null == _requestInfo) { _requestInfo = _refContentApi.RequestInformationRef; } if (!_dataManager.IsAnalyticsViewer()) { litErrorMessage.Text = GetMessage("com: user does not have permission"); ErrorPanel.Visible = true; return; } RegisterScripts(); Page.Validate(); if (!Page.IsValid) { _reportGenerated = true; } this.AnalyticsDetail.ProviderSegments = this.ProviderSegments; ltrlNoRecords.Text = GetMessage("lbl no records"); litCssTweaks.Text = String.Empty; }
public WidgetHostCtrl() { requestInformation = ObjectFactory.GetRequestInfoProvider().GetRequestInformation(); m_refMsg = new EkMessageHelper(requestInformation); appPath = requestInformation.ApplicationPath; }
protected void Page_Load(object sender, EventArgs e) { ErrorPanel.Visible = false; if (null == _requestInfo) { _requestInfo = _refContentApi.RequestInformationRef; } if (!_dataManager.IsAnalyticsViewer()) { litErrorMessage.Text = GetMessage("com: user does not have permission"); ErrorPanel.Visible = true; return; } RegisterScripts(); Page.Validate(); if (!Page.IsValid) { _reportGenerated = true; } if (!String.IsNullOrEmpty(_providerName) && _dataManager.HasProvider(_providerName)) { SegmentPersistenceId = _dataManager.GetSegmentFilterCookieName(_providerName); } ltrlNoRecords.Text = GetMessage("lbl no records"); }
private void UsingLanguage(EkRequestInformation reqInfo, int languageId, Action procedure) { int savedContentLanguage = reqInfo.ContentLanguage; try { reqInfo.ContentLanguage = languageId; procedure(); } finally { reqInfo.ContentLanguage = savedContentLanguage; } }
/// <summary> /// Impersonating the Inbound Connection User of the DxH. /// </summary> /// <param name="authenticationToken"></param> /// <param name="requestInformation"></param> private void ImpersonateUser(string authenticationToken, EkRequestInformation requestInformation) { UserData user = null; if (HttpContext.Current != null && HttpContext.Current.Session != null) { user = UserContext.GetCurrentUser(); if (user.AuthenticationToken != authenticationToken) user = null; } if (user == null || string.IsNullOrEmpty(user.AuthenticationToken)) { IUser userManager = ObjectFactory.GetUser(requestInformation.Clone() as EkRequestInformation); userManager.RequestInformation.CallerId = EkConstants.InternalAdmin; userManager.RequestInformation.UserId = EkConstants.InternalAdmin; user = userManager.GetItemByToken(authenticationToken); } if (user != null) { requestInformation.UserId = user.Id; requestInformation.CallerId = user.Id; requestInformation.AuthenticationToken = authenticationToken; requestInformation.ClientEktGUID = user.SessionId.ToString(); } if (requestInformation.UserId == 0) throw new SoapException("User not logged in", SoapException.ClientFaultCode); }
protected void Page_Init(object sender, EventArgs e) { requestInformation = ObjectFactory.GetRequestInfoProvider().GetRequestInformation(); m_refMsg = new EkMessageHelper(requestInformation); appPath = requestInformation.ApplicationPath; columnDisplay.ItemDataBound += new RepeaterItemEventHandler(columnDisplay_ItemDataBound); (Page as PageBuilder).PageUpdated += new EventHandler(Page_Updated); }
private void Page_Load(object sender, EventArgs e) { bool IsRunning = EkThreads.URLCheckerClass.ThreadRunning; StyleSheetJS.Text = m_refStyle.GetClientScript(); SiteAPI m_refSiteApi = new SiteAPI(); m_refMsg = m_refSiteApi.EkMsgRef; btnCheck.ToolTip = m_refMsg.GetMessage("btn Check Links"); if (m_RequestInfo == null) { ContentAPI refContentApi = new ContentAPI(); m_RequestInfo = refContentApi.RequestInformationRef; } RegisterResources(); Utilities.ValidateUserLogin(); if ( Convert.ToBoolean( m_RequestInfo.IsMembershipUser ) || m_RequestInfo.UserId == 0) { Response.Redirect("blank.htm", false); return; } if (IsRunning) { Response.AppendHeader("Refresh", "5"); } // set initial values of fields on page if (Page.IsPostBack == false) { var m_refContentApi = new ContentAPI(); var styleHelper = new StyleHelper(); if (IsRunning) { checkWrapper.Visible = false; btnCheck.Visible = false; //printWrapper.Visible = false; //btnPrint.Visible = false; cancelWrapper.Visible = true; btnCancel.Visible = true; //CancelButton.Text = styleHelper.GetButtonEventsWCaption(m_refContentApi.AppPath + "images/UI/Icons/cancel.png", "javascript:btnCancel_Click();", m_refMsg.GetMessage("generic cancel"), m_refMsg.GetMessage("generic cancel"), "", StyleHelper.CancelButtonCssClass, true); lnkTabTestURL.Visible = false; lnkTabStatus.Enabled = false; // purge page state HttpContext.Current.Session["_PAGE_STATE_" + Request.Url.AbsolutePath] = null; } else { //CancelButton.Text = String.Empty; PrintButton.Text = styleHelper.GetButtonEventsWCaption(m_refContentApi.AppPath + "images/UI/Icons/print.png", "#", m_refMsg.GetMessage("Print Report button text"), m_refMsg.GetMessage("btn print"), "onclick=\"PrintReport();\"", StyleHelper.PrintButtonCssClass, true); btnCancel.Visible = false; cancelWrapper.Visible = false; } if (ConfigurationManager.AppSettings["ek_DebugLinkCheck"] != "True") { lnkTabTestURL.Visible = false; } if (! IsRunning) { txtStatus.Text = m_refMsg.GetMessage("txt linkcheck idle"); txtStatus.ToolTip = txtStatus.Text; } else { txtStatus.Text = EkThreads.URLCheckerClass.ThreadStatus; txtStatus.ToolTip = txtStatus.Text; } if (EkThreads.URLCheckerClass.ThreadLog.Length == 0) { ApplicationAPI m_AppRef = new ApplicationAPI(); string reportfile = m_AppRef.RequestInformationRef.PhysicalAppPath + "ekbadlinkrpt.html"; if (File.Exists(reportfile)) { System.IO.StreamReader oRead; try { oRead = System.IO.File.OpenText(reportfile); EkThreads.URLCheckerClass.ThreadLog = new StringBuilder(oRead.ReadToEnd()); } catch { // ignore errors reading from report file } } else { txtStatus.Text = ""; // don't display status if it was never run txtStatus.ToolTip = txtStatus.Text; } } if (EkThreads.URLCheckerClass.ThreadLog.Length > 0) { txtReport.Text = txtReport.Text; if (IsRunning) { txtReport.Text = txtReport.Text + "<ul style=\'margin: .5em 2em\'>" + "<li>Objects Checked: " + EkThreads.URLCheckerClass.CountObjsChecked.ToString(); txtReport.Text = txtReport.Text + "</ li>" + "<li>Links Checked: " + EkThreads.URLCheckerClass.CountLinksChecked.ToString(); txtReport.Text = txtReport.Text + "</li>" + "<li>Bad Links: " + EkThreads.URLCheckerClass.CountBadLinks.ToString() + "</li></ul>"; if (EkThreads.URLCheckerClass.CountBadLinks > 500) { txtReport.Text = txtReport.Text + "Too many errors. Please wait for report to be completed."; } else { txtReport.Text = txtReport.Text + EkThreads.URLCheckerClass.ThreadLog.ToString(); } } else { txtReport.Text = txtReport.Text + "<span id=\"ReportDataGrid\">"; txtReport.Text = txtReport.Text + "<span id=\"viewApprovalList_ViewGrid\">"; txtReport.Text = txtReport.Text + "<table><tr><td>"; txtReport.Text = txtReport.Text + EkThreads.URLCheckerClass.ThreadLog.ToString(); txtReport.Text = txtReport.Text + "</td></tr></table>"; txtReport.Text = txtReport.Text + "</span>"; txtReport.Text = txtReport.Text + "</span>"; } } // handle localization text StyleHelper m_refStyle1 = new StyleHelper(); if (! IsRunning) { m_refStyle1.MakeToolbarButton(btnCheck, m_refMsg.GetMessage("alt linkcheck button text"), m_refMsg.GetMessage("alt linkcheck button text")); //m_refStyle1.MakeToolbarButton(btnPrint, m_refMsg.GetMessage("btn print"), m_refMsg.GetMessage("btn print")); } else { //m_refStyle1.MakeToolbarButton(btnCancel, m_refMsg.GetMessage("generic cancel"), m_refMsg.GetMessage("generic cancel")); } lnkTabStatus.Text = m_refMsg.GetMessage("tab linkcheck status"); lnkTabStatus.ToolTip = lnkTabStatus.Text; lnkTabTestURL.Text = m_refMsg.GetMessage("tab linkcheck testurl"); lnkTabTestURL.ToolTip = lnkTabTestURL.Text; lblStatus.Text = m_refMsg.GetMessage("lbl linkcheck status"); lblStatus.ToolTip = lblStatus.Text; lblURL.Text = m_refMsg.GetMessage("lbl linkcheck testurl"); lblURL.ToolTip = lblURL.Text; btnHelp.Text = m_refStyle.GetHelpButton("badlinkcheck", ""); } }
bool GetComplianceModeFromRequestInfo() { bool result = false; try { if (RequestInfo == null) RequestInfo = ObjectFactory.GetRequestInfoProvider().GetRequestInformation(); userId = RequestInfo.UserId; result = RequestInfo.CommerceSettings.ComplianceMode; } catch (Exception ex) { _error = ex.Message; } return result; }
void context_BeginRequest(object sender, EventArgs e) { RequestInfo = null; // Parse Lang type from query string, it might be appended to alias. GetLanguage(); // Process URL Alias UrlAliasingBase.ProcessUrl(HttpContext.Current, ref RequestInfo); // Again Parse lang type from query string, might have been encoded in alias. GetLanguage(); // Finally set the global Culture SetCulture(langtype); }