<script language="VB" runat="server">
dim id as string
dim obj as new DBAct
dim str as string
dim rs As SQLDataReader
dim user as string
dim intype as string
dim goodsno as string
dim srcweight as double
dim db as string
dim owner as string
dim ls_version as string
Function Pre_db(dbv as object) as string
if dbv is dbnull.value
return ""
else
return dbv.tostring()
end if
End Function
Sub Page_load(sender As Object, e As EventArgs)
dim tmp as string
user = GYTCOM.IsLogin()
if trim(user) = "" or user Is Nothing then
user = "guest"
end if
if Not GYTCOM.CheckAuth("","") then
obj.close()
obj=nothing
GYTCOM.ProcError(1)
end if
if request.querystring("ck") is nothing or request.querystring("no") is nothing then
obj.close()
obj=nothing
GYTCOM.ProcError(3)
end if
db = request.querystring("ck")
db = obj.isopened(obj.setsql(db))
if db = "" then
obj.close()
obj=nothing
GYTCOM.ProcError(1)
end if
id = request.querystring("no")
id = obj.setsql(id)
tmp = obj.GetAllowedStoreList(user)
if tmp = "" then
obj.close()
obj=nothing
GYTCOM.ProcError(1)
elseif tmp = "ALL" then
else
if (tmp.IndexOf("'" + obj.GetStoreName(db,4) + "'") < 0) then
obj.close()
obj=nothing
GYTCOM.ProcError(1)
end if
end if
owner = obj.GetAllowedOwnerList(user)
if owner = "" then '没有允许查询的货主
obj.close()
obj=nothing
GYTCOM.ProcError(1)
end if
ls_version = GetVersion()
End Sub
Function GetVersion() as string
dim ls_str as string
str = "select version from t_main_store where db_code = '" + db + "'"
rs = obj.getselect(str)
if rs.read() then
ls_str = rs(0)
else
ls_str = "2"
end if
rs.close()
return ls_str
End Function