94 lines
3.5 KiB
Plaintext
94 lines
3.5 KiB
Plaintext
<!-- #include virtual = "lib/config.asp" -->
|
|
<!-- #include virtual = "lib/logger_nk.asp" -->
|
|
<%
|
|
dim neakeun_name
|
|
dim neakeun_jumin
|
|
Dim neakeun_id
|
|
dim Query
|
|
dim condate
|
|
dim time_chk '출근/퇴근
|
|
dim ip_address
|
|
dim now_time
|
|
|
|
condate = Request("condate")
|
|
neakeun_name = Request("neakeun_name")
|
|
neakeun_jumin = Request("neakeun_jumin")
|
|
neakeun_id = Request("neakeun_id")
|
|
permanent_position = Request("permanent_position")
|
|
|
|
time_chk = Request("time_chk")
|
|
yoil = request("yoil")
|
|
ip_address = Request.ServerVariables("REMOTE_HOST")
|
|
|
|
'today = CDate("2023-02-14 17:58:02")
|
|
'time2 = FormatDateTime(today, 4)
|
|
'response.write "<br> time = "& time2
|
|
|
|
now_time = zeroformat(hour(time),2) & zeroformat(minute(time),2)
|
|
|
|
'response.write "<br> now_time = "& now_time &"<br>"
|
|
|
|
if cint(now_time) >= 1200 and cint(now_time) < 1300 then
|
|
now_time = "1300"
|
|
end if
|
|
|
|
If neakeun_id <> "" Then
|
|
if trim(time_chk) = "1" then '출근시각 신규입력
|
|
query = "insert into neakeun_in_out_time "
|
|
query = query & "(neakeun_name,neakeun_jumin, [date], yoil, in_time,in_ip_addr, m_id) values ("
|
|
query = query & "'" & neakeun_name & "', "
|
|
query = query & "'" & neakeun_jumin & "', "
|
|
query = query & "'" & condate & "', "
|
|
query = query & "'" & yoil & "', "
|
|
query = query & "'" & now_time & "', "
|
|
query = query & "'" & ip_address & "', "
|
|
query = query & "'" & neakeun_id & "') "
|
|
else '퇴근시각 update
|
|
query = "update neakeun_in_out_time set "
|
|
query = query & " out_time = '" & now_time & "', "
|
|
query = query & " all_time = cast((cast("& now_time &" as float)-1000)/100 as float), "
|
|
query = query & " add1 = case when cast(cast((cast("& now_time &" as float)-1000)/100 as float) as float)>7 then 1 else '' end, "
|
|
query = query & " add2 = case when cast(cast((cast("& now_time &" as float)-1000)/100 as float) as float)>10 then 1 else '' end, "
|
|
query = query & " out_ip_addr = '" & ip_address & "' "
|
|
query = query & " where neakeun_name = '" & neakeun_name & "'"
|
|
query = query & " and left(neakeun_jumin, 6) = left('" & neakeun_jumin & "', 6)"
|
|
query = query & " and [date] = '" & condate & "'"
|
|
end if
|
|
|
|
'Response.Write query
|
|
'response.end
|
|
|
|
adoConn.Execute query
|
|
|
|
Else
|
|
Response.Write "<script language='javascript'>alert('등록되지 않은 면접원/내근직 입니다. 담당 S.V에게 문의하여 주십시오.'); history.back();</script>"
|
|
End If
|
|
%>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=ks_c_5601-1987">
|
|
<TITLE>내근직 업무일지 기록</TITLE>
|
|
</head>
|
|
<body>
|
|
<form method='post' name='frm_work' >
|
|
<input type="hidden" name='neakeun_name' value = '<%=neakeun_name%>' />
|
|
<input type="hidden" name='neakeun_jumin' value = '<%=neakeun_jumin%>' />
|
|
<input type="hidden" name='neakeun_id' value = '<%=neakeun_id%>' />
|
|
<input type="hidden" name='permanent_position' value = '<%=permanent_position%>' />
|
|
<input type="hidden" name='condate' value = '<%=condate%>' />
|
|
</form>
|
|
</body>
|
|
</html>
|
|
<script language="javascript">
|
|
//모프레임을 리플레쉬하기
|
|
var neakeun_name = document.frm_work.neakeun_name.value;
|
|
var neakeun_jumin = document.frm_work.neakeun_jumin.value;
|
|
var permanent_position = document.frm_work.permanent_position.value;
|
|
var neakeun_id = document.frm_work.neakeun_id.value;
|
|
var condate = document.frm_work.condate.value;
|
|
|
|
var url = "./input_time_2014.asp?neakeun_name=" + neakeun_name + "&neakeun_jumin=" + neakeun_jumin + "&neakeun_id=" + neakeun_id + "&condate = " + condate + "&permanent_position = " + permanent_position;
|
|
parent.document.forms[0].action=url;
|
|
parent.document.forms[0].submit();
|
|
</script>
|