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

📄 default.asp

📁 asp新闻发布网站系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="pageset.asp"-->
<!--#include file="lock.asp"-->
<!--#include file="css.asp"-->
<meta http-equiv="REFRESH" content="<%=reset%>">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="762" valign="top"> <!--#include file="top.asp" --></td>
  </tr>
  <tr> 
    <td background="images/TABLE3.gif" bgcolor="<%=tablecolor%>"> <table width="760" border="0" cellspacing="0" cellpadding="0">
        <tr valign="bottom"> 
          <td width="40" height="20"> 
            <div align="center">状态</div></td>
          <td width="380"> 
            <div align="left">主题</div></td>
          <!-- <td width="120"> 
            <div align="center">作者</div></td>
          <td width="100"> 
           <div align="center">回复/浏览</div></td> -->
          <td width="120"> 
            <div align="center">更新时间</div></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td valign="top"> 
<%If request("PageNo")="" then
   PageNo=1
Else
   PageNo=request("PageNo")
End If

if request("ssql")<>"" then
  sql=request("ssql")
else
sql="SELECT * from body order by lasttime desc"
end if
rs.open sql,conn,1,3
rs.Pagesize=20
if rs.eof then
PageNo=0
else
rs.absolutepage=PageNo
end if
x = 0  
For x = 1 to rs.Pagesize
If rs.eof then
Exit For  
Else%>

<%
set rst=server.createobject("adodb.recordset")
sql="SELECT locktime from pageset "
rst.open sql,conn,1,3

%>

      <hr size="1" color="<%=tablecolor%>">
      <table width="760" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="40"> <div align="center"> 
              <%if rs("time")>date and rs("lasttime")=rs("time") then'绿色
response.write "<img src=images/new.gif alt=今日公告>"
end if
if rs("time")<date and rs("lasttime")<date then'黄色
response.write "<img src=images/old.gif alt=非今日贴>"
end if
if rs("lasttime")>date and rs("lasttime")>rs("time") then'红色
response.write "<img src=images/re.gif alt=今日回复>"
end if%>
 <%if rs("time")>(date - rst("locktime"))  then'绿色
response.write "<img src=images/news.gif alt=新公告>"
end if
rst.close
%>
            </div></td>
          <td width="380"><A HREF="body.asp?id=<%=rs("id")%>" title="<%="内容:"&left(rs("body"),50)&"……"%>"></A> 
            <table border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><a href="body.asp?id=<%=rs("id")%>" title="<%="内容:"&left(rs("body"),50)&"……"%>"><%=server.htmlencode(trim(rs("title")))%></a></td>
                <td> </td>
                <td> 
                  <%x=0
if x=0 then Medium=""
if instr(rs("body"),"[IMG]")<>0 and instr(rs("body"),"[/IMG]")<>0 and instr(rs("body"),"[IMG]")<instr(rs("body"),"[/IMG]") then
  x=cint(x)+1
  if x=1 then Medium="<img src=images/type_img.gif alt=Image>"
end if
if instr(rs("body"),"[MP]")<>0 and instr(rs("body"),"[/MP]")<>0 and instr(rs("body"),"[MP]")<instr(rs("body"),"[/MP]") then
  x=cint(x)+1
  if x=1 then Medium="<img src=images/type_mp.gif alt=Media>"
end if
if instr(rs("body"),"[RM=")<>0 and instr(rs("body"),",")<>0 and instr(rs("body"),"]")<>0 and instr(rs("body"),"[/RM]")<>0 and instr(rs("body"),"[RM=")<instr(rs("body"),",") and instr(rs("body"),",")<instr(rs("body"),"]") and instr(rs("body"),"]")<instr(rs("body"),"[/RM]") then
  x=cint(x)+1
  if x=1 then Medium="<img src=images/type_rm.gif alt=Real>"
end if
if instr(rs("body"),"[FLASH=")<>0 and instr(rs("body"),",")<>0 and instr(rs("body"),"]")<>0 and instr(rs("body"),"[/FLASH]")<>0 and instr(rs("body"),"[FLASH=")<instr(rs("body"),",") and instr(rs("body"),",")<instr(rs("body"),"]") and instr(rs("body"),"]")<instr(rs("body"),"[/FLASH]") then
  x=cint(x)+1
  if x=1 then Medium="<img src=images/type_flash.gif alt=Flash>"
end if
if x>1 then Medium="<img src=images/type_some.gif alt=some>"
response.write Medium
%>
                </td>
              </tr>
            </table></td>
      
          <td width="120"><%=rs("lasttime")%></td>
        </tr>
      </table>
      <hr size="1" color="<%=tablecolor%>">
      <%rs.MoveNext  
End If  
Next
%>
    </td>
  </tr>
  <tr> 
 
     <td background="images/TABLE4.gif" bgcolor="<%=tablecolor%>"><table width="760" border="0" cellspacing="0" cellpadding="0">
       <!-- <tr> 
          <td width="40" height="20"> 
            <div align="center">状态</div></td>
          <td width="380"> 
            <div align="center">主题</div></td>
          <td width="120"> 
            <div align="center">作者</div></td>
          <td width="100"> 
            <div align="center">回复/浏览</div></td>
          <td width="120"> 
            <div align="center">更新时间</div></td>
        </tr>
        -->
      </table></td>
  </tr>
  <tr> 
    <td> 
      <table width="760" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="30">
<div align="center">共<%=rs.recordcount%>条公告,<%=PageNo%>/<%=Int(rs.pagecount)%>页, 
              每页<%=rs.Pagesize%>。</span><span lang="zh-cn"><a href="default.asp?PageNo=1">首页</a> 
              <%If PageNo > 1 then
%>
              <a href="default.asp?PageNo=<%=PageNo-1%>">上一页</a> 
              <%
Else  
    response.write " "  
End If  
If int(PageNo)<>Int(rs.pagecount) then%>
              <a href="default.asp?PageNo=<%=PageNo+1%>">下一页</a> 
              <%Else  
    response.write " "  
End If %>
              <a href="default.asp?PageNo=<%=Int(rs.pagecount)%>">尾页</a> 
              <%rs.close%>
            </div></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td> <div align="center"> 
        <!--#include file="bottom.asp"-->
      </div></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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