|
|
<%'................................................................................................%>
<%
set con=server.createobject("adodb.connection")
con.open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\xvrt\urbegi.com\data\links.mdb "
idc=Trim(Request.QueryString("idc"))
nc=Trim(Request.QueryString("nc"))
Set rs=Server.CreateObject("adodb.recordset")
sql="select distinct c.id, c.cat, c.descrip_c from categoria c inner join links l on c.id=l.idcat order by c.cat"
rs.open sql,con,3,3,&H0001
if not rs.eof then
%>
| |
| |
Categorias de Links de interés ...ID
|
|
|
| |
<%
i=1
if (cint(rs.RecordCount mod 2 )=0) or (rs.Recordcount<=3) then
mitad=CInt(rs.RecordCount/2)
else
mitad=CInt(rs.RecordCount/2)+(rs.RecordCount mod 2 )
end if
while not rs.eof and (i<=mitad)
%>
 |
&nc=<%=rs("cat")%>" class="txtcapas"><%=rs("cat")%>
<%
Set rspt=Server.CreateObject("adodb.recordset")
sqlpt="select id from links where idcat="&rs("id")
rspt.open sqlpt,con,3,3,&H0001
if (rspt.Recordcount>0) then
%>
( <%=rspt.Recordcount%> )
<%
else
%>
<%
end if
rspt.close
set rspt=nothing
%>
|
<%if (rs("descrip_c")<>"") then%>
| |
<%=rs("descrip_c")%>
|
<%
end if
rs.Movenext
i=i+1
wend
%>
|
|
<%
while not rs.eof
%>
 |
&nc=<%=rs("cat")%>" class="txtcapas"><%=rs("cat")%>
<%
Set rspt=Server.CreateObject("adodb.recordset")
sqlpt="select id from links where idcat="&rs("id")
rspt.open sqlpt,con,3,3,&H0001
if (rspt.Recordcount>0) then
%>
( <%=rspt.Recordcount%> )
<%
else
%>
<%
end if
rspt.close
set rspt=nothing
%>
|
<%if (rs("descrip_c")<>"") then%>
| |
<%=rs("descrip_c")%> |
<%
end if
rs.Movenext
wend
%>
|
|
<%
if (idc<>"") and (isNumeric(idc)) and (nc<>"") then
%>
| |
Categoria : <%=nc%>
|
<%
Set rsp=Server.CreateObject("adodb.recordset")
sqlp="select id, nom, url, descripcion from links where idcat="&idc
rsp.open sqlp,con,3,3,&H0001
if not rsp.eof then
%>
|
|
<%
else
%>
|
ACTUALIZANDO
CONTENIDOS ...
|
|
<%
end if
rsp.close
set rsp=nothing
%>
|
|
<%
end if
else
%>
ACTUALIZANDO CONTENIDOS ...
<%
end if
rs.close
set rs=nothing
con.close
set con=nothing
%>
<%'..................................................................................................%>
|