protected override void OnInit(EventArgs e)
{
WebUtils.CheckRightsForAdminPagesPages(false);
this.MaintainScrollPositionOnPostBack = true;
if (!String.IsNullOrEmpty(this.Request.QueryString["id"]) && this.Request.QueryString["id"].Length == 36)
{
var id = new Guid(this.Request.QueryString["id"]);
this.BindPage(id);
this.BindParents(id);
}
else if (!String.IsNullOrEmpty(this.Request.QueryString["delete"]) &&
this.Request.QueryString["delete"].Length == 36)
{
var id = new Guid(this.Request.QueryString["delete"]);
this.DeletePage(id);
}
else
{
if (!Security.IsAuthorizedTo(Rights.CreateNewPages))
{
Response.Redirect(Utils.RelativeWebRoot);
return;
}
this.BindParents(Guid.Empty);
this.cbPublished.Checked = Security.IsAuthorizedTo(Rights.PublishOwnPages);
}
this.btnUploadFile.Click += this.BtnUploadFileClick;
this.btnUploadImage.Click += this.BtnUploadImageClick;
this.btnUploadVideo.Click += this.BtnUploadVideoClick;
this.Page.Title = labels.pages;
base.OnInit(e);
}