www.gusucode.com > 枫的记忆个人主页程序源码程序 > downcode.com\fengdejiyizh\admin\manage_diary.asp

    <link href="admin.css" rel="stylesheet" type="text/css">
<%
	if session("level")<>"1" then
		Response.Write("你无权访问此页面!")
		Response.End
	end if	
%>
<!--#INCLUDE FILE="conn.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<%
Set FUbb = New FunctionUBB
  
  set rs=server.createobject("adodb.recordset")
  sql="select * from diary order by id desc"
  rs.Open sql,conn,1,3
  PageSize=10
%><!--#INCLUDE FILE="page_up_down.asp"-->

<body bgcolor="#CDD5DE">
<table width="95%" border="0" cellspacing="1" cellpadding="0" align="center" class="tablebody">
  <tr>
    <td><table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
          <th>日 记 管 理</a></span></th>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="1" cellpadding="5">
<%
  if rs.eof then
  	response.write ("<tr><td bgcolor='#F3F5F8' colspan='5'>对不起,没有任何数据!</td></tr>")
  else
  do while not rs.eof
	if processedrecord >=pagesize then 
	exit do 
	end if
  id=rs("id")
  d_type=rs("d_type")
  	if d_type="公开日记" then
	wtype="<font color=red>公开日记</font>"
	elseif d_type="私人日记" then
	wtype="<font color=blue>私人日记</font>"
	end if
  title=rs("title")
  weather=rs("weather")
  add_time=rs("add_time")
  who=rs("who")
%>
      <tr bgcolor="#A5B3C2">
        <td width="10%" align="center">NO <font color=red><%=id%></font></td>
        <td width="35%">标题:<%=title%></td>
        <td width="15%">天气:<%=weather%></td>
        <td width="15%">类型:<%=wtype%></td>
        <td width="25%" align="center"><a href="change_diary.asp?id=<%=id%>"><img src="images/mod.gif" width="45" height="20" border="0" align="absmiddle"></a>  <a href="del_diary.asp?id=<%=id%>"><img src="images/delete.gif" width="45" border="0" height="20" align="absmiddle"></a></td>
      </tr>
      <tr bgcolor="#Ffffff">
        <td colspan="5" style="line-height:22px;"><%=FUbb.UBBCode(Rs("Content"))%></td>
      </tr>
      <tr bgcolor="#F3F5F8">
        <td colspan="5" align="right">发布时间:<%=add_time%>  站长:<%=who%></td>
      </tr>
<%
	processedrecord=processedrecord+1
	rs.movenext
	loop
	end if
	rs.close
	set rs=nothing
%>
    </table></td>
  </table>
<table width="75%" border="0" cellspacing="1" cellpadding="1" align="center">
  <form action="manage_diary.asp" method="post">
    <tr height="25">
      <td align="right">总记录数:<%=RecordCount%> 每页显示:<%=PageSize%> 总计页数:<%=pagecount%> 当前页数:<%=Page_No%> 
          <%if page_no>1 then%>
          <a href="?page_no=<%=page_no-1%>">上一页</a> |
          <%end if%>
          <a href="?page_no=<%=page_no%>">刷新</a>
          <%if page_no<pagecount then%>
       	   | <a href="?page_no=<%=page_no+1%>">下一页</a>
        <%end if%>
        转到第
        <select name="page_no" size="1">
          <option value="<%=page_no%>" selected><%=Page_No %></option>
          <%For i=1 to pagecount%>
          <option value="<%=i%>"><%=i%></option>
          <%Next%>
        </select>
        页
        <input type="submit" value="GO">
      </td>
    </tr>
  </form>
</table>
</body>
</html>