<%
set rs =server.createobject("ADODB.Recordset")
SQL="SELECT DISTINCT left(id_revista,7) as vol FROM REV_Revista"
'afegim l'rdre
SQL=SQL& " ORDER BY left(id_revista,7) DESC"
rs.Open SQL, oConn
'Cerquem el ultim volum
Ultim="Any "&left(rs("vol"),4)&" Volum "&mid(rs("vol"),6,2)
ultimvol=rs("vol")
'Recollim el volum que volem buscar
'comencem per desplegable:
if request.Form("vol")="" then
'mirem si s'ha traspasat per url
volsel=request.QueryString("vol")
else
volsel=Request.Form("vol")
end if
if volsel="" then volsel=ultimvol
'Construim el desplegable
c=""& VbCrLf
'response.write volsel
'tanquem la db
Rs.Close()
'busquem el peu de la revista
sql="SELECT * FROM REV_Revista WHERE left(id_revista,10)='"& left(volsel,7) & "-00'"
rs.Open SQL, oConn
if not rs.eof then
peu_rev=rs("titol")
peu_rev=webtexte(peu_rev)
id_peu=rs("id")
end if
'response.Write id_peu
'response.End()
Rs.Close()
'obrim la bd i sel. el volumen
vlong=len(volsel)
sql="SELECT * FROM REV_Revista WHERE left(id_revista," & vlong & ")='"& volsel & "' ORDER by Id_revista"
rs.Open SQL, oConn
'Muntem la pagina
%>
Sumari
Volum complet
(Llibre electrònic)
Volum complet
(Impressió)
<% 'ara mirem si es un subapartat EsUnSubapartat=(len(volsel)>7) 'Si es un subapartat (la longitut del id es >7) Posem la capsalera del aparatat i del sub if EsUnSubapartat then%>
<%end if id_ante="" ap_ante="" idt_ante="" sub_ante="" 'on error resume next while not rs.eof id_actu=left(rs("Id_revista"),vlong+3) idt_actu=rs("Id_revista") ap_actu=trim(rs("apartat")) sub_actu=trim(rs("subapartat")) ' Nomes escriurem si son apratats generic (com un unique) if id_ante=id_actu or mid(rs("Id_revista"),9,2)="00" then rs.movenext else 'Obrirem el div apartat si es diferent if ap_ante<>ap_actu then%>
<%
response.Write VbCrLf
end if
end if
end if
id_ante=id_actu
ap_ante=ap_actu
idt_ante=idt_actu
sub_ante=sub_actu
'response.Write id_ante&"/"&ap_ante
wend
tancar%>
<%=peu_rev%>
(Llibre electrònic)
(Impressió)
<% 'ara mirem si es un subapartat EsUnSubapartat=(len(volsel)>7) 'Si es un subapartat (la longitut del id es >7) Posem la capsalera del aparatat i del sub if EsUnSubapartat then%>
<%=rs("apartat")%>
<%end if id_ante="" ap_ante="" idt_ante="" sub_ante="" 'on error resume next while not rs.eof id_actu=left(rs("Id_revista"),vlong+3) idt_actu=rs("Id_revista") ap_actu=trim(rs("apartat")) sub_actu=trim(rs("subapartat")) ' Nomes escriurem si son apratats generic (com un unique) if id_ante=id_actu or mid(rs("Id_revista"),9,2)="00" then rs.movenext else 'Obrirem el div apartat si es diferent if ap_ante<>ap_actu then%>
<%if not EsUnSubapartat then
response.Write rs("apartat")
else
response.Write rs("subapartat")
end if%>
<%end if 'Si no te subapartat (un final) llavors creem el link i posem el PDF if mid(rs("id_revista"),vlong+5,2)="" then if mid(idt_ante,vlong+5,2)="" then response.Write "" end if %>
")
else
if ap_actu<>trim(rs("apartat")) then
'response.Write rs("apartat")&"/"&ap_actu
'response.Write ap_actu<>rs("apartat")
response.Write VbCrLf
%><%end if 'Si no te subapartat (un final) llavors creem el link i posem el PDF if mid(rs("id_revista"),vlong+5,2)="" then if mid(idt_ante,vlong+5,2)="" then response.Write "" end if %>
" target="_blank">
<%if ap_ante=trim(rs("apartat")) and sub_ante<>trim(rs("subapartat")) then
response.Write rs("subapartat")&". "
end if%>
<%=webtexte(rs("titol"))%>
<%temp=trim(rs("autors")) temp=webtexte(temp) if temp<>"" then response.write ""&temp&"
" temp=trim(rs("centre")) temp=webtexte(temp) if temp<>"" then response.write ""&temp&"
" temp=rs("n_acesos") if isnull(temp) then temp=0 if temp>0 then response.write "("&temp&" Visites)
"%>
<%else%>
<%end if
rs.movenext
'response.Write rs("apartat")
end if
if mid(id_actu,9,2)<>"00" then
if rs.eof then
response.Write("<%temp=trim(rs("autors")) temp=webtexte(temp) if temp<>"" then response.write ""&temp&"
" temp=trim(rs("centre")) temp=webtexte(temp) if temp<>"" then response.write ""&temp&"
" temp=rs("n_acesos") if isnull(temp) then temp=0 if temp>0 then response.write "("&temp&" Visites)
"%>