20260907 :: 김현정 > 260824 PMS 개선 요청_경영문화본부 4차 반영
This commit is contained in:
@@ -277,12 +277,12 @@
|
||||
'request("aa")
|
||||
|
||||
query = "insert into <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, target1, target2, target3, target4, target5, "
|
||||
query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target20, target21, target97,target98,target99,target100,p_sn, <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip) values ( "
|
||||
query = query & " target6, target7, target8, target9, target10, target11, target12, target13, target14, target15, target16, target17, target20, target21, target97,target98,target99,target100,p_sn, <20>߱<EFBFBD><DFB1><EFBFBD>, <20>߱ð<DEBD>, login_p_no, login_<6E≯<EFBFBD>,login_ip, remark1) values ( "
|
||||
query = query & "'" & krc_no & "', "
|
||||
query = query & "'" & replace(title, " ", "") & "', "
|
||||
query = query & "'" & gap(1) & "', "
|
||||
query = query & "'" & CheckWord(gap(2)) & "', "
|
||||
query = query & "'" & gap(3) & "', "
|
||||
query = query & "'" & year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2) & "', "
|
||||
query = query & "'" & gap(4) & "', "
|
||||
query = query & "'" & gap(5) & "', "
|
||||
query = query & "'" & gap(6) & "', "
|
||||
@@ -312,7 +312,7 @@
|
||||
query = query & "'" & time() & "', "
|
||||
query = query & "'" & user_name(0) & "', "
|
||||
query = query & "'" & user_name(1) & "', "
|
||||
query = query & "'" & Session("USERIP") & "') "
|
||||
query = query & "'" & Session("USERIP") & "', '3') "
|
||||
'Response.Write query & "<br>"
|
||||
adoconn.execute query
|
||||
|
||||
|
||||
93
ess/doc_attach_add.asp
Normal file
93
ess/doc_attach_add.asp
Normal file
@@ -0,0 +1,93 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
Response.CharSet = "euc-kr"
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.Expires = -1
|
||||
|
||||
Dim attachClientIp
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
|
||||
If attachClientIp <> "10.10.13.47" And _
|
||||
attachClientIp <> "10.10.13.105" And _
|
||||
attachClientIp <> "10.10.13.48" And _
|
||||
attachClientIp <> "10.10.13.6" And _
|
||||
attachClientIp <> "10.10.13.29" Then
|
||||
Response.Write "{""result"":""denied""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Dim uploadform, fso, krc_no, folderPath, i, foundSlot, targetPath, fileName, ext
|
||||
Dim allowedExt, folderObj, oneFile, us, dt, idxPart
|
||||
Dim usedSlot(20)
|
||||
|
||||
' PDFs are rasterized into jpg on the client (pdf.js) before upload, same as the
|
||||
' registration page, so the server only ever needs to save the file as-is.
|
||||
allowedExt = "|jpg|jpeg|png|gif|zip|pdf|hwp|doc|docx|xls|xlsx|ppt|pptx|"
|
||||
|
||||
Set uploadform = Server.CreateObject("DEXT.FileUpload")
|
||||
uploadform.Codepage = 949
|
||||
|
||||
krc_no = uploadform("krc_no")
|
||||
|
||||
If krc_no = "" Or InStr(krc_no, "..") > 0 Or InStr(krc_no, "/") > 0 Or InStr(krc_no, "\") > 0 Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
fileName = uploadform("attach_file")(1).FileName
|
||||
|
||||
If fileName = "" Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
ext = LCase(Mid(fileName, InStrRev(fileName, ".") + 1))
|
||||
|
||||
If InStr(allowedExt, "|" & ext & "|") = 0 Then
|
||||
Response.Write "{""result"":""badtype""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Set fso = Server.CreateObject("Scripting.FileSystemObject")
|
||||
folderPath = Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no
|
||||
|
||||
If fso.FolderExists(folderPath) = False Then
|
||||
fso.CreateFolder folderPath
|
||||
End If
|
||||
|
||||
' find used index slots regardless of extension
|
||||
Set folderObj = fso.GetFolder(folderPath)
|
||||
For Each oneFile In folderObj.Files
|
||||
us = InStrRev(oneFile.Name, "_")
|
||||
dt = InStrRev(oneFile.Name, ".")
|
||||
If us > 0 And dt > us Then
|
||||
idxPart = Mid(oneFile.Name, us + 1, dt - us - 1)
|
||||
If IsNumeric(idxPart) Then
|
||||
If CInt(idxPart) >= 1 And CInt(idxPart) <= 20 Then
|
||||
usedSlot(CInt(idxPart)) = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
foundSlot = 0
|
||||
For i = 1 To 20
|
||||
If usedSlot(i) <> 1 Then
|
||||
foundSlot = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If foundSlot = 0 Then
|
||||
Response.Write "{""result"":""full""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
targetPath = folderPath & "/" & krc_no & "_" & CStr(foundSlot) & "." & ext
|
||||
uploadform("attach_file")(1).saveAs(targetPath)
|
||||
|
||||
Response.Write "{""result"":""ok""}"
|
||||
|
||||
Set fso = Nothing
|
||||
Set uploadform = Nothing
|
||||
%>
|
||||
83
ess/doc_attach_del.asp
Normal file
83
ess/doc_attach_del.asp
Normal file
@@ -0,0 +1,83 @@
|
||||
<!-- #include virtual = "lib/config.asp" -->
|
||||
<%
|
||||
Response.CharSet = "euc-kr"
|
||||
Response.AddHeader "Pragma","no-cache"
|
||||
Response.Expires = -1
|
||||
|
||||
Dim attachClientIp
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
|
||||
If attachClientIp <> "10.10.13.47" And _
|
||||
attachClientIp <> "10.10.13.105" And _
|
||||
attachClientIp <> "10.10.13.48" And _
|
||||
attachClientIp <> "10.10.13.6" And _
|
||||
attachClientIp <> "10.10.13.29" Then
|
||||
Response.Write "{""result"":""denied""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Dim fso, krc_no, delIdx, folderPath, i, writePos
|
||||
Dim folderObj, oneFile, us, dt, idxPart, srcName, extPart
|
||||
Dim fileMap(20)
|
||||
|
||||
krc_no = Request.Form("krc_no")
|
||||
|
||||
If krc_no = "" Or InStr(krc_no, "..") > 0 Or InStr(krc_no, "/") > 0 Or InStr(krc_no, "\") > 0 Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
If Not IsNumeric(Request.Form("idx")) Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
delIdx = CInt(Request.Form("idx"))
|
||||
|
||||
If delIdx < 1 Or delIdx > 20 Then
|
||||
Response.Write "{""result"":""fail""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Set fso = Server.CreateObject("Scripting.FileSystemObject")
|
||||
folderPath = Server.Mappath("/") & "/Upload/DOC_ATTACH/" & krc_no
|
||||
|
||||
If fso.FolderExists(folderPath) = False Then
|
||||
Response.Write "{""result"":""ok""}"
|
||||
Response.End
|
||||
End If
|
||||
|
||||
Set folderObj = fso.GetFolder(folderPath)
|
||||
For Each oneFile In folderObj.Files
|
||||
us = InStrRev(oneFile.Name, "_")
|
||||
dt = InStrRev(oneFile.Name, ".")
|
||||
If us > 0 And dt > us Then
|
||||
idxPart = Mid(oneFile.Name, us + 1, dt - us - 1)
|
||||
If IsNumeric(idxPart) Then
|
||||
If CInt(idxPart) >= 1 And CInt(idxPart) <= 20 Then
|
||||
fileMap(CInt(idxPart)) = oneFile.Name
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If fileMap(delIdx) <> "" Then
|
||||
fso.DeleteFile folderPath & "/" & fileMap(delIdx)
|
||||
fileMap(delIdx) = ""
|
||||
End If
|
||||
|
||||
' close the numbering gap, preserving each remaining file's own extension
|
||||
writePos = delIdx
|
||||
For i = delIdx + 1 To 20
|
||||
If fileMap(i) <> "" Then
|
||||
srcName = fileMap(i)
|
||||
extPart = Mid(srcName, InStrRev(srcName, "."))
|
||||
fso.MoveFile folderPath & "/" & srcName, folderPath & "/" & krc_no & "_" & CStr(writePos) & extPart
|
||||
writePos = writePos + 1
|
||||
End If
|
||||
Next
|
||||
|
||||
Response.Write "{""result"":""ok""}"
|
||||
|
||||
Set fso = Nothing
|
||||
%>
|
||||
@@ -30,6 +30,9 @@
|
||||
'--------------- <20>߰<EFBFBD>(20170306)<29><> ------------------------
|
||||
|
||||
dim xadmin : xadmin = request("xadmin") '-- <20><><EFBFBD><EFBFBD>(edit)
|
||||
dim attachClientIp, attachEditAllowed
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
attachEditAllowed = (attachClientIp = "10.10.13.47" Or attachClientIp = "10.10.13.105" Or attachClientIp = "10.10.13.48" Or attachClientIp = "10.10.13.6" Or attachClientIp = "10.10.13.29")
|
||||
'response.write "[" & xadmin & "]"
|
||||
|
||||
dim pay_type(4)
|
||||
@@ -915,7 +918,7 @@ if rsc.RecordCount > 0 then
|
||||
%>
|
||||
<div class="attach_preview">
|
||||
<img src="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & attachFileMap(i)%>" />
|
||||
<% If xadmin = "edit" And Session("N_depart") = "M" And Session("N_team") = "101" Then %>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
@@ -927,7 +930,7 @@ if rsc.RecordCount > 0 then
|
||||
<span class="attach_file_ext"><%=Ucase(Mid(attachFileMap(i), InStrRev(attachFileMap(i),".")+1))%></span>
|
||||
<span class="attach_file_name"><%=attachFileMap(i)%></span>
|
||||
</a>
|
||||
<% If xadmin = "edit" And Session("N_depart") = "M" And Session("N_team") = "101" Then %>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
@@ -936,7 +939,7 @@ if rsc.RecordCount > 0 then
|
||||
End If
|
||||
Next
|
||||
%>
|
||||
<% If xadmin = "edit" And Session("N_depart") = "M" And Session("N_team") = "101" Then %>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<div class="attach_add_btn" id="attachAddBtn">+ <20>߰<EFBFBD></div>
|
||||
<input type="file" id="attachFileInput" accept="image/*,.zip,.pdf,.hwp,.doc,.docx,.xls,.xlsx,.ppt,.pptx" multiple style="display:none;" />
|
||||
<% End If %>
|
||||
|
||||
@@ -28,6 +28,9 @@ Response.CharSet="euc-kr"
|
||||
|
||||
'--------------- <20>߰<EFBFBD>(20170306)<29><> ------------------------
|
||||
dim xadmin : xadmin=request("xadmin") '-- <20><><EFBFBD><EFBFBD>(edit)
|
||||
dim attachClientIp, attachEditAllowed
|
||||
attachClientIp = Replace(Replace(Trim(Request.ServerVariables("REMOTE_ADDR")), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.")
|
||||
attachEditAllowed = (attachClientIp = "10.10.13.47" Or attachClientIp = "10.10.13.105" Or attachClientIp = "10.10.13.48" Or attachClientIp = "10.10.13.6" Or attachClientIp = "10.10.13.29")
|
||||
dim pay_type(4)
|
||||
pay_type(1) = "ī<><C4AB>/<2F><><EFBFBD><EFBFBD>"
|
||||
pay_type(2) = "<22><><EFBFBD>ݰ<EFBFBD><DDB0>꼭"
|
||||
@@ -947,7 +950,7 @@ if rsc.RecordCount > 0 then
|
||||
%>
|
||||
<div class="attach_preview">
|
||||
<img src="<%="/Upload/DOC_ATTACH/" & krc_no & "/" & attachFileMap(i)%>" />
|
||||
<% If xadmin = "edit" And Session("N_depart") = "M" And Session("N_team") = "101" Then %>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
@@ -959,7 +962,7 @@ if rsc.RecordCount > 0 then
|
||||
<span class="attach_file_ext"><%=Ucase(Mid(attachFileMap(i), InStrRev(attachFileMap(i),".")+1))%></span>
|
||||
<span class="attach_file_name"><%=attachFileMap(i)%></span>
|
||||
</a>
|
||||
<% If xadmin = "edit" And Session("N_depart") = "M" And Session("N_team") = "101" Then %>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<span class="attach_del_btn" data-idx="<%=i%>">×</span>
|
||||
<% End If %>
|
||||
</div>
|
||||
@@ -968,7 +971,7 @@ if rsc.RecordCount > 0 then
|
||||
End If
|
||||
Next
|
||||
%>
|
||||
<% If xadmin = "edit" And Session("N_depart") = "M" And Session("N_team") = "101" Then %>
|
||||
<% If xadmin = "edit" And attachEditAllowed Then %>
|
||||
<div class="attach_add_btn" id="attachAddBtn">+ <20>߰<EFBFBD></div>
|
||||
<input type="file" id="attachFileInput" accept="image/*,.zip,.pdf,.hwp,.doc,.docx,.xls,.xlsx,.ppt,.pptx" multiple style="display:none;" />
|
||||
<% End If %>
|
||||
|
||||
Reference in New Issue
Block a user