<%@ LANGUAGE="VBSCRIPT" %> <% '***************************************************************************************** ' QNguyen 5/02/05 Modified to allow search by applications. ' QNguyen 9/20/05 Removed Hardcopy link. ' QNguyen 10/21/05 Modified to disable tool selection. ' QNguyen 1/12/07 Modified for NT05 migration - SQL injection issue. '***************************************************************************************** dim strType, objAppRs strType = Request.QueryString("type") set objAppRs = Server.CreateObject("ADODB.Recordset") sqlStr = "select BusinessLineId, BusinessUnitName from businesslines where status=1 order by priority" Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open strConnWebDB Set oRs = Server.CreateObject("ADODB.Recordset") oRs.Open sqlStr, oConn, , , adCmdText Set oConn2 = Server.CreateObject("ADODB.Connection") oConn2.Open strConnWebDB Set oRs2 = Server.CreateObject("ADODB.Recordset") dim BLID %> Documentation Search
  home > documentation search
Documentation   Search <% if strType="" or strType = "prod" then %> All Product Documentation <% elseif strType = "app" then %> All Application Documentation <% end if %>
<% if strType="" or strType="prod" then ' Display product doc search oRs.MoveFirst Do While Not oRs.EOF %> <% BLID = oRs.Fields("BusinessLineId") ' 1/12/07 if not isnumeric(BLID) then Response.Write("Invalid parameters.") Response.End end if oRs2.Open "select distinct familyid, businesslineid, FAMILY_Description from v_parts_families where businesslineid = '" & BLID & "' order by FAMILY_Description", oConn2, adOpenStatic, , adCmdText oRs2.MoveFirst rcount = 0 Do While Not oRs2.EOF %> <% Do While Not rcount > 1 AND NOT oRs2.EOF %> <% rcount = rcount + 1 oRs2.MoveNext Loop If oRs2.EOF and rcount < 2 Then %> <%End If rcount = 0 %> <% Loop %> <% oRs.MoveNext oRs2.Close Loop %>
Please select the <% if strType="" or strType = "prod" then %> product <% elseif strType = "app" then %> application <% end if %> family you are interested in:
 
" ID="parent<%=oRs.Fields("BusinessLineID")%>" onClick="checkSpecific('<%=oRs("BusinessLineID")%>')"> All <%= oRs.Fields("BusinessUnitName") %>
     " ID="<%=oRs.Fields("BusinessLineID")%>"> <%= oRs2.Fields("FAMILY_Description") %> 

Select All Product Families
  <% Set docRs = Server.CreateObject("ADODB.Recordset") otStr = "select docTypeId, DocType, Searchable from DocType where searchable <> 1 order by docType" docRs.Open otStr, oConn, adOpenStatic docRs.MoveFirst count = 0 otStr = "" Do While Not docRs.EOF otStr = otStr & docRs("docTypeId") count = count + 1 If count <> docRs.RecordCount Then otStr = otStr & "," End If docRs.MoveNext Loop docRs.Close docStr = "select docTypeId, DocType, Searchable from DocType where searchable = 1 order by docType" docRs.Open docStr, oConn, , , adCmdText docRs.MoveFirst Do While Not docRs.EOF %> <% docRs.MoveNext Loop %> <% elseif strType="app" then ' Display application search %> <% objAppRs.Open "select distinct app_id, name, description from t_application order by description", oConn2, adOpenStatic, , adCmdText objAppRs.MoveFirst rcount = 0 Do While Not objAppRs.EOF %> <% Do While Not rcount > 1 AND NOT objAppRs.EOF %> <% rcount = rcount + 1 objAppRs.MoveNext Loop If objAppRs.EOF and rcount < 2 Then %> <%End If rcount = 0 %> <% Loop objAppRs.Close %> <% Set docRs = Server.CreateObject("ADODB.Recordset") otStr = "select docTypeId, DocType, Searchable from DocType where searchable <> 1 order by docType" docRs.Open otStr, oConn, adOpenStatic docRs.MoveFirst count = 0 otStr = "" Do While Not docRs.EOF otStr = otStr & docRs("docTypeId") count = count + 1 If count <> docRs.RecordCount Then otStr = otStr & "," End If docRs.MoveNext Loop docRs.Close docStr = "select docTypeId, DocType, Searchable from DocType where searchable = 1 order by docType" docRs.Open docStr, oConn, , , adCmdText docRs.MoveFirst Do While Not docRs.EOF %> <% docRs.MoveNext Loop %> <% end if %>
Please select the documentation type(s) you are interested in:
 
Select All Documentation Types
    "> <%=docRs("DocType")%>
     Other
 
   
All Applications
     " ID="app"> <%= objAppRs("Name") %> 
 
 
Please select the documentation type(s) you are interested in:
 
Select All Documentation Types
    " ID="Checkbox3"> <%=docRs("DocType")%>
     Other
 
   
 
 
app<%else%>doc<%end if%>" name="txtType" ID="Hidden1">