<% 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 rs=Server.CreateObject("Adodb.Recordset") Function buscar_sql() sql = "SELECT * FROM mail WHERE id_plantilla=1 AND activo='Y'" if campo<>"" then sql= sql & " AND "&campo&" like '" & FormatSqlWeb(buscar) &"%'" end if if clase<>0 then sql= sql & " AND C.id_clase_caso= '" & FormatSqlWeb(clase) &"'" end if 'if orden<>"" then sql=sql&" ORDER BY C.fecha desc" 'end if 'Response.Write(sql) buscar_sql =sql End Function 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 & "comunicadosPrensa.html" SQL=buscar_sql() set rs2=Server.CreateObject("ADODB.Recordset") rs2.Open SQL, oConn.Conn 'n_total_reg=rs2.getrows 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&"
" tabla=tabla&"

"&FormatDateTime(f1, 1)&"
" tabla=tabla&""&t&"
" tabla=tabla&""&a&"

" 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 Else tabla=tabla&"" tabla=tabla & "" tabla=tabla & "" tabla=tabla & "" tabla=tabla&"
No existen registros
" End If .AddToken "TABLA",1, tabla rs.close() .AddToken "TXT_BUSQUEDA",1, txt_busqueda .parseTemplateFile end with set objTemplate = nothing %>