<%@ LANGUAGE="VBSCRIPT" %> <% '***************************************************************************************** ' QNguyen 5/02/05 Modified to allow search by applications. ' QNguyen 8/18/05 Removed distinct from applications doc SQL statement ' QNguyen 8/23/05 Change hard coded "Source Code" header string to doctype value ' in child row. ' QNguyen 8/24/05 Modified to use applications doc SQL statement only. ' QNguyen 9/20/05 Removed Hardcopy link. ' QNguyen 5/22/06 Library association display modifications. ' QNguyen 8/7/06 Hit tracking modifications. '***************************************************************************************** '5/02/05 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, 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 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 %> Documentation Search Results <% Response.Write("" & vbCrLf) %> <%=oMap%> <%=dMap%> <%=tMap%> <%=dnMap%>
  home > documentation search > documentation search results
Documentation   Search Results

  

<% 'If blnAPPDOC <> "true" then If false then If Not oRs.EOF Then ' Display product search results. %> <% blnResults = true setFlag = 0 BLFirst = "" PFFirst = "" DTFirst = "" DFirst = "" oRs.MoveFirst RowCount = 0 'Do While Not oRs.EOF docno = oRs.Fields("docno") famID = oRs.Fields("familyid") title = oRs.Fields("title") longdesc = oRs.Fields("longdesc") BLCurrent = oRs.Fields("BusinessUnitName") If BLFirst <> BLCurrent Then If PFFirst <> "" AND BLFIRST <> BLCurrent AND setFlag <> 1 Then %>
 
<% setFlag = 1 End If BLFirst = BLCurrent %>
<%=longdesc%>
 
<% End IF PFCurrent = oRs.Fields("FamilyShortName") If PFFirst <> PFCurrent Then If PFFirst <> "" AND BLFIRST = BLCurrent AND setFlag <> 1 Then %>  
<% End If setFlag = 0 PFFirst = PFCurrent %>
  <%= oRs.Fields("DocType")%>
<% If DTFirst = oRs.Fields("DocType") AND RowCount <> 0 Then %> <% End If End If DTCurrent = oRs.Fields("DocType") If DTFirst <> DTCurrent Then DTFirst = DTCurrent %> <% End If DCurrent = oRs.Fields("DocID") If DFirst = DCurrent Then 'DFirst = DCurrent %> <% If RowCount MOD 2 = 0 Then 'Even Row thisColor = "#FFFFFF" Else 'Odd Row thisColor = "#EDEDED" End If %> <% End If ' New Stuff If DFirst <> DCurrent Then DFirst = DCurrent %> <% If RowCount MOD 2 = 0 Then 'Even Row thisColor = "#FFFFFF" Else 'Odd Row thisColor = "#EDEDED" End If %> <% End If ' New Stuff RowCount = RowCount + 1 'oRs.MoveNext 'Loop %>
 Doc ID   Title Updated   File Type  Size (KB) 
 Doc ID   Title Updated   File Type  Size (KB) 
 <%=UCASE(docno)%> );">Download );"><%=title%> <%=oRs.Fields("updatedate")%> );"><% Call getPic(oRs.Fields("fileType"),oRs.Fields("new")) %> <%=oRs.Fields("filesize")%>
 <%=UCASE(docno)%> );">Download );"><%=title%> <%=oRs.Fields("updatedate")%> );"><% Call getPic(oRs.Fields("fileType"),oRs.Fields("new")) %> <%=oRs.Fields("filesize")%>

<% Set oRSChild = oRS("oRSDocs").Value If Not oRSChild.EOF Then %>
  <%=oRSChild("doctype")%>
<% 'Set oRSChild = oRS("oRSDocs").Value 'childFirst = "" Do While Not oRSChild.EOF LongDescSC = oRsChild("longdesc") If PFCurrent = oRsChild("FamilyShortName") Then %> <% End If oRSChild.MoveNext Loop oRSChild.Close %>
 Doc ID   Title Updated   File Type  Size (KB) 
 <%=UCASE(oRSChild("docno"))%> <%if not isnull(LongDescSC) and len(LongDescSC)>0 then %> <% end if %>);">Download );"><%=oRSChild.Fields("title")%> <%=oRSChild.Fields("updatedate")%> );"><% Call getPic(oRSChild.Fields("fileType"),oRSChild.Fields("new")) %> <%=oRSChild.Fields("filesize")%>
<% End If oRs.Close Set oRs = Nothing oConn.Close end if end if '5/02/05 - Display application search results. 'If blnAPPDOC="true" then 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") %>
<%=longdesc%>
 
  <%= objAppDocRs.Fields("DocType")%>
<% If RowCount MOD 2 = 0 Then 'Even Row thisColor = "#FFFFFF" Else 'Odd Row thisColor = "#EDEDED" End If %> <% RowCount = RowCount + 1 %>
 Doc ID   Title Updated   File Type  Size (KB) 
 <%=UCASE(docno)%> );">Download );"><%=title%> <%=objAppDocRs.Fields("updatedate")%> );"><% Call getPic(objAppDocRs.Fields("fileType"),objAppDocRs.Fields("new")) %> <%=objAppDocRs.Fields("filesize")%>

<% 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="Form1"> <% 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 %> <% if blnResults=false then '5/02/05 - If no results were returned %>

The Search Returned No Results. Please try again.

<% end if %>