73 lines
2.5 KiB
Plaintext
73 lines
2.5 KiB
Plaintext
<!--#include Virtual="/Lib/config.asp" -->
|
|
<%
|
|
Dim SQL, Objdb
|
|
Dim gubun : gubun = Request("gubun")
|
|
set Objdb = Server.CreateObject("ADODB.Recordset")
|
|
Dim r_phone : r_phone = Request("r_phone")
|
|
Dim r_name : r_name = Trim(Request("r_name"))
|
|
Dim r_position : r_position = Trim(Request("r_position"))
|
|
Dim r_area : r_area = Request("r_area")
|
|
Dim r_district : r_district = Request("r_district")
|
|
Dim r_edu : r_edu = Trim(Request("r_edu"))
|
|
|
|
Dim flag
|
|
|
|
if gubun = "insert" then
|
|
SQL = ""
|
|
SQL = SQL &" insert into exitpoll.dbo.R_Info (r_name, r_phone, r_pass, r_area, r_district, r_position, r_job, chk, is_reg_admin) " & VbcRlf
|
|
SQL = SQL &" values ( " & VbcRlf
|
|
SQL = SQL &" '" & r_name & "', " & VbcRlf
|
|
SQL = SQL &" dbo.base64_encode('" & r_phone & "'), " & VbcRlf
|
|
SQL = SQL &" dbo.base64_encode('" & r_phone & "'), " & VbcRlf
|
|
SQL = SQL &" '" & r_area & "', " & VbcRlf
|
|
SQL = SQL &" '" & r_district & "', " & VbcRlf
|
|
SQL = SQL &" '" & r_position & "', " & VbcRlf
|
|
SQL = SQL &" '1', " & VbcRlf
|
|
SQL = SQL &" '0', " & VbcRlf
|
|
SQL = SQL &" 1 " & VbcRlf
|
|
SQL = SQL &" ) " & VbcRlf
|
|
|
|
flag = ExecuteSQL(SQL)
|
|
End If
|
|
|
|
if gubun = "update" Then
|
|
SQL = ""
|
|
SQL = SQL &" Update exitpoll.dbo.R_Info set "&VbcRlf
|
|
If r_name <> "NULL" Then
|
|
SQL = SQL &" r_name = '"&r_name&"', "&VbcRlf
|
|
End If
|
|
If r_position <> "NULL" Then
|
|
SQL = SQL &" r_position = '"&r_position&"', "&VbcRlf
|
|
End If
|
|
If r_area <> "NULL" Then
|
|
SQL = SQL &" r_area = '"&r_area&"', "&VbcRlf
|
|
End If
|
|
If r_district <> "" OR r_district <> "NULL" Then
|
|
SQL = SQL &" r_district = '"&r_district&"', "&VbcRlf
|
|
End If
|
|
If r_edu <> "NULL" Then
|
|
SQL = SQL &" r_edu = '"&r_edu&"', "&VbcRlf
|
|
End If
|
|
SQL = SQL &" Udate = getDate() "&VbcRlf
|
|
SQL = SQL &" where dbo.base64_decode(r_phone) = '"&r_phone&"'; "&VbcRlf
|
|
flag = ExecuteSQL(SQL)
|
|
End If
|
|
|
|
If gubun = "delete" Then
|
|
SQL = ""
|
|
SQL = SQL&" update exitpoll.dbo.R_Info set flag ='2', Udate=GETDATE() where dbo.base64_decode(r_phone) ='"&r_phone&"';"&VbcRlf
|
|
flag = ExecuteSQL(SQL)
|
|
SQL = SQL&" Delete from R_Deploy where dbo.base64_decode(r_phone) = '"&r_phone&"';"&VbcRlf
|
|
flag = ExecuteSQL(SQL)
|
|
End If
|
|
|
|
If gubun = "rej" Then
|
|
SQL = ""
|
|
SQL = SQL&" update exitpoll.dbo.R_Info set flag ='1', Udate=GETDATE() where dbo.base64_decode(r_phone) ='"&r_phone&"';"&VbcRlf
|
|
flag = ExecuteSQL(SQL)
|
|
End If
|
|
|
|
if flag = True Then
|
|
response.write "1"
|
|
End If
|
|
%> |