📄 actadd.asp
字号:
<%@ LANGUAGE=VBScript%>
<%Server.ScriptTimeout=600
Response.Expires=0
actname=Request.Form("actname")
range=Request.Form("range")
actnl=Request.Form("act")
actname=Trim(actname)
actnl=Trim(actnl)
actnl=Replace(actnl,"<","<")
actnl=Replace(actnl,">",">")
if range<>0 and range<>1 then range=""
if actname="" or actnl="" or range="" or len(actnl)<=2 then
Response.Write "<title>出错提示 - 添加新动作</title>"
Response.write "<body bgcolor=#FFCC99><p> </p><p align='center'>出错提示:各个项目均不能放空白,请填写完整!</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
if left(actnl,2)<>"//" then
Response.Write "<title>出错提示 - 添加新动作</title>"
Response.write "<body bgcolor=#FFCC99><p> </p><p align='center'>出错提示:动作内容必须是以“//”开头的语句!</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
if len(actnl)>100 or len(actname)>4 then
Response.Write "<title>出错提示 - 添加新动作</title>"
Response.write "<body bgcolor=#FFCC99><p> </p><p align='center'>出错提示:动作名称或动作内容超过限制的长度!</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
if InStr(actnl,"%%")<>0 and range=0 then
Response.Write "<title>出错提示 - 添加新动作</title>"
Response.write "<body bgcolor=#FFCC99><p> </p><p align='center'>出错提示:动作内容含有“%%”<br><br>动作类型应改为“1 对别人”!</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
if InStr(actnl,"%%")=0 and range=1 then
Response.Write "<title>出错提示 - 添加新动作</title>"
Response.write "<body bgcolor=#FFCC99><p> </p><p align='center'>出错提示:动作类型为“1 对别人”<br><br>动作内容中却没有出现“%%”!</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
if InStr(actnl,chr(34))<>0 then
Response.Write "<title>出错提示 - 添加新动作</title>"
Response.write "<body bgcolor=#FFCC99><p> </p><p align='center'>出错提示:添加的动作内容中,不能包含半角的双引号“ " & chr(34) & " ”!</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
dim act()
actfile = server.mappath("actdata.asp")
Set fs = CreateObject("Scripting.FileSystemObject")
set thisfile = fs.OpenTextFile(actfile,1,False)
countact = 0
do while not thisfile.AtEndOfStream
thisline = thisfile.readline
Redim preserve act(countact)
act(countact) = thisline
countact = countact + 1
loop
thisfile.Close
for i=5 to countact-1 step 3
if act(i)=actnl then
Response.Write "<title>出错提示 - 添加新动作</title>"
Response.write "<body bgcolor=#FFCC99><p> </p><p align='center'>出错提示:该动作内容已经存在,不必再次添加!</p>"
Response.write "<p align='center'><a href='javascript:history.go(-1);'>点击这里进行修改</a></p></body>"
Response.end
end if
next
set outfile = fs.CreateTextFile(actfile,TRUE,FALSE)
for each item in act
outfile.WriteLine item
next
outfile.WriteLine range
outfile.WriteLine actname
outfile.WriteLine actnl
outfile.Close%><html>
<head>
<title>添加成功</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style TYPE="text/css">
<!--
.p9{line-height : 150%;font-size : 9pt;}
.p12{line-height : 150%;font-size : 12pt;}
div {line-height : 150%;font-size : 12pt;}
A {color : Blue;text-decoration : none;}
A:Visited {color : Blue;}
A:Active {color : Fuchsia;}
A:Hover {color : Blue;}
-->
</style>
</head>
<body bgcolor="#FFCC99">
<p align=center><font style="font-size: 30pt" face="黑体" color="#FF0000">添加成功</font></p>
<div align="left">
<p> <span class="p9">您已经将下述动作加入动作库中!辛苦您了!</span></p>
<p><font color="#FF0000">动作对象:<%=range%><br>
动作名称:<%=actname%><br>
动作内容:<%=actnl%></font></p>
<p> <span class="p9"> 如果您发现上述动作有误,请在<a href="speaktalk.asp" target="_blank">留言簿</a>中留言,由站长为您修改。</span></p>
<p align="center"><a href="javascript:history.go(-1);">继续添加动作</a> <a href="javascript:window.close();">关闭添加窗口</a></p>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -