1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
| <head runat="server">
<title>Examens</title>
<link rel="stylesheet" href="../css/ExamenAdapte.css" />
</head>
<%
Dim nr, objCommand, objRecordset, objConnection, rsArray, objrootDSE, objDomain, strBase, sname, smail, Valeurs
On Error Resume Next
Const ADS_SCOPE_SUBTREE=2
' Use ADO to search Active Directory.
set objRecordset= CreateObject("ADODB.Recordset")
Set objCommand = CreateObject("ADODB.Command")
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
set objCommand.ActiveConnection = objConnection
objCommand.CommandText = "SELECT displayName,mail FROM 'LDAP://OU=Professeur,DC=nomdomaine,DC=ext1,DC=ext2' WHERE objectCategory='person' ORDER BY displayName ASC"
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
Set objRecordSet = objCommand.Execute
%>
<%
If Not IsEmpty(Request.Form("OK")) Then
If Not (Request.Form("Nom")="") Then
TheMessage = "Nom : " & Request.Form("nom") & _
"Adresse de courriel: " & Request.Form("adresseCourriel") & _
"Titre du cours : " & Request.Form("titreCours") & _
"Date de passation : " & Request.Form("datePassation") & _
"Journée : " & Request.Form("journee") & _
"Heure de début : " & Request.Form("heureDebut") & _
"Heure de fin : " & Request.Form("heureFin") & _
"prof: " & Request.Form("ListeProf")
Set objMail = CreateObject("CDONTS.NewMail")
objMail.Send Request.Form("adresseCourriel"), "moi@monadresse.qc.ca", _
"=-= Examens =-=", cstr(TheMessage)
Set objMail = Nothing
%>
<%'=-=-=-=-=-=affichage apres l'envoi =-=-=-=-=-=-=-=-%>
envoyé
<%else%>
<%'=-=-=-=-=-=affichage si les champs ne sont pas tous remplis =-=-=-=-=-=-=-=-%>
<center>
<p>Veuillez remplir tous les champs obligatoire S.V.P.<br><a href="#" alt="retour" onclick= "window.history.go(-1)">Retour</a></center>
<%End If%>
<%else%>
<%'=-=-=-=-=-=affichage du formulaire =-=-=-=-=-=-=-=-%>
<br><br>
<div id=formExamen>
<P align=left<BR>Formulaire</P>
<br><br>
<div id=formExamenEleve>
<form method="POST" action="../formulaires/f_examensAdaptes.asp"/>
<br>
<FIELDSET id="fsIdentification">
<LEGEND align=top><font-color="#006ba1"> Identification: </font></LEGEND
<br><br><label for="nom">Nom de l'élève:</label>
<input type="text" name="nom" size="80" />
<br><br><label for="adresseCourriel">Adresse courriel:</label>
<input type="text" name="adresseCourriel" size="50" />
<br><br><label for="titreCours">Titre du cours: </label>
<input type="text" name="titreCours" size="50" />
<br><br><label for="datePassation">Date de passation de l'examen:</label>
<br><br><label for="journee">Journée:</label>
<input type="text" name="journee" size="10" maxlength=10/>
<br><br><label for="heureDebut">Heure de début de l'examen:</label>
<input type="text" name="heureDebut" size="13">
<b>et de fin:</b>
<input type="text" name="heureFin" size="13" >
</fieldset>
</div>
<div id=formExamenEnseignant>
<select id="listeProf" name="ListeProf">
<%
Do Until objRecordSet.EOF
sName = objRecordSet.Fields("displayName").Value
sMail=objRecordset.Fields("mail").value
response.write "<option value= '" & smail & "' >" & sName & "</option>"
objRecordSet.MoveNext
Loop
%>
</select>
</div>
<div id=boutonEnvoyer>
<br><input type="submit" value="Envoyer" name="OK">
</form>
</div>
</div>
<%End If%> |
Partager