최초 커밋

This commit is contained in:
2025-10-01 09:29:34 +09:00
commit a8b84ff39a
1677 changed files with 954149 additions and 0 deletions

View File

@@ -0,0 +1,202 @@
<!--#include Virtual="/Lib/config.asp" -->
<%
Dim SQl, objdb
set Objdb = Server.CreateObject("ADODB.Recordset")
Dim gubun : gubun = Request("gubun")
dim json
dim iCnt
Dim json_arr1, json_arr2
Dim gender, district, allDate, gDate
Select case gubun
case "FirstEdu"'조사 참석 가능자
DBConnect()
SQL = ""
SQL = SQL&" SELECT [1] as lCnt, [2] as mCnt, [3] as fCnt, [4] as sCnt, [1]+[2]+[3]+[4] as tcnt FROM "&VbCrlf
SQL = SQL&" ( "&VbCrlf
SQL = SQL&" SELECT r_position FROM R_Info "&VbCrlf
SQL = SQL&" WHERE flag='1' "&VbCrlf
SQL = SQL&" ) AA "&VbCrlf
SQL = SQL&" pivot "&VbCrlf
SQL = SQL&" ( "&VbCrlf
SQL = SQL&" count(r_position) for r_position in ([1],[2],[3],[4]) "&VbCrlf
SQL = SQL&" ) pvt "&VbCrlf
objdb.Open SQL, DBConn,3,1,1
set json = jsObject()
If not objdb.Eof Then
json("tCnt") = objdb("tcnt")
json("lCnt") = objdb("lCnt")
json("mCnt") = objdb("mCnt")
json("fCnt") = objdb("fCnt")
json("sCnt") = objdb("sCnt")
Else
json("tCnt") = "0"
json("lCnt") = "0"
json("mCnt") = "0"
json("fCnt") = "0"
json("sCnt") = "0"
End If
DBClose()
response.write toJson(json)
case "cnt"
DBConnect()
SQL = ""
SQL = SQL &" SELECT "&VbCrlf
SQL = SQL &" count(*) as tCnt, "&VbCrlf
SQL = SQL &" (select count(*) from exitpoll.dbo.R_info where Flag='1' and r_gender='1') mCnt, "&VbCrlf
SQL = SQL &" (select count(*) from exitpoll.dbo.R_info where Flag='1' and r_gender='2') wCnt "&VbCrlf
SQL = SQL &" FROM exitpoll.dbo.R_info where Flag='1' "&VbCrlf
Objdb.Open SQL,DBConn,3,1,1
'response.write sQL
If not objdb.Eof Then
set json = jsObject()
json("tCnt") = objdb("tCnt")
json("mCnt") = objdb("mCnt")
json("wCnt") = objdb("wCnt")
End If
DBClose()
response.write toJson(json)
case "RecruitDate"
DBConnect()
SQL = ""
SQL = SQL &" SELECT convert(varchar(10), Regdate, 20) Regdate, count(convert(varchar(10), Regdate, 20)) tcnt FROM exitpoll.dbo.R_info where Flag='1' "&VbCrlf
SQL = SQL &" group by convert(varchar(10), Regdate, 20) "&VbCrlf
Objdb.Open SQL,DBConn,3,1,1
If not objdb.eof Then
iCnt = 0
Redim json_arr1(objdb.recordCount-1)
while not objdb.eof
set allDate = jsObject()
allDate("Regdate") = objdb("Regdate")
allDate("tcnt") = objdb("tcnt")
set json_arr1(iCnt) = allDate
iCnt = iCnt + 1
objdb.movenext
wend
End If
DBClose()
DBConnect()
SQL = ""
SQL = SQL &" select Regdate, [1] man, [2] woman from "&VbCrlf
SQL = SQL &" ( "&VbCrlf
SQL = SQL &" select r_gender, convert(varchar(10), Regdate, 20) Regdate from exitpoll.dbo.R_info where Flag='1' "&VbCrlf
SQL = SQL &" ) as a "&VbCrlf
SQL = SQL &" pivot "&VbCrlf
SQL = SQL &" ( "&VbCrlf
SQL = SQL &" count(r_gender) for r_gender in ([1],[2]) "&VbCrlf
SQL = SQL &" ) pvt "&VbCrlf
Objdb.Open SQL,DBConn,3,1,1
If not objdb.eof Then
iCnt = 0
Redim json_arr2(objdb.recordCount-1)
while not objdb.eof
set gDate = jsObject()
gDate("Regdate") = objdb("Regdate")
gDate("man") = objdb("man")
gDate("woman") = objdb("woman")
set json_arr2(iCnt) = gDate
iCnt = iCnt + 1
objdb.movenext
wend
End If
DBClose()
set json = jsObject()
json("all") = json_arr1
json("gDate") = json_arr2
response.write toJson(json)
'response.write "[{""aa"":1}]"
case "RecruitGender"
DBConnect()
SQL = ""
SQL = SQL &" select *, case when r_gender = '1' then '남성' else '여성' end gender, cast(cnt as float)/cast(tcnt as float)*100 as per from "&VbCrlf
SQL = SQL &" ( "&VbCrlf
SQL = SQL &" select r_gender, count(r_gender) as cnt, (select count(*) from exitpoll.dbo.R_info where flag='1') as tcnt from exitpoll.dbo.R_info "&VbCrlf
SQL = SQL &" where Flag='1' "&VbCrlf
SQL = SQL &" group by r_gender "&VbCrlf
SQL = SQL &" ) a "&VbCrlf
Objdb.Open SQL,DBConn,3,1,1
If not objdb.eof Then
iCnt = 0
reDim json_arr1(objdb.recordCOunt-1)
while not objdb.eof
set gender = jsObject()
gender("name") = objdb("gender")
if objdb("gender") = "남성" Then
gender("drilldown") = "m"
else
gender("drilldown") = "w"
End If
gender("y") = Cdbl(Formatnumber(objdb("per"),1))
set json_arr1(iCnt) = gender
iCnt = iCnt + 1
objdb.movenext
wend
End if
DBClose()
DBConnect()
SQL = ""
SQL = SQL&" select r_gender, dbo.codeLabel('district', r_district, NULL) r_nm, r_district, count(r_gender) as cnt from exitpoll.dbo.R_info a "&VbCrlf
SQL = SQL&" where Flag='1' "&VbCrlf
SQL = SQL&" group by r_gender, r_district "&VbCrlf
SQL = SQL&" order by r_gender, r_district "&VbCrlf
Objdb.Open SQL,DBConn,3,1,1
If not objdb.eof Then
iCnt = 0
reDim json_arr2(objdb.recordCOunt-1)
while not objdb.eof
set district = jsObject()
district("gender") = objdb("r_gender")
district("district") = objdb("r_nm")
district("cnt") = objdb("cnt")
set json_arr2(iCnt) = district
iCnt = iCnt+1
objdb.movenext
wend
End If
DBClose()
set json = jsObject()
json("gender") = json_arr1
json("district") = json_arr2
response.write toJson(json)
End Select
%>

View File

@@ -0,0 +1,53 @@
<!--#include Virtual="/Lib/config.asp" -->
<%
Dim SQl, objdb
set Objdb = Server.CreateObject("ADODB.Recordset")
Dim gubun : gubun = request("gubun")
Dim eNo : eNo = request("E_No")
Dim IDKey : IDKey = request("IDKEY")
Dim flag
select case gubun
case "List"
DBConnect()
SQL = ""
SQL = SQL&" select a.*, case isnull(b.Status,'') when '1' then '진행중' when '11' then '수정가능' when '10' then '완료' else '미진행' end as status from [No.6].krc_survey.dbo.Dat_2002020_B_exit a "&VbCrlf
SQL = SQL&" left join [No.6].krc_survey.dbo.Dat_2002020_B b on a.id=case when CHARINDEX('_', b.IDKey)<>0 then LEFT(b.IDKey, CHARINDEX('_', b.IDKey)-1) end where a.flag='1' "&VbCrlf
'response.write SQL
Objdb.Open SQL,DBConn,3,1,1
If not objdb.eof Then
while not objdb.eof
response.write "<tr>"&VbCrlf
response.write " <td>"&objdb("Q1")&"</td>"&VbCrlf
response.write " <td>"&objdb("cluster_nm")&"</td>"&VbCrlf
response.write " <td>"&objdb("Q4")&"<input type='hidden' name='E_No' value='"&objdb("ID")&"'/></td>"&VbCrlf
response.write " <td>"&objdb("Q3")&"</td>"&VbCrlf
response.write " <td>"&objdb("Q10")&"</td>"&VbCrlf
response.write " <td>"&objdb("pre_name")&"</td>"&VbCrlf
response.write " <td>"&objdb("pre_phone")&"</td>"&VbCrlf
response.write " <td>"&objdb("status")&"</td>"&VbCrlf
response.write "</tr>"&VbCrlf
objdb.movenext
wend
End If
DBClose()
case "confirm"
If IDKey <> "" Then
SQL = "Update krc_survey.dbo.dat_2002020_B set status='10' where Idkey= '"&IDKEY&"'"
flag = ExecuteSQL1(SQL)
Else
flag = false
End If
response.write flag
End Select
%>

