researchupate.asp

来自「一个互联网络公司网站源码」· ASP 代码 · 共 52 行

ASP
52
字号
<!--#include file="../conn.asp" -->
<%
	id=request("id")
	if id<>"" and isnumeric(id) then
	pp=0 '修改
	else
	pp=1 '添加
	end if
	set rs=server.CreateObject("adodb.recordset")
	if pp=1 then
	sql="select * from research"
	else
	sql="select * from research where id="&id
	end if
	rs.open sql,conn,1,3
	if request.Form("isvalid")="1" then
	conn.execute("update research set isvalid=0")
	end if
	if pp=1 then
	rs.addnew
	end if
	if trim(request.Form("value1"))="" or isnumeric(trim(request.Form("value1"))) then
	value1=0
	end if
	if trim(request.Form("value2"))="" or isnumeric(trim(request.Form("value2"))) then
	value2=0
	end if
	if trim(request.Form("value3"))="" or isnumeric(trim(request.Form("value3"))) then
	value3=0
	end if
	if trim(request.Form("value4"))="" or isnumeric(trim(request.Form("value4"))) then
	value4=0
	end if
	if trim(request.Form("value5"))="" or isnumeric(trim(request.Form("value5"))) then
	value5=0
	end if
	rs("question")=request.Form("question")
	rs("title1")=request.Form("title1")
	rs("title2")=request.Form("title2")
	rs("title3")=request.Form("title3")
	rs("title4")=request.Form("title4")
	rs("title5")=request.Form("title5")
	rs("value1")=value1
	rs("value2")=value2
	rs("value3")=value3
	rs("value4")=value4
	rs("value5")=value5
	rs("isvalid")=request.Form("isvalid")
	rs.update
	rs.close
	response.Redirect(request.ServerVariables("HTTP_REFERER"))
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?