<body lang=ZH-CN style='tab-interval:21.25pt;text-justify-trim:punctuation'>
<!--#include file="../conn.asp" -->
<%
function strLength(str)
if isNull(str) or str="" then strLength = 0
Set regEx = New RegExp
regEx.Pattern = "[^\x00-\x80]"
regEx.IgnoreCase = True
regEx.Global = True
Set Matches = regEx.Execute(str)
if not isNull(Matches) then strLength=Len(str)+Matches.Count
end function
function strLeft(str,lenum)
if strLength(str)>lenum*2 then
Dim K, newstr
K = 0
newstr = ""
Set regEx = New RegExp
regEx.Pattern = "[^\x00-\x80]"
regEx.IgnoreCase = True
regEx.Global = True
for i = 1 to Len(str)
tmpstr = Mid(str,i,1)
newstr = newstr + tmpstr
if regEx.Test(tmpstr) then K=K+2 else K=K+1
'if K=lenum*2 then Exit For
if K>=lenum*2-1 then Exit For
next
strLeft = newstr
else
strLeft = str
end if
end function
function SpaceLenStr(sVal,nLen,bCenter)
if isNull(sVal) then
SpaceLenStr = "<span style=""mso-spacerun: yes"">"& replace(Space(nLen), " ", " ") &"</span>"
else
if Not IsNumeric(sVal) then sVal = Cstr(sVal)
if strLength(sVal)>=nLen then
SpaceLenStr = sVal
else
if bCenter then
SpaceLenStr = "<span style=""mso-spacerun: yes"">"& replace(Space(Fix((nLen-strLength(sVal))/2)), " ", " ") &"</span>" & sVal & "<span style=""mso-spacerun: yes"">"& replace(Space(nLen-strLength(sVal)-Fix((nLen-strLength(sVal))/2)), " ", " ") &"</span>"
else
SpaceLenStr = sVal & "<span style=""mso-spacerun: yes"">"& replace(Space(nLen-strLength(sVal)), " ", " ") &"</span>"
end if
end if
end if
end function
obj_ID = Trim(Request("ID"))
if obj_ID="" then response.write "<B>错误的档案序列号参数,请确认你是从正确的位置进入!单击后退重新来过。</B>" : response.end
sql="select * from uca_Object"&left(Obj_ID,1)&" A inner join uca_Item"&left(Obj_ID,1)&" B on A.Obj_IteID=B.Ite_ID where obj_id="&Mid(obj_ID,2)
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,3,3
'response.write sql
if rs.eof then
response.write "此单位工程("&Obj_ID&")不存在,请确认你是从正确的位置进入!"
rs.close
set rs = nothing
conn.close
set conn = nothing
response.end
else
conn.execute("update uca_Object"&left(Obj_ID,1)&" set Obj_DocStatus=8 where obj_id="&Mid(obj_ID,2)&"")
end if
<%
if request.querystring("action")="toWord" then
Response.ContentType="application/msword"
Response.AddHeader "content-disposition","attachment;filename=aaa.doc"
end if
%>