<% 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 "
time = "& time2 now_time = zeroformat(hour(time),2) & zeroformat(minute(time),2) 'response.write "
now_time = "& now_time &"
" 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 "" End If %> 내근직 업무일지 기록