savecontent.asp

来自「工资管理系统功能齐全包括工人工资信息查询.」· ASP 代码 · 共 38 行

ASP
38
字号
<%@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>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</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 + =
减小字号Ctrl + -
显示快捷键?