adminverify.aspx

来自「www.gsmlanka.com is a website for tradin」· ASPX 代码 · 共 63 行

ASPX
63
字号


<script runat="server">
sub loginAdmin(sender As Object, e As System.Web.UI.ImageClickEventArgs)
	
       
        Dim strUname as string
        Dim strPass as string
        Dim strSQLQuery as string
        Dim CheckUname as string
        Dim Checkpass as string

        CheckUname =txtGsmadmin.Text
        Checkpass = txtadminlogPas.Text
     	 call dbcon
 		strSQLQuery = "select userID,pass_word from users where userID='" & txtGsmadmin.Text & "' and priviladge='Administrator'" 
		Bcon.open
        bcmd = New SqlCommand(strSQLQuery, Bcon)
        objreader = bcmd.ExecuteReader

		If objreader.HasRows = False Then

           lblmessege.text="Your Admin ID is incorrect. Please try again"
		   lblmessege.visible=true
        End If

 
        Do while (objreader.Read())

            strUname=objReader("UserID")
            strPass=objReader("pass_word")
			
			

       if  (strUname <> Request.Form("txtGsmadmin")) Then
                lblmessege.text = "Your AdminID is incorrect. Please try again."
				txtGsmadmin.text=""
                lblmessege.Visible = True
            elseif (strPass <> Request.Form("txtadminlogPas")) Then
                lblmessege.text = "Your password is incorrect. Please try again."
                lblmessege.Visible = True
				
				
            else
                Session("userid") = strUname
				session("adminID")=strUname
				session("secCOde")=getsecCode(1,546789)
				session("adminlog")=false
                Response.Redirect("adminhome.aspx")
				txtGsmadmin.text=""
            end if

        loop

        bcon.close
				
				

end sub

</script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?