addspecial2_submit.asp
来自「这是一个学生毕业时做的教务系统」· ASP 代码 · 共 61 行
ASP
61 行
<%@ Language=VBScript %>
<!--#include file=conn.asp -->
<%
IF not(Session("KEY")="super" or Session("KEY")="input") THEN
response.redirect "login.asp"
response.end
END IF
NewSpecialName=trim(Request.Form("NewSpecialName"))
if NewSpecialName="" then
%>
<script language=javascript>
history.back()
alert("新闻专题名称不能为空!")
</script>
<%
Response.End
end if
set rs=server.CreateObject ("Adodb.RecordSet")
rs.Source="select * from Special where SpecialName='" & NewSpecialName & "'"
rs.Open rs.Source,conn,1,1
if not rs.EOF then
%>
<script language=javascript>
history.back()
alert("已经存在该专题!")
</script>
<%
else
sql="INSERT INTO Special (SpecialName) VALUES ('" & NewSpecialName & "')"
conn.Execute (sql)
end if
%>
<html>
<head>
<meta http-equiv="refresh" content="3;url=AddSpecial1.asp">
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=site.css rel=stylesheet>
</head>
<body>
<p> </p>
<p> </p>
<p> </p>
<table border="0" width="450" align=center cellspacing="1" bgcolor="#000000">
<tr>
<td width="100%" bgcolor="#FFFFFF" align="center">
<p> </p>
<p>专题已经添加!</p>
<p> </p>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?