📄 rs_access.asp
字号:
<!--#include file="../title.asp"-->
<%
dim ref_no,name,size
dim color,quantity,destination
dim unit_p,etd_date,meno,access_id
access_id=request("access_id")
ref_no=request("ref_no")
name=request("name")
size=request("size")
color=request("color")
quantity=request("quantity")
destination=request("destination")
unit_p=request("unit_p")
etd_date=request("etd_date")
meno=request("meno")
founderr=false
if quantity<>"" then
if not isnumber(quantity) then
founderr=true
errmsg=errmsg+"<li>Wrong Quantity(YDS)!</li>"
end if
else
quantity=0
end if
if unit_p<>"" then
if not isnumber(unit_p) then
founderr=true
errmsg=errmsg+"<li>Wrong Unit Price!</li>"
end if
else
unit_p=0
end if
if not isdate(etd_date) then
founderr=true
response.write "<p>"
response.write "Wrong Etd Date"
else
etd_date=formatdatetime(etd_date)
end if
if founderr<>true then
sql="select * from cloth_access_2"
rs.open sql,conn,1,3
rs.addnew
rs("ref_no")=ref_no
rs("access_id")=access_id
rs("etd_date")=etd_date
rs("name")=name
rs("size")=size
rs("color")=color
rs("quantity")=quantity
rs("unit_p")=unit_p
rs("meno")=meno
rs.update
end if
Function isnumber(strng)
isnumber = fals
Dim regEx, Match
Set regEx = New RegExp
regEx.Pattern = "^\d+(\.\d+)?$"
regEx.IgnoreCase = True
Set Match = regEx.Execute(strng)
if match.count then isnumber= true
End Function
%>
<meta http-equiv="refresh" content='5; URL="javascript:history.go(-2)"'><!--#include file="../copyright.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -