%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit Response.Buffer=1 %> <% Dim nId,nIdt,sql if IsEmpty(Request("Id")) then nId = "0" else nId = Request.querystring("Id") end if if IsEmpty(Request("Idt")) then nIdt = "0" else nIdt = Request.querystring("Idt") end if dim msql1,msql2 if nId="0" then msql1="" else msql1=" AND anuncios.Idcateg= " & nId end if if nIdt="0" then msql2="" else if nId="0" then msql2=" AND anuncios.Idtipo= " & nIdt else msql2=" AND anuncios.Idtipo= " & nIdt end if end if Dim Conn Set Conn = ConexionAbre sql=replace(sql_anuns,":0?",msql1) sql=replace(sql,":1?",msql2) Dim listado,cuan set listado = Server.CreateObject("ADODB.Recordset") listado.ActiveConnection = Conn listado.Source = sql listado.CursorType = 0 listado.CursorLocation = 2 listado.LockType = 3 listado.Open listado_numRows = 0 sql=replace(sql_anuncuan,":0?",msql1) sql=replace(sql,":1?",msql2) set cuan = Server.CreateObject("ADODB.Recordset") cuan.ActiveConnection = Conn cuan.Source = sql cuan.CursorType = 0 cuan.CursorLocation = 2 cuan.LockType = 3 cuan.Open Dim Repeat1__numRows,listado_numRows Repeat1__numRows = 30 Dim Repeat1__index Repeat1__index = 0 listado_numRows = listado_numRows + Repeat1__numRows Dim rsRubros Set rsRubros = Conn.Execute(sql_tip) Dim rsCategorias Set rsCategorias = Conn.Execute(sql_cat) %>