<% Set oConn = New NTI 'clase NTI manejo del sistema oConn.Conecta set rs=Server.CreateObject("Adodb.Recordset") set rs2=Server.CreateObject("Adodb.Recordset") set rs3=Server.CreateObject("Adodb.Recordset") '''''''''''''' set objTemplate = new template_cls chek="" dim objTemplate const TMPLDIR = "templates/" const IMGDIR = "templates/" TABLA_LIMITE=10 if (isNumeric(Request.QueryString("inicio"))) then inicio=CInt(Request.QueryString("inicio"))+0 else inicio=0 end if with objTemplate .TemplateFile = TMPLDIR & "notNacional.html" '''########################################### ''SELECION DENOTICIA SQL="select * from noticia WHERE id_clase_noticia=1 and publicar=1 order by fecha_publicacion desc" tabla="" rs2.Open SQL, oConn.Conn Dim miTabla If Not rs2.EOF Then miTabla = rs2.GetRows rs2.close n_total_reg=UBound(miTabla,2)+1 .AddToken "N_TOTAL_REG",1,n_total_reg if ((inicio/TABLA_LIMITE)>5) then if ((n_total_reg/TABLA_LIMITE)-(inicio/TABLA_LIMITE))<5 then num=0+((n_total_reg\TABLA_LIMITE)-11) if num<0 then num=0 end if fin=(inicio/TABLA_LIMITE)+((n_total_reg\TABLA_LIMITE)-(inicio/TABLA_LIMITE)) else num=0+(inicio/TABLA_LIMITE)-5 fin=TABLA_LIMITE+(inicio/TABLA_LIMITE)-5 end if else num=0 fin=(n_total_reg\TABLA_LIMITE) end if while num<=fin pag=num+1 ini2=num*TABLA_LIMITE if num=(inicio/TABLA_LIMITE) then numeros=numeros&" "&pag&" " else numeros=numeros&" "&pag&" " end if num=num+1 wend .AddToken "NUMEROS",1, numeros if inicio>0 then ini=inicio - TABLA_LIMITE .AddToken "ATRAS",1,"<<Atras" end if if inicio + TABLA_LIMITE Siguiente>>" end if .AddToken "INICIO",1,inicio + 1 limite=inicio + TABLA_LIMITE if limite" tabla=tabla&"" tabla=tabla&"" tabla=tabla&""&s &", "&FormatDateTime(f1, 1)&"
" tabla=tabla&""&t&"
" tabla=tabla&""&d&"" tabla=tabla&"" tabla=tabla&"
" tabla=tabla&"" tabla=tabla&"
" rs.movenext i=1+i if i>10 then If Not rs.EOF Then rs.move n_total_reg-1 'Response.Write("
--->s"& rs.EOF) end if end if Loop end if ''fin rs.close .AddToken "TABLA",1, tabla .parseTemplateFile end with set objTemplate = nothing %>