127
AdminPoll/Ajax/AjaxQu.asp Normal file
View File

@@ -0,0 +1,127 @@
<!--#include Virtual="/Lib/config.asp" -->
<%
Dim SQl, objdb
set Objdb = Server.CreateObject("ADODB.Recordset")
Dim gubun : gubun = Request("gubun")
Dim json, json_arr, iCnt
Select case gubun
case "Qu"
DBConnect()
SQL = ""
SQL = SQL&" SELECT a_cd, a_nm, d_cd, d_nm, p_cd, p_nm, Qu, ISNULL(R.Cnt, 0) AS Cnt "
SQL = SQL&" FROM R_Quota Q LEFT JOIN "
SQL = SQL&" ( "
SQL = SQL&" SELECT r_position, r_district, count(*) Cnt "
SQL = SQL&" FROM R_Info WHERE flag = 1 "
SQL = SQL&" GROUP BY r_position, r_district "
SQL = SQL&" ) R ON Q.d_cd = R.r_district and Q.p_cd = R.r_position "
SQL = SQL&" WHERE Q.Flag = 1 "
SQL = SQL&" ORDER BY a_cd, d_cd, p_cd "
'response.write SQL
Objdb.Open SQL,DBConn,3,1,1
If not objdb.eof Then
iCnt = 0
Redim json_arr(objdb.recordCount-1)
while not objdb.eof
set json = jsObject()
json("a_cd") = objdb("a_cd")
json("a_nm") = objdb("a_nm")
json("d_cd") = objdb("d_cd")
json("d_nm") = objdb("d_nm")
json("p_cd") = objdb("p_cd")
json("p_nm") = objdb("p_nm")
json("Qu") = objdb("Qu")
json("Cnt") = objdb("Cnt")
set json_arr(iCnt) = json
iCnt = iCnt + 1
objdb.movenext
wend
End If
DBClose()
response.write toJson(json_arr)
Case "Edu"
DBConnect()
SQL = ""
SQL = SQL&" SELECT RE.eduCd, EduArea, EduDate, EduSpace, EduEtc1, Qu, ISNULL(RC.Cnt, 0) AS Cnt, "
SQL = SQL&" (SELECT Min(eduCd) FROM exitpoll.dbo.R_Edu WHERE EduArea = RE.EduArea GROUP BY EduArea) as EduArea_Order "
SQL = SQL&" FROM exitpoll.dbo.R_Edu RE "
SQL = SQL&" LEFT JOIN ( "
SQL = SQL&" SELECT r_edu, count(*) AS Cnt "
SQL = SQL&" FROM exitpoll.dbo.R_Info "
SQL = SQL&" WHERE flag = 1 AND ISNULL(r_edu, '') <> '' "
SQL = SQL&" GROUP BY r_edu "
SQL = SQL&" ) RC ON RE.EduCd = RC.r_edu "
SQL = SQL&" WHERE RE.Flag = 1 AND eduNm = '교육' "
SQL = SQL&" ORDER BY RE.eduCd "
Objdb.Open SQL,DBConn,3,1,1
If not objdb.eof Then
iCnt = 0
Redim json_arr(objdb.recordCount-1)
while not objdb.eof
set json = jsObject()
json("eduCd") = objdb("eduCd")
json("EduArea_Order") = objdb("EduArea_Order")
json("EduArea") = objdb("EduArea")
json("EduSpace") = objdb("EduSpace")
json("EduDate") = objdb("EduDate")
json("Qu") = objdb("Qu")
json("Cnt") = objdb("Cnt")
set json_arr(iCnt) = json
iCnt = iCnt + 1
objdb.movenext
wend
End If
DBClose()
response.write toJson(json_arr)
End Select
Function pColor(data)
Dim StyleColor
if Cdbl(data) <=0 Then
ElseIf Cdbl(data) > 0 and Cdbl(data) < 10 then
StyleColor = "background-color:#ff0000c7;"
ElseIf Cdbl(data) >= 10 and Cdbl(data) < 20 then
StyleColor = "background-color:#fd3a3ac7;"
ElseIf Cdbl(data) >= 20 and Cdbl(data) < 30 then
StyleColor = "background-color:#fd8888c7;"
ElseIf Cdbl(data) >= 30 and Cdbl(data) < 40 then
StyleColor = "background-color:#fbc2c2c7;"
ElseIf Cdbl(data) >= 40 and Cdbl(data) < 50 then
StyleColor = "background-color:#ffbd01c7;"
ElseIf Cdbl(data) >= 50 and Cdbl(data) < 60 then
StyleColor = "background-color:#ffbd01c7;"
ElseIf Cdbl(data) >= 60 and Cdbl(data) < 70 then
StyleColor = "background-color:#ffbd01c7;"
ElseIf Cdbl(data) >= 70 and Cdbl(data) < 80 then
StyleColor = "background-color:#ffcf45c7;"
ElseIf Cdbl(data) >= 80 and Cdbl(data) < 90 then
StyleColor = "background-color:#ffe18cc7;"
ElseIf Cdbl(data) >= 90 and Cdbl(data) < 100 then
StyleColor = "background-color:#66BF7Cc7;"
Else
StyleColor = "background-color:#66BF7Cc7;"
End If
pColor = StyleColor
End Function
%>

