Diary.asp
资源名称:7.rar [点击查看]
上传用户:lfyh0123
上传日期:2020-11-04
资源大小:200k
文件大小:5k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#include file="wapls_up.asp"-->
- <%
- '==================================
- '=文 件 名:Diary.asp
- '=适用版本:蓝色世纪WAP网站管理系统(CMS)V1.1
- '=官方版权:http://www.songfr.cn
- '=文件功能:网站公告
- '=文件作者:蓝色阳光
- '=发行时间:2007-02-01
- '==================================
- IF Request.QueryString("Action")="view" Then
- call view
- else
- call main
- End IF
- '========网站的公告列表=======
- Function main
- dim sql
- %>
- <card id="index" title="公告主页">
- <p align="<%=const1%>">
- <%
- if len(mb_diary)>1 then
- response.write ""&outHTM(mb_diary)&"<br/>"
- end if
- Set Rs = Server.CreateObject("Adodb.Recordset")
- Sql = "SELECT * FROM wapls_diary order by d_id desc"
- Rs.Open Sql,conn,1,1
- if not (rs.bof and rs.eof) then
- page = Request("Page")
- Rs.PageSize = pagenum
- IF Not IsEmpty(Page) Then
- IF Not IsNumeric(Page) Then
- Page=1
- Else
- Page=Cint(Page)
- End IF
- IF Page > Rs.PageCount Then
- Rs.AbsolutePage = Rs.PageCount
- ElseIF Page <= 0 Then
- Rs.AbsolutePage = 1
- Else
- Rs.AbsolutePage = Page
- End IF
- Else
- Rs.AbsolutePage = 1
- End IF
- Page = Rs.AbsolutePage
- For i=1 to Rs.PageSize
- If Rs.Eof Then
- exit For
- End If
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/biao.gif' alt='.'/>"
- end if%><%=utf8(i+(page-1)*Rs.PageSize)%>:<a href="diary.asp?Action=view&page=<%=utf8(i+(page-1)*Rs.PageSize)%>"><%=utf8(Rs("d_title"))%></a><br/>
- <%
- Rs.MoveNext
- Next
- if page>=Rs.PageCount then
- 'Response.Write ("[下-页]")
- else
- Response.Write("[<a href='?Page=" & (Page+1) & "'>下-页</a>]<br/>")
- end if
- if page<=1 then
- 'Response.Write ("[上-页] ")
- else
- Response.Write("[<a href='?Page=" & (Page-1) & "'>上-页</a>]<br/>")
- end if
- if Rs.PageCount>2 then
- %><input name="Page<%=minute(now)%><%=second(now)%>" format="*N" maxlength="50" size="2" value="<%=page+1%>"/>
- <anchor>GO>><go href="?" method="post">
- <postfield name="Page" value="$(Page<%=minute(now)%><%=second(now)%>)"/></go></anchor><br/>
- 共(<%=utf8(page)%>/<%=rs.pageCount%>)页<br/><%end if%>
- <%
- else
- response.write "暂无公告!<br/>"
- end if
- Rs.close
- set rs=nothing
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/>"
- else%>
- ----------
- <%end if
- end Function
- '========网站的公告详情========
- Function view
- dim sql,d_id,page
- d_id = Request.QueryString("d_id")
- Set rs=Server.CreateObject("Adodb.Recordset")
- Sql = "select * from wapls_diary order by d_id desc"
- rs.open sql,conn,1,3
- if not (rs.bof and rs.eof) then
- page = Request("Page")
- Rs.PageSize = 1
- IF Not IsEmpty(Page) Then
- IF Not IsNumeric(Page) Then
- Page=1
- Else
- Page=Cint(Page)
- End IF
- IF Page > Rs.PageCount Then
- Rs.AbsolutePage = Rs.PageCount
- ElseIF Page <= 0 Then
- Rs.AbsolutePage = 1
- Else
- Rs.AbsolutePage = Page
- End IF
- Else
- Rs.AbsolutePage = 1
- End IF
- Page = Rs.AbsolutePage
- %>
- <card id="index" title="查看公告">
- <p align="<%=const1%>">
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>标题:<%=utf8(rs("d_title"))%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>内容:<%=outHTM(rs("d_content"))%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>作者:<%=rs("d_poster")%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>时间:<%=Year(rs("d_date"))%>.<%=Month(rs("d_date"))%>.<%=day(rs("d_date"))%>-<%=Hour(rs("d_date"))%>:<%=Minute(rs("d_date"))%>:<%=Second(rs("d_date"))%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>浏览:<%=rs("d_count")%>次<br/>
- <%
- if page>=Rs.PageCount then
- 'Response.Write ("[下条]")
- else
- Response.Write("[<a href='diary.asp?Action=view&Page=" & (Page+1) & "'>下条</a>]")
- end if
- if page<=1 then
- 'Response.Write ("[上条]")
- else
- Response.Write("[<a href='diary.asp?Action=view&Page=" & (Page-1) & "'>上条</a>]")
- end if
- if Rs.PageCount>2 then%>
- <br/><input name="Page<%=minute(now)%><%=second(now)%>" format="*N" size="3" value="<%=page+1%>" maxlength="3"/>
- <anchor>GO>><go href="diary.asp?Action=view" method="post">
- <postfield name="Page" value="$(Page<%=minute(now)%><%=second(now)%>)"/>
- </go></anchor>
- <%
- end if
- end if
- %>
- <br/>共(<%=page%>/<%=rs.RecordCount%>)条公告<br/>
- <a href="diary.asp">[公告首页]</a>
- <%
- '========公告访问记数========
- rs("d_count")=rs("d_count")+1
- rs.update()
- Rs.close
- set rs=nothing
- end Function
- %>
- <br/><a href='index.asp'>[返回首页]</a>
- <!--#include file="wapls_down.asp"-->