// Spludlow Software // Copyright © Samuel P. Ludlow 2020 All Rights Reserved // Distributed under the terms of the GNU General Public License version 3 // Distributed WITHOUT ANY WARRANTY; without implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE // https://www.spludlow.co.uk/LICENCE.TXT // The Spludlow logo is a registered trademark of Samuel P. Ludlow and may not be used without permission // v1.14 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { if (Spludlow.Security.IntanetPasswordInUse() == false) System.Web.Security.FormsAuthentication.RedirectFromLoginPage("user", true); } Spludlow.WebControls.DisableOnClick(this.Button1); this.TextBox1.Focus(); } protected void Button1_Click(object sender, EventArgs e) { string password = this.TextBox1.Text.Trim(); if (Spludlow.Security.IntanetPasswordValidate(password) == false) { System.Threading.Thread.Sleep(4000); this.LabelError.Text = "Bad Login Password."; } else { System.Web.Security.FormsAuthentication.RedirectFromLoginPage("user", true); } } }