⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.asp

📁 网佳网络办公系统(以下简称OA)是一套基于B/S模式的无纸化办公系统。[显著特点:无须安装客户端] 主要功能模块:管理 公文 车辆 通知 档案 值班 人事 审批 仓库 主界面 软件下载 个
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<%   	loginname=session("hxf_u_nickname")
        ljldj=Session("hxf_u_grade")
	dim rs,sql
	dim classid
	dim classname
   	dim totalPut   
   	dim CurrentPage
   	dim TotalPages
   	if request("classid")<>"" then
		classid=request("classid")
   	else
		classid=1
   	end if
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
  	set rs = server.createobject("adodb.recordset")
 	set rs1=server.createobject("adodb.recordset")
   	if trim(request("Nclassid"))<>"" then
		Nclassid=trim(request("Nclassid"))
  		sql="select * from ANclass where NclassID="&cstr(Nclassid)
 		rs.open sql,conn,1,1
 		if not rs.eof then
			Nclassname=rs("Nclass")
 		end if
		rs.close
   	else
		Nclassid=""
		Nclassname="全部文章"
   	end if
  	sql="select * from Aclass where classID="&cstr(classid)
 	rs.open sql,conn,1,1
 	if not rs.eof then
		classname=rs("class")
 	end if
	rs.close
%>
<html>
<head>
<meta NAME="GENERATOR" Content="Microsoft FrontPage 5.0">
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="网佳资讯,http://www.e169.net">
<LINK href="style.css" rel=stylesheet>
<title><%=classname%>|<%=hosturl%></title>
</head>

<body oncontextmenu=self.event.returnValue=false topmargin="0" leftmargin="0">
<TABLE cellSpacing=0 cellPadding=0 width="95%" border=0 align=center>
  <TBODY>
  <TR>
    <TD bgColor="<%=Tablebackcolor%>">
      <TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
        <TR>
          <TD bgColor="<%=Tabletitlecolor%>" background="pic/bjing.gif">
<%
	sql="select class,classid from Aclass"
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "还没有任何栏目"
	else
	do while not rs.eof
%>|&nbsp;&nbsp;<a href="default.asp?classid=<%=rs("classid")%>"><%if cint(rs("classid"))=cint(classid) then%><font color=red><%=rs("class")%></font><%else%><%=rs("class")%><%end if%></a>&nbsp;&nbsp;|&nbsp;&nbsp;   
<%   
	rs.movenext   
	loop   
	end if   
	rs.close   
%>   
	</TD></TR> 
        <TR>  
          <TD bgColor="<%=Tablebodycolor%>">  
<%  
	sql="select Nclass,Nclassid from ANclass where classID="&cstr(classid)  
	rs.open sql,conn,1,1  
	if rs.eof and rs.bof then  
		response.write "还没有任何栏目"  
	else  
	do while not rs.eof  
%><a href="index.asp?classid=<%=classid%>&Nclassid=<%=rs("Nclassid")%>"><%=rs("Nclass")%></a>&nbsp;&nbsp;  
<%    
	rs.movenext    
	loop    
	end if    
	rs.close    
%>  
	</TD></TR>  
      </table> 
    </td> 
  </tr> 
  </tbody> 
</table> 
<div align="center">                                            
  <center>                                            
  <table border="0" width=95% align=center cellspacing="0" cellpadding="1" bgcolor="#FFFFFF">   
    <tr>   
      <td valign="top" width="25%">    
  <table border="0" width=95% align=center cellspacing="0" cellpadding="1" bgcolor="#FFFFFF">    
    <tr>    
      <td valign="top" width="25%"><TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>  
        <TR>  
          <TD bgColor="<%=Tabletitlecolor%>"><B>文件分类导航</B>  
	</TD></TR>  
        <TR>  
          <TD bgColor="<%=Tablebodycolor%>">  
<font style=line-height:150%>   
<%   
	sql="select class,classid from Aclass"   
	rs.open sql,conn,1,1   
	if rs.bof and rs.eof then   
		response.write "没有任何分类"   
	else   
	do while not rs.eof   
%>   
<img border="0" src="pic/close.gif"><a href="default.asp?classid=<%=rs("classid")%>"><%=rs("class")%></a><br>   
<%   
	sql1="select Nclass,Nclassid,classid from ANclass where classid="&rs("classid")   
	rs1.open sql1,conn,1,1   
	do while not rs1.eof   
%> <img border="0" src="pic/open.gif"><a href="index.asp?classid=<%=rs1("classid")%>&Nclassid=<%=rs1("Nclassid")%>"><%=rs1("Nclass")%></a><br>   
<%   
	rs1.movenext   
	loop   
	rs1.close   
