一、网页留言板的代码
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="guest_lib.asp"--><%
if not isempty(request("page")) then
set ASPBook= Server.CreateObject("ADODB.Recordset")
StrSQL="Select* from guest order by ID desc"
maxpages=cint(ASPBook.pagecount)
GuestTotal=ASPBook.RecordCount
if cint(Mypage)> maxpages then
MESSAGE("<li>没有你所想去的页数!</li>")
<title>[客户留言系统]</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/colorbird.css">
BODY{SCROLLBAR-FACE-COLOR:#D4D0C8; SCROLLBAR-HIGHLIGHT-COLOR:#999999; SCROLLBAR-SHADOW-COLOR:#999999; SCROLLBAR-3DLIGHT-COLOR:#FFFFFF; SCROLLBAR-ARROW-COLOR:#000000; SCROLLBAR-TRACK-COLOR:#E3E3E3; SCROLLBAR-DARKSHADOW-COLOR:#666666;}
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
<p align="center"><a href="gb_sign.asp">
<img border="0" src="IMAGES/sign.gif" alt="签写留言"></a></p>
<td><p align="center"><font color="#000000"><b><font face="Arial" size="1">Total of
<font color="#ff0000"><%=GuestTotal%></font> messages,</font></b></font>
<font face="Arial"><font size="1" color="#ff0000"><%=MyPageSize%></font><font size="1">
messages per page, You are on page</font></font></font><font color="#FF0000"><font size="1" face="Arial"><%=cint(Mypage)%></font>
<%=Greeting%>...<font color="#000000"><%PageLink%></font></p>
<div align="right"></div></td>
<table width="590" border="0" cellspacing="0" cellpadding="0">
<td height="50"><a href="gb_sign.asp"><img src="IMAGES/shop.gif" alt="签写留言" width="89" height="25" border="0"></a></td>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#6699CC" width="590" height="197">
<td align="center" height="197">
<table width="590" border="0" cellspacing="0" cellpadding="4" style="border-collapse: collapse" height="35" bgcolor="#F7F7F7">
<table cellspacing="1" border="1" width="592" height="23" style="border-collapse: collapse" cellpadding="0" bgcolor="#C6C3C6" bordercolorlight="#FFFFFF" bordercolordark="#000000" background="table.gif">
<td align="right" width="130" height="23">
<p align="left"><b>
<font color="#FFFFFF">留言者:</font></b></p>
<td align="right" width="445" height="23">
<p align="left"><b>
<font color="#FFFFFF">留言内容:</font></b></p>
<table width="590" border="0" cellspacing="0" cellpadding="0">
If ASPBook.Eof or ASPBook.Bof then
Response.Write"<TD bgcolor="& Color1&" align=center colspan=6><FONT STYLE=font-size:9pt>对不起,目前还没有任何留言,如要留言,请按“我要留言”图片!</FONT></TD>"
do until ASPBook.Eof or total= totalsize
<tr bgcolor="<%=CColor%>">
<table width="590" border="1" cellspacing="8" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<table width="590" border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" height="1">
<td width="137" rowspan="3" height="1" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="99%" id="AutoNumber2" height="96">
<td width="100%" align="center" height="12"><b><%=ASPBook("名字")%></b></td>
<td width="100%" align="center" height="54"><%if ASPBook("性别")="boy" then%>
<img src="images/boy.gif" alt="英俊潇洒的<%=ASPBook("名字")%>先生" align="middle" border="0">
<%elseif ASPBook("性别")="girl" then%>
<img src="images/girl.gif" alt="美丽又温柔的<%=ASPBook("名字")%>小姐" align="middle" border="0">
<td width="100%" align="center" height="28">Form:<%=ASPBook("来自")%></td>
<td width="234" height="1"><font size="1">
<font color="#000000" class="littel">
<img src="./icons/em<%=ASPBook("表情")%>.gif" border="0" align="ABSCENTER"></font><font color="#0000FF" class="littel">On:
<%=ASPBook("留言日期")%></font></font><font size="1" color="#0000FF">
<td width="212" height="1"><%if ASPBook("邮件")<>"" then%>
<a href="mailto:<%=ASPBook("邮件")%>">
<img src="images/email.gif" ALIGN="absmiddle" border="0" width="15" height="16"></a>
<%end if%><%if ASPBook("主页")<>"" and ASPBook("主页")<>"http://" then%>
<a href="<%=ASPBook("主页")%>" Target="_blank">
<img src="images/home.gif" ALIGN="absmiddle" border="0"></a>
<%end if%><%if ASPBook("ICQ")<>"" then%>
<img src="images/icq.gif" alt="ICQ:<%=ASPBook("ICQ")%>" align="absmiddle" border="0" width="15" height="16">
<%if ASPBook("OICQ")<>"" then%><%end if%>
<a href="http://club3.tencent.com:81/cgi-bin/friend/show_info?ln=<%=ASPBook("OICQ")%>" target="_blank">
<img src="images/oicq.gif" alt="OICQ:<%=ASPBook("OICQ")%>" align="absmiddle" border="0" width="16" height="16"></a>
<img src="images/ip.gif" alt="<%=ASPBook("IP")%>" align="absmiddle" border="0" width="13" height="16">
<img src="images/system.gif" alt="<%=ASPBook("系统")%>" align="absmiddle" border="0" width="15" height="16"></td>
<td width="450" height="14" colspan="2" valign="top"><%=ASPBook("留言")%></td>
<%if ASPBook("Reply")<>"" then%><td width="450" height="17" colspan="2" valign="top">
<font color="#FF0000">Reply:<b></b></font>
<font color="#0000FF" class="littel" size="1">(<%=ASPBook("Reply_Date")%>)</font><br>
<img src="./icons/em<%=ASPBook("Reply_Icon")%>.gif" border="0" align="ABSCENTER"><%=ASPBook("Reply")%></font></td>
<table width="590" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<td width="137" rowspan="2"></td>
<td width="450"></td>
<td width="450"></td>
<table width="590" height="24" border="0" cellpadding="0" cellspacing="1" bordercolor="#DCE8F3" bordercolorlight="#FFFFFF" bgcolor="#DCE8F3" style="border-collapse: collapse">
<td align="right" width="131" height="20">
<p align="left"></p>
<td align="right" width="448" height="20">
<a href="gb_reply.asp?page=<%=mypage%>&Number=<%=ASPBook("ID")%>">
<img src="images/quote.gif" alt="回复该留言" align="absmiddle" border="0" width="16" height="16"></a>
<a href="gb_delete.asp?page=<%=mypage%>&Number=<%=ASPBook("ID")%>">
<img src="images/recycle.gif" alt="删除该留言" align="absmiddle" border="0" width="16" height="16"></a></td>
<table border="0" cellpadding="2" cellspacing="0" width="590" height="1" bgcolor="#F7F7F7" style="border-collapse: collapse" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF">
<td width="131" height="1">
<p align="center"></p>
<td align="right" width="448" height="1"><font color="#000000"><%PageLink%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="592" id="AutoNumber1">
<p align="center"><a href="gb_sign.asp"></a><br>
Scriptname=Request.Servervariables("script_name")
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((GuestTotal-1)/MyPageSize)+1
PagePrev=PageShowSize*(PageNextSize-1)
Response.write"<a href='"& Scriptname&"?page="& PagePrev&"'>[<<]</a>-"
Response.write"<a href='"& Scriptname&"?page="& Prev_Page&"'>[<]</a>"
if maxpages>=PageNextSize*PageShowSize then
PageSizeShow= Maxpages-PageShowSize*(PageNextSize-1)
for PageCounterSize=1 to PageSizeShow
PageLink=(PageCounterSize+PageNextSize*10)-10
if PageLink<> cint(Mypage) then
Response.write"<a href='"& Scriptname&"?page="& PageLink&"'>["& PageLink&"]</a>"
if Mypage+1<=Pagetpage then
Response.write"<a href='"& Scriptname&"?page="& Next_Page&"'>[>]</a>"
if maxpages> PageShowSize*PageNextSize then
PageNext= PageShowSize* PageNextSize+ 1
Response.write"-<a href='"& Scriptname&"?page="& PageNext&"'>[>>]</a>"
二、手机qq空间留言板qq表情代码。求详细数字代码。
微笑100、撇嘴101、色102、发呆103、得意104、流泪105、害羞106、闭嘴107、睡108、大哭109、尴尬110、发怒111、调皮112、呲牙113、惊讶114、难过115、酷116、冷汗117、抓狂118、吐119、偷笑120、可爱121、白眼122、傲慢123、讥饿124、困125、惊恐126、流汗127、憨笑128、大兵129、奋斗130、咒骂131、疑问132、嘘133、晕134、折腾135、衰136、骷髅137、敲打138、再见139、擦汗140、抠鼻141、鼓掌142、糗大了143、坏笑144、左哼哼145、右哼哼146、哈欠147、鄙视148、委屈149、快哭了150、阴险151、亲亲152、吓153、可怜154、菜刀155、西瓜156、啤酒157、蓝球158、乒乓159、咖啡160、饭161、猪头162、玫瑰163、凋谢164、示爱165、爱心166、心碎167、蛋糕168、闪电169、炸'弹170、刀171、足球172、飘虫173、便便174、月亮175、太阳176、礼物177、拥抱178、强179、弱180、握手181、胜利182、抱拳183、勾引184、拳头185、差劲186、爱你187、NO188、OK189、爱情190、飞吻191、跳跳192、发抖193、怄火194、转圈195、磕头196、回头197、跳绳198、挥手199、激动200、街舞201、献吻202、左太极203、右太极204、眨眼300、咧牙笑301、热泪盈眶—哭302、眼泪哗哗流303、怒火304、嘟着嘴咪咪笑305、咬开钢板306、打哈欠—困307、汗如雨下308、做鬼脸309、生病了—探热310、遐想到流口水311、阴险—四处瞄312、得意—露金牙313、鄙视你314、晕315、抠鼻子316、喜欢—流口水317、打瞌睡—钓鱼318、惊恐—冒汗319、害羞320、奋斗321、吓!—惊讶322、囧—323、酷—戴墨镜324、遐想—偷笑325、倒霉—好黑326、委屈327、疑问328、抓狂—拍桌子329、调皮—伸舌头330
三、求简单的asp留言板代码
步骤一:先设计一个留言表单的网页(如:guestbook1.asp,这不用我在这儿说教了吧?)。见下图:
步骤二:在设计好留言表单后,我们开始进行编写处理留言的ASP程序。
我们要编写处理留言的ASP程序,最重要的问题是如何实现存取留言。而在ASP程序中,要存取文件,我们必须建立FileSystemObject对象(该对象主要用于读取Unicode或ASCII码的文件)。而要建立FileSystemObject对象,我们又可以使用以下的语句:
SET对象实例= CREATEOBJECT("SCRIPTING.FILESYSTEMOBJECT")
FileSystemObject对象的方法包括:CreateTextFile和OpenTextFile:
CreateTextFile:建立一个文件名称,并返回一个TextStream对象提供你读写文件
OpenTextFile:打开一个已存在的文件并建立一个TextStream对象以供你读写文件在建立并打开一个可供编辑的文件后,我们最后可以调用TextStream对象下的方法WriteLine(把信息写入到已打开的文件中并换行)和方法ReadLine(读取已打开文件的一行信息)来存取文件。
因此,要实现存取留言的ASP程序,我们可以大致构思如下:
先建立FileSystemObject对象;然后通过该对象来调用OpenTextFile打开文件或者调用CreateTextFile来创建新的文件,建立TextStream对象;最后我们再进行调用TextStream对象的WriteLine和ReadLine进行存取文件。解决了这个主要问题后,我们可以将处理留言的ASP程序写成如下所示:
If Name="" Or Email="" Or Subject="" Or Memo="" Then
Response.Write"输入框不能为空白!"
'检查表单的各输入框是否有信息输入,若留有空输入框没填则显示说明信息:"输入框不能为空白!"并停止执行下面的程序。?
Email="< A HREF=mailto:"& Email&">"& Email&"</A>"
Line1= Line1&"Email�"& Email&"< BR>"
Line2="主题:"& Subject&"< BR>"
Memo= Replace( Memo, vbCrLf,"< BR>")
Line3="< TABLE BORDER=1>< TR>< TD>"
Line3= Line3&"您的留言:"& Memo&"</TD></TR></TABLE>"
'定义留言的显示格式,其中留言信息用信息框框起来。
'避免如果执行下面的ReadAll(读取已打开文件的全部信息)时,无法读取信息就造成的程序错误的情况发生,因此加入此句用于忽略所有的错误。
Set fso= Server.CreateObject("Scripting.FileSystemObject") Application.Lock
TxtPath= Server.MapPath("book1.txt")
NewPath= Server.MapPath("newbook.txt")
Set fin= fso.OpenTextFile(NewPath,, True)
Set fout= fso.CreateTextFile(TxtPath)
'建立 FileSystemObject对象,并锁定Application对象,不让任何两位上网者同时执行留言操作,同时建立和打开一个TextStream对象,指向要对其实行僮鳎�糜诹粞约锹嫉奈谋绰ook1.txt。
'把留言表单中的信息分行写入到已打开的文件中。
Response.Redirect"guestbook1.asp"
'关闭并删除gbookold.txt,然后解除Application对象的锁定,再指引客户端浏览器到新的Web页面guestbook1.asp。
将上述代码COPY到你的记事本,注意:要记得将所有“<”符号后面多加的空格去掉,然后存成文件manage1.asp。
因为我们要本留言簿的留言显示在留言表单下面,所以我们可以将以下HTML代码COPY到guestbook1.asp的最后面。
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>您的留言</title>
<link rel="stylesheet" href="../images/Text.css">
<body TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="b01.jpg">
<h2 ALIGN="CENTER">您的留言</h2>
<hr noshade color="red">
<!--#include file="book1.txt"-->
留言板代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于QQ飞车留言板代码、留言板代码的信息别忘了在本站进行查找哦。









