Files
KIN/other/writeok.asp
2025-09-29 17:55:08 +09:00

76 lines
2.2 KiB
Plaintext
Raw Blame History

<!-- #include virtual = "lib/config.asp" -->
<%
set dbin = server.CreateObject("ADODB.CONNECTION")
workit = request("workit")
setYear_srp = Request("setYear_srp")
setMonth_srp = request("setMonth_srp")
p_rdate = request("p_rdate")
p_rstimecode = request("p_rstimecode")
p_retimecode = request("p_retimecode")
p_comment = request("p_comment_" & p_retimecode)
tmp_scode = request("tmp_scode")
Dim tmp_min(2)
tmp_scode = 1
tmp_min(0) = "00"
tmp_min(1) = "30"
for i = 9 to 22
for j = 1 to 2
if int(p_rstimecode) = tmp_scode then
p_rstime = right("0" & i, 2) & ":" & tmp_min(j - 1)
end if
if int(p_retimecode) = tmp_scode then
p_retime = right("0" & i + int(1 - (j mod 2)), 2) & ":" & tmp_min(j mod 2)
end if
tmp_scode = tmp_scode + 1
next
next
query = ""
query = query & " SELECT p_team_name FROM project2.dbo.V_Person WHERE p_no = '" & session("User_Number") & "'"
Adors.Open query, adoConn, 1
if Adors.RecordCount > 0 then
tmp_depart = Adors("p_team_name")
end if
Adors.Close
query = "INSERT INTO [srp] "
query = query & "(p_type, p_depart, p_departcode, p_name, p_namecode, p_rdate, p_rstime, p_retime, p_rstimecode, p_retimecode, p_codegap, p_comment, p_delok, p_wdate) "
query = query & "VALUES "
query = query & "('" & workit & "', "
query = query & "'" & tmp_depart & "', "
query = query & "'" & session("Depart_Code") & "', "
query = query & "'" & session("loginuser") & "', "
query = query & "'" & session("User_Number") & "', "
query = query & "'" & p_rdate & "', "
query = query & "'" & p_rstime & "', "
query = query & "'" & p_retime & "', "
query = query & "'" & p_rstimecode & "', "
query = query & "'" & p_retimecode & "', "
query = query & "'" & (p_retimecode - p_rstimecode) + 1 & "', "
query = query & "'" & p_comment & "', "
query = query & "'N', "
query = query & "'" & now() & "') "
dbin.Open adoConn
dbin.Execute query
dbin.Close
%>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<form name="srp" method="post">
<input type="hidden" name="workit" value="<%=workit%>">
<input type="hidden" name="condate" value="<%=p_rdate%>">
</form>
<script>
alert('<27><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>');
document.srp.action = 'view.asp';
document.srp.submit();
</script>
<%
set dbin = nothing
%>