% Const strDbTable = "admin" strUserName = Request.Form("user") strPassWord = Request.Form("pws") If Request.Form("Submit") <> "" Then If strUserName = "" AND strPassWord = "" Then Response.Redirect"login.asp?err=no5445a545ll" ElseIf strUserName = "" AND strPassWord <> "" Then Response.Redirect"login.asp?err=45no544u" ElseIf strUserName <> "" AND strPassWord = "" Then Response.Redirect"login.asp?err=no874lkp" End If strCon = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("member.mdb") Set adoCon = Server.CreateObject("ADODB.Connection") adoCon.connectionstring = strCon adoCon.Open Set rsCommon = Server.CreateObject("ADODB.Recordset") strSQL = "select username,pwss from admin where username = '"&strUserName&"' and pwss = '"&strPassWord&"'" rsCommon.Open strSQL, adoCon,1,3 If NOT rsCommon.EOF Then If strPassWord = rsCommon("pwss") Then Session("blnIsUserGood") = True Response.Redirect"main display.asp" Else Session("blnIsUserGood") = False Response.Redirect"login.asp?err=psfd54ass" End If Else Response.Redirect"login.asp?err=f45xdbull" End If Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing Else If Request.QueryString("name") <> "" Then %> <% Else %>
| Adminstrator
Log In |
|
Watfordcontrol.co.th |