<%
set RsSpecialites=Server.CreateObject("ADODB.Recordset")
If Request.Querystring("initiale")<>"" Then '=====UNE INITIALE EST CHOISIE POUR FILTRER LE RECORDSET=========
strRequete="SELECT * FROM Tbl_Specialites WHERE UCASE(LEFT(Specialite,1))='" & UCASE(Request.Querystring("initiale")) & "' ORDER BY Specialite ASC"
Else
strRequete="SELECT * FROM Tbl_Specialites WHERE UCASE(LEFT(Specialite,1))='A' ORDER BY Specialite ASC"
End If
RsSpecialites.open strRequete,Connexion
%>
<%
SELECT CASE Request.Querystring("Action")
Case "Afficher"
Select Case Request.Querystring("Direction")
Case "","Premier"
strRequete="SELECT * FROM Tbl_Congres WHERE Specialite='" & Request.Querystring("Specialite") & "' ORDER BY id_num ASC"
Case "Suivant"
strRequete="SELECT * FROM Tbl_Congres WHERE Specialite='" & Request.Querystring("Specialite") & "' AND id_num >" & Request.Querystring("numCongres")
Case "Précédent"
strRequete="SELECT * FROM Tbl_Congres WHERE Specialite='" & Request.Querystring("Specialite") & "' AND id_num <" & Request.Querystring("numCongres") & " ORDER BY id_num DESC"
Case "Dernier"
strRequete="SELECT * FROM Tbl_Congres WHERE Specialite='" & Request.Querystring("Specialite") & "' ORDER BY id_num DESC"
End Select
Str_Specialite = Request.QueryString("Specialite")
strRequete="SELECT * FROM Tbl_Congres WHERE Valid=1 AND Specialite_fr='" & Str_Specialite & "'"
Set RsCongres=Server.CreateObject("ADODB.Recordset")
RsCongres.Open strRequete,Connexion
If RsCongres.Eof Then
If Request.Querystring("Direction")="" Then
%>
Aucun congrès trouvé dans cette spécialité
<%
ElseIf Request.Querystring("Direction")="Précédent" Then
Response.Redirect "Congres_specialite.asp?Action=Afficher&Specialite=" & Request.Querystring("Specialite") & "&Direction=Premier&modeAff=" & Request.Querystring("modeAff")
ElseIf Request.Querystring("Direction")="Suivant" Then
Response.Redirect "Congres_specialite.asp?Action=Afficher&Specialite=" & Request.Querystring("Specialite") & "&Direction=Dernier&modeAff=" & Request.Querystring("modeAff")
End If
Else
'-----------------------------------------------------------------------------------------------------------------
%>
<%
'Mise en forme affichage du Contact #2
If Trim(RsCongres("titre_1"))<>"" Then
varContact1=RsCongres("titre_1")
End If
If Trim(RsCongres("nom_1"))<>"" Then
varContact1=varContact1 & " " & RsCongres("nom_1")
End If
If Trim(RsCongres("prenom_1"))<>"" Then
varContact1=varContact1 & " " & RsCongres("prenom_1")
End If
If Trim(RsCongres("etablissement_1"))<>"" Then
varContact1=varContact1 & " " & " " & RsCongres("etablissement_1")
End If
If Trim(RsCongres("adresse_1"))<>"" Then
varContact1=varContact1 & " " & RsCongres("adresse_1")
End If
If Trim(RsCongres("codeVille_1"))<>"" Then
varContact1=varContact1 & " " & RsCongres("codeVille_1")
End If
If Trim(RsCongres("pays_1"))<>"" Then
varContact1=varContact1 & " " & RsCongres("pays_1")
End If
If Trim(RsCongres("Tel_1"))<>"" Then
varContact1=varContact1 & " " & " " & RsCongres("Tel_1")
End If
If Trim(RsCongres("Fax_1_bis"))<>"" Then
varContact1=varContact1 & " " & RsCongres("Fax_1_bis")
End If
If Trim(RsCongres("mail_1"))<>"" Then
varContact1=varContact1 & " " & RsCongres("mail_1")
End If
'Mise en forme affichage du Contact #2
If Trim(RsCongres("titre_2"))<>"" Then
varContact2=RsCongres("titre_2")
End If
If Trim(RsCongres("nom_2"))<>"" Then
varContact2=varContact2 & " " & RsCongres("nom_2")
End If
If Trim(RsCongres("prenom_2"))<>"" Then
varContact2=varContact2 & " " & RsCongres("prenom_2")
End If
If Trim(RsCongres("etablissement_2"))<>"" Then
varContact2=varContact2 & " " & " " & RsCongres("etablissement_2")
End If
If Trim(RsCongres("adresse_2"))<>"" Then
varContact2=varContact2 & " " & RsCongres("adresse_2")
End If
If Trim(RsCongres("codeVille_2"))<>"" Then
varContact2=varContact2 & " " & RsCongres("codeVille_2")
End If
If Trim(RsCongres("pays_2"))<>"" Then
varContact2=varContact2 & " " & RsCongres("pays_2")
End If
If Trim(RsCongres("Tel_2"))<>"" Then
varContact2=varContact2 & " " & " " & RsCongres("Tel_2")
End If
If Trim(RsCongres("Fax_2_bis"))<>"" Then
varContact2=varContact2 & " " & RsCongres("Fax_2_bis")
End If
If Trim(RsCongres("mail_2"))<>"" Then
varContact1=varContact1 & " " & RsCongres("mail_2")
End If
'-----------------------------------------------------------------------------------------------------------------------------------------
%>
<%=varContact1%>
<%=varContact2%>
<%
'-----------------------------------------------------------------------------------------------------------------
End If
End If
Case "Terminer"
Response.Redirect "Congres_specialite.asp?initiale=" & Request.Querystring("initiale") & "&modeAff=" & Request.Querystring("modeAff")
Case Else
%>