View File

@@ -0,0 +1,66 @@
<!--#include Virtual="/Lib/config.asp" -->
<%
Dim SQL, Objdb
Dim sel_gubun : sel_gubun = Request("sel_gubun")
set Objdb = Server.CreateObject("ADODB.Recordset")
Dim sel_code : sel_code = Request("sel_code")
if sel_code = "edu" Then
sel_gubun = "edu"
End If
Select case sel_gubun
case "code"
Response.Write "<option value=''>선택</option>"
DBConnect()
SQL = " select gubun, r_cd, r_nm, Flag from exitpoll.dbo.R_code where Flag = '1' and gubun = '" & sel_code & "' "
if sel_code = "district" Then
SQL = SQL & " and left(r_cd,2) = '" & Request("area_cd") & "' "
End If
Objdb.Open SQL,DBConn,3,1,1
if not Objdb.eof Then
while not objdb.eof
Response.Write "<option value='"&objdb("r_cd")&"'>"&objdb("r_nm")&"</option>"
objdb.movenext
wend
End If
DBClose()
case "edu"
Response.Write "<option value=''>선택</option>"
DBConnect()
SQL = ""
SQL = SQL & " SELECT RE.eduCd, EduArea, EduDate, EduSpace, EduEtc1, Qu, ISNULL(RC.comp_cnt, 0) AS comp_cnt, "
SQL = SQL & " CASE WHEN Qu - ISNULL(RC.comp_cnt, 0) < 0 THEN 0 ELSE Qu - ISNULL(RC.comp_cnt , 0) END AS req_cnt "
SQL = SQL & " FROM exitpoll.dbo.R_Edu RE "
SQL = SQL & " LEFT JOIN ( "
SQL = SQL & " SELECT r_edu, count(*) AS comp_cnt "
SQL = SQL & " FROM exitpoll.dbo.R_Info "
SQL = SQL & " WHERE flag = 1 AND ISNULL(r_edu, '') <> '' "
SQL = SQL & " GROUP BY r_edu "
SQL = SQL & " ) RC ON RE.EduCd = RC.r_edu "
SQL = SQL & " WHERE RE.Flag = 1 AND eduNm = '교육' "
SQL = SQL & " And EduArea like '%" & Request("area_cd") & "%' "
Objdb.Open SQL,DBConn,3,1,1
if not Objdb.eof Then
while not objdb.eof
Response.Write "<option value='"&objdb("eduCd")&"' data-addr='"&objdb("EduETC1")&"'>"&objdb("EduDate")&" - "&objdb("EduSpace")&" (잔여:"& objdb("req_cnt") &")</option>"
'if cint(objdb("req_cnt")) > 0 Then
' Response.Write "<option value='"&objdb("eduCd")&"' data-addr='"&objdb("EduETC1")&"'>"&objdb("EduDate")&" - "&objdb("EduSpace")&" (잔여:"& objdb("req_cnt") &")</option>"
'else
' Response.Write "<option value='"&objdb("eduCd")&"' data-addr='"&objdb("EduETC1")&"' disabled>"&objdb("EduDate")&" - "&objdb("EduSpace")&" (잔여:"& objdb("req_cnt") &")</option>"
'End If
objdb.movenext
wend
End If
DBClose()
End Select
%>

