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

📄 index_diary.asp

📁 一个很好的下载系统原码
💻 ASP
字号:
<%sub index_diary()
dim totaldiary,Currentpage,totalpages,i
opendiary
sql="select * from diary order by d_date DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%> 
<table width="100%" border="0" cellspacing="0" align="center" cellpadding="0">
  <%if not rs.eof then
rs.Movefirst
rs.pagesize=diaryperpage
if trim(request("page"))<>"" then
    currentpage=clng(request("page"))
	if currentpage>rs.pagecount then
	   currentpage=rs.pagecount
	end if
else
    currentpage=1
end if
    totaldiary=rs.recordcount
	if currentpage<>1 then
	   if(currentpage-1)*diaryperpage<totaldiary then
	      rs.move(currentpage-1)*diaryperpage
		  dim bookmark
		  bookmark=rs.bookmark
	   end if
	end if
	if (totaldiary mod diaryperpage)=0 then
	   totalpages=totaldiary\diaryperpage
	else
	   totalpages=totaldiary\diaryperpage+1
	end if
i=0
do while not rs.eof and i<diaryperpage
url="showdiary.asp?id="&rs("d_id")%>
  <tr> 
    <td class="chinese" bgcolor="#FFFFFF" align="right">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F5F5F5">
        <tr bgcolor="#00CCFF"> 
          <td colspan="2" class="chinese"><%=ubb2html(cutstr(formatStr(autourl(rs("d_content"))),700,true,url), true, true)%></td>
        </tr>
        <tr> 
          <td width="74%" rowspan="2" bgcolor="#00CCFF" class="chinese">&nbsp;</td>
          <td width="26%" bgcolor="#00CCFF" class="chinese">&nbsp;</td>
        </tr>
        <tr>
          <td class="chinese"></td>
        </tr>
      </table>
      
    </td>
  </tr>
  <%
i=i+1
rs.movenext
loop
else
If rs.EOF And rs.BOF Then%>
  <tr> 
    <td height="30" class="chinese" align="center" bgcolor="#00CCFF">目前还没有公告</td>
  </tr>
  <%end if
end if%>
</table>
<%
rs.close
set rs=nothing
end sub%>

⌨️ 快捷键说明

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