forked from BlogEngine/BlogEngine.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.master.cs
More file actions
63 lines (54 loc) · 1.77 KB
/
admin.master.cs
File metadata and controls
63 lines (54 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// --------------------------------------------------------------------------------------------------------------------
// <summary>
// The AdminMasterPage.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Admin
{
using System;
using System.Threading;
using System.Web.UI;
using BlogEngine.Core;
/// <summary>
/// The AdminMasterPage.
/// </summary>
public partial class ExtensionsMasterPage : MasterPage
{
#region Public Methods
/// <summary>
/// Sets the status.
/// </summary>
/// <param name="status">
/// The status.
/// </param>
/// <param name="msg">
/// The message.
/// </param>
public void SetStatus(string status, string msg)
{
this.AdminStatus.Attributes.Clear();
this.AdminStatus.Attributes.Add("class", status);
this.AdminStatus.InnerHtml =
string.Format(
"{0}<a href=\"javascript:HideStatus()\" style=\"width:20px;float:right\">X</a>",
this.Server.HtmlEncode(msg));
}
#endregion
#region Methods
/// <summary>
/// Raises the <see cref="E:System.Web.UI.Control.Init"/> event.
/// </summary>
/// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
protected override void OnInit(EventArgs e)
{
if (!Security.IsAuthenticated)
{
Security.RedirectForUnauthorizedRequest();
return;
}
Page.Header.DataBind();
base.OnInit(e);
}
#endregion
}
}