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

📄 guestbook.asp

📁 1、日志增加首页显示调用index_show.asp 2、日志增加用户的修改和删除权利 3、日志增加文件上传大小修改和限制 4、时间的动态修改 5、增加日志的日志推荐功能 6、用户的ip查询
💻 ASP
📖 第 1 页 / 共 2 页
字号:
			If CheckStr(Request.Form("message"))<>Empty Then
				Conn.ExeCute("UPDATE blog_Guestbook SET gb_Reply='"&CheckStr(Request.Form("message"))&"',gb_ReplyAuthor='"&memName&"',gb_ReplyTime='"&Now()&"' WHERE gb_ID="&Request.QueryString("gbID")&"")
				SQLQueryNums=SQLQueryNums+1
				msg_Title="回复成功"
				msg_Content="<a href=""guestbook.asp"">点击返回留言本</a>"
			Else
			Dim reply_GB
			Set reply_GB=Conn.Execute("SELECT * FROM blog_Guestbook WHERE gb_ID="&Request.QueryString("gbID")&"")
			If reply_GB.Eof And reply_GB.Bof Then
				msg_Title="出现错误"
				msg_Content="<a href=""javascript:history.go(-1);"">你所评论的留言不存在,点击返回上一页</a>"
			Else
				msg_Title=reply_GB("gb_Author")&" 于 "&DateToStr(reply_GB("gb_PostTime"),"Y-m-d H:I A")&" 留言:"
				msg_Content=Ubbcode(HTMLEncode(reply_GB("gb_Content")),0,0,0,1,0)
			%>
              <script language="JavaScript" src="include/ubbcode.js"></script>
              <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
                <tr>
                  <td colspan="2" bgcolor="#EFEFEF"><b>回复留言</b></td>
                </tr>
                <form name="input" method="post" action="guestbook.asp?action=replygb&gbID=<%=reply_GB("gb_ID")%>">
                  <tr>
                    <td valign="top" bgcolor="#FFFFFF" width="138"><b>回复内容:</b>
                        <div class="siderbar_main"></div></td>
                    <td bgcolor="#FFFFFF" nowrap><textarea name="message" cols="62" rows="8" wrap="VIRTUAL" id="Message" onSelect="javascript: storeCaret(this);" onClick="javascript: storeCaret(this);" onKeyUp="javascript: storeCaret(this);" onKeyDown="javascript: ctlent();"><%=EditDeHTML(reply_GB("gb_Reply"))%></textarea></td>
                  </tr>
                  <tr align="center">
                    <td colspan="2" nowrap bgcolor="#FFFFFF"><input type="submit" name="replysubmit" value=" 回复留言 [可按 Ctrl+Enter 发布] " onClick="this.disabled=true;document.input.submit();" />
&nbsp;
              <input name="Reset" type="reset" id="Reset" value=" 重置回复 " /></td>
                  </tr>
                </form>
              </table>
              <%End If
Set reply_GB=Nothing
End If
End If
End If
Response.Write("<br><br><center><div class=""msg_head"">"&msg_Title&"</div><div class=""msg_content"">"&msg_Content&"</div></center><br><br>")
Else
	Dim CurPage
	If CheckStr(Request.QueryString("Page"))<>Empty Then
		Curpage=CheckStr(Request.QueryString("Page"))
		If IsInteger(Curpage)=False OR Curpage<0 Then Curpage=1
	Else
		Curpage=1
	End If

	Dim RS_GB
	Set RS_GB=Server.CreateObject("Adodb.Recordset")
	SQL="SELECT * FROM blog_Guestbook "&SQLFiltrate&" ORDER BY GB_ID DESC"
	RS_GB.Open SQL,CONN,1,1
	SQLQueryNums=SQLQueryNums+1
	If RS_GB.EOF AND RS_GB.BOF Then 
		Response.Write("<div class=""message"">暂时没有留言</div>")
	Else
		Dim GB_Nums,gbview_ID,gbview_Author,gbview_Reply
		RS_GB.PageSize=blogPerPage
		RS_GB.AbsolutePage=CurPage
		GB_Nums=RS_GB.RecordCount
		Dim MultiPages,PageCount
		MultiPages="<span class=""smalltxt"">"&MultiPage(GB_Nums,blogPerPage,CurPage,Url_Add)&"</span>"
		Response.Write(MultiPages)
		Response.Write("<table width=""100%"" height=""6"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0""><tr><td></td></tr></table>")
		Do Until RS_GB.EOF OR PageCount=blogPerPage
			gbview_ID=RS_GB("gb_ID")
			gbview_Author=RS_GB("gb_Author")
			gbview_Reply=RS_GB("gb_ReplyAuthor")
			Response.Write("<div class=""content_head"" style=""font-size:11px;""><b>")
			If gbview_Reply<>Empty Then
				Response.Write("<img src=""images/icon_ctb.gif"" border=""0"" align=""absmiddle""/>")
			ElseIf RS_GB("gb_IsPublic")=0 Then
				Response.Write("<img src=""images/icon_cttb.gif"" border=""0"" align=""absmiddle""/>")
			Else
				Response.Write("<img src=""images/icon_quote.gif"" border=""0"" align=""absmiddle""/>")
			End If
			Response.Write("&nbsp;<a href=""member.asp?action=view&memName="&Server.URLEncode(gbview_Author)&""" target=""_blank"">"&gbview_Author&"</a> 于 "&DateToStr(RS_GB("gb_PostTime"),"Y-m-d H:I A")&" 留言:</b>")
			If memStatus="SupAdmin" OR memStatus="Admin" Then
				Response.Write("&nbsp;&nbsp;<a href=""guestbook.asp?action=delegb&gbID="&gbview_ID&""" title=""删除留言"" onClick=""winconfirm('你真的要删除这个留言吗?','guestbook.asp?action=delegb&gbID="&gbview_ID&"'); return false""><b><font color=""#FF0000"">×</font></b></a>&nbsp;|&nbsp;<a href=""ipview.asp?ipdata="&RS_GB("gb_PostIP")&""" title=""点击查看IP地址:"&RS_GB("gb_PostIP")&" 的来源"" target=""_blank"">IP</a>&nbsp;|&nbsp;<a href=""guestbook.asp?action=replygb&gbID="&gbview_ID&""" title=""点击回复"">回复</a>")
			End If
			Response.Write("</div><div class=""content_main"" style=""font-size:11px;"">")
			If RS_GB("gb_IsPublic")=True OR (memStatus="SupAdmin" OR memStatus="Admin" OR memName=RS_GB("gb_Author")) Then
				Response.Write(Ubbcode(HTMLEncode(RS_GB("gb_Content")),0,0,0,1,0))
				If gbview_Reply<>Empty Then
					Response.Write("<div class=""content_head"" style=""margin-left:12px;margin-right:12px;margin-top:5px;""><span class=""smalltxt""><b><img src=""images/icon_ctb.gif"" border=""0"" align=""absmiddle""/> <a href=""member.asp?action=view&memName="&Server.URLEncode(RS_GB("gb_ReplyAuthor"))&""" target=""_blank"">"&RS_GB("gb_ReplyAuthor")&"</a> 于 "&DateToStr(RS_GB("gb_ReplyTime"),"Y-m-d H:I A")&" 回复:</b><div style=""margin-left:6px;margin-top:6px;"">"&Ubbcode(HTMLEncode(RS_GB("gb_Reply")),0,0,0,1,0)&"</div></span></div>")
				End If
			Else
				Response.Write("此留言仅管理员以及发表人可以浏览")
			End If
			Response.Write("</div>")
			RS_GB.MoveNext
			PageCount=PageCount+1
			Response.Write("<table width=""100%"" height=""6"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0""><tr><td></td></tr></table>")
		Loop
	End If
	RS_GB.Close
	Set RS_GB=Nothing
	Response.Write(MultiPages)
	Response.Write("<table width=""100%"" height=""6"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0""><tr><td></td></tr></table>")%>
              <script language="JavaScript" src="include/ubbcode.js"></script>
              <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
                <tr>
                  <td colspan="2" bgcolor="#EFEFEF"><b>发表留言</b></td>
                </tr>
                <form name="input" method="post" action="guestbook.asp?action=postgb">
                  <tr>
                    <td width="108" align="right" bgcolor="#FFFFFF" nowrap><b>作者:</b></td>
                    <td width="100%" bgcolor="#FFFFFF">用户名:
                        <%IF memName<>Empty Then
			Response.Write("<input name=""gb_memName"" type=""text"" id=""gb_memName"" value="""&memName&""" size=""12"" readonly />")
			Else
			Response.Write("<input name=""gb_memName"" type=""text"" id=""gb_memName"" size=""12"" />&nbsp;密码: <input name=""gb_memPassword"" type=""password"" id=""gb_memPassword"" size=""12"" />&nbsp;<input name=""gb_SaveMem"" type=""checkbox"" id=""gb_SaveMem"" value=""1"" /> 同时注册?")
			End IF%></td>
                  </tr>
                  <tr>
                    <td align="right" valign="top" bgcolor="#FFFFFF"><b>内容: </b>
                        <div style="padding-left:5px;" align="left" width="100%"> <br>
                            <input name="gb_IsPublic" type="checkbox" id="gb_IsPublic" value="1" checked/>
                公开留言</div></td>
                    <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="2">
                        <tr>
                          <td valign="top" nowrap><textarea name="Message" cols="74" rows="8" wrap="VIRTUAL" id="Message" onSelect="javascript: storeCaret(this);" onClick="javascript: storeCaret(this);" onKeyUp="javascript: storeCaret(this);" onKeyDown="javascript: ctlent();"></textarea></td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr align="center">
                    <td colspan="2" nowrap bgcolor="#FFFFFF"><input type="submit" name="replysubmit" value=" 发表留言 [可按 Ctrl+Enter 发布] " onClick="this.disabled=true;document.input.submit();" />
&nbsp;
              <input name="Reset" type="reset" id="Reset" value=" 重置留言 " /></td>
                  </tr>
                </form>
              </table>
              <%End If%>
            </td>
          </tr>
        </table>
    </div></td>
  </tr>
</table>
<!--#include file="footer.asp" -->

⌨️ 快捷键说明

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