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

📄 admin.asp

📁 文学网采用飞翔网的内核和界面作了较大程度的修改和美化 主要功能有: 1、界面美化 2、增加网文周榜和推荐作品 3、增加每个栏目图片和栏目的导读 4、增加推荐作品和会员文集 5、增加会员个人管理中心 6
💻 ASP
字号:
<!--#include file="chkstr.inc"-->  
<!--#include file="const.asp"-->
 <!--#include file="articleconn.asp"-->
 <%
IF not(Session("KEY")="super" or session("KEY")="check" ) THEN
	response.redirect "error.asp?id=065"
	response.end
END IF
%>

<html>
<head>
<title>东安文学-----&gt;浏览文章</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
a:link       { text-decoration: underline; color: #000000; font-family: 宋体 }
a:visited    { text-decoration: underline; color: #000000; font-family: 宋体 }
a:hover      { text-decoration: underline; color: #cc0000 }
body {font-family: "宋体"; font-size: 9pt;line-height: 12pt;}
table {font-family: "宋体"; font-size: 9pt;line-height: 12pt;}
-->
</style>
</head>

<%
   const MaxPerPage=10
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   dim sql
   dim rs
   dim rstype
   dim typesql
   dim typeid1,typename1
   if request("typename1")<>"" then
   typename1=request("typename1")
   else
    typename1="校园文学"
    end if
   if request("typeid1")<>"" then
	typeid1=request("typeid1")
   else
	typeid1=1
   end if
if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
%>

<body bgcolor="#C0C0C0" text="#000000">
<TABLE  cellSpacing=0 cellPadding=2 width="90%" 
            align=center border=0>
              <TBODY> 
              <tr align="left"> 
                <td  colSpan=4 ><b><font color="#FF0000">分 类 栏 目:</font></b><%                         
Set rst= Server.CreateObject("ADODB.Recordset")                        
	rst.open "select * from type",conn,1                        
 if rst.EOF then                        
	response.write "没有栏目:("                        
	else                        
%> <%do while NOT rst.EOF%><a href="admin.asp?typename1=<%=rst("type")%>&mmm=0"><%=rst("type")%></a> <%                         
	rst.MoveNext                        
	loop                        
	end if                        
    rst.close
	set rst=nothing                 
%></td>
              </tr>
<%                                                                         
mmm=request("mmm")                                                                       
if mmm="" then mmm=0                                                                       
ttt=request("ttt")                                                                       
set rs=server.createobject("adodb.recordset")  
if request("typename1")="" then
sql ="select * from article order by dateandtime Desc" 
else                                                                    
sql ="select * from article where typename='"&typename1&"' order by dateandtime Desc" 
end if                                                                      
rs.open sql,conn,1,1%>                                                                       
        &nbsp;<% i=0 %>
                                                                                    
            <%  total=rs.recordcount 
            if (total mod MaxPerPage)=0 then                        
	     currentpage= total \ MaxPerPage                        
	   else                        
	      currentpage= total \ MaxPerPage + 1                        
	   end if                                                                                                       
  if mmm<>0 then                                                                                   
  	for iisf=1 to mmm *12                                                                                
  		if rs.eof then exit for                                                                                   
  		rs.movenext                                                                                   
  	next                                                                                   
  end if    %>                                                                               

              <TR class=lanmu>
                <TD width=40% height=24> 
                  <P><B>作 品 标 题</B></P> 
                </TD>
                <TD align=middle width=15%> 
                  <DIV align=center><B>作者</B></DIV>
                </TD>
                <TD align=middle width=30%> 
                  <DIV align=center><B>日期</B></DIV>
                </TD>
                <TD align=middle width=15%> 
                  <P align=center><B>操 作</B></P>
                </TD></TR>
              <TR>
                <TD background=images/line.gif colSpan=5
                height=1></TD>
              </TR>
			  <%do while not rs.eof     %>     
              
  <TR> 
    <TD width=40%><a href="openarticle.asp?id=<%=rs("newsid")%>" ) target="_blank"><%=rs("title")%></a></TD>
                
    <TD align=middle width=15%><a href="userinfo.asp?username=<%=rs("zznews")%>" target="_blank"><%=rs("zznews")%></a> 
    </TD>
                
    <TD align=middle width=30%><%=rs("dateandtime")%></TD>
                
    <TD align=center width=15%><a href="editarticle.asp?id=<%=rs("newsid")%>">修改</a> <a href="delearticle.asp?id=<%=rs("newsid")%>">删除</a></TD>
              </TR>
              <TR>
                <TD background=images/line.gif colSpan=4 
                height=1></TD>
              </TR>
			 <% i=i+1                                                                                                            
   rs.movenext                                                                                                            
   if i=12 then exit do                                                                                                            
   loop                                                                                    
%>    
</TBODY></TABLE>
            <TABLE cellSpacing=2 cellPadding=2 width="90%" 
              border=0 align=center>
              <TBODY> 
              <TR>
                <TD>第&nbsp;<%=mmm+1%> 页 
                  <!--上页-->
                  &nbsp;&nbsp;&nbsp;&nbsp;<%=mmm+1%>/<%=currentpage%>页&nbsp;&nbsp; 
                  <%if mmm<>0 then%>
                  <a href="admin.asp?typename1=<%=request("typename1")%>&mmm=<%=mmm-1%>">上页</a> 
                  <%end if%>
                  <!--下页-->
                  <%if not rs.eof then%>
                  <a href="admin.asp?typename1=<%=request("typename1")%>&mmm=<%=mmm+1%>">下页</a> 
                  <%rst.close%>
                  <%end if%>
                   共《<%=total%>》篇 </TD>
              </TR></TBODY></TABLE>
          
</body>
</html>
<%
rs.close
set rs=nothing
 conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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