Gb.asp
资源名称:7.rar [点击查看]
上传用户:lfyh0123
上传日期:2020-11-04
资源大小:200k
文件大小:11k
源码类别:
手机WAP编程
开发平台:
ASP/ASPX
- <!--#include file="wapls_up.asp"-->
- <%
- '==================================
- '=文 件 名:Gb.asp
- '=适用版本:蓝色世纪WAP网站管理系统(CMS)V1.1
- '=官方版权:http://www.songfr.cn
- '=文件功能:网站留言
- '=文件作者:蓝色阳光
- '=发行时间:2007-02-01
- '==================================
- IF Request.QueryString("Action")="view" Then
- call view
- elseIF Request.QueryString("Action")="add" Then
- call add
- elseIF Request.QueryString("Action")="save" Then
- call save
- else
- call main
- End IF
- '========网站的留言列表=======
- Function main
- dim sql
- %>
- <card id="index" title="留言主页">
- <p align="<%=const1%>">
- <%
- if len(mb_gb)>1 then
- response.write ""&outHTM(mb_gb)&"<br/>"
- end if
- Set Rs = Server.CreateObject("Adodb.Recordset")
- Sql = "SELECT * FROM wapls_gb where gb_passed<>1 order by gb_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
- sql="select * from wapls_gb_reply where gb_id="&rs("gb_id")
- set rsrep=server.createobject("adodb.recordset")
- rsrep.open sql,conn,1,1
- %>
- <%=utf8(i+(page-1)*Rs.PageSize)%>:<a href="Gb.asp?Action=view&page=<%=utf8(i+(page-1)*Rs.PageSize)%>"><%=utf8(Rs("gb_title"))%></a><%IF Rs("gb_bm")=1 Then%>[密]<%end if%><%if not (rsrep.bof and rsrep.eof) then
- Response.Write "[回]"
- end if
- Response.Write "<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%>
- <%
- Rsrep.close
- set rsrep=nothing
- Rs.close
- set rs=nothing
- else
- response.write "暂无留言!<br/>"
- end if
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
- else%>
- ----------<br/>
- <%end if%>
- <a href="gb.asp?Action=add">[发表留言]</a>
- <%
- end Function
- '========网站的留言详情========
- Function view
- dim sql,gb_id,page
- gb_id = Request.QueryString("gb_id")
- Set rs=Server.CreateObject("Adodb.Recordset")
- Sql = "select * from wapls_gb where gb_passed<>1 order by gb_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%>表情:<img src="logo/emot/em<%=utf8(rs("GuestImages"))%>.gif" alt="LOGO..."/><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>标题:<%=keys(utf8(rs("gb_title")))%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>内容:<%=keys(outHTM(rs("gb_content")))%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>作者:<%=keys(rs("gb_poster"))%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>时间:<%=Year(rs("gb_date"))%>.<%=Month(rs("gb_date"))%>.<%=day(rs("gb_date"))%>-<%=Hour(rs("gb_date"))%>:<%=Minute(rs("gb_date"))%>:<%=Second(rs("gb_date"))%><br/>
- <%
- sql="select * from wapls_gb_reply where gb_id="&rs("gb_id")
- set rsrep=server.createobject("adodb.recordset")
- rsrep.open sql,conn,1,1
- if rsrep.eof and rsrep.bof then
- response.write"暂时没有回复<br/>"
- else
- if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/fgx.gif' alt='.'/><br/>"
- else%>
- ----------<br/>
- <%end if%>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>回复:<%=outHTM(rsrep("rep_content"))%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>站长:<%=rsrep("rep_poster")%><br/>
- <%if len(mb_logo)>1 then
- response.write "<img src='"&mb_logo&"/bar.gif' alt='.'/>"
- end if%>时间:<%=Year(rsrep("rep_date"))%>.<%=Month(rsrep("rep_date"))%>.<%=day(rsrep("rep_date"))%>-<%=Hour(rsrep("rep_date"))%>:<%=Minute(rsrep("rep_date"))%>:<%=Second(rsrep("rep_date"))%><br/>
- <%
- end if
- Rsrep.close
- set rsrep=nothing
- if page>=Rs.PageCount then
- 'Response.Write ("[下条]")
- else
- Response.Write("[<a href='gb.asp?Action=view&Page=" & (Page+1) & "'>下条</a>]")
- end if
- if page<=1 then
- 'Response.Write ("[上条]")
- else
- Response.Write("[<a href='gb.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="gb.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="gb.asp?Action=add">[发表留言]</a><br/>
- <a href="gb.asp">[留言首页]</a>
- <%
- Rs.close
- set rs=nothing
- end Function
- '========网站的留言发表========
- Function add
- %>
- <card id="index" title="发表留言">
- <p align="<%=const1%>">
- <%if book_ok=0 then%>
- 系统暂停开放此项功能<br/>
- <%else%>
- <%if book_ok=2 and session("name")="" then%>
- 系统目前只对会员开放此项功能<br/>
- <%else%>
- <%if session("name")="" then%>
- 名称:*<br/><input name="gb_poster<%=minute(now)%><%=second(now)%>" emptyok="false" maxlength="40"/><br/>
- <%end if%>
- 标题:*<br/><input name="gb_title<%=minute(now)%><%=second(now)%>" emptyok="false" maxlength="40"/><br/>
- 内容:*<br/><input name="gb_content<%=minute(now)%><%=second(now)%>" format="false" maxlength="150"/><br/>
- 主页:<br/><input name="gb_posterhome<%=minute(now)%><%=second(now)%>" format="false" maxlength="150"/><br/>
- 邮箱:<br/><input name="gb_posteremail<%=minute(now)%><%=second(now)%>" format="false" maxlength="150"/><br/>
- QQ号:<br/><input name="gb_posterqq<%=minute(now)%><%=second(now)%>" format="false" maxlength="11"/><br/>
- 表情:
- <select title="表情" name="logo<%=minute(now)%><%=second(now)%>">
- <option value="1">微笑</option>
- <option value="2">色相</option>
- <option value="3">发愁</option>
- <option value="4">脸红</option>
- <option value="5">酷毙</option>
- <option value="6">头晕</option>
- <option value="7">眨眼</option>
- <option value="9">思考</option>
- <option value="10">口渴</option>
- <option value="11">撇嘴</option>
- </select>
- <br/>
- 验证:<input name="yz<%=minute(now)%><%=second(now)%>" format="*N" maxlength="4" size="7"/> <%=s%><br/><br/>
- <anchor>[发表留言]<go href="gb.asp?Action=save" method="post">
- <%if session("name")="" then%><postfield name="gb_poster" value="$(gb_poster<%=minute(now)%><%=second(now)%>)"/><%else%>
- <postfield name="gb_poster" value="<%=session("name")%>"/><%end if%>
- <postfield name="gb_title" value="$(gb_title<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="gb_content" value="$(gb_content<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="gb_posterqq" value="$(gb_posterqq<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="gb_posteremail" value="$(gb_posteremail<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="gb_posterhome" value="$(gb_posterhome<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="GuestImages" value="$(logo<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="gb_posterip" value="<%=userip%>"/>
- <postfield name="yz" value="$(yz<%=minute(now)%><%=second(now)%>)"/>
- <postfield name="yz1" value="<%=s%>"/>
- </go>
- </anchor><br/>
- *号为必填内容<br/>
- <%
- end if
- end if
- %>
- <a href="gb.asp">[留言首页]</a>
- <%
- end Function
- '========网站的留言提交=======
- Function save
- yz=Request("yz")
- yz1=Request("yz1")
- if yz<>yz1 then
- response.redirect "wapls_404.asp?id=9"
- else
- gb_posterqq=Request("gb_posterqq")
- gb_posterip=Request("gb_posterip")
- gb_posterhome=Request("gb_posterhome")
- gb_posteremail=Request("gb_posteremail")
- gb_poster=Trim(Request("gb_poster"))
- gb_title=Trim(Request("gb_title"))
- gb_content=Trim(Request("gb_content"))
- GuestImages=Trim(Request("GuestImages"))
- if gb_poster="" then response.redirect "wapls_404.asp?id=10"
- if gb_title="" then response.redirect "wapls_404.asp?id=11"
- if gb_content="" then response.redirect "wapls_404.asp?id=12"
- if Session("gb_content")=gb_content and gb_content<>"" then response.redirect "wapls_404.asp?id=13"
- Session("gb_content")=gb_content
- Session.Timeout=60
- Dim sql
- set rs=server.CreateObject("adodb.recordset")
- sql="select * from wapls_gb"
- rs.open sql,conn,1,3
- rs.addnew()
- if gb_posterqq<>"" then rs("gb_posterqq")=gb_posterqq
- if gb_posterip<>"" then rs("gb_posterip")=gb_posterip
- if gb_posterhome<>"" then rs("gb_posterhome")=gb_posterhome
- if gb_posteremail<>"" then rs("gb_posteremail")=gb_posteremail
- if gb_poster<>"" then rs("gb_poster")=gb_poster
- if gb_title<>"" then rs("gb_title")=gb_title
- if gb_content<>"" then rs("gb_content")=gb_content
- rs("GuestImages")=GuestImages
- rs("gb_passed")=addbook_ok
- rs.update()
- Rs.close
- set rs=nothing
- end if
- %>
- <card id="index" title="留言提交">
- <p align="<%=const1%>">
- 您的留言发表成功...<br/>
- <%if addbook_ok=1 then%>
- 等审核后就可以显示出来了.同时我们也会尽快的给您回复的.<br/>
- <%end if%>
- <a href="gb.asp">[留言首页]</a>
- <%end Function%>
- <br/><a href='index.asp'>[返回首页]</a>
- <!--#include file="wapls_down.asp"-->