
<%ShadowImg " "%>
<%
I = 0
set FSO = server.CreateObject("Scripting.FileSystemObject")
set FO = FSO.GetFolder(Server.MapPath(".") & "\revues")
for each F in FO.SubFolders
set FOsub = FSO.GetFolder(Server.MapPath(".") & "\revues\" & F.name)
for each Fsub in FOsub.SubFolders
if FSO.FileExists(Server.MapPath(".") & "\revues\" & F.Name & "\" & Fsub.Name & "\" & "cover.jpg") then
redim preserve vRev(I)
vRev(I) = (100 * cint(F.Name)) + cint(Fsub.name)
I = I + 1
end if
next
next
SortArrDESC vRev
for I = 0 to ubound(vRev)
if vRev(I) = (vVol * 100) + vNum then
exit for
end if
next
dim vPrev, vNext
vPrev = 0
vNext = 0
'prev
if I > 0 then
vPrev = vRev(I - 1)
end if
if I < Ubound(vRev) then
vNext = vRev(I + 1)
end if
%>
<%
case "archives":
'**** ce bout de table doit être présent dans tout les headers%>

<%
set FSO = server.CreateObject("Scripting.FileSystemObject")
set FO = FSO.GetFolder(Server.MapPath(".") & "\revues")
I = 0
for each F in FO.SubFolders
set FOsub = FSO.GetFolder(Server.MapPath(".") & "\revues\" & F.name)
for each Fsub in FOsub.SubFolders
if FSO.FileExists(Server.MapPath(".") & "\revues\" & F.Name & "\" & Fsub.Name & "\" & "cover-petit.jpg") then
redim preserve vRev(I)
vRev(I) = (100 * cint(F.Name)) + cint(Fsub.name)
I = I + 1
end if
next
next
SortArrDESC vRev
for I = 0 to Ubound(vRev)
'show it
if I mod 3 = 0 then
%> <%
end if
%>
<% ShadowImg " ![]() " %>
<%
%> | <%
if (I + 1) mod 3 = 0 or I = ubound(vRev) then
%>
| <%
end if
next
set FOsub = nothing
%>
<%
Case "article":
strSQL = "SELECT Titre, Article, Revue, Pages, Description, Nom_Jou, Link FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_jou WHERE ID = " & request.QueryString("id")
RS.Open strSQL, CN
if not RS.EOF then
%>
<%'**** ce bout de table doit être présent dans tout les headers%>

<% ShadowImg " ![]() " %>
|
|
<%=Ucase(RS.Fields("Titre"))%>
|
Volume <%=RS.Fields("Revue") \ 100%> Numéro <%=RS.Fields("Revue") mod 100%>, <%=1999 + (RS.Fields("Revue") \ 100)%>
Page : <%=RS.Fields("Pages")%>
|
| |
| Description : |
<%
dim vDescArt
vDescArt = RS.Fields("Description")
%>
|
<%=FormMess(vDescArt)%>
Auteur :
<%=RS.Fields("Nom_Jou")%>
|
<% if RS.Fields("Link") <> "" and not isNull(RS.Fields("Link")) then %>
/<%=RS.Fields("Revue") mod 100%>/<%=RS.Fields("Link")%>.htm">
<% end if %>
|
|
|
<%
dim IDNav
vPage = RS.Fields("Pages")
if instr(1, vPage, "-") > 0 then
vPage = cSng(Left(vPage, instr(1, vPage, "-") - 1))
end if
IDnav = GetResult("SELECT TOP 1 ID " & _
"FROM Articles " & _
"WHERE (Revue = " & RS.Fields("Revue") & _
" AND csng(LEFT(Pages, IIF(instr(1, Pages, '-') > 0, instr(1, Pages, '-') - 1, LEN(Pages)))) < " & vPage & ") " & _
" OR Revue < " & RS.Fields("Revue") & _
" ORDER BY Revue DESC, csng(LEFT(Pages, IIF(instr(1, Pages, '-') > 0, instr(1, Pages, '-') - 1, LEN(Pages)))) DESC ")
if IDnav > 0 then
%> <%
end if %>
|
">
">
|
<%
IDnav = GetResult("SELECT TOP 1 ID " & _
"FROM Articles " & _
"WHERE (Revue = " & RS.Fields("Revue") & _
" AND csng(LEFT(Pages, IIF(instr(1, Pages, '-') > 0, instr(1, Pages, '-') - 1, LEN(Pages)))) > " & vPage & ") " & _
" OR Revue > " & RS.Fields("Revue") & _
" ORDER BY Revue ASC, csng(LEFT(Pages, IIF(instr(1, Pages, '-') > 0, instr(1, Pages, '-') - 1, LEN(Pages)))) ASC ")
if IDnav > 0 then
%> <%
end if %>
|
<%
else
%>
 <%
end if
RS.Close
Case "liste":
'**** ce bout de table doit être présent dans tout les headers%>
<%
dim vOrder, vRows, vSec, NumPages, ActPage
vOrder = Request.QueryString("o")
if vOrder = "" then vOrder = "titre"
vRows = Request.QueryString("r")
if vRows = "" then vRows = 25
vRows = cint(vRows)
ActPage = Request.QueryString("p")
if ActPage = "" then ActPage = 1
ActPage = cint(ActPage)
vSec = Request.QueryString("s")
%>

Vous désirez effectuer une recherche?
<% 'affichage des titres
dim NumRows, NumBound, vQuery
vQuery = true
select case vOrder
case "titre":
'section a-z
if vSec = "" then vSec = "A"
NumRows = GetResult("SELECT COUNT(ID) FROM Articles WHERE Ucase(Left(Titre, 1)) = '" & vSec & "'")
NumPages = cINt(NumRows \ vRows) + 1
NumBound = (NumRows - (vRows * (ActPage - 1)))
if NumBound < 0 then NumBound = NumRows
%><%BuildBarAlpha%>
<%
BuildNavBar
%> <%
if NumRows > 0 then
strSQl = "SELECT TOP " & vRows & " ID, Titre, Revue, Nom_jou, Link " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE UCase(Left(Titre, 1)) = '" & vSec & "' " & _
"AND ID IN (SELECT TOP " & NumBound & " ID " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE UCase(Left(Titre, 1)) = '" & vSec & "' " & _
"ORDER BY Titre DESC) " & _
"ORDER BY Titre ASC"
else
vQuery = false
end if
case "revue":
'section a-z
if vSec = "" then vSec = 1
vSec = cint(vSec)
if vSec < 100 then
NumRows = GetResult("SELECT COUNT(ID) FROM Articles WHERE left(Revue, len(Revue) - 2) = '" & vSec & "'")
else
NumRows = GetResult("SELECT COUNT(ID) FROM Articles WHERE Revue = " & vSec)
end if
NumPages = cINt(NumRows \ vRows) + 1
NumBound = (NumRows - (vRows * (ActPage - 1)))
if NumBound < 0 then NumBound = NumRows
%><%BuildBarVolNum%>  <%
BuildNavBar
%> <%
if NumRows > 0 then
if vSec < 100 then
strSQl = "SELECT TOP " & vRows & " ID, Titre, Revue, Nom_jou, Link " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE left(Revue, len(Revue) - 2) = '" & vSec & "' " & _
"AND ID IN (SELECT TOP " & NumBound & " ID " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE left(Revue, len(Revue) - 2) = '" & vSec & "' " & _
"ORDER BY Titre DESC) " & _
"ORDER BY Titre ASC"
else
strSQl = "SELECT TOP " & vRows & " ID, Titre, Revue, Nom_jou, Link " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE Revue = " & vSec & _
" AND ID IN (SELECT TOP " & NumBound & " ID " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE Revue = " & vSec & _
" ORDER BY Titre DESC) " & _
"ORDER BY Titre ASC"
end if
else
vQuery = false
end if
case "nom_jou":
'section a-z
if vSec = "" then vSec = GetResult("SELECT MIN(ID_jou) FROM Journalistes")
vSec = cint(vSec)
NumRows = GetResult("SELECT COUNT(ID) FROM Articles WHERE Journaliste = " & vSec)
NumPages = cINt(NumRows \ vRows) + 1
NumBound = (NumRows - (vRows * (ActPage - 1)))
if NumBound < 0 then NumBound = NumRows
%><%BuildBarNames%>
<%
BuildNavBar
%> <%
if NumRows > 0 then
strSQL = "SELECT TOP " & vRows & " ID, Titre, Revue, Nom_jou, Link " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE Journaliste = " & vSec & " " & _
"AND ID IN (SELECT TOP " & NumBound & " ID " & _
"FROM Articles LEFT JOIN Journalistes ON Articles.Journaliste = Journalistes.ID_Jou " & _
"WHERE Journaliste = " & vSec & " " & _
"ORDER BY Titre DESC) " & _
"ORDER BY Titre ASC"
else
vQuery = false
end if
end select
'Response.Write NumRows & " "
'Response.Write NumPages & " "
'Response.Write NumBound & " "
'Response.Write strSQL
if vQuery then
RS.Open strSQL, CN
%><%
if not RS.EOF then
do while not RS.EOF
%>
- <%=RS.Fields("Nom_jou")%>, Volume <%=RS.Fields("Revue") \ 100%> Numéro <%=RS.Fields("Revue") mod 100%>
<%
RS.MoveNext
loop
BuildNavBar
%> <%
else
%> Aucun article à afficher<%
end if
%> <%
RS.Close
end if
end select
%>
| | | | |