谁可以提供个留言本?发送到邮箱的那种。ASP
<%
dim conn,rs,ps,PostIntervalTime,IpLists,LoginPassWord,OnlyShowReplay
LoginPassWord = "51windows.net" '管理密码,请设置复杂的密码
ps = 20 '每页留言数
PostIntervalTime = 5*60 '同一个IP多长时间可以留一次言,单位是秒,5分钟可以用5*60表示,不限制请设置为0
OnlyShowReplay = 1 '留言是否有回复再显示,0为留言后立刻显示在留言列表中,1为需要回复后才显示在列表中。置顶的留言不受限制
IpLists = "192.168.|"
'禁止留言的IP,例如: "127.0.|192.168.0.1"
%><html>
<head>
<meta /whois/?ip=<% = rs("ip") %>"><% = rs("ip") %></a></td>
</tr>
<tr>
<td>回 复:</td>
<td><textarea rows="4" class="input" name="reply" cols="48" style="overflow:auto;width:100%;"><% = server.htmlencode(rs("reply")) %></textarea><div align="right"><input type="checkbox" name="isTop" id="isTop<% = rs("ID") %>" value="1"<%if Cstr(rs("IsTop"))="1" then%> checked<%end if%>><label for="isTop<% = rs("ID") %>">置顶留言</label><input type="submit" value="回 复"> <input type="button" onclick="if(confirm('确定删除吗?')){document.HwForm<% = rs("ID") %>.act.value='del';document.HwForm<% = rs("ID") %>.submit();}" style="color:red;" value="删 除"></div></td>
</tr>
</form>
<%else%>
<tr>
<td nowrap>留言内容:</td>
<td><% = replace(server.htmlencode(rs("content")),vbnewline,"<br>") %></td>
</tr>
<%if len(rs("reply")) > 0 then%>
<tr>
<td>回 复:</td>
<td><% = replace(server.htmlencode(rs("reply")),vbnewline,"<br>") %></td>
</tr>
<%end if%>
<%end if%>
</table>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end sub
end if
%>
</td>
</tr>
<tr>
<td width="100%" height="24" align="right" id="bottompage"><%showpages()%></td>
</tr>
<tr>
<td width="100%"><% logintable()%></td>
</tr>
</table>
</div>
<%
conn.close
set conn = nothing
Function NoJapn(byVal iStr)
if isnull(iStr) or isEmpty(iStr) then
NoJapn=""
Exit function
end if
dim F
F=array(chr(-23116),chr(-23124),chr(-23122),chr(-23120),chr(-23118),chr(-23114),chr(-23112),chr(-23110),chr(-23099),chr(-23097),chr(-23095),chr(-23075),chr(-23079),chr(-23081),chr(-23085),chr(-23087),chr(-23052),chr(-23076),chr(-23078),chr(-23082),chr(-23084),chr(-23088),chr(-23102),chr(-23104),chr(-23106),chr(-23108))
NoJapn=iStr
for i=0 to 25
NoJapn=replace(NoJapn,F(i),"")
next
End Function
function fixsql(str)
dim newstr
newstr = str
if isnull(newstr) or len(newstr) = 0 then
fixsql = newstr
exit function
end if
newstr = Replace(newstr,"'","''")
fixsql = newstr
end function
function isForbid(sip)
dim Iplist,Iparr,Ipi
Iplist = "|"& IpLists &"|"
Iparr = split(Iplist,"|")
for Ipi = 0 to ubound(Iparr)
if len(Iparr(Ipi)) > 0 and instr("|" & sip,"|" & Iparr(Ipi)) > 0 then
isForbid = true
exit function
end if
next
isForbid = false
end function
sub showpages()
pageurl = Request.ServerVariables("SCRIPT_NAME") & "?"
%>
<span id="PageZone"><%
if len(totalput) = 0 then
totalput = 0
end if
if totalpages<2 then
if int(totalpages) > 0 then
response.write "*** "&totalput&" 条留言 "
end if
else
dim Page_First,Page_Previous,Page_Next,Page_Last
Page_First = "首页"
Page_Previous = "前页"
Page_Next = "后页"
Page_Last = "尾页"
%>
>>
<%if int(currentPage) = 1 Then%>
<span class="PageDisabled"><% = Page_First %></span>
<span class="PageDisabled" id="__PrevLink"><% = Page_Previous %></span>
<a href="<%=pageurl%>Page=<%=currentPage+1%>" id="__NextLink"><% = Page_Next %></a>
<a href="<%=pageurl%>Page=<%=totalpages%>"><% = Page_Last %></a>
<%elseif int(currentPage) = int(totalpages) Then%>
<a href="<%=pageurl%>"><% = Page_First %></a>
<a href="<%=pageurl%>Page=<%=currentPage-1%>" id="__PrevLink"><% = Page_Previous %></a>
<span class="PageDisabled" id="__NextLink"><% = Page_Next %></span>
<span class="PageDisabled"><% = Page_Last %></span>
<%else%>
<a href="<%=pageurl%>"><% = Page_First %></a>
<a href="<%=pageurl%>Page=<%=currentPage-1%>" id="__PrevLink"><% = Page_Previous %></a>
<a href="<%=pageurl%>Page=<%=currentPage+1%>" id="__NextLink"><% = Page_Next %></a>
<a href="<%=pageurl%>Page=<%=totalpages%>"><% = Page_Last %></a>
<%end if%>
页次:<span class="PageNote"><%=currentPage%></span>/<%=totalpages%> 页 转到 <span id=divpage></span> 页 *** <span class="PageNote"><%=totalput%></span>个留言
<SCRIPT LANGUAGE="JavaScript">var selected="";var arr = new Array(<%=totalpages%>);for (var i=1; i<<%=totalpages+1%>; i++){if (i==<%=currentPage%>){selected="selected";}else{selected="";}arr[i] = "<OPTION value='"+i+"' "+selected+">" + i + "</OPTION>";}document.getElementById("divpage").innerHTML = "<SELECT tabindex='1' class='hwPageSelect' onChange='javascript:location.href=\"<%=pageurl%>Page=\"+this.options[selectedIndex].value'>" + arr.join() + "</SELECT>";</SCRIPT>
<%end if%></span><%
end sub
function logintable()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<form method="POST" name="login" action="<% = Request.ServerVariables("SCRIPT_NAME") %>">
<td width="100%">
<%if session("islogin") = LoginPassWord then%>
<p align="center"><a href="?action=loginout">退出管理</a></p>
<%elseif request("action") = "login" then%>
<input type="hidden" name="act" value="login">
<p align="center">请输入密码:<input type="password" class="input" name="pws"size="20"> <input type="submit" value="登陆"> <a href="?">取消</a></p>
<%else%>
<p align="center"><a href="?action=login#bottom">管理</a></p>
<%end if%>
</td>
</form>
</tr>
</table>
<%end function%>
<a name="bottom" />
</body>
</html>