%>   
<br><br>   
<%   
	rs.movenext   
	loop   
	end if   
	rs.close   
%>   
</font>   
  
	</TD></TR>  
      </table>    </td> 
  </tr> 
  </tbody> 
</table> 
      </td>  
      <td valign="top" width="3%">   &nbsp;  
      </td>  
      <td width="72%" valign="top">    
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 align=center> 
  <TBODY> 
  <TR> 
    <TD bgColor="<%=Tablebackcolor%>"> 
      <TABLE cellSpacing=1 cellPadding=4 width="100%" border=0> 
        <TR> <td><font color="#FFFFFF">今日发文列表<span lang="en-us">&gt;&gt;&gt;</span></font></td>
</TR> 
        <TR> 
          <TD bgColor="<%=Tablebodycolor%>"> 
<font style=line-height:150%>  
<%  
sql="select * from article where dateandtime=date() and baomi<="&ljldj&" order by articleid desc"  
	rs.open sql,conn,1,1  
  	if rs.eof and rs.bof then  
       		response.write "<p align='center'>今天到现在时间为准没有新发文件!</p>"  
   	else  
   	       	totalPut=rs.recordcount  
      		if currentpage<1 then  
          		currentpage=1  
      		end if  
 
      		if (currentpage-1)*MaxPerPage>totalput then  
	   		if (totalPut mod MaxPerPage)=0 then  
	     			currentpage= totalPut \ MaxPerPage  
	   		else  
	      			currentpage= totalPut \ MaxPerPage + 1  
	   		end if  
      		end if  
       		if currentPage=1 then  
            		showContent  
            		showpage totalput,MaxPerPage,"default.asp"  
       		else  
          		if (currentPage-1)*MaxPerPage<totalPut then  
            			rs.move  (currentPage-1)*MaxPerPage  
            			showContent  
             			showpage totalput,MaxPerPage,"default.asp"  
        		else  
	        		currentPage=1  
           			showContent  
           			showpage totalput,MaxPerPage,"default.asp"  
	      		end if  
	   	end if  
   	rs.close  
   	end if  
	          
   	sub showContent  
       	dim i  
	   	i=0  
	do while not rs.eof 
	cao=rs("yueduzhe")
%><%=i+1%>.	<%if InStr(cao,loginname)=0 then%>
 <b>  
<a href="list.asp?id=<%=rs("articleid")%>"><font color="#FF0000"><%=rs("title")%></font></a></b> <%else%><a href="list.asp?id=<%=rs("articleid")%>"><%=rs("title")%></a> <%end if%>
(<font color=red><%=month(rs("dateandtime"))%>月<%=day(rs("dateandtime"))%>日</font>,<font color=green><%=rs("hits")%></font>)  
<br>  
<%  
	i=i+1 
	if i>=MaxPerPage then exit do 
	rs.movenext  
	loop  
	end sub 
%>  
</font>  
<!--#include file=query.asp--> 
	</TD></TR> 
      </table> 
    </td> 
  </tr> 
  </tbody> 
</table> 
      </td>  
    </tr>                             
  </table>                             
</div> 
<% 
	function showpage(totalnumber,maxperpage,filename) 
  	dim n 
  	if totalnumber mod maxperpage=0 then 
     		n= totalnumber \ maxperpage 
  	else 
     		n= totalnumber \ maxperpage+1 
  	end if 
  	response.write "<form method=Post action="&filename&"?classid="&request("classid")&"&Nclassid="&request("Nclassid")&">" 
  	response.write "<font color='red'>"&Nclassname&"</font>" 
 
  	if CurrentPage<2 then 
    		response.write "共"&totalnumber&"篇&nbsp;首页 上一页&nbsp;" 
  	else 
    		response.write ""&totalnumber&"个&nbsp;<a href="&filename&"?page=1&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">首页</a>&nbsp;" 
    		response.write "<a href="&filename&"?page="&CurrentPage-1&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">上一页</a>&nbsp;" 
  	end if 
 
  	if n-currentpage<1 then 
    		response.write "下一页 尾页" 
  	else 
    		response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">" 
    		response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&request("classid")&"&Nclassid="&request("Nclassid")&">尾页</a>" 
  	end if 
   	response.write "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 " 
    	response.write "&nbsp;<b>"&maxperpage&"</b>篇文章/页 " 
%> 
转:<select name='page' size='1' onchange='javascript:submit()'>    
              <%for i = 1 to n%>    
              <option value='<%=i%>' <%if cint(Page)=cint(i) then%> selected <%end if%>>第<%=i%>页</option>    
              <%next%>    
            </select> 
</form> 
<%      
end function 
 
   	set rs=nothing    
	conn.close 
	set conn=nothing 
%>                             
  <br>
</body>                              
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -