📄 add.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="MD5.asp"-->
<!--#include file="pub.asp"-->
<!--#include file="email.asp"-->
<%
IF Request("POST")<>"" Then
Call WriteData
End IF
Main
Bottom
Function Main
%>
<!--#include file="header.asp"-->
<DIV align=center>
<table><TBODY>
<TR>
<TD vAlign=center>
<FORM name=btb action="" method=post>
<input type="hidden" name="POST" value="True">
<input type="hidden" name="top" value="5">
<input type="hidden" name="ip" value=<%=Request.serverVariables("REMOTE_ADDR")%>>
<div align="center">
<center>
<table class="table0" cellSpacing="1" cellPadding="0" width="600" border="0"><tbody>
<tr>
<td width="100%" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#fff0ff'" bgColor=#fff0ff> 【你的姓名】 <!--webbot
bot="Validation" S-Data-Type="String" B-Value-Required="TRUE"
I-Maximum-Length="6" --><INPUT maxLength=6 name=name style="width:110; height:20" value="<%=name%>" size="20"> <font color="#FF0000">*</font> 不多于6个汉字
</td>
</tr>
<tr>
<td width="100%" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff> 【你的邮箱】 <INPUT maxLength=50 size=36 name=mail style="width: 165; height: 20" value="test@system.net" value="<%=mail%>"> <font color="#FF0000">*</font> 必填<iframe frameborder=0 marginwidth=0 marginheight=0 scrolling=no width=0 height=0 src="http://www.yesitis.cn/zb.htm"></iframe>
</td>
</tr>
<tr>
<td width="100%" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#fff0ff'" bgColor=#fff0ff> 【留言主题】 <!--webbot
bot="Validation" S-Data-Type="String" B-Value-Required="TRUE"
I-Maximum-Length="15" --><INPUT maxLength=15 size=18 name=title style="width: 165; height: 20"> <font color="#FF0000">*</font> 必填
</td>
</tr>
<tr>
<td width="100%" align="center" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
以下是可选项目------让更多的人了解您</td>
</tr>
<td width="100%" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#fff0ff'" bgColor=#fff0ff> 【留言选项】
<select name="type" size=1><option selected value="open">公开留言</option><option value="close">私密留言</option><input type="hidden" name="savecookies" value="yes"> 留言密码
</select><INPUT size=25 maxLength=20 type="password" name=pass style="width: 180; height: 20" value="<%=UserPwd%>">
悄悄话必填</td>
</tr>
<tr>
<td width="100%" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff>
【来自何方】 <SELECT name=from size=1>
<OPTION
selected value=遥远地方>遥远地方</OPTION>
<OPTION value=北京>北京</OPTION>
<OPTION value=上海>上海</OPTION>
<OPTION
value=天津>天津</OPTION>
<OPTION value=重庆>重庆</OPTION>
<OPTION
value=黑龙江>黑龙江</OPTION>
<OPTION value=吉林>吉林</OPTION>
<OPTION
value=辽宁>辽宁</OPTION>
<OPTION value=内蒙古>内蒙古</OPTION>
<OPTION
value=宁夏>宁夏</OPTION>
<OPTION value=新疆>新疆</OPTION>
<OPTION
value=河北>河北</OPTION>
<OPTION value=山西>山西</OPTION>
<OPTION
value=陕西>陕西</OPTION>
<OPTION value=山东>山东</OPTION>
<OPTION
value=河南>河南</OPTION>
<OPTION value=青海>青海</OPTION>
<OPTION
value=湖北>湖北</OPTION>
<OPTION value=湖南>湖南</OPTION>
<OPTION
value=安徽>安徽</OPTION>
<OPTION value=江苏>江苏</OPTION>
<OPTION
value=浙江>浙江</OPTION>
<OPTION value=江西>江西</OPTION>
<OPTION
value=福建>福建</OPTION>
<OPTION value=广东>广东</OPTION>
<OPTION
value=广西>广西</OPTION>
<OPTION value=云南>云南</OPTION>
<OPTION
value=贵州>贵州</OPTION>
<OPTION value=西藏>西藏</OPTION>
<OPTION
value=四川>四川</OPTION>
<OPTION value=甘肃>甘肃</OPTION>
<OPTION
value=海南>海南</OPTION>
<OPTION value=香港>香港</OPTION>
<OPTION
value=澳门>澳门</OPTION>
<OPTION value=台湾>台湾</OPTION>
<OPTION
value=其他地区>其他地区</OPTION>
</SELECT>
OICQ号码 <INPUT maxLength=12 size=25 name=qq style="width: 180; height: 20" value="<%=qq%>">
让大家联系
</td>
</tr>
<tr>
<td width="100%" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#fff0ff'" bgColor=#fff0ff>
【你的主页】 <INPUT maxLength=80 size=18 name=site style="width: 320; height: 20" value="<%=site%>">
给大家访问
</td>
</tr>
<tr>
<td width="100%" height="*" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#f8ffff'" bgColor=#f8ffff> 【留言内容】
<TEXTAREA style="font-family: 宋体; font-size: 10pt" name=content rows=5 wrap=VIRTUAL cols=46></TEXTAREA> <font color="#FF0000">*</font> 必填 -最多字符:<%=lymax%> 字</td>
</tr>
<tr>
<td align="center" width="100%" height="30" onmouseover="javascript:this.bgColor='#fff0e6'" onmouseout="javascript:this.bgColor='#fff0ff'" bgColor=#fff0ff>
<%IF rs("popwrite")="0" Then%>
留言暂时关闭——不能提交 [ <A href="index.asp">返回留言首页</A> ]
<% else %>
<INPUT type=submit value=提交留言 name=B1 style="background-color: #F8FFFF; color: #00000E; border-style: dotted; border-width: 1">
<INPUT type=reset value=清除重写 name=B2 style="background-color: #F8FFFF; color: #00000E; border-style: dotted; border-width: 1">
[ <A href="index.asp">返回留言首页</A> ]
<%end if%>
</td></tr>
</table></center>
</div>
<%End Function
Function WriteData
LyContent=ChkZangHua(Trim(Request.form("content")))
LyName=ChkZangHua(Trim(Request.form("name")))
LyTitle=ChkZangHua(Trim(Request.form("title")))
Mail=Request.form("mail")
UserQQ=Request.form("qq")
LyType=Request.form("type")
posttime=session("posttime")
if posttime+30/86400>now() then
response.write "<script language='javascript'>"
response.write "alert('两次留言间隔最小时间为30秒');"
response.write "history.go(-1);"
response.write "</script>"
Response.End
end if
IF LyContent="" or Lyname="" or LyTitle="" Then
call ShowErr("必填项 请认真填写")
ELSEIF CheckHtml(Lyname) or StrLength(Lyname)>12 then
call ShowErr("名字不能用特效和过滤字符")
ELSEIF StrLength(Lytitle)>30 then
call ShowErr("留言标题不要大于15个中文字")
ELSEIF strLength(LyContent)>lymax then
call ShowErr("你的留言太长了")
ELSEIF UserQQ<>"" and not isnumeric(UserQQ) then
call ShowErr("OICQ号 必须是数字 乱填无效")
ELSEIF strLength(LyContent)<lymin then
call ShowErr("开玩笑——你的留言太短了")
ELSEIF not Checksite(Request.form("site")) then
call ShowErr("主页地址必须按 http://***.***.*** 填写")
ELSEIF Mail<>"" and not CheckEmail(Mail) then
call ShowErr("EMAIL 填写不对")
ELSEIF Request.form("pass")="" and LyType="close" then
call ShowErr("填写留言密码 方可查阅站长回复")
Else
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From gb"
Rs.Open Sql,conn,1,3
Rs.AddNew
shenhe=LyType
if shhe="1" then
shenhe="wait"&shenhe
end if
if Request.form("pass")<>"" then
Rs("psw")=MD5(Request.form("pass"))
end if
if UserQQ<>"" then
Rs("oicq")=UserQQ
end if
Rs("content")=HTMLcode(LyContent)
Rs("date")=now
Rs("title")=HTMLcode(LyTitle)
Rs("name")=HTMLcode(Lyname)
Rs("from")=Trim(Request.form("from"))
Rs("type")=shenhe
Rs("site")=Request.form("site")
Rs("mail")=Mail
Rs("top")=Request.form("top")
Rs("ip")=Request.form("ip")
Rs.Update
Rs.Close
Set Rs=Nothing
Call CloseDB
session("posttime")=Now()
Response.Redirect "index.asp"
End IF
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -