/// <summary> /// Returns system information. /// </summary> private static string GetSystemInformation() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("CMS version: {0} Build: {1}", CMSVersion.MainVersion, CMSVersion.GetVersion(true, true, true, true)); sb.AppendLine(); sb.AppendFormat("OS version: {0}", Environment.OSVersion); sb.AppendLine(); LicenseKeyInfo licenseKey = null; if (SiteContext.CurrentSite != null) { licenseKey = LicenseKeyInfoProvider.GetLicenseKeyInfo(SiteContext.CurrentSite.DomainName); } if (licenseKey != null) { sb.AppendFormat("License info: {0}, {1}, {2}, {3}", licenseKey.Domain, licenseKey.Edition, licenseKey.ExpirationDateReal.ToString(DateTimeHelper.DefaultIFormatProvider), licenseKey.Version); string packages = ValidationHelper.GetString(licenseKey.GetValue("LicensePackages"), string.Empty); if (!string.IsNullOrEmpty(packages)) { sb.AppendFormat(", {0}", packages); } } int eventId = QueryHelper.GetInteger("eventid", 0); if (eventId > 0) { EventLogInfo ev = EventLogProvider.GetEventLogInfo(eventId); if (ev != null) { sb.AppendLine(); sb.Append(HttpUtility.HtmlDecode(EventLogHelper.GetEventText(ev))); } } return(sb.ToString()); }
/// <summary> /// Returns system information. /// </summary> private static string GetSystemInformation() { StringBuilder sb = new StringBuilder(); sb.AppendFormat("CMS version: {0} Build: {1}", CMSContext.SYSTEM_VERSION, typeof(TreeProvider).Assembly.GetName().Version.ToString(3)); sb.AppendLine(); sb.AppendFormat("OS version: {0}", Environment.OSVersion); sb.AppendLine(); LicenseKeyInfo licenseKey = null; if (CMSContext.CurrentSite != null) { licenseKey = LicenseKeyInfoProvider.GetLicenseKeyInfo(CMSContext.CurrentSite.DomainName); } if (licenseKey != null) { sb.AppendFormat("License info: {0}, {1}, {2}, {3}", licenseKey.Domain, licenseKey.Edition, licenseKey.ExpirationDateReal.ToString(DateTimeHelper.DefaultIFormatProvider), licenseKey.Version); string packages = ValidationHelper.GetString(licenseKey.GetValue("LicensePackages"), string.Empty); if (!string.IsNullOrEmpty(packages)) { sb.AppendFormat(", {0}", packages); } } return(sb.ToString()); }