// Token: 0x06001D1B RID: 7451 RVA: 0x000A7978 File Offset: 0x000A5B78
 protected void RenderMenuItemInnerSpan(TextWriter output, string text, ContextMenu.RenderMenuItemIcon renderMenuItemIcon, ContextMenu.RenderMenuItemHtml renderMenuItemHtml, bool blockContent)
 {
     if (output == null)
     {
         throw new ArgumentNullException("output");
     }
     if (renderMenuItemHtml == null && text == null)
     {
         throw new InvalidOperationException("Must have either a non null string text or a non null renderMenuItemHtml");
     }
     if (!this.hasImages && renderMenuItemIcon != null)
     {
         throw new InvalidOperationException("This menu doesn't have images");
     }
     if (this.hasImages || this.isAnr)
     {
         output.Write("<span class=\"cmIco\"");
         if (this.id != null)
         {
             output.Write(" id=spnImg");
         }
         output.Write(">");
         if (!this.isAnr)
         {
             if (renderMenuItemIcon != null)
             {
                 renderMenuItemIcon(output);
             }
             else
             {
                 RenderingUtilities.RenderInlineSpacer(output, this.userContext, 16, "imgI");
             }
         }
         output.Write("</span>");
         if (!blockContent)
         {
             RenderingUtilities.RenderInlineSpacer(output, this.userContext, this.ImagePadding);
         }
     }
     if (!blockContent)
     {
         output.Write("<span id=spnT>");
     }
     if (text != null)
     {
         string text2 = Utilities.HtmlEncode(text);
         text2 = text2.Replace("\\n", "<br>");
         output.Write(SanitizedHtmlString.GetSanitizedStringWithoutEncoding(text2));
     }
     else
     {
         renderMenuItemHtml(output);
     }
     if (!blockContent)
     {
         output.Write("</span>");
     }
 }
Beispiel #2
0
        protected void RenderCalendarProperties(CalendarViewBase view)
        {
            CalendarAdapterBase calendarAdapter = view.CalendarAdapter;

            this.RenderValue(this.Output, "sFId", calendarAdapter.IdentityString);
            this.RenderValue(this.Output, "fHRtL", calendarAdapter.UserCanReadItem);
            this.RenderValue(this.Output, "Title", SanitizedHtmlString.GetSanitizedStringWithoutEncoding(calendarAdapter.CalendarTitle));
            this.RenderValue(this.Output, "sDD", view.FolderDateDescription);
            this.RenderValue(this.Output, "fCC", calendarAdapter.DataSource.UserCanCreateItem);
            CalendarAdapter calendarAdapter2 = calendarAdapter as CalendarAdapter;

            this.RenderValue(this.Output, "iSharedType", (int)calendarAdapter.DataSource.SharedType);
            if (calendarAdapter2 != null)
            {
                if (calendarAdapter2.PromotedFolderId != null)
                {
                    this.RenderValue(this.Output, "sPromotedFolderId", calendarAdapter2.PromotedFolderId.ToBase64String());
                }
                this.RenderValue(this.Output, "sLegacyDN", calendarAdapter2.LegacyDN);
                if (calendarAdapter2.DataSource.SharedType == SharedType.InternalFreeBusy)
                {
                    this.RenderValue(this.Output, "sCalendarOwnerDisplayName", calendarAdapter2.CalendarOwnerDisplayName);
                }
                this.RenderValue(this.Output, "iOlderExchangeCalendarType", (int)calendarAdapter2.OlderExchangeSharedCalendarType);
                this.RenderColor(calendarAdapter2);
                this.RenderValue(this.Output, "fPublishedOut", calendarAdapter2.IsPublishedOut);
                if (calendarAdapter2.IsExternalSharedInFolder)
                {
                    if (calendarAdapter2.LastAttemptTime != ExDateTime.MinValue)
                    {
                        this.RenderValue(this.Output, "dtSyncTime", calendarAdapter2.LastAttemptTime.ToString("g", this.SessionContext.UserCulture));
                    }
                    if (calendarAdapter2.LastSuccessSyncTime != ExDateTime.MinValue)
                    {
                        this.RenderValue(this.Output, "dtSuccessSyncTime", calendarAdapter2.LastSuccessSyncTime.ToString("g", this.SessionContext.UserCulture));
                    }
                }
                this.RenderValue(this.Output, "fArchive", calendarAdapter2.IsInArchiveMailbox);
                if (calendarAdapter2.DataSource.SharedType == SharedType.WebCalendar)
                {
                    this.RenderValue(this.Output, "sWebCalUrl", calendarAdapter2.WebCalendarUrl);
                    return;
                }
            }
            else if (calendarAdapter is PublishedCalendarAdapter)
            {
                PublishedCalendarAdapter publishedCalendarAdapter = (PublishedCalendarAdapter)calendarAdapter;
                this.RenderValue(this.Output, "sPublishRange", SanitizedHtmlString.Format(LocalizedStrings.GetNonEncoded(-1428371010), new object[]
                {
                    publishedCalendarAdapter.PublishedFromDateTime.ToShortDateString(),
                    publishedCalendarAdapter.PublishedToDateTime.ToShortDateString()
                }));
            }
        }
 internal void BuildInfobar(Infobar infobar)
 {
     if (this.IsPhishingItemWithEnabledLinks())
     {
         string s = "<a id=\"aIbBlk\" href=\"#\" " + string.Format(CultureInfo.InvariantCulture, ">{0}</a> {1} ", new object[]
         {
             LocalizedStrings.GetHtmlEncoded(-672110188),
             LocalizedStrings.GetHtmlEncoded(-1020475744)
         });
         string s2 = string.Format(CultureInfo.InvariantCulture, "<a href=\"#\" " + Utilities.GetScriptHandler("onclick", "opnHlp(\"" + Utilities.JavascriptEncode(Utilities.BuildEhcHref(HelpIdsLight.EmailSafetyLight.ToString())) + "\");") + ">{0}</a>", new object[]
         {
             LocalizedStrings.GetHtmlEncoded(338562664)
         });
         infobar.AddMessage(SanitizedHtmlString.Format("{0}{1}{2}", new object[]
         {
             LocalizedStrings.GetNonEncoded(1581910613),
             SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s),
             SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s2)
         }), InfobarMessageType.Phishing);
     }
     if (this.isDelegated)
     {
         infobar.AddMessage(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(-1205864060), new object[]
         {
             MeetingUtilities.GetReceivedOnBehalfOfDisplayName(this.meetingRequest)
         }), InfobarMessageType.Informational);
     }
     if (this.meetingRequest.MeetingRequestType == MeetingMessageType.PrincipalWantsCopy)
     {
         infobar.AddMessage(SanitizedHtmlString.FromStringId(-332743944), InfobarMessageType.Informational);
     }
     if (!this.IsDraft && this.meetingRequest.MeetingRequestType != MeetingMessageType.Outdated && this.CalendarItemBase != null)
     {
         CalendarUtilities.AddCalendarInfobarMessages(infobar, this.CalendarItemBase, this.meetingRequest, this.UserContext);
     }
     if (this.infobarResponseString != null)
     {
         infobar.AddMessage(this.infobarResponseString.Value, InfobarMessageType.Informational);
     }
 }
 // Token: 0x06002FBD RID: 12221 RVA: 0x001159C4 File Offset: 0x00113BC4
 private static SanitizedHtmlString GetWebBeaconBlockedInfobarMessage(WebBeaconFilterLevels level, string additionalAttribute)
 {
     if (additionalAttribute == null)
     {
         throw new ArgumentNullException("item");
     }
     if (level == WebBeaconFilterLevels.UserFilterChoice)
     {
         string s = string.Format("<a id=\"aIbBlk\" href=\"#\" {0}", additionalAttribute) + string.Format(CultureInfo.InvariantCulture, ">{0}</a>", new object[]
         {
             LocalizedStrings.GetHtmlEncoded(469213884)
         });
         return(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(2063285740), new object[]
         {
             SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s)
         }));
     }
     if (level == WebBeaconFilterLevels.ForceFilter)
     {
         return(SanitizedHtmlString.FromStringId(-1196115124));
     }
     return(SanitizedHtmlString.Empty);
 }
Beispiel #5
0
        // Token: 0x06002FD7 RID: 12247 RVA: 0x001170C4 File Offset: 0x001152C4
        public static void RenderCancelRecurrenceCalendarItemDialog(TextWriter output, bool showCancelOccurrence, bool isMeeting, bool isPermanentDelete, bool showWarningAttendeesWillNotBeNotified)
        {
            output.Write("<div id=\"divCRMsg\" style=\"display:none\" sTtl=\"");
            if (isMeeting)
            {
                output.Write(SanitizedHtmlString.FromStringId(-2063563644));
            }
            else
            {
                output.Write(SanitizedHtmlString.FromStringId(78467316));
            }
            output.Write("\" sOk=\"");
            output.Write(SanitizedHtmlString.FromStringId(2041362128));
            output.Write("\" sCncl=\"");
            output.Write(SanitizedHtmlString.FromStringId(-1936577052));
            output.Write("\">");
            if (showWarningAttendeesWillNotBeNotified)
            {
                output.Write("<div class=\"w\">");
                output.Write(SanitizedHtmlString.FromStringId(-1626455311));
                output.Write("</div>");
            }
            if (showCancelOccurrence)
            {
                output.Write("<div class=\"cancelRcrRow\">");
                output.Write("<div class=\"fltBefore cancelRcrInput\"><input type=\"radio\" name=\"rdoCncl\" id=\"rdoCnclO\"></div>");
                output.Write("<div class=\"fltBefore\"><label for=\"rdoCnclO\">");
                if (isPermanentDelete)
                {
                    output.Write(SanitizedHtmlString.FromStringId(-897929905));
                }
                else
                {
                    output.Write(SanitizedHtmlString.FromStringId(-673339501));
                }
                output.Write("</label></div><div class=\"clear\"></div></div>");
            }
            output.Write("<div class=\"cancelRcrRow\">");
            output.Write("<div class=\"fltBefore cancelRcrInput\"><input type=\"radio\" name=\"rdoCncl\" id=\"rdoCnclD\"></div>");
            output.Write("<div class=\"fltBefore\"><label for=\"rdoCnclD\">");
            StringBuilder stringBuilder = new StringBuilder();

            using (SanitizingStringWriter <OwaHtml> sanitizingStringWriter = new SanitizingStringWriter <OwaHtml>(stringBuilder))
            {
                sanitizingStringWriter.Write("&nbsp;</label></div><div class=\"fltBefore dtPkerAd\">");
                DatePickerDropDownCombo.RenderDatePicker(sanitizingStringWriter, "divRecurrenceDate", DateTimeUtilities.GetLocalTime());
                sanitizingStringWriter.Write("</div><div class=\"fltBefore\"><label for=\"rdoCnclD\">");
                sanitizingStringWriter.Close();
            }
            if (isPermanentDelete)
            {
                output.Write(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(-1487900473), new object[]
                {
                    SanitizedHtmlString.GetSanitizedStringWithoutEncoding(stringBuilder.ToString())
                }));
            }
            else
            {
                output.Write(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(-1062918861), new object[]
                {
                    SanitizedHtmlString.GetSanitizedStringWithoutEncoding(stringBuilder.ToString())
                }));
            }
            output.Write("</label></div><div class=\"clear\"></div></div>");
            output.Write("<div class=\"cancelRcrRow\">");
            output.Write("<div class=\"fltBefore cancelRcrInput\"><input type=\"radio\" name=\"rdoCncl\" id=\"rdoCnclA\"></div>");
            output.Write("<div class=\"fltBefore\"><label for=\"rdoCnclA\">");
            if (isPermanentDelete)
            {
                output.Write(SanitizedHtmlString.FromStringId(817420711));
            }
            else
            {
                output.Write(SanitizedHtmlString.FromStringId(1631668395));
            }
            output.Write("</label></div>");
            output.Write("</div>");
        }
        // Token: 0x0600061F RID: 1567 RVA: 0x000307CC File Offset: 0x0002E9CC
        public static IList <AttachmentLink> GenerateNonEditableMessageBodyAndRenderInfobarMessages(Item item, TextWriter writer, OwaContext owaContext, Infobar infobar, bool allowWebBeacon, bool forceEnableItemLink, string itemType, string action, string state, bool isEmbedded, string attachmentUrl)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            if (owaContext == null)
            {
                throw new ArgumentNullException("owaContext");
            }
            UserContext           userContext = owaContext.UserContext;
            WebBeaconFilterLevels filterWebBeaconsAndHtmlForms = userContext.Configuration.FilterWebBeaconsAndHtmlForms;
            bool flag  = false;
            bool flag2 = false;
            bool flag3 = false;
            bool flag4 = false;

            JunkEmailUtilities.GetJunkEmailPropertiesForItem(item, isEmbedded, forceEnableItemLink, userContext, out flag, out flag2, out flag3, out flag4);
            OwaSafeHtmlCallbackBase owaSafeHtmlCallbackBase;

            if (!flag4)
            {
                if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.DisableFilter || allowWebBeacon || Utilities.IsWebBeaconsAllowed(item))
                {
                    owaSafeHtmlCallbackBase = new OwaSafeHtmlAllowWebBeaconCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, owaContext, false);
                }
                else
                {
                    owaSafeHtmlCallbackBase = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, false, owaContext, false);
                }
            }
            else
            {
                owaSafeHtmlCallbackBase = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, true, owaContext, false);
            }
            BodyConversionUtilities.RenderReadBody(writer, item, owaSafeHtmlCallbackBase, flag4);
            bool hasBlockedImages = owaSafeHtmlCallbackBase.HasBlockedImages;

            if (flag)
            {
                if (flag2)
                {
                    infobar.AddMessageText(LocalizedStrings.GetNonEncoded(1581910613) + " " + LocalizedStrings.GetNonEncoded(614784743), InfobarMessageType.Phishing);
                }
                else if (userContext.IsJunkEmailEnabled)
                {
                    infobar.AddMessageText(LocalizedStrings.GetNonEncoded(59853257) + " " + LocalizedStrings.GetNonEncoded(385373859), InfobarMessageType.JunkEmail);
                }
            }
            else if (flag2 && !flag3)
            {
                string s = string.Format(CultureInfo.InvariantCulture, "<a id=\"aIbBlk\" href=\"#\" onclick=\"return onClkBm('{0}', 1, 0)\">{1}</a> {2} ", new object[]
                {
                    itemType,
                    LocalizedStrings.GetHtmlEncoded(-672110188),
                    LocalizedStrings.GetHtmlEncoded(-1020475744)
                });
                string format = "<a href=\"#\" onClick=opnHlp('" + Utilities.JavascriptEncode(Utilities.BuildEhcHref(HelpIdsLight.EmailSafetyLight.ToString())) + "')>{0}</a>";
                string s2     = string.Format(CultureInfo.InvariantCulture, format, new object[]
                {
                    LocalizedStrings.GetHtmlEncoded(338562664)
                });
                infobar.AddMessageHtml(SanitizedHtmlString.Format("{0}{1}{2}", new object[]
                {
                    LocalizedStrings.GetNonEncoded(1581910613),
                    SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s),
                    SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s2)
                }), InfobarMessageType.Phishing);
            }
            else if (hasBlockedImages)
            {
                if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.UserFilterChoice)
                {
                    string s3 = string.Format(CultureInfo.InvariantCulture, "<a id=\"aIbBlk\" href=\"#\" onclick=\"return onClkBm('{0}', 1, 1);\">{1}</a>", new object[]
                    {
                        itemType,
                        LocalizedStrings.GetHtmlEncoded(469213884)
                    });
                    infobar.AddMessageHtml(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(2063285740), new object[]
                    {
                        SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s3)
                    }), InfobarMessageType.Informational);
                }
                else if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.ForceFilter)
                {
                    infobar.AddMessageLocalized(-1196115124, InfobarMessageType.Informational);
                }
            }
            if (owaSafeHtmlCallbackBase.HasRtfEmbeddedImages)
            {
                infobar.AddMessageLocalized(1338319428, InfobarMessageType.Informational);
            }
            return(owaSafeHtmlCallbackBase.AttachmentLinks);
        }
        // Token: 0x06002FBB RID: 12219 RVA: 0x001156A4 File Offset: 0x001138A4
        public static IList <AttachmentLink> GenerateNonEditableMessageBodyAndRenderInfobarMessages(Item item, TextWriter writer, OwaContext owaContext, Infobar infobar, bool allowWebBeacon, bool forceEnableItemLink, string itemType, string action, string state, bool isEmbedded, string attachmentUrl)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (infobar == null)
            {
                throw new ArgumentNullException("infobar");
            }
            if (owaContext == null)
            {
                throw new ArgumentNullException("context");
            }
            UserContext           userContext = owaContext.UserContext;
            WebBeaconFilterLevels filterWebBeaconsAndHtmlForms = userContext.Configuration.FilterWebBeaconsAndHtmlForms;
            bool flag  = false;
            bool flag2 = false;
            bool flag3 = false;
            bool flag4 = false;

            JunkEmailUtilities.GetJunkEmailPropertiesForItem(item, isEmbedded, forceEnableItemLink, userContext, out flag, out flag2, out flag3, out flag4);
            OwaSafeHtmlOutboundCallbacks owaSafeHtmlOutboundCallbacks;

            if (!flag4)
            {
                if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.DisableFilter || allowWebBeacon || (!Utilities.IsPublic(item) && Utilities.IsWebBeaconsAllowed(item)))
                {
                    owaSafeHtmlOutboundCallbacks = new OwaSafeHtmlAllowWebBeaconCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, owaContext, false);
                }
                else
                {
                    owaSafeHtmlOutboundCallbacks = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, false, owaContext, false);
                }
            }
            else
            {
                owaSafeHtmlOutboundCallbacks = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, true, owaContext, false);
            }
            BodyConversionUtilities.RenderReadBody(writer, item, owaSafeHtmlOutboundCallbacks, flag4, userContext.IsIrmEnabled);
            bool flag5 = owaSafeHtmlOutboundCallbacks.HasBlockedImages || owaSafeHtmlOutboundCallbacks.HasBlockedForms;

            if (flag)
            {
                if (flag2)
                {
                    infobar.AddMessage(SanitizedHtmlString.Format("{0} {1}", new object[]
                    {
                        LocalizedStrings.GetNonEncoded(1581910613),
                        LocalizedStrings.GetNonEncoded(-2026026928)
                    }), InfobarMessageType.Phishing);
                }
                else if (userContext.IsJunkEmailEnabled)
                {
                    infobar.AddMessage(SanitizedHtmlString.Format("{0} {1}", new object[]
                    {
                        LocalizedStrings.GetNonEncoded(59853257),
                        LocalizedStrings.GetNonEncoded(-2129859766)
                    }), InfobarMessageType.JunkEmail);
                }
            }
            else if (flag2 && !flag3)
            {
                string s = "<a id=\"aIbBlk\" href=\"#\"" + SanitizedHtmlString.Format("_sIT=\"{0}\" _sAct=\"{1}\" _iSt=\"{2}\" _fPhsh=1 _fAWB={3}", new object[]
                {
                    itemType,
                    action,
                    state,
                    allowWebBeacon ? 1 : 0
                }) + string.Format(CultureInfo.InvariantCulture, ">{0}</a> {1} ", new object[]
                {
                    LocalizedStrings.GetHtmlEncoded(-672110188),
                    LocalizedStrings.GetHtmlEncoded(-1020475744)
                });
                string s2 = string.Format(CultureInfo.InvariantCulture, "<a href=\"#\" " + Utilities.GetScriptHandler("onclick", "opnHlp(\"" + Utilities.JavascriptEncode(Utilities.BuildEhcHref(HelpIdsLight.EmailSafetyLight.ToString())) + "\");") + ">{0}</a>", new object[]
                {
                    LocalizedStrings.GetHtmlEncoded(338562664)
                });
                infobar.AddMessage(SanitizedHtmlString.Format("{0}{1}{2}", new object[]
                {
                    SanitizedHtmlString.FromStringId(1581910613),
                    SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s),
                    SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s2)
                }), InfobarMessageType.Phishing);
            }
            else if (flag5)
            {
                infobar.AddMessage(BodyConversionUtilities.GetWebBeaconBlockedInfobarMessage(filterWebBeaconsAndHtmlForms, SanitizedHtmlString.Format("_sIT=\"{0}\" _sAct=\"{1}\" _iSt=\"{2}\" _fPhsh={3} _fAWB=1", new object[]
                {
                    itemType,
                    action,
                    state,
                    forceEnableItemLink ? 1 : 0
                }).ToString()), InfobarMessageType.Informational);
            }
            if (owaSafeHtmlOutboundCallbacks.HasRtfEmbeddedImages)
            {
                infobar.AddMessage(1338319428, InfobarMessageType.Informational);
            }
            return(owaSafeHtmlOutboundCallbacks.AttachmentLinks);
        }
 // Token: 0x06001E79 RID: 7801 RVA: 0x000AFBEC File Offset: 0x000ADDEC
 protected virtual void RenderListItems(TextWriter writer)
 {
     for (int i = 0; i < this.ListItems.Length; i++)
     {
         DropDownListItem dropDownListItem = this.ListItems[i];
         if (dropDownListItem.IsDisplayTextHtmlEncoded)
         {
             DropDownList.RenderListItemHtml(writer, dropDownListItem.ItemValue, SanitizedHtmlString.GetSanitizedStringWithoutEncoding(dropDownListItem.Display), dropDownListItem.ItemId, dropDownListItem.IsBold, this.sessionContext.IsRtl);
         }
         else
         {
             DropDownList.RenderListItem(writer, dropDownListItem.ItemValue, dropDownListItem.Display, dropDownListItem.ItemId, dropDownListItem.IsBold, this.sessionContext.IsRtl);
         }
     }
 }