📄 savecontent.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="CheckLogin.asp"-->
<!--#include file="StudentConn.asp" -->
<link href="home.css" rel="stylesheet" type="text/css">
<%
Dim mmsg:mmsg="您尚未设置公式!"
Dim sql,rs
Content_Name=Request("ContentName")
if Request("gongshi")<>"" then
strField=Request("gongshi")
else
Response.Write("<p> </p><p> </p><p> </p><p align=center class='msg'><script language='javascript'>alert('公式内容不能为空!请重新设置!');history.go(-1)</script></P>")
Response.End
end if
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.ConnectionString=MM_StudentConn_STRING
objConn.Open
Set rs=Server.CreateObject("ADODB.Recordset")
sql="Select * from gongshi where Content='" & Content_Name & "'"
rs.open sql,objConn,3,3
If rs.eof or rs.bof Then
If strField<>"" Then
strUpdate="insert into gongshi(Content,Test_Content) values('" & Content_Name & "','"& strField &"')"
objConn.execute(strUpdate)
Response.Redirect("ShowContent.asp")
Else
Response.Redirect("CountTest2.asp?mmsg=" & mmsg & "&sheetName=" & Test_Name & "&Content=" &Content_Name)
End If
Else
If strField<>"" Then
strUpdate="update gongshi Set Content='" & Content_Name & "',Test_Content='"& strField &"'"
objConn.execute(strUpdate)
Response.Redirect("ShowContent.asp")
Else
Response.Redirect("CountTest2.asp?mmsg=" & mmsg & "&Content=" &Content_Name)
End If
End if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -