%@LANGUAGE="VBSCRIPT"%> <% Dim logos Set logos = Server.CreateObject("ADODB.Recordset") logos.ActiveConnection = MM_conn_STRING logos.Source = "SELECT a.* FROM LOGOS as a WHERE a.OCULTAR=0 ORDER BY a.ORDEN ASC" logos.CursorType = 0 logos.CursorLocation = 2 logos.LockType = 1 logos.Open() %> <% Dim tipo_noticias Dim tipo_noticias_numRows Set tipo_noticias = Server.CreateObject("ADODB.Recordset") tipo_noticias.ActiveConnection = MM_conn_STRING tipo_noticias.Source = "SELECT * FROM TIPO_NOTICIA WHERE OCULTAR =0 ORDER BY ORDEN ASC" tipo_noticias.CursorType = 0 tipo_noticias.CursorLocation = 2 tipo_noticias.LockType = 1 tipo_noticias.Open() tipo_noticias_numRows = 0 %> <% Dim todas_noticias__MMColParam todas_noticias__MMColParam = "1" If (Request.QueryString("id") <> "") Then todas_noticias__MMColParam = Request.QueryString("id") End If %> <% Dim todas_noticias Dim todas_noticias_numRows Set todas_noticias = Server.CreateObject("ADODB.Recordset") todas_noticias.ActiveConnection = MM_conn_STRING todas_noticias.Source = "SELECT * FROM NOTICIAS WHERE ID_NOTICIAS = " + Replace(todas_noticias__MMColParam, "'", "''") + "" todas_noticias.CursorType = 0 todas_noticias.CursorLocation = 2 todas_noticias.LockType = 1 todas_noticias.Open() todas_noticias_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 tipo_noticias_numRows = tipo_noticias_numRows + Repeat1__numRows %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim todas_noticias_total Dim todas_noticias_first Dim todas_noticias_last ' set the record count todas_noticias_total = todas_noticias.RecordCount ' set the number of rows displayed on this page If (todas_noticias_numRows < 0) Then todas_noticias_numRows = todas_noticias_total Elseif (todas_noticias_numRows = 0) Then todas_noticias_numRows = 1 End If ' set the first and last displayed record todas_noticias_first = 1 todas_noticias_last = todas_noticias_first + todas_noticias_numRows - 1 ' if we have the correct record count, check the other stats If (todas_noticias_total <> -1) Then If (todas_noticias_first > todas_noticias_total) Then todas_noticias_first = todas_noticias_total End If If (todas_noticias_last > todas_noticias_total) Then todas_noticias_last = todas_noticias_total End If If (todas_noticias_numRows > todas_noticias_total) Then todas_noticias_numRows = todas_noticias_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (todas_noticias_total = -1) Then ' count the total records by iterating through the recordset todas_noticias_total=0 While (Not todas_noticias.EOF) todas_noticias_total = todas_noticias_total + 1 todas_noticias.MoveNext Wend ' reset the cursor to the beginning If (todas_noticias.CursorType > 0) Then todas_noticias.MoveFirst Else todas_noticias.Requery End If ' set the number of rows displayed on this page If (todas_noticias_numRows < 0 Or todas_noticias_numRows > todas_noticias_total) Then todas_noticias_numRows = todas_noticias_total End If ' set the first and last displayed record todas_noticias_first = 1 todas_noticias_last = todas_noticias_first + todas_noticias_numRows - 1 If (todas_noticias_first > todas_noticias_total) Then todas_noticias_first = todas_noticias_total End If If (todas_noticias_last > todas_noticias_total) Then todas_noticias_last = todas_noticias_total End If End If %>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||