但书上确实有例子如:购物积分、留言次数等
附查看贴子程序与购物积分附件
<!-- #include file="config.inc" -->
<%
set conn=server.createobject("adodb.connection")
conn.open connstring
set objnoters=server.createobject("adodb.recordset")
noteid=request.querystring("noteid")
ssql="select * from notebook where noteid='"& noteid&"'"
objnoters.open ssql,conn,1,3
if objnoters.eof then
response.write "留言已删除,请<a href=""vbscript:window.close()"">关闭</a>"
response.end
end if
'下面计算出留言时间的表达式
temp=split(objnoters("notetime")," ",-1,1)
datetemp=split(temp(0),"-",-1,1)
bnotetime=datetemp(0)&"年"&datetemp(1)&"月"&datetemp(2)&"日"
timetemp=split(temp(1),":",-1,1)
notetime=notetime&timetemp(0)&"点"&timetemp(1)&"分"&timetemp(2)&"秒"
userid=objnoters("userid")
email=objnoters("email")
subject=objnoters("subject")
content=objnoters("content")
objnoters.close
'此留言的阅读数要加上1
ssql="update notebook set readnum=readnum+1 where noteid='"¬eid&"'"
application.lock
objnoters.open ssql,conn,1,3
application.unlock
'关闭数据库连接
conn.close
set conn=nothing
set objnoters=nothing
%>
<html>
<head>
<title>查看留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
.class1{font:10pt; color:#9900CC;}
.class2{font:11pt;}
input{font:10pt;background-color:#eeeeee;border-style:solid;border-color:#6666cc;border-width:1;}
a:hover{color:#ff0000;text-decoration:none;}
a:link{color:#000000;text-decoration:underline;}
-->
</style>
</head>
<body bgcolor="#FFFFFF" style="font:10pt">
<div id="floater" align="center" style="left: 15px; top: 2px; width: 280;font:10pt">
<table width=270 border=0 cellspacing="1" bgcolor="#b0cfef">
<tr>
<td align=center bgcolor="#D8F3FE"> <b><font color=#669900 class=class2>查看留言</font><font color=999999 face=arial size=4>...</font>
</b>
</td>
</tr>
<tr>
<td align=center bgcolor="#ffffff">
<p align="center">
<br>
<font class=class1>大名</font>  <input type=text size=24 value=<%=userid%>>
<br>
<font class=class1>信箱</font>  <input type=text size=24 value=<%=email%>>
<br>
<font class=class1>主题</font>  <input type=text size=24 value=<%=subject%>>
<br>
<font class=class1>时间</font>  <input type=text size=24 value=<%=notetime%>>
<br><font
class=class1>
详细内容</font> <br>
<textarea name="content" cols="31" rows="4"><%=content%></textarea>
<br>
<br>
</td>
</tr><tr><td><table width="100%">
<tr><td width="50%" align="center"style="font:10pt"><a href="vbscript:window.close()">关闭窗口</a></td><td width="50%" align="center"><a href="noteback.asp?noteid=<%=noteid%>&subject=<%=subject%>" style="font:10pt">回复留言</a></td></tr></table></td></tr>
</table>
</div>
</body>
</html>