Personal GOME
| Encontrados: <%=(rrhh_total)%> | |||
| "><%=(rrhh.Fields.Item("PERSONAL_Apellido").Value)%> | <%=(rrhh.Fields.Item("PERSONAL_Nombre").Value)%> | <%=(rrhh.Fields.Item("PERSONAL_Tareas").Value)%> | |
%@LANGUAGE="VBSCRIPT"%> <% Dim rrhh__VARAPELLIDO rrhh__VARAPELLIDO = "%" If (Request("name") <> "") Then rrhh__VARAPELLIDO = Request("name") End If %> <% Dim rrhh__VARSITUA rrhh__VARSITUA = "%" If (Request("Situacion") <> "") Then rrhh__VARSITUA = Request("Situacion") End If %> <% Dim rrhh Dim rrhh_cmd Dim rrhh_numRows Set rrhh_cmd = Server.CreateObject ("ADODB.Command") rrhh_cmd.ActiveConnection = MM_Bases_STRING rrhh_cmd.CommandText = "SELECT * FROM PERSONAL WHERE PERSONAL_Apellido LIKE ? and PERSONAL_Situacion LIKE ? ORDER BY PERSONAL_Apellido" rrhh_cmd.Prepared = true rrhh_cmd.Parameters.Append rrhh_cmd.CreateParameter("param1", 200, 1, 255, "%" + rrhh__VARAPELLIDO + "%") ' adVarChar rrhh_cmd.Parameters.Append rrhh_cmd.CreateParameter("param2", 200, 1, 255, rrhh__VARSITUA) ' adVarChar Set rrhh = rrhh_cmd.Execute rrhh_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 rrhh_numRows = rrhh_numRows + Repeat1__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim rrhh_total Dim rrhh_first Dim rrhh_last ' set the record count rrhh_total = rrhh.RecordCount ' set the number of rows displayed on this page If (rrhh_numRows < 0) Then rrhh_numRows = rrhh_total Elseif (rrhh_numRows = 0) Then rrhh_numRows = 1 End If ' set the first and last displayed record rrhh_first = 1 rrhh_last = rrhh_first + rrhh_numRows - 1 ' if we have the correct record count, check the other stats If (rrhh_total <> -1) Then If (rrhh_first > rrhh_total) Then rrhh_first = rrhh_total End If If (rrhh_last > rrhh_total) Then rrhh_last = rrhh_total End If If (rrhh_numRows > rrhh_total) Then rrhh_numRows = rrhh_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (rrhh_total = -1) Then ' count the total records by iterating through the recordset rrhh_total=0 While (Not rrhh.EOF) rrhh_total = rrhh_total + 1 rrhh.MoveNext Wend ' reset the cursor to the beginning If (rrhh.CursorType > 0) Then rrhh.MoveFirst Else rrhh.Requery End If ' set the number of rows displayed on this page If (rrhh_numRows < 0 Or rrhh_numRows > rrhh_total) Then rrhh_numRows = rrhh_total End If ' set the first and last displayed record rrhh_first = 1 rrhh_last = rrhh_first + rrhh_numRows - 1 If (rrhh_first > rrhh_total) Then rrhh_first = rrhh_total End If If (rrhh_last > rrhh_total) Then rrhh_last = rrhh_total End If End If %> <% Dim MM_paramName %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters Dim MM_keepNone Dim MM_keepURL Dim MM_keepForm Dim MM_keepBoth Dim MM_removeList Dim MM_item Dim MM_nextItem ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" End If MM_keepURL="" MM_keepForm="" MM_keepBoth="" MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each MM_item In Request.QueryString MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item)) End If Next ' add the Form variables to the MM_keepForm string For Each MM_item In Request.Form MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm If (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) End If If (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) End If If (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) End If ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %>
Personal GOME
| Encontrados: <%=(rrhh_total)%> | |||
| "><%=(rrhh.Fields.Item("PERSONAL_Apellido").Value)%> | <%=(rrhh.Fields.Item("PERSONAL_Nombre").Value)%> | <%=(rrhh.Fields.Item("PERSONAL_Tareas").Value)%> | |