49 lines
1.6 KiB
Plaintext
49 lines
1.6 KiB
Plaintext
<!--#include Virtual="/Lib/config.asp" -->
|
|
|
|
<%
|
|
Dim SQL, objdb, iCnt
|
|
set Objdb = Server.CreateObject("ADODB.Recordset")
|
|
Dim r_phone : r_phone = request("r_Phone")
|
|
Dim r_name : r_name = request("r_name")
|
|
Dim chk : chk = request("chk")
|
|
Dim gubun : gubun = request("gubun")
|
|
|
|
|
|
Select case gubun
|
|
case "check"
|
|
Dim userChk, checkType
|
|
DBConnect()
|
|
SQL = ""
|
|
SQL = SQL & " SELECT Count(*) AS Cnt FROM R_Info WHERE r_name = '"&unescape(r_name)&"' AND dbo.base64_decode(r_phone) = '"&unescape(r_phone)&"' AND Flag = 1 "
|
|
Objdb.Open SQL,DBConn,3,1,1
|
|
userChk = Objdb("Cnt")
|
|
Objdb.Close
|
|
|
|
If userChk = "1" Then
|
|
SQL = " SELECT ISNULL(r_check, '') as r_check FROM R_Info WHERE dbo.base64_decode(r_phone) = '"&unescape(r_phone)&"' "
|
|
Objdb.Open SQL,DBConn,3,1,1
|
|
If Objdb.RecordCount > 0 Then
|
|
checkType = Objdb("r_check")
|
|
End If
|
|
Objdb.Close
|
|
|
|
If checkType <> "" Then
|
|
response.write "already"
|
|
ElseIf chk <> "" And checkType = "" Then
|
|
SQL = " Update R_Info set "
|
|
SQL = SQL&" r_check = '" & chk & "', "
|
|
SQL = SQL&" UDate = GETDATE() "
|
|
SQL = SQL&" where dbo.base64_decode(r_phone) = '"&unescape(r_phone)&"' "
|
|
DBConn.execute SQL
|
|
response.write "complete"
|
|
Else
|
|
response.write "nocheck"
|
|
End If
|
|
Else
|
|
response.write "nouser"
|
|
End If
|
|
|
|
DBClose()
|
|
|
|
End Select
|
|
%> |