protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Master).SetPagePermissionLevel(3);
            User loggedUser = Help.GetUserSession(Session);

            if (loggedUser != null && loggedUser.PermissionLevel >= 3)
            {
                string[] logLines = DatabaseHandler.GetLog(Session);

                Label_LogTitle.Text = "Logs as of " + DateTime.Now;

                if (logLines != null)
                {
                    foreach (string s in logLines)
                    {
                        Label l = new Label();
                        l.Text = s;
                        Panel_ViewLog.Controls.AddAt(2, l);
                        Panel_ViewLog.Controls.AddAt(2, new LiteralControl("<br /> <br />"));
                    }
                }

                List <string> activeCodes = DatabaseHandler.GetActiveCodes(Session);

                foreach (string s in activeCodes)
                {
                    Label codeLabel = new Label();
                    codeLabel.ForeColor = codeColor;
                    codeLabel.Text      = s;
                    Panel_ActiveCodes.Controls.Add(codeLabel);
                    Panel_ActiveCodes.Controls.Add(new LiteralControl("<br />"));
                }

                //Slow loading this is a temporary solution
                //System.Threading.Thread.Sleep(1000);

                //Checking if data needs to be filled in...
                string editID = Request.QueryString["editID"];
                if (editID != null)
                {
                    int      postID = int.Parse(editID);
                    NewsPost post   = DatabaseHandler.GetNewsPost(postID);
                    if (post != null && post.Creator.ID == loggedUser.ID)
                    {
                        editingPost                = post;
                        FreeTextBox1.Text          = post.Data; //Server.HtmlDecode(post.Data);
                        FreeTextBox1.UpdateToolbar = true;
                    }
                }
            }
        }