Agenda 21 escolar de Aranda de Duero
<%
conn="DRIVER={Microsoft Access Driver (*.mdb)};"
conn=conn & "DBQ=" & server.mappath(bd) 'Constante con url relativa a bd
set rs = Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM clase"
rs.open sql,conn
if not rs.eof then cl=rs.getrows
rs.close
if isarray(cl) then ubcl=ubound(cl,2) else ubcl=-1
cid=cint(request("id"))
if cid=0 then
randomize
cid=cl(cl_id,fix(rnd()*ubcl))
end if
for x=0 to ubcl
if cl(cl_id,x)=cid then clx=x:x=ubcl
next
todoco=0
sql="SELECT * FROM colegio"
rs.open sql,conn
if not rs.eof then co=rs.getrows
rs.close
if isarray(co) then ubco=ubound(co,2) else ubco=-1
for x=0 to ubco
todoco=todoco+co(c_co2,x)
if co(c_id,x)=cl(cl_id_c,clx) then cox=x
next
sql="SELECT * FROM clase ORDER BY cl_orden"
rs.open sql,conn
if not rs.eof then c=rs.getrows
rs.close
if isarray(c) then ubc=ubound(c,2) else ubc=-1
sql="SELECT * FROM aviso ORDER BY a_id DESC"
rs.open sql,conn
if not rs.eof then a=rs.getrows
rs.close
if isarray(a) then uba=ubound(a,2) else uba=-1%>
<%=fixtildes(formatFecha(date))%>
BIBLIOTECA
<%totalco=0
for x=0 to ubc
totalco=totalco+c(cl_co2,x)
next
totalco=cifm(totalco,6)
if len(totalco)>6 then totalco=999999
%>
<%for x=0 to 5
tam="g"
if x>2 then tam="p"
if x=3 then%>
<%end if
if len(totalco)>4-x then
%><%
else
%><%
end if
next%>
<%
if request("t")<>"" then
sql="SELECT * FROM doc WHERE d_tipo=" & request("t") & " ORDER BY d_fecha DESC"
rs.open sql,conn
if not rs.eof then d=rs.getrows
rs.close
end if
if isarray(d) then ubd=ubound(d,2) else ubd=-1
ld=0
for x=0 to ubd%>