<% end if %>
<% if strType = "doc" then %>
<%
'5/02/05 - Display application search results.
if true then
If Not objAppDocRs.EOF Then
blnResults = true
objAppDocRs.MoveFirst
RowCount = 0
docno = objAppDocRs.Fields("docno")
title = objAppDocRs.Fields("title")
longdesc = objAppDocRs.Fields("longdesc")
%>
<%
Set oRSChild = objAppDocRs("objAppDocRSDocs").Value
If Not oRSChild.EOF Then
%>
<%=oRSChild("doctype")%>
Doc ID
Title
Updated
File Type
Size (KB)
<%
Do While Not oRSChild.EOF
LongDescSC = oRsChild("longdesc")
%>
<%
oRSChild.MoveNext
Loop
oRSChild.Close
set oRSChild = nothing
%>
<%
End If
objAppDocRs.Close
set objAppDocRs = nothing
oConn.Close
end if
end if
%>
<% ' 5/22/06 - Display libraries
If Not objLibRs.EOF Then %>
Application Sample Libraries
Library Name
Version
Details
Associated Documentation
<%
LibFirst = ""
objLibRs.MoveFirst
RowCount = 0
Do While Not objLibRs.EOF
LibCurrent = objLibRs("lib_id")
strDescription = objLibRs("description")
strVersion = objLibRs("version")
strDetail = objLibRs("readme_file")
If cstr(LibFirst) <> cstr(LibCurrent) Then
LibFirst = LibCurrent
' Set row colors based on odd even
If RowCount MOD 2 = 0 Then
thisColor = "#FFFFFF"
Else
thisColor = "#EDEDED"
End If
%>
<% End If
RowCount = RowCount + 1
objLibRs.MoveNext
Loop
objLibRs.Close
%>
<%
Set objLibRs = Nothing
End If
%>
<% ' Display reference designs
If Not objRefRs.EOF Then %>
Reference Designs
Reference Design
Description
Product
<%
RefFirst = ""
objRefRs.MoveFirst
RowCount = 0
Do While Not objRefRs.EOF
RefCurrent = objRefRs("ref_id")
LongDescRef = objRefRs("long_description")
If cstr(RefFirst) <> cstr(RefCurrent) Then
RefFirst = RefCurrent
'' Set row colors based on odd even
If RowCount MOD 2 = 0 Then
thisColor = "#FFFFFF"
Else
thisColor = "#EDEDED"
End If
%>
<% End If
RowCount = RowCount + 1
objRefRs.MoveNext
Loop
objRefRs.Close
%>
<%
if strAction="download" then
' 10/3/2006
'if instr(1,strRedirect,".pdf",1) = 0 or Request.Cookies("PDF") <> "no" then
'if instr(1,strRedirect,".pdf",1) = 0 then
' Response.Redirect (strRedirect)
'else
'
' Download PDF without displaying in Acrobat.
'
if instr(1,strRedirect,"http://www.zilog.com",1) > 0 then
strAbsFile = Server.MapPath(mid(strRedirect,21,len(strRedirect)))
elseif instr(1,strRedirect,"http://webdev",1) > 0 then
strAbsFile = Server.MapPath(mid(strRedirect,14,len(strRedirect)))
else
strAbsFile = Server.MapPath(strRedirect)
end if
set objFSO = server.createobject("scripting.filesystemobject")
'-- check to see if the file exists
If objFSO.FileExists(strAbsFile) Then
Set objFile = objFSO.GetFile(strAbsFile)
'-- first clear the response, and then set the appropriate headers
Response.clear
Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
'-- set as binary
objStream.Type = 1
Response.CharSet = "UTF-8"
'-- load into the stream the file
objStream.LoadFromFile(strAbsFile)
'-- send the stream in the response
Response.BinaryWrite(objStream.Read)
objStream.Close
Set objStream = Nothing
Set objFile = nothing
else
Response.Redirect "/errors/404page.asp"
end if
set objFSO = nothing
Response.End
'end if
end if
%>
<%
if err.number <> 0 then
if session("strStartPage")<>"" then
Response.redirect session("strStartPage")
else
if strServerName = "www.zilog.com" or strServerName = "zilog.com" or strServerName = "" then
Response.Redirect ("http://www.zilog.com")
elseif strServerName = "webdev" then
Response.Redirect ("http://webdev")
end if
end if
end if
%>