45
AdminPoll/Ajax/Redit.asp Normal file
View File

@@ -0,0 +1,45 @@
<!--#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_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 = "update" Then
SQL = ""
SQL = SQL &" Update exitpoll.dbo.R_Info set "&VbcRlf
SQL = SQL &" r_position = '"&r_position&"', "&VbcRlf
SQL = SQL &" r_area = '"&r_area&"', "&VbcRlf
If r_district <> "" Then
SQL = SQL &" r_district = '"&r_district&"', "&VbcRlf
End If
SQL = SQL &" r_edu = '"&r_edu&"', "&VbcRlf
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
%>

71
AdminPoll/Ajax/list.asp Normal file
View File

@@ -0,0 +1,71 @@
<!-- #include Virtual = "/Lib/config.asp" -->
<%
Dim SQl, objdb
set Objdb = Server.CreateObject("ADODB.Recordset")
DBConnect()
SQL = ""
SQL = SQL&" SELECT ISNULL(RD.exit_cd,'') AS exit_cd, "
SQL = SQL&" CASE WHEN RI.Flag = '3' then '예비' else ISNULL(RE.e_exit_nm,'') END AS exit_nm, "
SQL = SQL&" CASE WHEN ISNULL(RD.exit_cd,'') = '' THEN '미배치' ELSE '배치' END AS deploy,"
SQL = SQL&" ISNULL(RI.r_name,'') AS r_name, "
SQL = SQL&" dbo.base64_decode(RI.r_phone) AS r_phone, "
SQL = SQL&" dbo.codeLabel('gender', RI.r_gender, NULL) AS r_gender, "
SQL = SQL&" ISNULL(RI.r_birth,'') AS r_birth, "
SQL = SQL&" CASE "
SQL = SQL&" WHEN ISDATE(RI.r_birth) = 1 "
SQL = SQL&" THEN DATEDIFF(YEAR, CAST(RI.r_birth AS DATE), GETDATE()) - 1 "
SQL = SQL&" ELSE '' "
SQL = SQL&" END AS r_age, "
SQL = SQL&" ISNULL(KD.chk, '') as id_chk, ISNULL(KC.c_chk, '') as c_chk, "
SQL = SQL&" ISNULL(r_sd,'') + ' ' + ISNULL(r_sgg,'') + ' ' + ISNULL(r_emd,'') AS r_addr, "
SQL = SQL&" dbo.codeLabel('job', RI.r_job, NULL) AS r_job, "
SQL = SQL&" dbo.codeLabel('area', RI.r_area, NULL) AS r_area, "
SQL = SQL&" dbo.codeLabel('district', RI.r_district, NULL) AS r_district, "
SQL = SQL&" dbo.codeLabel('position', RI.r_position, NULL) AS r_position, "
SQL = SQL&" Replace(dbo.codeLabel('car', RI.r_car, NULL), '없음', '') AS r_car, "
SQL = SQL&" Replace(dbo.codeLabel('ex', RI.r_ex, NULL), '없음', '') AS r_ex, "
SQL = SQL&" dbo.base64_decode(ISNULL(r_jumin,'')) AS r_jumin, "
SQL = SQL&" dbo.codeLabel('bank', RI.r_bank, NULL) AS r_bank, "
SQL = SQL&" dbo.base64_decode(ISNULL(r_account,'')) AS r_account, "
SQL = SQL&" RI.r_edu, ISNULL(eduSpace, '') AS r_edu_space, ISNULL(eduDate, '') AS r_edu_date, ISNULL(eduEtc1, '') AS r_edu_addr, "
SQL = SQL&" CASE ISNULL(r_check, '') WHEN 'on' THEN 'O' WHEN 'off' THEN 'O' ELSE '' END AS r_check, "
SQL = SQL&" CONVERT(VARCHAR(19), RI.Regdate, 120) AS regdate, "
SQL = SQL&" RI.chk "
SQL = SQL&" FROM R_info RI LEFT JOIN R_edu ED on RI.r_edu = ED.educd and ED.flag = 1 "
SQL = SQL&" LEFT JOIN R_Deploy RD ON RI.r_phone = RD.r_phone and RD.exit_cd not like 'DEL[_]%' "
SQL = SQL&" LEFT JOIN R_Exit RE on RD.exit_cd = RE.e_full_it "
SQL = SQL&" LEFT JOIN "
SQL = SQL&" ( "
SQL = SQL&" SELECT IDKEY, JSON_VALUE(DATJSON, '$.Q1.Q1_1') AS f_name, JSON_VALUE(SURVEY_DATE, '$.Q1') AS s_date, 'O' AS chk "
SQL = SQL&" FROM kon.dbo.[DATA] "
SQL = SQL&" WHERE PKEY = '2402011_B' AND Status = '10' AND SURVEY_TYPE <> '' "
SQL = SQL&" ) KD ON RI.r_phone = KD.IDKEY "
SQL = SQL&" LEFT JOIN "
SQL = SQL&" ( "
SQL = SQL&" SELECT IDKEY, JSON_VALUE(DATJSON, '$.Q1.Q1_1') AS c_f_name, JSON_VALUE(SURVEY_DATE, '$.Q1') AS c_s_date, 'O' AS c_chk "
SQL = SQL&" FROM kon.dbo.[DATA] "
SQL = SQL&" WHERE PKEY = '2402011_D' AND Status = '10' AND SURVEY_TYPE <> '' "
SQL = SQL&" ) KC ON RI.r_phone = KC.IDKEY "
if Request("flag") = "1" then
SQL = SQL&" WHERE RI.Flag = '1' and RI.r_phone != '' "
else
SQL = SQL&" WHERE RI.Flag in ('2','3') and RI.r_phone != '' "
end if
SQL = SQL&" ORDER BY RI.r_name "
SQL = SQL&" FOR JSON PATH "
Objdb.Open SQL,DBConn
'response.write sql
if not objdb.eof Then
response.write "{""data"":"
while not objdb.eof
Response.Write objdb(0)
objdb.movenext
wend
response.write "}"
Else
response.write "{""data"":[]}"
End If
DBClose()
%>

37
AdminPoll/Ajax/login.asp Normal file
View 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()
%>

View File

@@ -0,0 +1,4 @@
<!-- #include Virtual = "/Lib/config.asp" -->
<%
Logout()
%>