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

📄 culture.asp

📁 简洁清爽的网站管理管理系统,基本功能都具备了
💻 ASP
字号:
<!--#include file="Inc/syscode.asp"-->
<!--#include file="inc/Skin_css.asp"-->
<!-- #include file="Head.asp" -->
<table width="846" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td class="tdbg_left" width="217" valign="top">
      <!--#include file="user.asp" -->
<!--#include file="left_about.htm" --></td>
    <td width="6"></td>
    <td valign="top"><table  width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="206" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="71%" height="28" background="Images/xxbg.gif"><img src="Images/t_com.gif" width="210" height="22"></td>
                <td width="29%" background="Images/xxbg.gif"><div align="center">首页 -&gt; 企业文化</div></td>
              </tr>
              <tr>
                <td colspan="2"><img src="Images/bt1.gif" width="210" height="22"></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <TR>
                <TD>
                  <%
flag="尚未处理"
set rs=server.createobject("adodb.recordset")
sqltext="select * from culture Order BY id desc"
rs.open sqltext,conn,1,1
dim PerPage
PerPage=10
'假如没有数据时
If rs.eof and rs.bof then
response.write "<p align='center'><font color='#ff0000'>还没任何文章</font></p>"
response.end
End if
'取得页数,并判断用户输入的是否数字类型的数据,如不是将以第一页显示
text="0123456789"
Rs.PageSize=PerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next

If checkpage<>0 then
  If NOT IsEmpty(request("page")) Then
   CurrentPage=Cint(request("page"))
   If CurrentPage < 1 Then CurrentPage = 1 
   If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount 
  Else
   CurrentPage= 1
  End If
   If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
 CurrentPage=1
End if

call list

'显示帖子的子程序
Sub list()%>
                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="1%" bgcolor="#eeeeee">&nbsp;</td>
                      <td width="99%" bgcolor="#eeeeee">
                        <%
Response.write "<strong><font color='#000000'> 全部-</font>"
Response.write "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条文章</font></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong>&nbsp;"
If currentpage > 1 Then
response.write "<strong><a href='culture.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
Response.write "<strong><a href='culture.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
Else
Response.write "<strong><font color='#000000'>上一页 </font></strong>"
End if
If currentpage < Rs.PageCount Then
Response.write "<strong><a href='culture.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='culture.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong>&nbsp;&nbsp;"
Else
Response.write ""
Response.write "<strong><font color='#000000'>下一页</font></strong>&nbsp;&nbsp;"
End if
%>
                      </td>
                    </tr>
                    <tr>
                      <td colspan="2" bgcolor="#999999"></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="3" bgcolor="#FBFEFF">
                    <tr>
                      <td height="8"></td>
                    </tr>
                    <%
if not rs.eof then
i=1
do while not rs.eof
%>
                    <tr>
                      <td>&nbsp;&nbsp;<img src="Img/dot.gif" width="7" height="11">&nbsp;<a href="culturenewsInfo.asp?id=<%=rs("id")%>"><%=rs("title")%></a>&nbsp;&nbsp;<font color="#0066CC" face="Arial"><%=rs("time")%></font>&nbsp;
                          <%if rs("time")=date() then%>
                          <strong><font color="#FF0000" face="Arial">New</font></strong>
                          <%end if%>
                      </td>
                    </tr>
                    <%
i=i+1
if i > Perpage then exit do
rs.movenext
loop
end if
%>
                    <tr>
                      <td height="8"></td>
                    </tr>
                  </table>
                  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="1%" bgcolor="#eeeeee">&nbsp;</td>
                      <td width="99%" bgcolor="#eeeeee">
                        <%
Response.write "<strong><font color='#000000'> 全部-</font>"
Response.write "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条文章</font></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) &  "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong>&nbsp;"
If currentpage > 1 Then
response.write "<strong><a href='culture.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
Response.write "<strong><a href='culture.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
Else
Response.write "<strong><font color='#000000'>上一页 </font></strong>"
End if
If currentpage < Rs.PageCount Then
Response.write "<strong><a href='culture.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='culture.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong>&nbsp;&nbsp;"
Else
Response.write ""
Response.write "<strong><font color='#000000'>下一页</font></strong>&nbsp;&nbsp;"
End if
%>
                      </td>
                    </tr>
                    <tr>
                      <td colspan="2" bgcolor="#999999"></td>
                    </tr>
                  </table>
                  <%
End sub
rs.close
%>
                </TD>
              </TR>
          </table></td>
        </tr>
    </table></td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->
</BODY></HTML>
<!--网站系统交易网:www.csys.com.cn-->

⌨️ 快捷键说明

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