최초 커밋
This commit is contained in:
37
AdminPoll/Ajax/login.asp
Normal file
37
AdminPoll/Ajax/login.asp
Normal file
@@ -0,0 +1,37 @@
|
||||
<!-- #include Virtual = "/Lib/config.asp" -->
|
||||
<%
|
||||
Dim id : id = Request("userid")
|
||||
Dim pw : pw = Request("password")
|
||||
Dim SQL, Objdb, iCnt
|
||||
set Objdb = Server.CreateObject("ADODB.Recordset")
|
||||
|
||||
if id = "ra" and pw = "Kric3415!@" then
|
||||
Session("p_no") = "99999999"
|
||||
Session("name") = "RA"
|
||||
Session("ip") = "10.10.10.11"
|
||||
Session("admin") = "1"
|
||||
|
||||
response.write "true"
|
||||
response.end
|
||||
end if
|
||||
|
||||
DBConnect()
|
||||
|
||||
SQL = ""
|
||||
SQL = SQL & " select p_no, p_name, p_ip, admin "
|
||||
SQL = SQL & " from exitpoll.dbo.exitpoll_TF "
|
||||
SQL = SQL & " where p_user_mail = '"&id&"' and p_pass_new = HASHBYTES('SHA2_256', '"&pw&"' ); "
|
||||
'response.write SQL
|
||||
Objdb.Open SQL,DBConn,3,1,1
|
||||
If not Objdb.eof Then
|
||||
Session("p_no") = Objdb("p_no")
|
||||
Session("name") = Objdb("p_name")
|
||||
Session("ip") = Objdb("p_ip")
|
||||
Session("admin") = Objdb("admin")
|
||||
|
||||
response.write "true"
|
||||
Else
|
||||
response.write "false"
|
||||
End If
|
||||
DBClose()
|
||||
%>
|
||||
Reference in New Issue
Block a user