📄 addserverdo.asp
字号:
<!--#include file="conn.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
title=request.Form("title")
all=request.Form("all")
types=request.Form("types")
times=now()
if title="" then
response.write("<script>alert('标题不能为空!');window.location.href('addserver.asp')</script>")
response.end
end if
if all="" then
response.write("<script>alert('内容不能为空!');window.location.href('addserver.asp')</script>")
response.end
end if
if instr(all,"<%")>0 or instr(all,"<bg") then
response.write("<script>alert('内容中存在非法字符!');window.location.href('addserver.asp')</script>")
response.end
end if
if instr(title,"<%") then
response.write("<script>alert('标题中含有非法字符!');window.location.href('addserver.asp')</script>")
response.end
end if
if types="" or types=0 then '判断是否非法提交问题或没有选择问题类型
response.write("<script>alert('请选择问题类型!');window.location.href('addserver.asp')</script>")
response.end
end if
cmd="select * from question where type='"&types&"'"
rs.open cmd,conn,1,3
rs.addnew
rs("title")=title
rs("all")=all
rs("type")=types
rs("time")=times
rs.update
rs.close
conn.close
response.write("<script>alert('添加问题成功!');window.location.href('addserver.asp')</script>")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -