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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
| <html>
<head>
<meta charset="UTF-8">
<title>La compagnie : Liste des Compétences par Ordre Alphabétique</title>
<meta http-equiv="x-ua-compatible" content="IE=9">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div>
<a href="index.hta">Menu principal</a><hr>
<h1>Liste des compétences par Ordre Alphabétique:</h1>
<div id="alphabet">
<SCRIPT language="VBScript">
public strChemin, strCheminCompetence
Sub getChemin
dim rea ,fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set rea = fso.OpenTextFile("cheminBdd.txt",1)
strChemin=rea.readAll
set rea = fso.OpenTextFile("cheminCompetence.txt")
strCheminCompetence=rea.readAll
rea.close
set fso = nothing
End Sub
dim strRequete, majuscule, lettre, objConn, rs, connStr, strCheminFicheCompetence
getChemin
connStr = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & strChemin
Set objConn = CreateObject("ADODB.Connection")
objConn.open connStr
strRequete = "select libelle,IDcompetence from COMPETENCE order by libelle asc"
Set rs = objConn.execute(strRequete)
if rs.eof = false then
rs.movefirst
lettre = UCase(Left(unescape(rs(0)),1))
document.write "<a href=""" & "#" & lettre & """>" & lettre & "</a>"
While Not(rs.EOF)
majuscule = UCase(Left(unescape(rs(0)),1))
if lettre <> majuscule then
document.write "<a href=""" & "#" & majuscule & """>" & majuscule & "</a>"
lettre = majuscule
else
rs.movenext
end if
if not(rs.EOF) then
document.write " "
end if
wend
document.write "</div><hr>"
document.write "<div id=""liste"">"
rs.movefirst
lettre = UCase(Left(unescape(rs(0)),1))
document.write "<div class=""groupe"" id=""" & "#" & UCase(Left(unescape(rs(0)),1)) & """>" & Ucase(lettre) & "</div>"
While Not(rs.EOF)
majuscule = UCase(Left(unescape(rs(0)),1))
if lettre <> majuscule then
document.write "<div class=""groupe"" id=""" & majuscule & """>" & majuscule & "</div>"
lettre = majuscule
end if
strCheminFicheCompetence = strCheminCompetence & "\competence_" & rs(1) & ".html"
document.write "<div class=""detail""><a href=""" & strCheminFicheCompetence & """ target=""_blank"">" & unescape(rs(0)) & "</a></div>"
rs.movenext
wend
document.write "</div>"
else
msgbox "Aucune compétence enregistrée"
end if
rs.close
set rs = nothing
objConn.close
set objConn = nothing
</SCRIPT>
</div>
</body>
</html> |
Partager