<%@ Language=VBScript %>
<%
If session("username")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
'elseIf session("canadmispbeian")="" Then
'	ef=True
'	ec="您没有此操作的权限。"
End If


if not ef Then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
keyuseid=Request.querystring("id")
	Set ds_Wz_xx = Server.CreateObject("ADODB.Recordset")
	SQL="Select * from FreeHost.FreeHost_Beian_Wz_xx where id='"&keyuseid&"'  and username='"&session("username")&"'"
	ds_Wz_xx.Open Sql,conn,1,1
if not ds_Wz_xx.eof then
'if ds_Wz_xx("upgiflen")>0 then
'response.write "Nrlx_id_"&Request("fileid")&"_file"
'response.end
If Not IsNull(ds_Wz_xx("Spwj_"&Request("fileid"))) then
response.contenttype="image/jpeg"
Response.BinaryWrite ds_Wz_xx("Spwj_"&Request("fileid")).getChunk(102400)
Else
	ef=True
	ec="图片并没上传。"
End if
Else
	ef=True
	ec="不存在的id。"
end If
ds_Wz_xx.close
set conn=nothing 
end If

if ef then
Response.Redirect "e.asp?e="&ec
end If

Private Function EncodeBase64(arrData)
    Dim objXML
    Dim objNode
    Set objXML = Server.CreateObject("Msxml2.DOMDocument.6.0") 
    Set objNode = objXML.createElement("b64")
    objNode.dataType = "bin.base64"
    objNode.nodeTypedValue = arrData
    EncodeBase64 = objNode.Text
    Set objNode = Nothing
    Set objXML = Nothing
End Function

Private Function DecodeBase64( strData ) 
    Dim objXML 
    Dim objNode 
    Set objXML = Server.CreateObject("Msxml2.DOMDocument.6.0") 
    Set objNode = objXML.createElement("b64")
    objNode.dataType = "bin.base64"
    objNode.Text = strData
    DecodeBase64 = objNode.nodeTypedValue
    Set objNode = Nothing
    Set objXML = Nothing
End Function
%>