<% displayRecs = 10 recRange = 10 %> <% dbwhere = "iniciales=true" masterdetailwhere = "" searchwhere = "" a_search = "" b_search = "" whereClause = "" %> <% ' Get clear search cmd If Request.QueryString("cmd").Count > 0 Then cmd = Request.QueryString("cmd") If UCase(cmd) = "RESET" Then ' Reset search criteria searchwhere = "" Session("noticias_searchwhere") = searchwhere ElseIf UCase(cmd) = "RESETALL" Then ' Reset search criteria searchwhere = "" Session("noticias_searchwhere") = searchwhere End If ' Reset start record counter (reset command) startRec = 1 Session("noticias_REC") = startRec End If ' Build dbwhere If masterdetailwhere <> "" Then dbwhere = dbwhere & "(" & masterdetailwhere & ") AND " End If If searchwhere <> "" Then dbwhere = dbwhere & "(" & searchwhere & ") AND " End If If Len(dbwhere) > 5 Then dbwhere = Mid(dbwhere, 1, Len(dbwhere)-5) ' Trim rightmost AND End If %> <% ' Load Default Order DefaultOrder = "fecha" DefaultOrderType = "DESC" ' No Default Filter DefaultFilter = "" ' Check for an Order parameter OrderBy = "" If OrderBy = "" Then OrderBy = DefaultOrder Session("noticias_OB") = OrderBy Session("noticias_OT") = DefaultOrderType End If ' Open connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str ' Build SQL strsql = "SELECT * FROM [noticias]" If dbwhere <> "" Then whereClause = whereClause & "(" & dbwhere & ") AND " End If If Right(whereClause, 5)=" AND " Then whereClause = Left(whereClause, Len(whereClause)-5) If whereClause <> "" Then strsql = strsql & " WHERE " & whereClause End If If OrderBy <> "" Then strsql = strsql & " ORDER BY [" & OrderBy & "] " & Session("noticias_OT") End If 'Response.Write strsql Set rs = Server.CreateObject("ADODB.Recordset") rs.cursorlocation = 3 rs.Open strsql, conn, 1, 2 totalRecs = rs.RecordCount ' Check for a START parameter If Request.QueryString("start").Count > 0 Then startRec = Request.QueryString("start") Session("noticias_REC") = startRec ElseIf Request.QueryString("pageno").Count > 0 Then pageno = Request.QueryString("pageno") If IsNumeric(pageno) Then startRec = (pageno-1)*displayRecs+1 If startRec <= 0 Then startRec = 1 ElseIf startRec >= ((totalRecs-1)\displayRecs)*displayRecs+1 Then startRec = ((totalRecs-1)\displayRecs)*displayRecs+1 End If Session("noticias_REC") = startRec Else startRec = Session("noticias_REC") If Not IsNumeric(startRec) Or startRec = "" Then startRec = 1 ' Reset start record counter Session("noticias_REC") = startRec End If End If Else startRec = Session("noticias_REC") If Not IsNumeric(startRec) Or startRec = "" Then startRec = 1 'Reset start record counter Session("noticias_REC") = startRec End If End If %> :: ASTUR PAINTBALL ::
Iniciocontacte con nosotrosForo
<% ' Avoid starting record > total records If CLng(startRec) > CLng(totalRecs) Then startRec = totalRecs End If ' Set the last record to display stopRec = startRec + displayRecs - 1 ' Move to first record directly for performance reason recCount = startRec - 1 If Not rs.Eof Then rs.MoveFirst rs.Move startRec - 1 End If recActual = 0%> NOTICIAS
<% Do While (Not rs.Eof) And (recCount < stopRec) recCount = recCount + 1 If CLng(recCount) >= CLng(startRec) Then recActual = recActual + 1 %> <% ' Set row color bgcolor="#FFFFFF" %> <% ' Display alternate color for rows If recCount Mod 2 <> 0 Then bgcolor="#F5F5F5" End If %> <% ' Load Key for record key = rs("id") x_id = rs("id") x_fecha = rs("fecha") x_titulo = rs("titulo") x_contenido = rs("contenido") x_iniciales = rs("iniciales") %>
<% response.write x_fecha %> 
" class="texto_marron_bold"><% response.write x_titulo %>
<% End If rs.MoveNext Loop %> <% ' Close recordset and connection rs.Close Set rs = Nothing conn.Close Set conn = Nothing %>
» Mostrar todas las noticias

 
Tel./Fax : 985 240 527 • Móvil: 639 577 327 - 670 432 377 • www.asturpaintball.com