최초커밋

This commit is contained in:
2025-09-29 17:55:08 +09:00
parent 90af30c0d0
commit e39813395a
3334 changed files with 338522 additions and 0 deletions

887
lib/Function.asp Normal file
View File

@@ -0,0 +1,887 @@
<%
'======================================================================
'<27><> <20><> <20><> :
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
'<27>ۼ<EFBFBD><DBBC><EFBFBD><EFBFBD><EFBFBD> :
'<27><> <20><> <20><> :
'-----------------------------------------------------------------------
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
'=======================================================================
'
'=======================================================================
'Response.Expires = -1
%>
<%
' Response.Buffer=true
Const Ref = "D7EFGBCHL640MN598OIJKPQRSATWXVYZ123U"
public Function TransFormat(arg1)
'// 10<31><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>տ<EFBFBD> 0<><30> <20><><EFBFBD>δ<EFBFBD>
Dumy=""
if arg1 < 10 then
Dumy= "0" & arg1
else
Dumy=arg1
end if
TransFormat=Dumy
End Function
public Function ZeroFormat(arg1, arg2)
'//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>Ŀ<EFBFBD> <20>°<EFBFBD> <20><><EFBFBD>տ<EFBFBD> 0<><30> <20><><EFBFBD>δ<EFBFBD>
'arg1:<3A>Է°<D4B7>, arg2:<3A><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
'vb<76><62> format(x,"0000")<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.<2E><> #<23><> ,<2C><> <20><><EFBFBD><EFBFBD> <20>ȵ<EFBFBD>
dim dumy, i, j,arg1_len
Dumy=""
arg1 = trim(arg1)
arg1_len = len(arg1)
for i=1 to eval(arg2) - arg1_len
dumy = dumy & "0"
next
dumy = dumy & arg1
ZeroFormat = dumy
End function
public Function Admin_Check(arg)
if arg <> "OK" then
Response.Write "<script>"
Response.Write "window.alert ('<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.');"
Response.Write "history.back();"
Response.Write "</script>"
end if
end Function
public Function Buser_Check(arg1, arg2, arg3, arg4) ''<27>μ<EFBFBD> Ȯ<>ο<EFBFBD>
'arg1 : <20>ش<EFBFBD><D8B4>μ<EFBFBD><CEBC>ڵ<EFBFBD>
'arg2 : <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD> <20>ش<EFBFBD><D8B4>μ<EFBFBD><CEBC>ڵ<EFBFBD>
'arg3 : Session("admin_Code") <20>μ<EFBFBD><CEBC><EFBFBD><EFBFBD>ΰ<EFBFBD> Ȯ<>ο<EFBFBD>
'arg4 : Session("Admin")
if arg4 = "OK" then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD>
else
if arg1 = arg2 and (arg3 = "1" or arg3 = "True") then 'Ư<><C6AF>1<EFBFBD><31> <20>μ<EFBFBD><CEBC≯鼭 <20><><EFBFBD>常
elseif (arg1 = "<22><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>") and arg2 >= 1 and arg2 <= 10 then '<27><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD> <20><>ü<EFBFBD><C3BC>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20>μ<EFBFBD><CEBC>ڵ<EFBFBD><DAB5><EFBFBD> 10<31><30><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD><CCBE><EFBFBD> <20><>)
else
Response.Write "<script>"
Response.Write "window.alert ('<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.');"
Response.Write "history.back();"
Response.Write "</script>"
end if
end if
end Function
public Function Buser_Check2(arg1, arg2, arg3, arg4, arg5) ''<27>μ<EFBFBD> Ȯ<>ο<EFBFBD>
'arg1 : <20>ش<EFBFBD><D8B4>μ<EFBFBD><CEBC>ڵ<EFBFBD>
'arg2 : <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD><EFBFBD> <20>ش<EFBFBD><D8B4>μ<EFBFBD><CEBC>ڵ<EFBFBD>
'arg3 : Session("admin_Code") <20>μ<EFBFBD><CEBC><EFBFBD><EFBFBD>ΰ<EFBFBD> Ȯ<>ο<EFBFBD>
'arg4 : Session("Admin")
'arg5 : <20>ش<EFBFBD><D8B4>μ<EFBFBD><CEBC>ڵ<EFBFBD>
' call Buser_Check2("12", Session("p_depart"), 1, Session("Admin"), "13")
if arg4 = "OK" then '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD>
else
if (arg1 = arg2 or arg5 = arg2) and (arg3 = "1" or arg3 = "True") then 'Ư<><C6AF>1<EFBFBD><31> <20>μ<EFBFBD><CEBC≯鼭 <20><><EFBFBD>常
elseif (arg1 = "<22><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD>") and arg2 >= 1 and arg2 <= 10 then '<27><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD> <20><>ü<EFBFBD><C3BC>(<28><><EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20>μ<EFBFBD><CEBC>ڵ<EFBFBD><DAB5><EFBFBD> 10<31><30><EFBFBD><EFBFBD><EFBFBD>̾<EFBFBD><CCBE><EFBFBD> <20><>)
else
Response.Write "<script>"
Response.Write "window.alert ('<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.');"
Response.Write "history.back();"
Response.Write "</script>"
end if
end if
end Function
public Function Admin_Code_Check(depart, security)
if not((depart = "11" and security = "1") or (depart = "13" and security = "1")) then
Response.Write "<script>"
Response.Write "window.alert ('<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.');"
Response.Write "history.back();"
Response.Write "</script>"
end if
end Function
public Function Time_Check(arg)
dim tmp_cnt
if arg <> "OK" then
if request.Cookies("p_ip") = "" then
%>
<script language="javascript">
alert('<27>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20>ڵ<EFBFBD> <20>α׾ƿ<D7BE> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<>ٽ<EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD>Ͻñ<CFBD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.');
location.href = "/";
</script>
<%
end if
query="select * from person where p_ip ='" & request.Cookies("p_ip") & "'"
query = query & "and p_resign = 0"
adors.open query, adoconn, 1
tmp_cnt = adors.recordCount
if tmp_cnt = 1 then
Session("errmsg") = ""
Session("Login_Check") = "OK"
Session("loginuser") = adors("p_name") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD≯<EFBFBD>
Session("Depart_Code") = adors("p_depart") '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
Session("User_Number") = adors("p_no") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ
Session("User_Mail") = adors("p_User_Mail") '<27><><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>
Session("admin_Code") = adors("p_admin") '<27><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>(true,1:<3A><><EFBFBD><EFBFBD>,false,2:<3A><><EFBFBD><EFBFBD>)
Session("Position_Code")= adors("p_pos") '<27><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>
Session("keupho_Code") = adors("keupho") '<27><>ȣ<EFBFBD>ڵ<EFBFBD>
session("job_code") = adors("p_job_part") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ(p_job_part => 0:<3A>ӿ<EFBFBD>, 1:<3A><><EFBFBD><EFBFBD>, 2:<3A><><EFBFBD><EFBFBD>, 3:s/v, 4:<3A><><EFBFBD><EFBFBD>, 5:<3A>ڵ<EFBFBD>, 6:<3A><>ġ, 7:dp, 8:it, 9:ȸ<><C8B8>, 99:<3A><>Ÿ
Session("USERIP") = replace(replace(Request.ServerVariables("REMOTE_ADDR"), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP
response.Cookies("p_no")= adors("p_no") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ
response.Cookies("p_ip")= adors("p_ip") 'IP<49><50>ȣ
Session("teamcode") = adors("p_team") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȣ
Session("teamplace") = adors("p_team_place") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(0:<3A><>, 1:<3A><><EFBFBD><EFBFBD>, 2:<3A><><EFBFBD><EFBFBD>, 3:<3A>μ<EFBFBD><CEBC><EFBFBD>, 4:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 5:<3A>ӿ<EFBFBD>, 6:<3A><><EFBFBD><EFBFBD>or<6F><72>ǥ, 7:<3A><>ȸ<EFBFBD><C8B8>, 8:ȸ<><C8B8>)
Session("job_view") = adors("p_job_view_depart") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>μ<EFBFBD>(<28>ӿ<EFBFBD><D3BF><EFBFBD>)
Session("pw_new") = adors("p_pass_new") 'FCS <20>α<EFBFBD><CEB1>ο<EFBFBD>
Session("N_depart") = adors("p_depart_now") '<27>ű<EFBFBD> <20>μ<EFBFBD> <20>ڵ<EFBFBD>
Session("N_team") = adors("p_team_now") '<27>ű<EFBFBD> <20><> <20>ڵ<EFBFBD>
adors.close
elseif tmp_cnt > 1 then
adors.close
query="select * from person where p_no ='" & request.Cookies("p_no") & "'"
query = query & "and p_resign = 0"
adors.open query, adoconn, 1
if adors.recordCount > 0 then
Session("errmsg") = ""
Session("Login_Check") = "OK"
Session("loginuser") = adors("p_name") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD≯<EFBFBD>
Session("Depart_Code") = adors("p_depart") '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
Session("User_Number") = adors("p_no") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ
Session("User_Mail") = adors("p_User_Mail") '<27><><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>
Session("admin_Code") = adors("p_admin") '<27><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>(true,1:<3A><><EFBFBD><EFBFBD>,false,2:<3A><><EFBFBD><EFBFBD>)
Session("Position_Code")= adors("p_pos") '<27><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>
Session("keupho_Code") = adors("keupho") '<27><>ȣ<EFBFBD>ڵ<EFBFBD>
session("job_code") = adors("p_job_part") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ(p_job_part => 0:<3A>ӿ<EFBFBD>, 1:<3A><><EFBFBD><EFBFBD>, 2:<3A><><EFBFBD><EFBFBD>, 3:s/v, 4:<3A><><EFBFBD><EFBFBD>, 5:<3A>ڵ<EFBFBD>, 6:<3A><>ġ, 7:dp, 8:it, 9:ȸ<><C8B8>, 99:<3A><>Ÿ
Session("USERIP") = replace(replace(Request.ServerVariables("REMOTE_ADDR"), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>IP
response.Cookies("p_no")= adors("p_no") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ
response.Cookies("p_ip")= adors("p_ip") 'IP<49><50>ȣ
Session("teamcode") = adors("p_team") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȣ
Session("teamplace") = adors("p_team_place") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(0:<3A><>, 1:<3A><><EFBFBD><EFBFBD>, 2:<3A><><EFBFBD><EFBFBD>, 3:<3A>μ<EFBFBD><CEBC><EFBFBD>, 4:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 5:<3A>ӿ<EFBFBD>, 6:<3A><><EFBFBD><EFBFBD>or<6F><72>ǥ, 7:<3A><>ȸ<EFBFBD><C8B8>, 8:ȸ<><C8B8>)
Session("job_view") = adors("p_job_view_depart") '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>μ<EFBFBD>(<28>ӿ<EFBFBD><D3BF><EFBFBD>)
Session("pw_new") = adors("p_pass_new") 'FCS <20>α<EFBFBD><CEB1>ο<EFBFBD>
Session("N_depart") = adors("p_depart_now") '<27>ű<EFBFBD> <20>μ<EFBFBD> <20>ڵ<EFBFBD>
Session("N_team") = adors("p_team_now") '<27>ű<EFBFBD> <20><> <20>ڵ<EFBFBD>
end if
adors.close
else
adors.close
end if
if Session("loginuser") = "<22><>ȫ<EFBFBD><C8AB>" or Session("loginuser") = "<22>赿<EFBFBD><E8B5BF>" or Session("loginuser") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" or Session("loginuser") = "<22><><EFBFBD>غ<EFBFBD>" or Session("loginuser") = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" then
session("admin_ip") = replace(replace(Request.ServerVariables("REMOTE_ADDR"), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
end if
query = "select p_team_name as d_name from V_Person where p_no = '" & Session("User_Number") & "' "
adoRs.open query, adoconn, 1,1
Session("Depart_name") = adors("d_name") '<27>μ<EFBFBD><CEBC><EFBFBD>
adors.close
if Session("Login_Check") <> "OK" then
Session("errmsg") = "<22>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20>ڵ<EFBFBD> <20>α׾ƿ<D7BE> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<>ٽ<EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD>Ͻñ<CFBD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>."
%>
<script language="javascript">
alert('<27>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20>ڵ<EFBFBD> <20>α׾ƿ<D7BE> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.\n<>ٽ<EFBFBD> <20>α<EFBFBD><CEB1><EFBFBD><EFBFBD>Ͻñ<CFBD> <20>ٶ<EFBFBD><D9B6>ϴ<EFBFBD>.');
location.href = "/";
</script>
<%
'response.End
end if
end if
end Function
public Function Time_Check2(arg)
if arg <> "OK" then
Session("errmsg")="<22>ð<EFBFBD> <20>ʰ<EFBFBD>"
Response.Write "<script LANGUAGE='JavaScript'>"
Response.Write " var objPopup = window.open('/login.asp','','left=200,top=50,width=780,height=600,scrollbars=yes,resizable=yes,location=no,toolbar=no, menubar=no,status=yes');"
Response.Write " if (objPopup != null) { "
Response.Write " window.close();"
Response.Write " }else{"
Response.Write " }"
Response.Write "</script>"
end if
end Function
Function date_time()
v_year = year(date)
v_month = month(date)
if v_month < 10 then v_month = "0" & v_month
v_day = day(date)
if v_day < 10 then v_day = "0" & v_day
v_hour = hour(time)
if v_hour < 10 then v_hour = "0" & v_hour
v_minute = minute(time)
if v_minute < 10 then v_minute = "0" & v_minute
v_second = second(time)
if v_second < 10 then v_second = "0" & v_second
v_datetime = v_year&v_month&v_day&v_hour&v_minute&v_second
date_time = v_datetime
End Function
Function FormatDate()
dim yyyy, mm, dd,dumy
yyyy=year(date)
mm=month(date)
dd=day(date)
dumy=time
if mm < 10 then
mm="0" & mm
end if
if dd < 10 then
dd="0" & dd
end if
formatdate=yyyy & "-" & mm & "-" & dd & " " & dumy
End Function
Function Change(txt)
j=1
txt = replace(txt, "&dsin;", " ")
txt = replace(txt, "&sin;", " ")
txt = replace(txt, chr(34), " ")
txt = replace(txt, "'", " ")
for k=1 to 100
j= instr(txt, chr(13))
if j > 0 and k >= 7 then
response.write "" & "<br>"
response.write "" & "<br>"
response.write "....." & "<br>"
response.write "" & "<br>"
response.write "<b><3E><><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. Ŭ<><C5AC><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>....<b>" & "<br>"
exit for
end if
if j =0 then
response.write txt & "<br>"
k=100
else
response.write Mid(txt,1, j-1) & "<br>"
txt = Mid(txt,j+2)
end if
next
End Function
Function Change2(txt)
dim jjj
dim kkk
jjj=1
txt = replace(txt, "&dsin;", " ")
txt = replace(txt, "&sin;", " ")
txt = replace(txt, chr(34), " ")
txt = replace(txt, "'", " ")
for kkk=1 to 100
jjj= instr(txt, chr(13))
if jjj =0 then
response.write txt & "<br>"
kkk=100
else
response.write Mid(txt,1, jjj-1) & "<br>"
txt = Mid(txt,jjj+2)
end if
next
End Function
Function msg0(txt)
txt = replace(txt, "'", " ")
Response.Write "<script>"
Response.Write "window.alert ('" + txt + "');"
Response.Write "</script>"
End Function
Function msg(txt,tit)
txt = replace(txt, "'", " ")
tit = replace(tit, "'", " ")
Response.Write "<script>"
Response.Write "window.alert ('" + txt + ", " + tit + "');"
Response.Write "</script>"
End Function
'<27><><EFBFBD><EFBFBD> <20>޼<EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>
Function Alert(msg)
msg = replace(msg, "'", " ")
Response.Write "<Script>alert('" & msg & "');</Script>"
' Response.End
End Function
'<27><><EFBFBD><EFBFBD> <20>޼<EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>
Function Alert4(msg)
msg = replace(msg, "'", " ")
Response.Write "<Script>alert('"&msg&"');self.opener=self;window.close();</Script>"
' Response.End
End Function
'<27><><EFBFBD><EFBFBD> <20>޼<EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>
Function Alert2(msg)
msg = replace(msg, "'", " ")
Response.Write "<script>"
Response.Write "window.alert ('" &msg & "');"
Response.Write "history.back();"
Response.Write "</script>"
' Response.End
End Function
'<27><><EFBFBD><EFBFBD> <20>޼<EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>
Function Alert_Back(msg)
msg = replace(msg, "'", " ")
Response.Write "<script>"
Response.Write "window.alert ('" &msg & "');"
Response.Write "history.back(-2);"
Response.Write "</script>"
' Response.End
End Function
Function Pagelist(Url,page, Sort_key, txt_title, pagecount, strPath)
'Url:<3A><><EFBFBD>ϸ<EFBFBD>, Page:<3A><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Sort_key:<3A><>ƮŰ<C6AE><C5B0><EFBFBD><EFBFBD>, txt_title:<3A><><EFBFBD><EFBFBD>, pagecount:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, strPath : <20><>Ÿ<EFBFBD>н<EFBFBD>
Response.Write "<table class='table table-bordered my-2 mx-auto w-auto border-top-0'>"
Response.Write "<tr>"
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֵ鶧<D6B5><E9B6A7> 1<><31> <20><><EFBFBD><EFBFBD><EFBFBD>༭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ڸ<EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>
dim Back_page, tmp_page, i
Back_page = 0
gotopage_str = "?gotopage="
if right(url, 1) = "&" then
gotopage_str = "gotopage="
end if
if pagecount >= 2 AND 1 <> int(page) AND 10 < int(page) then
Response.Write "<td class='p-1 px-2'><A href='" & url & gotopage_str & "1" & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'><i class='fas fa-angle-double-left'></i></A></td>"
end if
if cint(page) > 10 then '<27><><EFBFBD><EFBFBD>10<31><30>
back_page = page - 10
Response.Write "<td class='p-1 px-2'><A href='" & url & gotopage_str & back_page & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'><i class='fas fa-angle-left'></i></A></td>"
end if
if cint(page) > 1 then
back_page= page - 1
'Response.Write "<td class=''><A href='" & url & gotopage_str & Back_page & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'><</A></td>"
end if
tmp_page=(Cint(page) \ 10)
if Cint(page) mod 10 = 0 then
tmp_page=tmp_page-1
end if
tmp_page=tmp_page * 10
for i=tmp_page +1 to tmp_page +10
if i > pagecount then
exit for
end if
if Cint(page)=i then
Response.Write "<td class='p-1 px-2' style='font-weight:bold;'>" & i & "</td>"
Else
Response.Write "<td class='p-1 px-2'><A href='" & Url & gotopage_str & i & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'>" & i & "</A></td>"
End if
next
if cint(page) < pagecount then
next_page= page + 1
'Response.Write "<td class=''><A href='" & url & gotopage_str & next_page & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'>></A></td>"
end if
if Back_page=0 then
Back_page = 11
else
Back_page = page +10
end if
if Back_page <= pagecount then '<27><><EFBFBD><EFBFBD>10<31><30>
Response.Write "<td class='p-1 px-2'><A href='" & url & gotopage_str & Back_page & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'><i class='fas fa-angle-right'></i></A></td>"
Elseif (Back_page-1) Mod 10 > (pagecount-1) Mod 10 And pagecount > 0 Then
Response.Write "<td class='p-1 px-2'><A href='" & url & gotopage_str & pagecount & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'><i class='fas fa-angle-right'></i></A></td>"
end if
if pagecount >= 11 AND pagecount <> int(page) then
Response.Write "<td class='p-1 px-2'><A href='" & url & gotopage_str & pagecount & strPath & "&SortKeyWd=" & Sort_key & "&txt_title=" & txt_title & "' class='blue'><i class='fas fa-angle-double-right'></i></A></td>"
end if
Response.Write "</tr>"
Response.Write "</table>"
End Function
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ġȯ<C4A1>ϱ<EFBFBD>
Function CheckWord(CheckValue)
if CheckValue <> "" then
CheckValue = replace(CheckValue, "&" , "&amp;")
CheckValue = replace(CheckValue, "<", "&lt;")
CheckValue = replace(CheckValue, ">", "&gt;")
CheckValue = replace(CheckValue, "'", "<22><>")
' CheckValue = replace(CheckValue, "'", "&quot;")
CheckValue = replace(CheckValue, ",", "&apos;")
CheckValue = replace(CheckValue, "%", "&per;")
' CheckValue = replace(CheckValue, " ", "&nbsp;")
' CheckValue = replace(CheckValue, "?", "&nbsp;")
' CheckValue = replace(CheckValue, chr(34), "&dsin;") '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>
CheckValue = replace(CheckValue, chr(34), "<22><>") '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>
CheckValue = replace(CheckValue, "'", "&sin;")
end if
CheckWord=CheckValue
End Function
'<27><><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD> <20><><EFBFBD><EFBFBD> ġȯ<C4A1>ϱ<EFBFBD>
Function ViewWord(CheckValue)
if CheckValue <> "" then
CheckValue = replace(CheckValue, "&amp;" , "&")
CheckValue = replace(CheckValue, "&lt;", "<")
CheckValue = replace(CheckValue, "&gt;", ">")
CheckValue = replace(CheckValue, "&quot;", "'")
CheckValue = replace(CheckValue, "&apos;", ",")
CheckValue = replace(CheckValue, "&nbsp;" , " ")
CheckValue = replace(CheckValue, "&per;", "%")
CheckValue = replace(CheckValue, "&dsin;", chr(34))
CheckValue = replace(CheckValue, "&sin;", "'")
end if
ViewWord=CheckValue
End Function
Function TransHTML(CheckValue)
if Not isNull(CheckValue) then
CheckValue = replace(CheckValue, "&sin;", "'")
' CheckValue = replace(CheckValue, " ", "&nbsp;")
CheckValue = replace(CheckValue, "&dsin;", chr(34)) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD>
CheckValue = replace(CheckValue, chr(13), "<br>")
end if
TransHTML = CheckValue
End Function
Function HTMLEncode(CheckValue)
' CheckValue=server.HTMLEncode(CheckValue)
''// <20>ؿ<EFBFBD> pre<72>±׸<C2B1> <20><><EFBFBD>鼭 <20>Ⱦ<EFBFBD>
''//pre <20>±׸<C2B1> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (ó<><C3B3>)<29><><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD><CCBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Not isNull(CheckValue) then
CheckValue = replace(CheckValue, chr(13), "<br>")
' CheckValue = replace(CheckValue, "<br>", chr(13))
end if
HTMLEncode = CheckValue
End Function
Function TransSTR(CheckValue)
if Not isNull(CheckValue) then
CheckValue = replace(CheckValue, "'", "&sin;")
CheckValue = replace(CheckValue, chr(34), "&dsin;")
CheckValue = replace(CheckValue, "<br>", "")
' CheckValue = replace(CheckValue, chr(13), "<br>")
end if
TransSTR = CheckValue
End Function
Function clen(STRIN)
Dim i, j
Dim LL
LL = 0
i = Len(STRIN)
For j = 1 To i
If Asc(Mid(STRIN, j, 1)) < 0 Then
LL = LL + 2
Else
LL = LL + 1
End If
Next
CLEN = LL
End Function
Function cmid(CSTRIN, CSTPOS, SLEN)
Dim i, j, l
Dim STT
Dim OUTSTR
Dim STPOS, ENPOS
Dim cnt
OUTSTR = ""
STT = RTrim(CSTRIN)
i = CLEN(STT)
l = 0
If i < CSTPOS Then
OUTSTR = Space(SLEN)
ElseIf CSTPOS < 2 Then
OUTSTR = Csformat(STT, SLEN)
Else
STPOS = 0
ENPOS = 0
cnt = 0
For j = 1 To Len(STT)
If Asc(Mid(STT, j, 1)) < 0 Then
cnt = cnt + 2
Else
cnt = cnt + 1
End If
If STPOS = 0 Then
If cnt >= (CSTPOS - 1) Then
STPOS = j + 1
If cnt > (CSTPOS - 1) Then
OUTSTR = " "
End If
End If
Else
If cnt <= (CSTPOS + SLEN - 1) Then
OUTSTR = OUTSTR + Mid(STT, j, 1)
If cnt = (CSTPOS + SLEN - 1) Then
j = Len(STT) + 10
End If
Else
j = Len(STT) + 10
End If
End If
Next
End If
i = CLEN(OUTSTR)
If i < SLEN Then
for j = 1 to (SLEN - i)
OUTSTR = OUTSTR + "&nbsp;"
next
End If
If i > SLEN Then
msg0 "ERROR- 'cmid' function return size error"
End If
Cmid = OUTSTR
End Function
Function csformat(STRIN, SLEN)
Dim i, j, l, k
Dim STT
STT = RTrim(STRIN)
i = CLEN(STT)
l = 0
If i > SLEN Then
For j = Len(STT) To 1 Step -1
If Asc(Mid(STT, j, 1)) < 0 Then
l = l + 2
Else
l = l + 1
End If
If i - l <= SLEN Then
STT = Mid(STT, 1, j - 1)
i = CLEN(STT)
for k = 1 to (SLEN - i)
stt = stt & "&nbsp;"
next
Csformat = STT
Exit For
End If
Next
Else
for k = 1 to (SLEN - i)
stt = stt & "&nbsp;"
next
Csformat = STT
End If
End Function
Function encode(str, chipVal)
' <20><>ȣȭ
''chipval<61><6C> <20><><EFBFBD><EFBFBD> 3<><33><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
Dim Temp, TempChar, Conv, Cipher, i: Temp = ""
chipVal = 3
chipVal = CInt(chipVal)
str = StringToHex(str)
For i = 0 To Len(str) - 1
TempChar = Mid(str, i + 1, 1)
Conv = InStr(Ref, TempChar) - 1
Cipher = Conv Xor chipVal
Cipher = Mid(Ref, Cipher + 1, 1)
Temp = Temp + Cipher
Next
encode = Temp
End Function
Function decode(str, chipVal)
' <20><>ȣȭ
''chipval<61><6C> <20><><EFBFBD><EFBFBD> 3<><33><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
Dim Temp, TempChar, Conv, Cipher, i: Temp = ""
chipVal = 3
chipVal = CInt(chipVal)
For i = 0 To Len(str) - 1
TempChar = Mid(str, i + 1, 1)
Conv = InStr(Ref, TempChar) - 1
Cipher = Conv Xor chipVal
Cipher = Mid(Ref, Cipher + 1, 1)
Temp = Temp + Cipher
Next
Temp = HexToString(Temp)
decode = Temp
End Function
Function StringToHex(pStr)
' <20><><EFBFBD>ڿ<EFBFBD> -> 16<31><36><EFBFBD><EFBFBD>
Dim i, one_hex, retVal
For i = 1 To Len(pStr)
one_hex = Hex(Asc(Mid(pStr, i, 1)))
retVal = retVal & one_hex
Next
StringToHex = retVal
End Function
Function HexToString(pHex)
' 16<31><36><EFBFBD><EFBFBD> -> <20><><EFBFBD>ڿ<EFBFBD>
Dim one_hex, tmp_hex, i, retVal
For i = 1 To Len(pHex)
one_hex = Mid(pHex, i, 1)
If IsNumeric(one_hex) Then
tmp_hex = Mid(pHex, i, 2)
i = i + 1
Else
tmp_hex = Mid(pHex, i, 4)
i = i + 3
End If
retVal = retVal & Chr("&H" & tmp_hex)
Next
HexToString = retVal
End Function
'-- <20><><EFBFBD><EFBFBD>üũ(20170303)
function fnc_user_level(mo_mode,mo_category,mo_val)
dim tval : tval="0"
dim mo_sql
dim mo_val1 : mo_val1 = replace(replace(mo_val, "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
select case mo_mode
case "0" '-- <20><><EFBFBD><EFBFBD>
mo_sql=" select top 1 id from dbo.T_special "&vbCrLf
mo_sql=mo_sql&" where div_use='1' "&vbCrLf
mo_sql=mo_sql&" and tcategory1='"&mo_category&"' "&vbCrLf
mo_sql=mo_sql&" and tval1='"&mo_val1&"' "&vbCrLf
Rs.Open mo_sql, adoConn, 1
if not Rs.eof then
tval="1"
end if
Rs.Close
case "1" '-- <20><>
mo_sql=" select top 1 id from dbo.T_special "&vbCrLf
mo_sql=mo_sql&" where div_use='1' "&vbCrLf
mo_sql=mo_sql&" and tcategory1='"&mo_category&"' "&vbCrLf
mo_sql=mo_sql&" and tval1 in ( "&vbCrLf
mo_sql=mo_sql&" select p_depart from dbo.person "&vbCrLf
mo_sql=mo_sql&" where p_no='"&mo_val1&"' "&vbCrLf
mo_sql=mo_sql&" ) "&vbCrLf
Rs.Open mo_sql, adoConn, 1
if not Rs.eof then
tval="1"
end if
Rs.Close
end select
fnc_user_level=tval
end function
function iif(condition, a, b)
if condition then
iif = a
else
iif = b
end if
end function
function formatNumberDbl(num)
dim str, nc
nc = 0
if IsNumeric(num) then
tmparr = split(cstr(cdbl(num)), ".")
if (uBound(tmparr) - LBound(tmparr) + 1) > 1 then
nc = len(tmparr(1))
end if
str = formatNumber(num, nc)
formatNumberDbl = str
else
formatNumberDbl = "None"
end if
end function
Function dayofweek(str)
If Not Isnumeric(str) Then str = weekDay(str)
Select Case cInt(str)
Case 1 : str = "<22>Ͽ<EFBFBD><CFBF><EFBFBD>"
Case 2 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Case 3 : str = "ȭ<><C8AD><EFBFBD><EFBFBD>"
Case 4 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Case 5 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Case 6 : str = "<22>ݿ<EFBFBD><DDBF><EFBFBD>"
Case 7 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
End Select
dayofweek = str
End Function
Function weekNum(condate)
'condate<74><65> '2020-01-05' <20><><EFBFBD><EFBFBD>
weekNum = int((Day(cdate(condate)) - weekday(cdate(condate)) + 13) / 7)
End Function
Function weekRange(ym, weekNum)
dim tmp_first_day, tmp_last_day, tmp_min_date, tmp_max_day, tmp_range
tmp_first_day = cDate(ym + "-01")
tmp_min_date = DateAdd("d", 7 * (weekNum - 1) - (weekday(tmp_first_day) - 1), tmp_first_day)
tmp_last_day = DateAdd("d", -1, DateAdd("m", 1, tmp_first_day))
tmp_max_day = DateAdd("d", 6, tmp_min_date)
If tmp_min_date < tmp_first_day Then
tmp_min_date = tmp_first_day
End If
If tmp_max_day > tmp_last_day Then
tmp_max_day = tmp_last_day
End If
if tmp_min_date > tmp_max_day Then
tmp_range = "undefined"
Else
tmp_range = Cstr(tmp_min_date) & "~" & Cstr(tmp_max_day)
End if
weekRange = tmp_range
End Function
''//--------------------------------------------------------------------
''//-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> start
''//-- dayofweek_mon, weekday_mon, weekNum_mon, weekRange
Function dayofweek_mon(str)
If Not Isnumeric(str) Then str = weekday_mon(str)
Select Case cInt(str)
Case 1 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Case 2 : str = "ȭ<><C8AD><EFBFBD><EFBFBD>"
Case 3 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Case 4 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Case 5 : str = "<22>ݿ<EFBFBD><DDBF><EFBFBD>"
Case 6 : str = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Case 7 : str = "<22>Ͽ<EFBFBD><CFBF><EFBFBD>"
End Select
dayofweek_mon = str
End Function
Function weekday_mon(str)
If Not Isnumeric(str) Then str = weekDay(str)
Select Case cInt(str)
Case 1 : str = 7
Case 2 : str = 1
Case 3 : str = 2
Case 4 : str = 3
Case 5 : str = 4
Case 6 : str = 5
Case 7 : str = 6
End Select
weekday_mon = str
End Function
'-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
Function weekNum_mon(condate)
'response.write "----------------------"&condate
''condate<74><65> '2020-01-05' <20><><EFBFBD><EFBFBD>
''weekNum_mon = int((Day(cdate(condate)) - weekday_mon(cdate(condate)) + 13) / 7)
query=" SELECT weeknum FROM project2.dbo.login_weeknum with(nolock) WHERE '"& condate &"' BETWEEN sdate and edate; "&vbCrLf
'response.write query
Rs.open query, adoConn, 1
if not Rs.eof then
weekNum_mon = Rs("weeknum")
else
weekNum_mon = 0
end if
Rs.Close
End Function
Function weekRange_mon(ym, weekNum)
dim tmp_first_day, tmp_last_day, tmp_min_date, tmp_max_day, tmp_range
'tmp_first_day = cDate(ym + "-01")
'tmp_min_date = DateAdd("d", 7 * (weekNum - 1) - (weekday(tmp_first_day) - 1), tmp_first_day)
'
'tmp_last_day = DateAdd("d", -1, DateAdd("m", 1, tmp_first_day))
'tmp_max_day = DateAdd("d", 6, tmp_min_date)
'
'If tmp_min_date < tmp_first_day Then
' tmp_min_date = tmp_first_day
'End If
'
'If tmp_max_day > tmp_last_day Then
' tmp_max_day = tmp_last_day
'End If
'if tmp_min_date > tmp_max_day Then
' tmp_range = "undefined"
'Else
' tmp_range = Cstr(tmp_min_date) & "~" & Cstr(tmp_max_day)
'End if
query=" SELECT sdate+'~'+edate AS rangedate FROM project2.dbo.login_weeknum with(nolock) WHERE yearnum = '"& left(ym,4) &"' AND weeknum = '"& weekNum &"' ; "&vbCrLf
'response.write query
Rs.open query, adoConn, 1
if not Rs.eof then
tmp_range = Rs("rangedate")
else
tmp_range = 0
end if
Rs.Close
weekRange_mon = tmp_range
End Function
''//-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD> end
''//--------------------------------------------------------------------
Function queryToJson(query)
Dim resJson, i
resJson = "["
Rs.open query, adoConn, 1
Do While Not Rs.Eof
resJson = resJson & "{"
For i = 0 To Rs.fields.Count - 1
resJson = resJson & """" & Rs.Fields.Item(i).Name & """:""" & Replace(Rs(i), """", "\""") & """"
if i < Rs.fields.Count - 1 Then
resJson = resJson & ","
End if
Next
resJson = resJson & "}"
Rs.MoveNext
if Rs.Eof = false Then
resJson = resJson & ","
End if
Loop
Rs.Close
resJson = resJson & "]"
queryToJson = resJson
End Function
'//-- 2020-10-21 12:14:40
Function adminView(query)
if replace(replace(Request.ServerVariables("REMOTE_ADDR"), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.") = session("admin_ip") then
response.write query
end if
end function
'//-- hwkim 20220117
Function adminView_hwkim(query)
if Request.ServerVariables("REMOTE_ADDR") = "10.10.17.82" then
response.write query
end if
end function
%>