최초커밋
This commit is contained in:
222
knowledge/b_list.asp
Normal file
222
knowledge/b_list.asp
Normal file
@@ -0,0 +1,222 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
b_type = request("b_type")
|
||||
searchtype = request("searchtype")
|
||||
if searchtype = "" then
|
||||
searchtype = "0"
|
||||
end if
|
||||
searchword = request("searchword")
|
||||
|
||||
if request("gotopage") <> "" then
|
||||
tmp_currentpage = request("gotopage")
|
||||
else
|
||||
tmp_currentpage = 1
|
||||
end if
|
||||
|
||||
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">
|
||||
<input type="hidden" name="b_type" value="<%=b_type%>">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<%
|
||||
query = "SELECT * "
|
||||
query = query & "FROM [intranet_board] "
|
||||
query = query & "WHERE b_type='" & b_type & "' "
|
||||
if searchtype = "0" then
|
||||
query = query & "and b_subject like '%" & searchword & "%' "
|
||||
elseif searchtype = "1" then
|
||||
query = query & "and b_content like '%" & searchword & "%' "
|
||||
elseif searchtype = "2" then
|
||||
query = query & "and (b_subject like '%" & searchword & "%' or b_content like '%" & searchword & "%') "
|
||||
elseif searchtype = "3" then
|
||||
query = query & "and b_name like '%" & searchword & "%' "
|
||||
end if
|
||||
query = query & "AND b_delok='N' "
|
||||
query = query & "ORDER BY b_sn DESC "
|
||||
'Response.Write query & "<BR>"
|
||||
Rs.Open query, adoConn, 1
|
||||
%>
|
||||
<tr>
|
||||
<td style="padding:5"><3E><><EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD> : <20><> <b class="tahoma_orange"><%=Rs.RecordCount%></b><3E><><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.</td>
|
||||
<td align="right">
|
||||
<select id="searchType">
|
||||
<option value="0"><3E><><EFBFBD><EFBFBD></option>
|
||||
<option value="1"><3E><><EFBFBD><EFBFBD></option>
|
||||
<option value="2"><3E><><EFBFBD><EFBFBD>+<2B><><EFBFBD><EFBFBD></option>
|
||||
<option value="3"><3E>ۼ<EFBFBD><DBBC><EFBFBD></option>
|
||||
</select>
|
||||
<input type="text" id="searchWord" value="" />
|
||||
<input type="button" id="searchBtn" value="<22>˻<EFBFBD>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" colspan="2">
|
||||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors mt-1">
|
||||
<tr>
|
||||
<td align="center" height="26" width="2%" >No.</td>
|
||||
<td align="center" height="26" width="50%" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" height="26" ><3E>з<EFBFBD></td>
|
||||
<td align="center" height="26" ><3E>ۼ<EFBFBD><DBBC><EFBFBD></td>
|
||||
<td align="center" height="26" ><3E>ۼ<EFBFBD><DBBC><EFBFBD></td>
|
||||
<td align="center" height="26" ><3E><><EFBFBD><EFBFBD></td>
|
||||
<td align="center" height="26" >÷<><C3B7></td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
if Rs.RecordCount > 0 then
|
||||
Rs.PageSize = 20
|
||||
tmp_ok = 1
|
||||
PageCount = Rs.PageCount
|
||||
Rs.absolutepage = tmp_Currentpage
|
||||
tmp_total_record = Rs.RecordCount
|
||||
tmp_for = Cint(tmp_total_record) - ((Cint(tmp_Currentpage) - 1) * Rs.PageSize)
|
||||
|
||||
if Rs.PageSize <= tmp_for then
|
||||
if Rs.RecordCount <= Rs.PageSize then
|
||||
tmp_for = Rs.recordcount
|
||||
else
|
||||
tmp_for = Rs.PageSize
|
||||
end if
|
||||
else
|
||||
tmp_for = tmp_for
|
||||
end if
|
||||
|
||||
for i = 1 to tmp_for
|
||||
if Cint(tmp_Currentpage)=1 then
|
||||
Num=Cint(tmp_total_record)- i+1
|
||||
else
|
||||
Num=Cint(tmp_total_record) - ((Cint(tmp_Currentpage) - 1) * Rs.PageSize) - i +1
|
||||
end if
|
||||
|
||||
tmp_subject = Rs("b_subject")
|
||||
|
||||
query = " SELECT p_team_name as d_name FROM project2.dbo.V_Person WHERE p_no = '" & Rs("b_namecode") & "' "
|
||||
Adors.Open query, adoConn, 1
|
||||
if Adors.RecordCount > 0 then
|
||||
tmp_depart = Adors("d_name")
|
||||
else
|
||||
tmp_depart = "-"
|
||||
end if
|
||||
Adors.Close
|
||||
|
||||
if Rs("b_filename") <> "" then
|
||||
fileArray = Split(replace(Rs("b_filename"),",,",","),",")
|
||||
|
||||
tmp_file = Ubound(fileArray)
|
||||
If tmp_file=0 then
|
||||
tmp_file = 1
|
||||
End If
|
||||
tmp_file = tmp_file & "<22><>"
|
||||
else
|
||||
tmp_file = "-"
|
||||
end if
|
||||
|
||||
if isnull(Rs("b_reply_cnt")) OR Rs("b_reply_cnt") = "0" then
|
||||
tmp_reply_cnt = ""
|
||||
else
|
||||
tmp_reply_cnt = "[ " & Rs("b_reply_cnt") & " ]"
|
||||
end if
|
||||
%>
|
||||
<!--- Loop Set Start --->
|
||||
<tr>
|
||||
<td align="center" height="26" ><%=Num%></td>
|
||||
<td align="left" height="26"><a href="javascript:goit('2','<%=Rs("b_sn")%>')" class="blue"><%=tmp_subject%></a> <%=tmp_reply_cnt%></td>
|
||||
<td align="center" height="26"><%=tmp_depart%></td>
|
||||
<td align="center" height="26"><%=Rs("b_name")%></td>
|
||||
<td align="center" height="26" ><%=left(Rs("b_regdate"), 10)%></td>
|
||||
<td align="center" height="26" ><%=Rs("b_readcnt")%></td>
|
||||
<td align="center" height="26">
|
||||
<%=tmp_file%>
|
||||
</td>
|
||||
</tr>
|
||||
<!--- Loop Set End --->
|
||||
<%
|
||||
Rs.MoveNext
|
||||
next
|
||||
end if
|
||||
Rs.Close
|
||||
%>
|
||||
</table>
|
||||
<!--- Paging Start --->
|
||||
<%=Pagelist("b_list.asp",tmp_currentpage ,tmp_bcolor , "", pagecount, "&b_type=" & b_type & "&searchtype=" & searchtype & "&searchword=" & searchword)%>
|
||||
<!--- Paging End --->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<img src="/images/common/btn_write.jpg" align="absmiddle" onClick="goit('1')" style="CURSOR:pointer;">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
function goit(a, b){
|
||||
if (a == 1){
|
||||
document.b_board.action = "b_write.asp";
|
||||
document.b_board.submit();
|
||||
}else if (a == 2){
|
||||
document.b_board.action = "b_view.asp?b_sn=" + b;
|
||||
document.b_board.submit();
|
||||
}else if (a == 3){
|
||||
document.b_board.action = "b_list.asp";
|
||||
document.b_board.submit();
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#searchBtn").on("click", function(){
|
||||
var searchType = $("#searchType option:selected").val();
|
||||
var searchWord = $("#searchWord").val();
|
||||
searchWord = searchWord.replace(/'/g, "");
|
||||
|
||||
location.href="./b_list.asp?b_type=<%=b_type%>&searchtype=" + searchType + "&searchword=" + searchWord;
|
||||
});
|
||||
$("#searchWord").on("keyup", function(e){
|
||||
e.preventDefault();
|
||||
var keycode = event.which ? event.which : event.keyCode;
|
||||
if(keycode == 13){
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
$("#searchType").val("<%=searchtype%>");
|
||||
$("#searchWord").val("<%=searchword%>");
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user