<%@ LANGUAGE="VBSCRIPT" %> <% 'Response.CacheControl = "no-cache" %> <% 'Response.AddHeader "Pragma", "no-cache" %> <% 'Response.Expires = -99999 %> Download <% '******************************************************************************* ' QNguyen 5/02/2006 Download page. ' QNguyen 9/06/2006 Fixed return to previous issue. Goes to previous ' page and not start page. ' QNguyen 9/20/2006 Resolve duplicate info issue from prev page ' using default2.asp. ' QNguyen 9/29/2006 Resolve ability to use direct URL issue. ' QNguyen 10/3/2006 Resolve do not display pdf in acrobat issue. ' QNguyen 10/4/2006 Removed unneeded cookies, replaced with sessions. ' '******************************************************************************* on error resume next dim strPath, strName dim objConn, strSQL, strRedirect dim objRs, strSQL2 dim strType, strEmail, strLinkDesc, strTargetURL, strProductFamily dim strAction, strPrevPage, strSQL3, strEmailOnyx dim strEmailDisplay, objRS2 dim strFrom, strServerName, strZCMConn, blnCookie dim intTime blnCookie = true strEmailOnyx = Request.Querystring("email") strFrom = Request.Querystring("from") strAction = Request.form("txtaction") strServerName = Request.ServerVariables("Server_Name") if instr(1,strServerName,"webdev") > 0 then strServerName = "webdev" end if if strEmailOnyx = "" then ' If haven't retrieved e-mail from Onyx... ' ' 9/29/2006 ' ' Retrieve data from querystring instead of form. strDocString = "&blnDoc=false" strName = Request.QueryString("name") strType = Request.QueryString("type") strPrevPage = Replace(Request.QueryString("prevpage"),"__","&") if strType = "doc" then set objConn = Server.CreateObject("ADODB.Connection") objConn.open strConnWebDB set objRS2 = Server.CreateObject("ADODB.Recordset") ' Retrieve document detail information from webdb. strSQL3 = "Select * from docs where status = 1 and docno = '" & strName & "'" objRS2.open strSQL3, objConn, adOpenStatic ' ' Get all family ids for doc string. ' set objRs3 = Server.CreateObject("ADODB.Recordset") strSQL3 = "select distinct familyid from productFamilies where status = 1" objRs3.Open strSQL3, objConn, adOpenStatic do while not objRs3.eof strFamilies = strFamilies & objRs3("familyid") & "," objRs3.MoveNext loop strFamilies = Left(strFamilies, len(strFamilies) - 1) objRs3.close ' ' Get all doc types for doc string. ' strSQL3 = "select distinct doctypeid from doctype" objRs3.Open strSQL3, objConn, adOpenStatic do while not objRs3.eof strDT = strDT & objRs3("doctypeid") & "," objRs3.MoveNext loop strDT = Left(strDT, len(strDT) - 1) objRs3.close set objRs3 = nothing strDocString = "&FAM=" & strFamilies & "&DT=" & strDT & "&id=" & Request.QueryString("qs") end if ' 9/06/2006 if instr(strPrevPage,"/download/default2.asp") > 0 then 'Response.Cookies("strPrevPath") = Request.Cookies("strPath2") 'Response.Cookies("strPrevName") = Request.Cookies("strName2") 'Response.Cookies("strPrevVersion") = Request.Cookies("strVersion2") 'Response.Cookies("strPrevLinkDesc") = Request.Cookies("strLinkDesc2") 'Response.Cookies("strPrevTargetURL") = Request.Cookies("strTargetURL2") 'Response.Cookies("strPrevProductFamily") = Request.Cookies("strProductFamily2") 'Response.Cookies("strPrevPrevPage") = Request.Cookies("strPrevPage2") 'Response.Cookies("strPrevType") = Request.Cookies("strType2") 'Response.Cookies("strPrevQString") = Request.Cookies("strQString2") 'Response.Cookies("blnRecursive") = "true" ' Not needed on default.asp 'Session("strPrevPath") = Request.Cookies("strPath2") 'Session("strPrevName") = Request.Cookies("strName2") 'Session("strPrevVersion") = Request.Cookies("strVersion2") 'Session("strPrevLinkDesc") = Request.Cookies("strLinkDesc2") 'Session("strPrevTargetURL") = Request.Cookies("strTargetURL2") 'Session("strPrevProductFamily") = Request.Cookies("strProductFamily2") 'Session("strPrevPrevPage") = Request.Cookies("strPrevPage2") 'Session("strPrevType") = Request.Cookies("strType2") 'Session("strPrevQString") = Session("strQString2") 'Session("blnRecursive") = "true" else 'Response.Cookies("blnRecursive") = "false" 'Response.Cookies("strStartPage") = strPrevPage Session("blnRecursive") = "false" Session("strStartPage") = strPrevPage end if ' Store data in cookies Session("strName") = strName Session("strPrevPage") = strPrevPage Session("strType") = strType ' 9/29/2006 Session("strQString") = Request.QueryString("qs") ' Get Onyx e-mail address. Use appopriate customer file from Onyx depending on server name. if strServerName = "www.zilog.com" or strServerName = "zilog.com" then '9/29/2006 Response.Redirect ("http://support.zilog.com/support/customer/customer.asp?from=download" & strDocString) ' Use redirect below if support.zilog.com is down. 'Response.Redirect ("/download/default.asp?email=na&from=download" & strDocString & "&from=onyx") elseif strServerName = "webdev" then '9/29/2006 Response.Redirect ("http://support.zilog.com/support/customer/customer_webdev.asp?from=download" & strDocString) ' Use redirect below if support.zilog.com is down. 'Response.Redirect ("/download/default.asp?email=na&from=download" & strDocString & "&from=onyx") end if end if strEmailDisplay = "" strEmail = Request.form("txtemail") if strAction <> "download" then if strEmailOnyx <> "na" then strEmailDisplay = strEmailOnyx if Session("strEmail")<>"" then strEmailDisplay = Session("strEmail") end if if strEmail <> "" then strEmailDisplay = strEmail ' Retrieve data from cookies after retrieving Onyx e-mail address. if strFrom = "download, onyx" then strName = Session("strname") strPrevPage = Session("strprevpage") strType = Session("strtype") if strType = "" then blnCookie = false 'User does not have session cookies enabled. end if ' 9/06/2006 strStartPage = Session("strStartPage") else ' Retrieve data from form after user clicks download. strPath = Request.form("txtpath") strName = Request.form("txtname") strVersion = Request.form("txtversion") strLinkDesc = Request.form("txtlinkdesc") strTargetURL = Request.form("txttargeturl") strProductFamily = Request.form("txtproductfamily") strPrevPage = Request.form("txtprevpage") strType = Request.form("txttype") ' 9/06/2006 strStartPage = Request.form("txtStartPage") end if set objConn = Server.CreateObject("ADODB.Connection") objConn.open strConnWebDB ' Retrieve business lines information. set objRs = Server.CreateObject("ADODB.Recordset") strSQL2 = "select businesslineid, businessunitname from businesslines where status = 1" objRs.Open strSQL2, objConn, adOpenStatic set objRS2 = Server.CreateObject("ADODB.Recordset") if strType = "app" or strType = "lib" then ' Retrieve application or CAD library information from ZCM. set objConnZCM = Server.CreateObject("ADODB.Connection") ' Use appopriate connection string depending on server name. if strServerName = "www.zilog.com" or strServerName = "zilog.com" then strZCMConn = "Provider=SQLOLEDB;Data Source=NT04;Initial Catalog=ZCM;User ID=webmaster;Password=h3@Rt$en" elseif strServerName = "webdev" then strZCMConn = "Provider=SQLOLEDB;Data Source=NT03;Initial Catalog=ZCM;User ID=webmaster;Password=h3@Rt$en" end if objConnZCM.open strZCMConn strSQL3 = "Select * from t_download where file_name = '" & strName & "'" objRS2.open strSQL3, objConnZCM, adOpenStatic if strType = "app" then strPath = "/support/software/" & objRS2("file_name") elseif strType = "lib" then strPath = "/cad/download/" & objRS2("file_name") end if strVersion = objRS2("version") strLinkDesc = objRS2("file_title") strTargetURL = "" strProductFamily = "" elseif strType = "doc" then ' Retrieve document detail information from webdb. strSQL3 = "Select * from docs where status = 1 and docno = '" & strName & "'" objRS2.open strSQL3, objConn, adOpenStatic strPath = objRS2("filepath") strVersion = "" strLinkDesc = objRS2("title") strTargetURL = "" strProductFamily = "" elseif strType = "samlib" then ' Retrieve sample library detail information from webdb. strSQL3 = "Select * from t_library where lib_id='" & strName & "'" objRS2.open strSQL3, objConn, adOpenStatic strName = objRS2("library_file") strPath = "/library/download/" & objRS2("library_file") strVersion = objRS2("version") strLinkDesc = objRS2("name") strTargetURL = "" strProductFamily = "" end if if strAction = "download" then 'Capture download information. Session("strEmail") = strEmailDisplay 'strSQL = "insert into t_download2 (email, file_name, file_version, file_path, link_desc, target_url, product_family, type, date_time) values('" & strEmailDisplay & "','" & strName & "','" & strVersion & "','" & strPath & "','" & strLinkDesc & "','" & strTargetURL & "','" & strProductFamily & "','" & strType & "',getdate())" strSQL = "exec sp_update_download '" & strEmailDisplay & "','" & strName & "','" & strVersion & "','" & strPath & "','" & strLinkDesc & "','" & strTargetURL & "','" & strProductFamily & "','" & strType & "'" objConn.Execute strSQL end if ' ' Begin docs2.asp code ' if strType = "doc" then dim blnAPPDOC, blnResults blnAPPDOC = Request.QueryString("APPDOC") blnResults = false dim products dim docTypes dim fams dim docType dim ordDate, ordSize, ordTitle, ordDocNo dim oTogg dim OSimg, ODimg, OTimg, ODNimg dim oTStr, oDStr, oFStr, oDNStr dim tMap, oMap, dMap, dnMap fams = Request.QueryString("FAM") docType = Request.QueryString("DT") ordDate = Request.QueryString("OD") ordSize = Request.QueryString("OS") ordTitle = Request.QueryString("OT") ordDocNo = Request.QueryString("DN") oDNStr = "" oTStr = "" oDStr = "" oFStr = "" oTogg = "1" Select Case ordDocNo Case "0" oDNStr = " desc" oTogg = "1" ODNimg = "" dnMap = "" Case "1" oDNStr = " asc" oTogg = "0" ODNimg = "" dnMap = "" Case Else ODNimg = "" dnMap = "" dnMap = dnMap & "" End Select Select Case ordTitle Case "0" oTStr = ", title desc" oTogg = "1" OTimg = "" tMap = "" Case "1" oTStr = ", title asc" oTogg = "0" OTimg = "" tMap = "" Case Else OTimg = "" tMap = "" tMap = tMap & "" End Select Select Case ordSize Case "0" oFStr = ", filesize desc" oTogg = "1" OSimg = "" oMap = "" Case "1" oFStr = ", filesize asc" oTogg = "0" OSimg = "" oMap = "" Case Else OSimg = "" oMap = "" oMap = oMap & "" End Select Select Case ordDate Case "0" oDStr = ", rUpdate desc" oTogg = "1" ODimg = "" dMap = "" Case "1" oDStr = ", rUpdate asc" oTogg = "0" ODimg = "" dMap = "" Case Else ODimg = "" dMap = "" dMap = dMap & "" End Select '5/02/05 Set oConn = Server.CreateObject("ADODB.Connection") oConn.Provider = "MSDataShape" oConn.Open strConnWebDB 'if blnAPPDOC <> "true" then if false then 'docStr = "SHAPE {Select docid, docno, doctype, title, updatedate, filesize, " _ ' & "filetype, parent, businessunitname, familyid, familyshortname, filepath, priority, new from v_AllDocs " _ ' & "where familyid in (" & fams & ") and doctypeid in (" & docType & ") " _ ' & "and isnull(parent, 0) = 0 " _ ' & "order by priority, familyshortname, doctype" & oFStr & oDStr & oTStr & ", docno" & oDNStr & "} AS ParentData " _ ' & "APPEND ({Select docid, docno, doctype, title, updatedate, filesize, " _ ' & "filetype, parent, businessunitname, familyid, familyshortname, filepath, priority, new from v_AllDocs " _ ' & "where familyid in (" & fams & ") and doctypeid in (" & docType & ") " _ ' & "and not isnull(parent, 0) = 0 " _ ' & "order by priority, familyshortname, doctype, docno} " _ ' & "AS oRSDocs " _ ' & "RELATE docid TO parent)" docStr = "SHAPE {Select docid, docno, doctype, title, updatedate, filesize, " _ & "filetype, parent, businessunitname, familyid, familyshortname, filepath, priority, new, longdesc from v_AllDocs " _ & "where familyid in (" & fams & ") and doctypeid in (" & docType & ") " _ & "and isnull(parent, 0) = 0 " _ & "and docid = "&Request.QueryString("id") _ & "order by priority, familyshortname, doctype" & oFStr & oDStr & oTStr & ", docno" & oDNStr & "} AS ParentData " _ & "APPEND ({Select a.docid, a.docno, a.doctype, a.title, a.updatedate, a.filesize, " _ & "a.filetype, a.parent, a.businessunitname, a.familyid, a.familyshortname, " _ & "a.filepath, a.priority, a.new, a.longdesc, b.docid from v_AllDocs a, v_AllDocs b " _ & "where a.familyid in (" & fams & ") and a.doctypeid in (" & docType & ") " _ & "and a.parent = ? " _ & "and a.parent = b.docid " _ & "and a.familyid = b.familyid " _ & "order by a.priority, a.familyshortname, a.doctype, a.docno, a.docid} " _ & "AS oRSDocs " _ & "RELATE docid TO PARAMETER 0)" Set oRs = Server.CreateObject("ADODB.Recordset") oRs.Open docStr, oConn, adOpenDynamic, , adCmdText else '5/02/05 dim strAppDocSQL, objAppDocRs, strApps, strAppID 'strApps = Request.QueryString("APP") strAppID = Request.QueryString("APP_ID") strAppDocSQL = "SHAPE {Select docid, docno, doctype, title, updatedate, filesize, " _ & "filetype, parent, app_id, app_name, filepath, new, longdesc from v_AllDocs_App " _ & "where doctypeid in (" & docType & ") " _ & "and isnull(parent, 0) = 0 " _ & "and docid = "&Request.QueryString("id") _ & "order by app_name, doctype" & oFStr & oDStr & oTStr & ", docno" & oDNStr & "} AS ParentData " _ & "APPEND ({Select a.docid as adocid, a.docno, a.doctype, a.title, a.updatedate, a.filesize, " _ & "a.filetype, a.parent, a.app_name, a.app_id, " _ & "a.filepath, a.new, a.longdesc, b.docid as bdocid from v_AllDocs_App a, v_AllDocs_App b " _ & "where a.doctypeid in (" & docType & ") " _ & "and a.parent = ? " _ & "and a.parent = b.docid " _ & "order by a.app_name, a.doctype, a.docno, a.docid} " _ & "AS objAppDocRSDocs " _ & "RELATE docid TO PARAMETER 0)" 'strAppDocSQL = "SHAPE {Select distinct docid, docno, doctype, title, updatedate, filesize, " _ ' & "filetype, parent, app_id, app_name, filepath, new, longdesc from v_AllDocs_App " _ ' & "where app_id in (" & strAppID & ") and doctypeid in (" & docType & ") " _ ' & "and docid not in (select secdocid from docassociations) " _ ' & "and isnull(parent, 0) = 0 " _ ' & "and docid = "&Request.QueryString("id") _ ' & "union " _ ' & "select distinct ad.docid, ad.docno, ad.doctype, ad.title, ad.updatedate, ad.filesize, " _ ' & "ad.filetype, ad.parent, a.app_id, a.name AS app_name, ad.filepath, ad.new, ad.longdesc " _ ' & "from v_allDocs_App ad inner join t_ref_design_docs rdd " _ ' & "on ad.docid = rdd.docid " _ ' & "inner join t_ref_design rd " _ ' & "on rdd.ref_id = rd.ref_id " _ ' & "inner join t_application a " _ ' & "on rd.app_id = a.app_id " _ ' & "where a.app_id in (" & strAppID & ") and doctypeid in (" & docType & ") " _ ' & "and ad.docid not in (select secdocid from docassociations) " _ ' & "and isnull(ad.parent, 0) = 0 " _ ' & "and ad.docid = "&Request.QueryString("id") _ ' & "order by app_name, doctype" & oFStr & oDStr & oTStr & ", docno" & oDNStr & "} AS ParentData " _ ' & "APPEND ({select docid, docno, doctype, title, updatedate, filesize, " _ ' & " filetype, parent, filepath, new, longdesc " _ ' & " from v_allDocs_App where docid in " _ ' & " (select docid from t_ref_design_docs " _ ' & " where docid in (select secdocid from docAssociations)) " _ ' & "order by doctype, docno} " _ ' & "AS objAppDocRSDocs " _ ' & "RELATE docid TO parent)" Set objAppDocRs = Server.CreateObject("ADODB.Recordset") objAppDocRs.Open strAppDocSQL, oConn, adOpenDynamic, , adCmdText end if ' ' Get reference design info ' Set oConn2 = Server.CreateObject("ADODB.Connection") oConn2.Open strConnWebDB set objRefRs = Server.CreateObject("ADODB.Recordset") 'strRefSQL = "exec sp_get_ref_design " & Request.QueryString("id") strRefSQL = "select rd.ref_id, rd.name, rd.description, rd.partno, rd.long_description " _ & "from t_ref_design_docs rdd join t_ref_design rd " _ & "on rdd.ref_id = rd.ref_id " _ & "where rdd.docid = " & Request.QueryString("id") _ & "order by rd.name" objRefRs.Open strRefSQL, oConn2 ,adOpenForwardOnly ' ' 5/22/06 - Get library info ' set objLibRs = Server.CreateObject("ADODB.Recordset") strLibSQL = "select l.lib_id, l.name, l.version, l.description, l.readme_file, l.library_file " _ & "from t_library_docs ld join t_library l " _ & "on ld.lib_id = l.lib_id " _ & "where l.status = 1 and ld.docid = " & Request.QueryString("id") _ & " order by l.name" objLibRs.Open strLibSQL, oConn2 ,adOpenForwardOnly end if ' ' End docs2.asp code ' %> <% ' 9/06/2006 intPos1 = instr(strPagePath,"from=download") strPagePath = "/download/default.asp?" & mid(strPagePath, intPos1 + 14, len(strPagePath) - (intPos1 + 15)- 8) %>
  home > file download
   
File Download   
Product Lines
<% Do While Not objRs.EOF %> > "><%=objRs("BusinessUnitName")%>
<% objRs.MoveNext Loop objRS.Close set objRS = nothing %>
  <% if blnCookie then %>
<% if Session("blnRecursive") = "false" then %>  Return to previous page <% elseif Session("blnRecursive") = "true" then %>  &name=<%=Session("strPrevName")%>&prevpage=<%=Replace(strStartPage,"&","__")%>&qs=<%=Replace(Session("strPrevQString"),"&","__")%>">Return to previous page <% end if %>
 
  File Information
<% if strType = "app" or strType = "samlib" then %> <% end if %>
 Download   Keep up to date 
<%=ucase(strLinkDesc)%>

<% if strType="doc" then 'Display language drop down if applicable. dim objRSLang, intLangCnt, blnDisplayLang dim arrLang(100), arrLangPath(100), arrLangDocNo(100) intLangCnt = 0 set objRSLang = server.CreateObject("ADODB.Recordset") objRSLang.open "select d.docno, d.filepath, l.language from docs d join t_docs_foreign_language dfl on d.docid = dfl.non_english_id join t_language l on d.language_Id = l.language_id where dfl.english_id = " & objRs2("docid") & " and d.status=1 order by language",objConn,2 do while not objRSLang.eof intLangCnt = intLangCnt + 1 arrLang(intLangCnt) = objRSLang("language") arrLangPath(intLangCnt)= objRSLang("filepath") arrLangDocNo(intLangCnt)= objRSLang("docno") objRSLang.MoveNext loop if intLangCnt > 0 then 'Display language drop down. blnDispLang = true arrLang(0) = "English" arrLangPath(0) = strPath arrLangDocNo(0) = strName %>

<% end if end if %> <% ' 10/3/2006 'if strType = "doc" and InStr(1,strPath,".pdf",1) > 0 then %> <% 'end if %> <% if strAction = "download" then %>

If your download does not start after a few seconds, use this link
<% end if %>

Get the latest information from ZiLOG about new and updated products by creating your own user account or include your e-mail adddress.

Your E-Mail

 
 Details  
Description
<% if strType = "app" or strType = "lib" or strType = "samlib" then Response.Write objRS2("description") else if objRS2("longdesc")<>"" then Response.Write objRS2("longdesc") else Response.Write objRS2("title") end if end if %>

  File Name:
<% if strType = "app" or strType = "lib" or strType = "samlib" then %> Version:
<% end if %> Date Posted:
Download Size:
Download Time:
   <% if strType = "app" or strType = "lib" or strType = "samlib" then if strType="samlib" then Response.Write(ucase(objRS2("library_file")) & "
") else Response.Write(ucase(objRS2("file_name")) & "
") end if Response.Write(objRS2("version") & "
") Response.Write(objRS2("date_posted") & "
") if strType="samlib" then lngFileSize = Round(objRS2("library_file_size"),2) else lngFileSize = Round(objRS2("file_size"),2) end if elseif strType = "doc" then Response.Write(ucase(mid(objRS2("filepath"),instrrev(objRS2("filepath"),"/")+1)) & "
") Response.Write(objRS2("creationdate") & "
") lngFileSize = Round(objRS2("filesize")/1024,2) end if if lngFileSize < .01 then lngFileSize = .01 Response.Write(lngFileSize & " Mb
") intTime = round(((lngFileSize * 8388608)/55296)/60,2) if intTime < .01 then intTime = .01 Response.Write(intTime & " minutes at 54 Kbps
") intTime = round(((lngFileSize * 8388608)/393216)/60,2) if intTime < .01 then intTime = .01 Response.Write(intTime & " minutes at 384 Kbps") %>

 
 Instructions  
<%=objRS2("instructions")%>
 Recommended Host System Configuration  
<%=objRS2("configuration")%>
<% objRS2.Close set objRS2 = nothing objConn.Close set objConn = nothing if strType = "app" or strType = "lib" then objConnZCM.Close set objConnZCM = nothing end if %>
<% else %> Please enable session cookies in your browser to continue with file download.

Return to previous page

<% 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")%>
<% Do While Not oRSChild.EOF LongDescSC = oRsChild("longdesc") %> <% oRSChild.MoveNext Loop oRSChild.Close set oRSChild = nothing %>
 Doc ID   Title Updated   File Type  Size (KB) 
 <%=UCASE(oRSChild("docno"))%> <%if not isnull(LongDescSC) and len(LongDescSC)>0then %> <% end if %>">Download "><%=oRSChild.Fields("title")%> <%=oRSChild.Fields("updatedate")%> "><% Call getPic(oRSChild.Fields("fileType"),oRSChild.Fields("new")) %> <%=oRSChild.Fields("filesize")%>
<% 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
<% 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 %> ID="Form2"> <% End If RowCount = RowCount + 1 objLibRs.MoveNext Loop objLibRs.Close %>
 Library Name   Version Details   Associated Documentation  
<%if not isnull(strDescription) and len(strDescription)>0 then %> <% end if %> Download <%=objLibRs("name")%> <%=objLibRs("version")%> ">Read Me ">Application and Technical Notes
<% Set objLibRs = Nothing End If %>

<% ' Display reference designs If Not objRefRs.EOF Then %>
  Reference Designs
<% 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 %> ID="Form3"> <% End If RowCount = RowCount + 1 objRefRs.MoveNext Loop objRefRs.Close %>
 Reference Design   Description Product  
<%=objRefRs("name")%> <%if not isnull(LongDescRef) and len(LongDescRef)>0 then %> <% end if %><%=objRefRs("description")%> "><%=objRefRs("partno")%>
<% Set objRefRs = Nothing End If %> <% end if %>
<% 'Set banner information. strBannerPagePath = Request.Servervariables("path_info") intBannerImageNo = 1 %>
 
<% 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 %>