216 lines
11 KiB
Plaintext
216 lines
11 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<%
|
|
b_type = request("b_type")
|
|
b_sn = request("b_sn")
|
|
tmp_menuname = ""
|
|
Select case b_type
|
|
case "not"
|
|
tmp_menuname = "공지사항"
|
|
case "con"
|
|
tmp_menuname = "제안용 서류함"
|
|
case "rule"
|
|
tmp_menuname = "사내규정"
|
|
case "sug"
|
|
tmp_menuname = "업무 매뉴얼"
|
|
case "klg"
|
|
tmp_menuname = "교육창고"
|
|
case "fre"
|
|
tmp_menuname = "통계지식"
|
|
End Select
|
|
%>
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1><%=tmp_menuname%></h1>
|
|
</div>
|
|
<!-- /.content-header -->
|
|
<!-- Main content -->
|
|
<div class="content-body">
|
|
<div class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<form name="b_board" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="b_type" value="<%=b_type%>">
|
|
<input type="hidden" name="b_sn" value="<%=b_sn%>">
|
|
|
|
<%
|
|
query = "SELECT * "
|
|
query = query & "FROM [intranet_board] "
|
|
query = query & "WHERE b_type='" & b_type & "' "
|
|
query = query & " AND b_sn='" & b_sn & "' "
|
|
|
|
Adors.Open query, adoConn, 1
|
|
if Adors.RecordCount > 0 then
|
|
Dim tmp_icon_array()
|
|
if Adors("b_filename") <> "" then
|
|
fileArray = Split(Adors("b_filename"),",")
|
|
blcnt = 0
|
|
For i=LBound(fileArray) To UBound(fileArray)
|
|
if fileArray(i) = "" Then
|
|
blcnt = blcnt + 1
|
|
End If
|
|
Next
|
|
|
|
arraycnt = cint(Ubound(fileArray))
|
|
if arraycnt = 0 then
|
|
arraycnt = 1
|
|
end if
|
|
reDim tmp_icon_array(arraycnt)
|
|
|
|
for i=0 To arraycnt-1
|
|
|
|
tmp_pro = right(fileArray(i), 3)
|
|
|
|
if lcase(tmp_pro)="zip" or lcase(tmp_pro)="hwp" or lcase(tmp_pro)="ppt" or lcase(tmp_pro)="xls" or lcase(tmp_pro)="pdf" or lcase(tmp_pro)="doc" or lcase(tmp_pro)="bmp" or lcase(tmp_pro)="jpg" then
|
|
tmp_file_icon = "<IMG alt=" & fileArray(i) & " width='16' height='16' border=0 src=./images/common/icon_" & tmp_pro & ".gif align=absmiddle>"
|
|
tmp_icon_array(i) = tmp_file_icon
|
|
else
|
|
tmp_file_icon = "<IMG alt=" & fileArray(i) & " width='16' height='16' border=0 src=/images/common/icon_etc.gif align=absmiddle>"
|
|
tmp_icon_array(i) = tmp_file_icon
|
|
end if
|
|
|
|
next
|
|
end if
|
|
%>
|
|
<table class="table table-bordered">
|
|
<tr>
|
|
<td width="10%" align="center" height="26" class='bg-dark'>제목</td>
|
|
<td height="26" style="padding:0 10 0 10">
|
|
<input type="text" name="b_subject" class='form-control' value="<%=Adors("b_subject")%>">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" height="26" class='bg-dark'>기존파일</td>
|
|
<td height="26">
|
|
<input type="hidden" name="fileCnt" value="<%=arraycnt - blcnt + 1%>" />
|
|
<%
|
|
for i=0 To arraycnt-1
|
|
if fileArray(i)<>"" then
|
|
%>
|
|
<%=tmp_icon_array(i)%> <a href="b_downloads.asp?b_type=<%=b_type%>&filename=<%=Server.UrlEncode(fileArray(i))%>" class="blue"><%=fileArray(i)%></a>
|
|
<%
|
|
if int(Adors("b_namecode")) = int(session("User_Number")) or int(session("Depart_Code")) = 18 then
|
|
%>
|
|
<img src="/images/business/icon_del.gif" style="width:15px;cursor:pointer;" onclick="del_files('<%=b_sn %>', '<%=fileArray(i) %>')" alt="삭제" />
|
|
<%
|
|
End if
|
|
%>
|
|
<%
|
|
end if
|
|
next
|
|
%>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" height="26" class='bg-dark'>첨부파일</td>
|
|
<td height="26">
|
|
<input type="file" name="txtFileName1" id="txtFileName1" style="width:calc(100% - 110px);display:inline-block;" class='form-control'>
|
|
<input type="checkbox" id="2FileCall" value="1" style="display:inline-block;" onclick="attachPM(this.id)"/>
|
|
<input type="file" name="txtFileName2" id="txtFileName2" style="width:calc(100% - 110px);display:inline-block;" class='form-control d-none'>
|
|
<input type="checkbox" id="3FileCall" value="1" style="display:inline-block;" onclick="attachPM(this.id)" class='d-none'/>
|
|
<input type="file" name="txtFileName3" id="txtFileName3" style="width:calc(100% - 110px);display:inline-block;" class='form-control d-none'>
|
|
<input type="checkbox" id="4FileCall" value="1" style="display:inline-block;" onclick="attachPM(this.id)" class='d-none'/>
|
|
<input type="file" name="txtFileName4" id="txtFileName4" style="width:calc(100% - 110px);display:inline-block;" class='form-control d-none'>
|
|
<input type="checkbox" id="5FileCall" value="1" style="display:inline-block;" onclick="attachPM(this.id)" class='d-none'/>
|
|
<input type="file" name="txtFileName5" id="txtFileName5" style="width:calc(100% - 110px);display:inline-block;" class='form-control d-none'>
|
|
<input type="checkbox" id="6FileCall" value="1" style="display:inline-block;" onclick="attachPM(this.id)" class='d-none'/>
|
|
<input type="file" name="txtFileName6" id="txtFileName6" style="width:calc(100% - 110px);display:inline-block;" class='form-control d-none'>
|
|
<input type="checkbox" id="7FileCall" value="1" style="display:inline-block;" onclick="attachPM(this.id)" class='d-none'/>
|
|
<input type="file" name="txtFileName7" id="txtFileName7" style="width:calc(100% - 110px);display:inline-block;" class='form-control d-none'>
|
|
<input type="checkbox" id="8FileCall" value="1" style="display:inline-block;" onclick="attachPM(this.id)" class='d-none'/>
|
|
<input type="file" name="txtFileName8" id="txtFileName8" style="width:calc(100% - 110px);display:inline-block;" class='form-control d-none'><font color="red">첨부파일추가</font><br />
|
|
<font class="brown">최대 20Mb 까지 첨부 가능</font>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" height="26" class='bg-dark'>내용</td>
|
|
<td height="26" style="padding:5">
|
|
<textarea name="b_content" rows="20" class='form-control'><%=ViewWord(Adors("b_content"))%></textarea>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="center" style="padding:10 0 10 0;">
|
|
<img src="/images/common/btn_modify.jpg" align="absmiddle" onClick="goit('1')" style="CURSOR:pointer;">
|
|
<img src="/images/common/btn_list.jpg" align="absmiddle" onClick="go_list();" style="CURSOR:pointer;">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<% end if %>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
$(function(){
|
|
currentMenu("/knowledge/b_list.asp", "?b_type=<%=b_type%>");
|
|
});
|
|
function goit(a){
|
|
if (a == 1){
|
|
if (document.b_board.b_subject.value.trim() == ""){
|
|
alert("제목을 입력해 주세요");
|
|
document.b_board.b_subject.value = "";
|
|
document.b_board.b_subject.focus();
|
|
return;
|
|
}
|
|
if (document.b_board.b_content.value.trim() == ""){
|
|
alert("내용을 입력해 주세요");
|
|
document.b_board.b_content.value = "";
|
|
document.b_board.b_content.focus();
|
|
return;
|
|
}
|
|
document.b_board.b_subject.value = document.b_board.b_subject.value.trim().replace(/'/g, "");
|
|
document.b_board.b_content.value = document.b_board.b_content.value.trim().replace(/'/g, "");
|
|
|
|
document.b_board.action = "b_modiok.asp";
|
|
document.b_board.submit();
|
|
}
|
|
}
|
|
|
|
function attachPM(checkid){
|
|
var numb = checkid.substring(0,1);
|
|
var checkYN = $("#"+checkid).is(":checked");
|
|
var filecnt = document.b_board.fileCnt.value;
|
|
|
|
if (filecnt * 1 + numb * 1 > 8) {
|
|
alert("최대 8개까지 등록가능합니다.");
|
|
$("#" + checkid).prop("checked", false);
|
|
} else {
|
|
if(checkYN){
|
|
$("#txtFileName"+numb).removeClass("d-none");
|
|
$("#"+(numb*1+1)+"FileCall").removeClass("d-none");
|
|
$("#"+(numb*1-1)+"FileCall").addClass("d-none");
|
|
}else{
|
|
$("#txtFileName"+numb).addClass("d-none");
|
|
$("#"+(numb*1+1)+"FileCall").addClass("d-none");
|
|
$("#"+(numb*1-1)+"FileCall").removeClass("d-none");
|
|
$("#"+(numb*1+1)+"FileCall").removeAttr("checked");
|
|
}
|
|
}
|
|
}
|
|
|
|
function del_files(b_sn, file_name) {
|
|
var param = { b_sn: b_sn, file_name: escape(file_name) };
|
|
if (confirm("삭제처리하시겠습니까?")) {
|
|
ajaxCallJson("b_file_delete_ajax.asp", param, null, "post", "del_files_complete()", "", "");
|
|
}
|
|
}
|
|
|
|
function del_files_complete() {
|
|
alert("삭제처리되었습니다.");
|
|
location.href = "./b_modi.asp?b_sn=" + document.b_board.b_sn.value + "&b_type=" + document.b_board.b_type.value;
|
|
}
|
|
|
|
function go_list(){
|
|
location.href = "./b_list.asp?b_type=" + document.b_board.b_type.value;
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |