Application防止灌水

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<form method="post" action="session.asp">
  <input type="text" />
  <input type="submit" value="提交" />
</form>
</body>
</html>

session.asp

<%If DateDiff("s",application("lasttime"),now())<=3 then %>

<script>
alert("不能发水贴!请于3秒后再发!")
history.back();
</script>

<%else%>

<%
application("user")=application("user") & request("username") & "<br/>"
response.write application("user")
%>

<%
application("lastuser")=session.sessionid
application("lasttime")=now()
%>
<%end if%>

    A+
发布日期:2007年04月03日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: