<%@ LANGUAGE="VBSCRIPT" %> <% Response.Expires = -99999 %> Download <% '******************************************************************************* ' QNguyen 5/02/2006 Download page. ' '******************************************************************************* 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 blnCookie = true strEmailOnyx = Request.Querystring("email") strForm = Request.Querystring("from") strAction = Request.form("txtaction") if strEmailOnyx = "" then ' If haven't retrieved e-mail from Onyx... ' Retrieve form data from originating download page. 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") ' Store data in cookies Response.Cookies("strPath") = strPath Response.Cookies("strName") = strName Response.Cookies("strVersion") = strVersion Response.Cookies("strLinkDesc") = strLinkDesc Response.Cookies("strTargetURL") = strTargetURL Response.Cookies("strProductFamily") = strProductFamily Response.Cookies("strPrevPage") = strPrevPage Response.Cookies("strType") = strType ' Retrieve e-mail fron Onyx Response.Redirect ("http://support.zilog.com/support/customer/customer.asp?from=download") end if strEmailDisplay = "" strEmail = Request.form("txtemail") if strAction <> "download" then if strEmailOnyx <> "na" then strEmailDisplay = strEmailOnyx if Request.Cookies("strEmail")<>"" then strEmailDisplay = Request.Cookies("strEmail") end if if strEmail <> "" then strEmailDisplay = strEmail ' Retrieve data from cookies after retrieving Onyx e-mail address. if strForm = "onyx" then strPath = Request.cookies("strpath") strName = Request.cookies("strname") strVersion = Request.cookies("strversion") strLinkDesc = Request.cookies("strlinkdesc") strTargetURL = Request.cookies("strtargeturl") strProductFamily = Request.cookies("strproductfamily") strPrevPage = Request.cookies("strprevpage") strType = Request.cookies("strtype") if strType = "" then blnCookie = false 'User does not have session cookies enabled. end if 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") 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") strServerName = Request.ServerVariables("Server_Name") if instr(1,strServerName,"webdev") > 0 then strServerName = "webdev" end if ' 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 elseif strType = "doc" then ' Retrieve document detail information from webdb. strSQL3 = "Select * from docs where docno = '" & strName & "'" objRS2.open strSQL3, objConn, adOpenStatic elseif strType = "samlib" then ' Retrieve sample library detail information from webdb. strSQL3 = "Select * from t_library where name='" & strLinkDesc & "' " & "and version='" & strVersion & "'" objRS2.open strSQL3, objConn, adOpenStatic end if if strAction = "download" then 'Capture download information. Response.Cookies("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 %>
  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 %>
 Return to previous page
 
  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") & " 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 %>

  

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 Response.Write objRS2("title") 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 = objRS2("library_file_size") else lngFileSize = objRS2("file_size") 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 Response.Write(lngFileSize & " Mb
") Response.Write(round(((lngFileSize * 8388608)/55296)/60,2) & " minutes at 54 Kbps
") Response.Write(round(((lngFileSize * 8388608)/393216)/60,2) & " 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 %>
<% 'Set banner information. strBannerPagePath = Request.Servervariables("path_info") intBannerImageNo = 1 %>