최초커밋
This commit is contained in:
216
knowledge/b_modi.asp
Normal file
216
knowledge/b_modi.asp
Normal file
@@ -0,0 +1,216 @@
|
||||
<!-- #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 = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
case "con"
|
||||
tmp_menuname = "<22><><EFBFBD>ȿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
case "rule"
|
||||
tmp_menuname = "<22>系<EFBFBD><E7B3BB><EFBFBD><EFBFBD>"
|
||||
case "sug"
|
||||
tmp_menuname = "<22><><EFBFBD><EFBFBD> <20>Ŵ<EFBFBD><C5B4><EFBFBD>"
|
||||
case "klg"
|
||||
tmp_menuname = "<22><><EFBFBD><EFBFBD>â<EFBFBD><C3A2>"
|
||||
case "fre"
|
||||
tmp_menuname = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
||||
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'><3E><><EFBFBD><EFBFBD></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'><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></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="<22><><EFBFBD><EFBFBD>" />
|
||||
<%
|
||||
End if
|
||||
%>
|
||||
<%
|
||||
end if
|
||||
next
|
||||
%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" height="26" class='bg-dark'>÷<><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD></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">÷<><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߰<EFBFBD></font><br />
|
||||
<font class="brown"><3E>ִ<EFBFBD> 20Mb <20><><EFBFBD><EFBFBD> ÷<><C3B7> <20><><EFBFBD><EFBFBD></font>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" height="26" class='bg-dark'><3E><><EFBFBD><EFBFBD></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("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD> <20>ּ<EFBFBD><D6BC><EFBFBD>");
|
||||
document.b_board.b_subject.value = "";
|
||||
document.b_board.b_subject.focus();
|
||||
return;
|
||||
}
|
||||
if (document.b_board.b_content.value.trim() == ""){
|
||||
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD> <20>ּ<EFBFBD><D6BC><EFBFBD>");
|
||||
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("<22>ִ<EFBFBD> 8<><38><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD><EFBFBD>մϴ<D5B4>.");
|
||||
$("#" + 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("<22><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD>Ͻðڽ<C3B0><DABD>ϱ<EFBFBD>?")) {
|
||||
ajaxCallJson("b_file_delete_ajax.asp", param, null, "post", "del_files_complete()", "", "");
|
||||
}
|
||||
}
|
||||
|
||||
function del_files_complete() {
|
||||
alert("<22><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.");
|
||||
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" -->
|
||||
Reference in New Issue
Block a user