inward_add.asp

来自「1.多种查询方式」· ASP 代码 · 共 69 行

ASP
69
字号
<%@ LANGUAGE="VBSCRIPT" %>
<%const title="确认数据"%>
<%
response.buffer=true
Response.Expires = 0
Response.CacheControl = "Private" 
%>
<!-- #include file=../data/username.inc-->
<!-- #include file=../data/connect.asp-->
<!--#include file=../data/myPrg.asp-->
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<title><%=title%></title>
<link rel="stylesheet" type="text/css" href="../data/forum.css">
</head>
<body topmargin=0>
<%
newcompanyid = request("companyid")
if newcompanyid = "" then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert("""+newcompanyid +"请先选择公司再做此步操作!"");"
	Response.write "history.go(-1);"
	Response.Write "</script>"
	Response.End 
elseif not isnumeric(newcompanyid) then
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "alert(""companyid必须为整数!"");history.go(-1);"
	Response.Write "</script>"
	Response.End
else
	newcompanyid = cint(newcompanyid) 
end if
arra = split(session("username"),";")
UserCompanyid = arra(0)
flag = arra(1)
User = arra(2)
userno = arra(4)
if flag > 4 then
	call closedatabase
	Response.End 
end if
dim inwa_sia
inwa_sia = trim(Request("inwa_sia"))
inwa_sia = replace(inwa_sia,"'","’")
sql = "select inwa_id from inward where inwa_sia = '"&inwa_sia&"' and inwa_companyid = "&newcompanyid&""
set rs_inward = conn.execute(sql)
if rs_inward.eof then 
	rs_inward.close
	set rs_inward = nothing
	call closedatabase
	response.write "<script language=javascript>"
	response.write "alert(""该SIA号码不存在"");"
	response.write "history.go(-1);"
	response.write "</script>"
	response.end
else
	inwardid = rs_inward("inwa_id")
	rs_inward.close
	set rs_inward = nothing
	call closedatabase
	Response.Write "<script language=javascript>"
	Response.Write "var myTime = new Date(); "
	Response.Write "var timeNow = myTime.getTime();"
	Response.Write "window.location ='inward_2.asp?id="&inwardid&"&companyid="&newcompanyid&"&database=yes&inward_second=yes&tt='+timeNow;"
	Response.Write "</script>"
end if
%>

⌨️ 快捷键说明

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